From c02fdffdec361e7a7f069d3941164d2877896eba Mon Sep 17 00:00:00 2001 From: David Lawrence Miller Date: Tue, 22 Apr 2014 11:37:51 -0400 Subject: [PATCH] example clarification --- R/Distance-package.R | 4 ++-- man/flatfile.Rd | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/R/Distance-package.R b/R/Distance-package.R index c683cba..e2843a3 100644 --- a/R/Distance-package.R +++ b/R/Distance-package.R @@ -80,13 +80,13 @@ NULL #' # Load the Excel file, note that header=FALSE and we add column names after #' minke <- read.xls(minke.filepath, stringsAsFactor=FALSE,header=FALSE) #' names(minke) <- c("Region.Label", "Area", "Sample.Label", "Effort","distance") -#' minke$Effort <- as.numeric(minke$Effort) # overcome problem in R 3.1.0 #' # One may want to call edit(minke) or head(minke) at this point #' # to examine the data format #' #' # Due to the way the file was saved and the default behaviour in R #' # for numbers stored with many decimal places (they are read as strings -#' # rather than numbers, see str(minke)). +#' # rather than numbers, see str(minke)). We must coerce the Effort column +#' # to numeric #' minke$Effort <- as.numeric(minke$Effort) #' #' ## perform an analysis using the exact distances diff --git a/man/flatfile.Rd b/man/flatfile.Rd index 78764dc..1be4db2 100644 --- a/man/flatfile.Rd +++ b/man/flatfile.Rd @@ -46,7 +46,8 @@ names(minke) <- c("Region.Label", "Area", "Sample.Label", "Effort","distance") # Due to the way the file was saved and the default behaviour in R # for numbers stored with many decimal places (they are read as strings -# rather than numbers, see str(minke)). +# rather than numbers, see str(minke)). We must coerce the Effort column +# to numeric minke$Effort <- as.numeric(minke$Effort) ## perform an analysis using the exact distances