Description Usage Arguments Details Value Examples
Read data and capture the file information within dependency object
1 2 | Read(file.name = "data.csv", description = "Data file",
read.fcn = guess.read.fcn(file.name), ...)
|
file.name |
name of file |
description |
description of data file |
read.fcn |
function for reading file |
... |
arguments to read function |
Main fuction for reading file data in projects. Wrapper function for Read.cap, automatically generates file information. Assumes file is in project "Data" directory. Use this in the body of the program. Guesses which function to use to read the file, but user can specify any function that given a file name returns an R object.
object read from file
1 2 3 4 5 6 7 | ## Not run:
source_info <- create_source_file_dir("adaprHome","tree_controller.R")
write.csv(cars,file.path(source_info$data.dir,"test.csv"))
cardata <- Read("test.csv","cars dataframe",as.is=TRUE)
file.remove(file.path(source_info$data.dir,"test.csv"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.