Skip to content

Commit

Permalink
example clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
David Lawrence Miller committed Apr 22, 2014
1 parent f79ac24 commit c02fdff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/Distance-package.R
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion man/flatfile.Rd
Expand Up @@ -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
Expand Down

0 comments on commit c02fdff

Please sign in to comment.