Learn R Programming

fifer (version 1.1)

write.fife: Write a dataset and load the meta-data

Description

Oftentimes the original data matrix is too large to practically read in everytime you want to do analysis. This often means creating a separate file for analysis. Unfortunately, if the original file is changed, the separate file doesn't reflect those changes. read.fife and write.fife both read and write meta-data, then display the original file name for the meta data.

Usage

write.fife(object, newfile, originalfile = NULL, file.type = ".csv",
  row.names = F, fullpath = T, ...)

Arguments

object
An R object to be written as a .csv (or whatever) file.
newfile
The location of the subsetted dataset to be written.
originalfile
The location of the original file that was subsetted.
file.type
The file type to be read. Defaults to .csv.
row.names
Should row names be written? Defaults to FALSE.
fullpath
Should the full path be written to the meta-data? (e.g., "documents/research/datasets/medical_data_ap9_2014.csv"). Defaults to T.
...
Other arguments passed to write.csv.

Details

Technically, read.fife and write.fife don't actually read and write meta-data. Instead, they create (or read) a separate file that has the same name (though different extension) than the subsetted dataset. The extension of the meta data file is .file.

See Also

read.fife