Read: Read data and capture the file information within dependency...

Description Usage Arguments Details Value Examples

Description

Read data and capture the file information within dependency object

Usage

1
2
Read(file.name = "data.csv", description = "Data file",
  read.fcn = guess.read.fcn(file.name), ...)

Arguments

file.name

name of file

description

description of data file

read.fcn

function for reading file

...

arguments to read function

Details

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.

Value

object read from file

Examples

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)  

adapr documentation built on May 1, 2019, 7:05 p.m.