
Convert data.table to csfmt_rts_data_v1 (deprecated)
Source:R/csfmt_rts_v1.R
set_csfmt_rts_data_v1.Rdset_csfmt_rts_data_v1 converts a data.table to csfmt_rts_data_v1 by reference.
csfmt_rts_data_v1 creates a new csfmt_rts_data_v1 (not by reference) from either a data.table or data.frame.
Usage
set_csfmt_rts_data_v1(x, create_unified_columns = TRUE, heal = TRUE)
csfmt_rts_data_v1(x, create_unified_columns = TRUE, heal = TRUE)Value
An extended data.table, which has been modified by reference and returned (invisibly).
No return value, called for side effect of replacing the current data.table with a csfmt_rts_data_v1 in place.
Returns a duplicated csfmt_rts_data_v1.
Smart assignment
csfmt_rts_data_v1 contains the smart assignment feature for time and geography.
When the variables in bold are assigned using :=, the listed variables will be automatically imputed.
location_code:
granularity_geo
country_iso3
isoyear:
granularity_time
isoweek
isoyearweek
season
seasonweek
calyear
calmonth
calyearmonth
date
isoyearweek:
granularity_time
isoyear
isoweek
season
seasonweek
calyear
calmonth
calyearmonth
date
date:
granularity_time
isoyear
isoweek
isoyearweek
season
seasonweek
calyear
calmonth
calyearmonth
Unified columns
csfmt_rts_data_v1 contains 16 unified columns:
granularity_time
granularity_geo
country_iso3
location_code
border
age
sex
isoyear
isoweek
isoyearweek
season
seasonweek
calyear
calmonth
calyearmonth
date
See also
Other csfmt_rts_data:
expand_time_to(),
identify_data_structure(),
remove_class_csfmt_rts_data(),
set_csfmt_rts_data_v2(),
unique_time_series()