show_deprecated_data.Rd
Show the file information for any raw data files which have been deprecated by the release of modified historical data to the NEON API.
show_deprecated_data(
product = NA,
table = NA,
site = NA,
start_date = NA,
end_date = NA,
type = NA,
ext = NA,
timestamp = NA,
release = NA,
dir = neon_dir()
)
A NEON productCode
or list of product codes, see examples.
Include only files matching this table name (or regex pattern). (optional).
4-letter site code(s) to filter on. Leave as NA
to search all.
Download only files as recent as (YYYY-MM-DD
). Leave
as NA
to download up to the most recent available data.
Download only files up to end_date (YYYY-MM-DD
). Leave as
NA
to download all prior data.
Should we prefer the basic or expanded version of this product? Note that not all products have expanded formats.
only match files with this file extension(s)
only match timestamps prior this. See details in neon_index()
.
Should be a datetime POSIXct object (or coerce-able string)
Select only data files associated with a particular release tag, see https://www.neonscience.org/data-samples/data-management/data-revisions-releases, e.g. "RELEASE-2021". Releases are associated with a specific DOI and the promise that files associated with a particular release will not change.
Location where files should be downloaded. By default will
use the appropriate applications directory for your system
(see tools::R_user_dir()
). This default also be configured by
setting the environmental variable NEONSTORE_HOME
, see Sys.setenv or
Renviron.
NEON data files are sometimes updated to correct errors. Old files are
removed from access from the API, but may be present in your local store
from an earlier download. neonstore
stacking functions ([neon_read()]
and neon_store()
) automatically exclude these deprecated files, though
neon_read()
can be instructed to use older files by passing a file list.
A data file is identified as deprecated whenever the local file store contains a second data file with the same product, table, site, month, and position (sensor products only) information, but having an updated timestamp. If such a change occurs in a file with a non-missing "month" code, it may indicate a data file has been updated. This could result in changes to the results of any previous analyses.
Note that metadata files, (readme, variables, positions) are 'pre-stacked': the metadata file in a given product-site-month set contains metadata going back to the start and not just for that month. As a result, each new version deprecates the old metadata file, but the old files are always available from the NEON API and always present in the store. Users will only need to care about the most recent ones, and the presence of old files is no cause for concern. This function will only show data files that have changed, and not metadata files. This can help pinpoint specific altered data.
neon_index, neon_read
# \dontshow{
# Hide setting tempfile, since a user would specify a persistent location
Sys.setenv("NEONSTORE_HOME"=tempfile())
# }
show_deprecated_data()
#> NULL
# \dontshow{
# tidy
Sys.unsetenv("NEONSTORE_HOME")
# }