Learn R Programming

adapr (version 2.0.0)

ReadTrack: Tracks files that read by functions not in adapr and captures the file information within dependency object

Description

Tracks files that read by functions not in adapr and captures the file information within dependency object

Usage

ReadTrack(file.name = "data.csv", description = "Data file")

Arguments

file.name

name of file (vectorized)

description

description of data file (vectorized)

Value

Filepath of file to read

Details

Allows tracking of files read by other functions than Read. Assumes file is in project "Data" directory

Examples

Run this code
# NOT RUN {
 source_info <- create_source_file_dir("adaprHome","tree_controller.R")
write.csv(cars,file.path(source_info$data.dir,"test.csv"))
# Read with any function
temp <- utils::read.csv(file.path(source_info$data.dir,"test.csv"))
ReadTrack("test.csv","cars dataframe")
# Will track the file as though read with Read().
file.remove(file.path(source_info$data.dir,"test.csv"))
# }

Run the code above in your browser using DataLab