R/ITRDB_FUNCTIONS.R
get_itrdb.Rd
get_itrdb
returns a named list of length 3:
'metadata': A data frame or Simple Feature
(if makeSpatial==TRUE
) of the locations
and names of extracted ITRDB chronologies,
'widths': A matrix of tree-ring widths/densities given user selection, and
'depths': A matrix of tree-ring sample depths.
get_itrdb(
template = NULL,
label = NULL,
recon.years = NULL,
calib.years = NULL,
species = NULL,
measurement.type = NULL,
chronology.type = NULL,
raw.dir = paste0(tempdir(), "/FedData/raw/itrdb"),
extraction.dir = ifelse(!is.null(label), paste0(tempdir(),
"/FedData/extractions/itrdb/", label, "/"), paste0(tempdir(),
"/FedData/extractions/itrdb")),
force.redo = FALSE
)
An Simple Feature
or SpatRaster
object to serve as a template for cropping.
If missing,
all available global chronologies are returned.
A character string naming the study area.
A numeric vector of years over which reconstructions are needed; if missing, the union of all years in the available chronologies are given.
A numeric vector of all required years---chronologies without these years will be discarded; if missing, all available chronologies are given.
A character vector of 4-letter tree species identifiers; if missing, all available chronologies are given.
A character vector of measurement type identifiers. Options include:
'Total Ring Density'
'Earlywood Width'
'Earlywood Density'
'Latewood Width'
'Minimum Density'
'Ring Width'
'Latewood Density'
'Maximum Density'
'Latewood Percent'
if missing, all available chronologies are given.
A character vector of chronology type identifiers. Options include:
'ARSTND'
'Low Pass Filter'
'Residual'
'Standard'
'Re-Whitened Residual'
'Measurements Only'
if missing, all available chronologies are given.
A character string indicating where raw downloaded files should be put. The directory will be created if missing.
A character string indicating where the extracted and cropped ITRDB dataset should be put. The directory will be created if missing.
If an extraction already exists, should a new one be created? Defaults to FALSE.
A named list containing the 'metadata', 'widths', and 'depths' data.
if (FALSE) {
# Get the ITRDB records
ITRDB <- get_itrdb(template = FedData::meve, label = "meve", makeSpatial = T)
# Plot the VEP polygon
plot(meve$geometry)
# Map the locations of the tree ring chronologies
plot(ITRDB$metadata, pch = 1, add = T)
legend("bottomleft", pch = 1, legend = "ITRDB chronologies")
}