prism_archive_clean()
'cleans' the prism download data by removing early
and/or provisional data if newer (provisional or stable) data also exist
for the same variable and temporal period. Stable data are newer than
provisional data that are newer than early data; only the newest data are
kept when the "clean" is performed.
del_early_prov()
is a deprecated version of prism_archive_clean()
that
only works for daily data, and does not prompt the user to confirm which
folders should be removed.
prism_archive_clean(
type,
temp_period,
years = NULL,
mon = NULL,
minDate = NULL,
maxDate = NULL,
dates = NULL
)del_early_prov(type, minDate = NULL, maxDate = NULL, dates = NULL)
Invisibly returns vector of all deleted folders.
The type of data you want to subset. Must be "ppt", "tmean", "tmin", "tmax", "tdmean", "vpdmin", or "vpdmax".
The temporal period to subset. Must be "annual", "monthly", "daily", "monthly normals", or "annual normals".
Valid numeric year, or vector of years.
Valid numeric month, or vector of months.
Date to start subsetting daily data. Must be specified in a valid iso-8601 (e.g. YYYY-MM-DD) format. May be provided as either a character or base::Date class.
Date to end subsetting daily data. Must be specified in a valid iso-8601 (e.g. YYYY-MM-DD) format. May be provided as either a character or base::Date class.
A vector of daily dates to subset. Must be specified in a valid iso-8601 (e.g. YYYY-MM-DD) format. May be provided as either a character or base::Date class.
prism_archive_clean()
prompts the user to verify the folders that should be
removed when R is running in interactive mode. Otherwise, all data that are
identified to be older than the newest available data are removed.
Daily data are considered "early" for the current month. The previous six months are provisional data. After six months data are considered stable. Thus early data only exist for daily data, while there can be monthly (and presumably yearly) provisional data.