prism_archive_verify()
checks the data in the prism archive to ensure it
is valid, or at least can be read into R, i.e., it is not corrupt. The
prism variable type, time period, etc. is specified the same as for
prism_archive_subset()
. Any files that are not readable can automatically
be re-downloaded.
check_corrupt()
is the deprecated version of
prism_archive_verify()
prism_archive_verify(
type,
temp_period,
years = NULL,
mon = NULL,
minDate = NULL,
maxDate = NULL,
dates = NULL,
download_corrupt = TRUE,
keepZip = TRUE
)check_corrupt(type, minDate = NULL, maxDate = NULL, dates = NULL)
prism_archive_verify()
returns TRUE
if all data are readable.
Any prism data that are not readable are returned (folder names), whether
they are re-downloaded or not.
check_corrupt()
returns logical
indicating whether the process
succeeded.
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.
If TRUE
, then any unreadable prism data are
automatically re-downloaded.
If TRUE
, leave the downloaded zip files in your
'prism.path', if FALSE
, they will be deleted.
Under the hood, it uses raster::stack()
and then raster::rasterToPoints()
to determine if the bil files are readable. If both those files are able
to successfully read the files, they are assumed to be valid/readable.