read_rwl.RdImport raw ring-width measurements from the ITRDB
read_rwl(dir.src, rwl)A list with two elements:
header: a table containing site-level metadata
rwl: a table containing raw ring-width measurements
The International Tree-Ring Data Bank (ITRDB) is maintained by the NOAA National Centers for Environmental Information (NCEI) as part of the World Data Service for Paleoclimatology. See: https://www.ncei.noaa.gov/products/paleoclimatology/tree-ring
Raw ring-width measurement files (`.rwl`) distributed through the ITRDB follow the *Tucson fixed-width format*. In this convention, header records encode site-level metadata (e.g., site identifier, site name, species code, geographic information, and temporal coverage), followed by ring-width measurements stored in a decadal layout (ten annual values per line).
Record 1
Columns 1–6: Site ID
Columns 10–61: Site name
Columns 62–65: Species code
Optional ID fields
Record 2
Columns 1–6: Site ID
Columns 10–22: State / country
Columns 23–30: Species
Columns 41–45: Elevation
Columns 48–57: Latitude–longitude
Columns 62–63: Measurement type code
Columns 68–76: First and last year
Latitude–longitude values are expressed in degrees and minutes (`ddmm` or `dddmm`).
Record 3
Columns 1–6: Site ID
Columns 10–72: Investigators
Columns 73–80: Optional completion date
## Online example (not run to avoid timeout and internet dependency)
# \donttest{
dir.src <- "https://www.ncei.noaa.gov/pub/data/paleo/treering/measurements/northamerica/canada"
rwl <- "cana615.rwl"
dt.rwl <- read_rwl(dir.src, rwl)
#> reading cana615.rwl
# }
## Local example using packaged data
file <- system.file("extdata", "cana615.rwl", package = "growthTrendR")
stopifnot(file != "")
dir.src <- dirname(file)
rwl <- basename(file)
dt.rwl <- read_rwl(dir.src, rwl)
#> reading cana615.rwl