Read and write rezrDF
s as CSV files
rw.Rd
Replacement of readr readr::read_csv()
and readr::write_csv()
, but contains added functionality for dealing with rezrDF
s more easily.
Arguments
- df
The
rezrDF
to be exported.- path
The path from which a CSV is to be imported / exported.
- inclCols
Columns to be included from the import / export.
- exclCols
Columns to be excluded from the import / export.
- ...
Arguments passed onto
readr::read_csv()
andreadr::write_csv()
- origDF
The
rezrDF
that originally produced this CSV, used to identify data types of the columns.- lubridate
Are you using the lubridate package?
Value
For rez_read_csv()
, a data.frame for the CSV being imported. This is NOT a rezrDF
, so please do not assign it to a rezrObj
; use updateFromDF()
to update an existing rezrDF with the imported data.frame.
Note
Includes a UTF-8 byte mark by default, so you can open the CSV directly in Excel. Whenever you export a .csv with the intention of importing it back, you must export the id
column so that the resulting table can be merged back.
Examples
#rez_write_csv(sbc007$trackDF$default, "rez007_refexpr.csv", c("id", "tokenOrderLast", "text", "name"))
inpath = system.file("extdata", "rez007_refexpr_edited.csv", package = "rezonateR")
changeDF = rez_read_csv(inpath, origDF = rez007$trackDF$default)