compress: Compresses a dataframe to make more efficient use of...

Description Usage Arguments Value

Description

Converts date variables in a dataframe to integers Integers represent time in days from the supplied origin Converts specified numeric values to integer This function is useful for keeping file sizes down and is used by the to_stata command to save to Stata files.

Usage

1
2
3
compress(dat, origin = "1970-01-01", format = "%Y-%m-%d",
  date_fields = c("eventdate", "sysdate", "lcd", "uts", "frd", "crd", "tod",
  "deathdate"), integer_fields = c("yob", "practid"))

Arguments

dat

a dataframe

origin

ISO string representation of the dat of origin. default is UNIX start date

format

character: format of the date string. Default is ISO standard

date_fields

character vector of column names representing dates

integer_fields

character vector of column names that should be integers

Value

dataframe


rEHR documentation built on Jan. 23, 2017, 1 p.m.

Related to compress in rEHR...