Filter to a given vintage of hub target data and drop the as_of
column.
Source: R/hub_utils.R
hub_target_data_as_of.Rd
This function succeeds silently on unvintaged target data tables
provided the user requests the latest available data. Otherwise,
it raises an error when the data set is not vintaged. It is designed
to work either with concrete dataframes or with the lazy API Arrow
datasets returned by hubData::connect_target_timeseries()
and
hubData::connect_target_oracle_output()
. In the arrow case, it
will not execute the query (i.e. you must still call dplyr::collect()
or similar to instantiate the results.
Arguments
- hub_target_data
Table of hub target data to filter
- as_of
As of date to filter to, as an object coercible by
as.Date()
, or "latest" to filter to the most recent available vintage. Default"latest"
.- .drop
Drop the
as_of
column once the dataset has been filtered to a specific vintage? DefaultTRUE
.