Learn R Programming

adapr (version 1.0.1)

Write: Write object and capture file information

Description

Write object and capture file information

Usage

Write(obj = NULL, file.name = "data.csv", description = "Result file", write.fcn = guess.write.fcn(file.name), date = FALSE, ...)

Arguments

obj
object to write
file.name
file to write to the source "Result" directory
description
describes object to write
write.fcn
function for writing file of object type
date
logical for adding date to filename
...
arguments passed to write.fcn

Value

File information list

Examples

Run this code
## Not run: 
# # Within an R script:
# source_info <- create_source_file_dir("adaprHome","tree_controller.R")
# # Inside R script body:
# write.csv(cars,file.path(source_info$results.dir,"test.csv"))
# Write(cars,"cars.csv","cars dataframe")
# # To examine effect:
# showResults()  
# ## End(Not run) 

Run the code above in your browser using DataLab