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

Description Usage Arguments Details Value Examples

View source: R/Read.R

Description

Read data and capture the file information within dependency object

Usage

1
2
3
4
5
6
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)  

gelfondjal/adapr documentation built on Feb. 2, 2020, 1:32 a.m.