write_rcsv: write_rcsv

Description Usage Arguments Details

Description

an extension of the csv file format

Usage

1
2
3
4
5
6
write_rcsv(input, file, strings.convert = FALSE,
  strings.as.factor.ints = strings.convert,
  factors.as.ints = strings.convert, dates.as.ints = strings.convert,
  posix.as.num = strings.convert, times.as.num = strings.convert,
  ITimes.as.ints = strings.convert, logical.convert = strings.convert,
  notes = attr(input, "notes"))

Arguments

input

a data.table or data.frame object to write out

file

file path to which the rscv will be written

strings.convert

global switching of storage conversion types

strings.as.factor.ints

logical, convert strings to factors, and write to file as integer. May save space on disk

factors.as.ints

logical, write factor columns to file as integer, with "levels" stored in a header object. May save space on disk

dates.as.ints

logical, write date columns to file as integer, with "tz" stored in a header object, and origin assumed to be "1970-01-01". May save space on disk

posix.as.num

logical, write POSIXct columns to file as numeric, with "tz" stored in a header object, and origin assumed to be "1970-01-01 00:00:00". May save space on disk

times.as.num

logical, write 'chron::times' columns to file as numeric. Allows for sub-second precision to be stored, as opposed to converting times to character, therefore only storing precision to seconds

ITimes.as.ints

logical, write 'ITime' columns to file as integers. May save space on disk

logical.convert

one of "int"/TRUE to store as integers, "short" to shorten to "T" or "F", or "long"/FALSE to leave unchanged. May save space on disk

notes

single line of text. Add notes to the dataset. Will be displayed in the console when data is impoted by 'read_rcsv', and stored in the imported data frame as an attribute "notes". By default, any existing "notes" attribute is stored here.

Details

write out an rcsv file, an extension of csv, with column format details stored in a header for more consistent reading into R


rossholmberg/rcsv documentation built on May 27, 2019, 11:36 p.m.