diff --git a/R/getDataFromFile.r b/R/getDataFromFile.r index edc87ab6a02f2ce7e015828cdf0e64cb88f6efaf..ac85f8829278ec9584efbcd43d52fd0a84b2b751 100644 --- a/R/getDataFromFile.r +++ b/R/getDataFromFile.r @@ -14,9 +14,10 @@ #' @examples #' # Examples of how to use getDataFromFile: #' # Change the file path and file name to something meaningful: -#' filePath <- '~/RData/' # Sample format +#' filePath <- system.file("extdata", package="dataRetrieval") +#' filePath <- paste(filePath,"/",sep="") #' fileName <- 'ChoptankRiverFlow.txt' -#' \dontrun{getDataFromFile(filePath,fileName, separator="\t")} +#' getDataFromFile(filePath,fileName, separator="\t") getDataFromFile <- function (filePath,fileName,hasHeader=TRUE,separator=","){ totalPath <- paste(filePath,fileName,sep=""); tmp <- read.delim(