View source: R/delete_time_series.R
db_ts_trim_history | R Documentation |
Removes any vintages of the given time series that are older than a specified date.
db_ts_trim_history(con, ts_keys, older_than, schema = "timeseries")
con |
RPostgres connection object. |
ts_keys |
character vector of time series identifiers. |
older_than |
Date cut off point |
schema |
character name of the database schema. Defaults to 'timeseries' |
In some cases only the last few versions of time series are of interest. This function can be used to trim off old vintages that are no longer relevant.
Other time series functions:
db_collection_read_ts()
,
db_dataset_read_ts()
,
db_ts_delete_latest_version()
,
db_ts_delete()
,
db_ts_get_last_update()
,
db_ts_read_history()
,
db_ts_read()
,
db_ts_store()
## Not run: # Store different versions of the time series data ch.kof.barometer <- kof_ts["baro_2019m11"] names(ch.kof.barometer) <- c("ch.kof.barometer") db_ts_store( con = connection, ch.kof.barometer, valid_from = "2019-12-01", schema = "schema" ) ch.kof.barometer <- kof_ts["baro_2019m12"] names(ch.kof.barometer) <- c("ch.kof.barometer") db_ts_store( con = connection, ch.kof.barometer, valid_from = "2020-01-01", schema = "schema" ) db_ts_trim_history( con = connection, ts_keys = "ch.kof.barometer", older_than = "2019-12-31", schema = "schema" ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.