Title: | Estimate, report and combine felling dates of historical tree-ring series |
---|---|
Description: | fellingdater is an R package that aims to facilitate the analysis and interpretation of tree-ring data from wooden cultural heritage objects and structures. The package standardizes the process of computing and combining felling date estimates, both for individual and groups of related tree-ring series. |
Authors: | Kristof Haneca [aut, cre, cph]
|
Maintainer: | Kristof Haneca <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.0.2 |
Built: | 2024-08-20 05:15:52 UTC |
Source: | https://github.com/ropensci/fellingdater |
Sapwood data set for Western Sweden published by Bräthen in 1982.
Brathen_1982
Brathen_1982
A tibble of 2 variables:
number of sapwood rings
number of times n_sapwood was observed
sample size = 69 observations
Bräthen A. 1982. A tree-ring chronology from the western part of Sweden. Sapwood and a dating problem, in: Hackens T., Mejdahl V. (Eds.), Second Nordic Conference on the Application of Scientific Methods in Archaeology, PACT 7(1). pp. 27–35.
sw_data_info("Brathen_1982") sw_model("Brathen_1982", plot = TRUE)
sw_data_info("Brathen_1982") sw_model("Brathen_1982", plot = TRUE)
This function calculates common correlation values between dated
tree-ring series (x
) and a set of reference chronologies (y
). When no
master chronologies are provided, each series in x is compared to all other
series in x.
Only values are reported for pairs of series with a common overlap >= min_overlap.
The correlation values computed include:
glk: 'Gleichläufigkeit' or 'percentage of parallel variation' (Buras & Wilmking 2015; Eckstein & Bauch 1969; Huber 1942; Visser 2020)
glk_p: significance level associated with the glk-value (Jansma 1995)
r_pearson: the Pearson's correlation coefficient
t_St: Student's t-value
t_BP: t-values according to the Baillie & Pilcher (1973) algorithm
t_Ho: t-values according to the Hollstein (1980) algorithm
cor_table( x, y = NULL, min_overlap = 50, remove_duplicates = TRUE, output = "table", sort_by = "t_Ho" )
cor_table( x, y = NULL, min_overlap = 50, remove_duplicates = TRUE, output = "table", sort_by = "t_Ho" )
x |
A |
y |
A |
min_overlap |
A |
remove_duplicates |
A logical value. If |
output |
The desired output format, either "matrix" or "table" (default). |
sort_by |
The correlation value by which the output is sorted for each
series in |
This function computes various correlation values between tree-ring series in
a data.frame
x
and a set of reference chronologies in a data.frame
y
.
If y
is not provided, it compares each series in x
to all other series in
'x.
The function returns a list of correlation matrices if output
is
set to "matrix." If output
is set to "table," it returns a data.frame
reporting all correlation values.
Baillie, M.G.L., Pilcher, J.R. (1973) A simple crossdating program for tree-ring research. Tree-Ring Bulletin 33, 7–14. http://hdl.handle.net/10150/260029
Buras, A. and Wilmking, M. (2015) Correcting the calculation of Gleichläufigkeit, Dendrochronologia 34, 29-30. https://doi.org/10.1016/j.dendro.2015.03.003
Eckstein, D. and Bauch, J. (1969) Beitrag zur Rationalisierung eines dendrochronologischen Verfahrens und zur Analyse seiner Aussagesicherheit. Forstwissenschaftliches Centralblatt, 88(1), 230-250.
Huber, B. (1943) Über die Sicherheit jahrringchronologischer Datierung. Holz als Roh- und Werkstoff 6, 263-268. https://doi.org/10.1007/BF02603303
Hollstein E. (1980) Mitteleuropäische Eichenchronologie. Trierer dendrochronologische Forschungen zur Archäologie und Kunstgeschichte, Trierer Grabungen und Forschungen 11, Mainz am Rhein.
Jansma, E. (1995) RemembeRINGs; The development and application of local and regional tree-ring chronologies of oak for the purposes of archaeological and historical research in the Netherlands, Nederlandse Archeologische Rapporten 19, Rijksdienst voor het Oudheidkundig Bodemonderzoek, Amersfoort. https://dspace.library.uu.nl/handle/1874/45149
Schweingruber, F. H. (1988) Tree rings: basics and applications of dendrochronology, Kluwer Academic Publishers, Dordrecht, Netherlands, 276 p.
Visser, R.M. (2020) On the similarity of tree-ring patterns: Assessing the influence of semi-synchronous growth changes on the Gleichläufigkeit for big tree-ring data sets, Archaeometry 63, 204-215. https://doi.org/10.1111/arcm.12600
# example code Doel1 <- system.file("extdata", "DOEL1.fh", package = "fellingdater") Doel1_trs <- read_fh(Doel1, verbose = FALSE) # crossdating ring-width series from Doel 1 against each other: cor_results <- cor_table(Doel1_trs, output = "table", min_overlap = 80, sort_by = "t_Ho", remove_duplicates = TRUE) head(cor_results,20)
# example code Doel1 <- system.file("extdata", "DOEL1.fh", package = "fellingdater") Doel1_trs <- read_fh(Doel1, verbose = FALSE) # crossdating ring-width series from Doel 1 against each other: cor_results <- cor_table(Doel1_trs, output = "table", min_overlap = 80, sort_by = "t_Ho", remove_duplicates = TRUE) head(cor_results,20)
This function reports the felling date estimate of individual tree-ring series, based on the presence/absence of sapwood and/or waney edge. There are three possible modes of reporting:
a terminus post quem or earliest possible felling date: when only heartwood rings have been observed and measured
a felling date range or interval: when sapwood rings have been recorded, but no bark or waney edge is present.
an exact felling date: when bark or waney edge is present on the measured sample.
Reports the lower and upper boundaries of a felling date range for individual tree-ring series.
fd_report( x, series = "series", last = "last", n_sapwood = "n_sapwood", waneyedge = "waneyedge", sw_data = "Hollstein_1980", cred_mass = 0.954, densfun = "lognormal" )
fd_report( x, series = "series", last = "last", n_sapwood = "n_sapwood", waneyedge = "waneyedge", sw_data = "Hollstein_1980", cred_mass = 0.954, densfun = "lognormal" )
x |
Name of a
A column describing the sapwood data set to be used for modelling and the computation of the hdi can be provided as well. |
series |
Name of the column in |
last |
Name of the column in |
n_sapwood |
Name of the column in |
waneyedge |
Name of the column in |
sw_data |
There are two options:
|
cred_mass |
A |
densfun |
Name of the density function fitted to the sapwood data set. Should be one of:
|
A data.frame reporting the estimate of the felling date for each tree-ring series?
sw_interval()
, sw_data_overview()
, sw_interval_plot()
tmp <- data.frame(id = c("aaa", "bbb", "ccc"), swr = c(10, 11, 12), waneyedge = c(FALSE, FALSE,TRUE), end = c(10, 0, -10)) fd_report(tmp, series = "id", n_sapwood = "swr", last = "end", sw_data = "Wazny_1990") # Example with different sw_model for individual series sw_models_for_indiv_series <- c("Sohar_2012_ELL_c", "Wazny_1990", "Hollstein_1980", "vanDaalen_Norway", "vanDaalen_Norway") trs_example2_edit <- cbind(trs_example2, "sw_models" = sw_models_for_indiv_series) fd_report(trs_example2_edit, sw_data = "sw_models" )
tmp <- data.frame(id = c("aaa", "bbb", "ccc"), swr = c(10, 11, 12), waneyedge = c(FALSE, FALSE,TRUE), end = c(10, 0, -10)) fd_report(tmp, series = "id", n_sapwood = "swr", last = "end", sw_data = "Wazny_1990") # Example with different sw_model for individual series sw_models_for_indiv_series <- c("Sohar_2012_ELL_c", "Wazny_1990", "Hollstein_1980", "vanDaalen_Norway", "vanDaalen_Norway") trs_example2_edit <- cbind(trs_example2, "sw_models" = sw_models_for_indiv_series) fd_report(trs_example2_edit, sw_data = "sw_models" )
fellingdater is an R package that facilitate the analysis and interpretation of tree-ring data from wooden cultural heritage objects and structures. The package standardizes the process of computing and combining felling date estimates (fd), derived from the observed number of sapwood rings (sw), both for individual and groups of related tree-ring series.
https://hanecakr.github.io/fellingdater/index.html/
Maintainer: Kristof Haneca [email protected] (ORCID) [copyright holder]
Other contributors:
Koen Van Daele (ORCID) [contributor]
Ronald Visser (ORCID) [contributor]
Antonio Jesus Pérez-Luque (ORCID) [reviewer]
Nicholas John Tierney (ORCID) [reviewer]
It's main functions are:
This function reports the HEADER fields from a Heidelberg format
(.fh) ring-width file. The header fields are harvested from the .fh-file by
the read_fh()
function, which stores the HEADER fields from the .fh file
as attributes of the data.frame
with the measurement data it returns.
fh_header(x)
fh_header(x)
x |
The output of |
A data.frame
with 29 header fields.
Doel1 <- system.file("extdata", "DOEL1.fh", package = "fellingdater") Doel1_trs <- read_fh(Doel1, verbose = FALSE) fh_header(Doel1_trs)
Doel1 <- system.file("extdata", "DOEL1.fh", package = "fellingdater") Doel1_trs <- read_fh(Doel1, verbose = FALSE) fh_header(Doel1_trs)
This function returns a matrix with 'upper' and 'lower' limits
of the hdi (highest density interval), and the associated probability 'p'.
The function first sorts the input data.frame
- with columns 'n_sapwood´
and 'p' (the associated probability) - by column 'p' in decreasing order
and then it calculates the HDI by finding the first value of the sorted
probabilities higher than the specified cred_mass.
It then finds the
indices of the values that are greater than or equal to this threshold, and
uses these indices to find the 'upper' and 'lower' limits of the hdi.
The function also calculates the probability of the interval. The final
result is returned as a matrix
with 'lower', 'upper', and 'p' values.
This function is applied in functions sw_model and sw_interval.
hdi(x, a = "n_sapwood", b = "p", cred_mass = 0.954)
hdi(x, a = "n_sapwood", b = "p", cred_mass = 0.954)
x |
A |
a |
The name of the column in x that lists the number of sapwood rings. |
b |
The name of the column in x that lists the the associated probability of having n sapwood rings. |
cred_mass |
A |
A matrix
with ´upper´ and ´lower´ limits of the hdi, and the
associated probability ´p´.
tmp <- data.frame(n_sapwood = seq(1,30, 1), p = dnorm(seq(1,30, 1), 15, 5)) hdi(tmp, cred_mass = 0.954)
tmp <- data.frame(n_sapwood = seq(1,30, 1), p = dnorm(seq(1,30, 1), 15, 5)) hdi(tmp, cred_mass = 0.954)
Sapwood data set for South and Central Germany published by Hollstein in 1980.
Hollstein_1980
Hollstein_1980
A tibble of 2 variables:
number of sapwood rings
number of times n_sapwood was observed
sample size = 490 observations
Hollstein E. 1980. Mitteleuropäische Eichenchronologie: Trierer dendrochronologische Forschungen zur Archäologie und Kunstgeschichte, Trierer Grabungen und Forschungen. Verlag Phillipp von Zabern, Mainz am Rhein.
sw_data_info("Hollstein_1980") sw_model("Hollstein_1980", plot = TRUE)
sw_data_info("Hollstein_1980") sw_model("Hollstein_1980", plot = TRUE)
Sapwood data set for the Northern Midland counties (U.K.) - Cheshire, Staffordshire, West Midlands, Northamptonshire, Cambridgeshire, and everything to the north - published by Miles in 1997.
Miles_1997_NM
Miles_1997_NM
A tibble of 2 variables:
number of sapwood rings
number of times n_sapwood was observed
sample size = 295 observations
Miles D. 1997. The interpretation, presentation and use of tree-ring dates. Vernacular architecture 28, 40–56. https://doi.org/10.1179/030554797786050563
sw_data_info("Miles_1997_NM") sw_model("Miles_1997_NM", plot = TRUE)
sw_data_info("Miles_1997_NM") sw_model("Miles_1997_NM", plot = TRUE)
Sapwood data set for the Southern counties (U.K.), up to and including Gloucestershire, Warwickshire, Bedfordshire, Suffolk and Norfolk, published by Miles in 1997.
Miles_1997_SC
Miles_1997_SC
A tibble of 2 variables:
number of sapwood rings
number of times n_sapwood was observed
sample size = 406 observations
Miles D. 1997. The interpretation, presentation and use of tree-ring dates. Vernacular architecture 28, 40–56. https://doi.org/10.1179/030554797786050563
sw_data_info("Miles_1997_SC") sw_model("Miles_1997_SC", plot = TRUE)
sw_data_info("Miles_1997_SC") sw_model("Miles_1997_SC", plot = TRUE)
Sapwood data set for Wales and border counties (U.K.), Shropshire, Hereford and Worcesterthe, published by Miles in 1997.
Miles_1997_WBC
Miles_1997_WBC
A tibble of 2 variables:
number of sapwood rings
number of times n_sapwood was observed
sample size = 219 observations
Miles D. 1997. The interpretation, presentation and use of tree-ring dates. Vernacular architecture 28, 40–56. https://doi.org/10.1179/030554797786050563
sw_data_info("Miles_1997_WBC") sw_model("Miles_1997_WBC", plot = TRUE)
sw_data_info("Miles_1997_WBC") sw_model("Miles_1997_WBC", plot = TRUE)
This vectorized function computes a running mean/moving average over a continuous (time) series with a specified window width.
mov_av(x, w = 11, align = "center", edges = "fill")
mov_av(x, w = 11, align = "center", edges = "fill")
x |
A |
w |
The width of the moving average window. When |
align |
The alignment of the window relative to the current data point. It can be one of:
|
edges |
Defines how values are computed at the start and end of the series. Options are:
|
A numeric
vector of the same length of x
with the computed
running mean values.
num_vec <- sample(seq(50, 100, 1), 100, replace = TRUE) filtered <- mov_av(num_vec, w = 5, align = "center", edges = "nofill") plot(num_vec, type = "l") lines(filtered, col = "darkblue")
num_vec <- sample(seq(50, 100, 1), 100, replace = TRUE) filtered <- mov_av(num_vec, w = 5, align = "center", edges = "nofill") plot(num_vec, type = "l") lines(filtered, col = "darkblue")
Sapwood data set for northern France , published by Pilcher in 1987.
Pilcher_1987
Pilcher_1987
A tibble of 2 variables:
number of sapwood rings
number of times n_sapwood was observed
sample size = 219 observations
Pilcher J.R. 1987. A 700 year dating chronology for northern France. Applications of tree-ring studies. Current research in dendrochronology and related subjects. BAR International Series 333, 127–139.
sw_data_info("Pilcher_1987") sw_model("Pilcher_1987", plot = TRUE)
sw_data_info("Pilcher_1987") sw_model("Pilcher_1987", plot = TRUE)
This function reads a Heidelberg format file (.fh) containing
ring width data and returns the HEADER fields as attributes of the
data.frame
´with the measurement data.
The Heidelberg file format is described in detail here: https://www.treeringsociety.org/resources/SOM/Brewer_Murphy_SupplementaryMaterial.pdf
read_fh(fname, BC_correction = FALSE, verbose = TRUE, header = FALSE)
read_fh(fname, BC_correction = FALSE, verbose = TRUE, header = FALSE)
fname |
A |
BC_correction |
A |
verbose |
A |
header |
A |
This function reads .fh file with ring width data in either block
(decadal format) or column format (e.g., with comment flags) as used by
TSAP program. The function is also capable of reading chronologies or
half-chronos in decadal format. The read_fh
function is case-insensitive.
Information found in the HEADER fields is listed as attributes of the
data.frame
´with the measurement data. .
The header fields harvested from the .fh file include:
"Project", "FirstMeasurementDate", "Location", "Town", "Street", "Client", "Longitude", "Latitude", "DateOfSampling", "FirstMeasurementDate", "SapWoodRings", "Comment", "MissingRingsAfter", "InvalidRingsAfter", "MissingringsBefore", "DeltaMissingringsBefore", "ChronoMemberKeycodes", "PersId"
If header
is TRUE, a data.frame is returned with HEADER fields as
attributes. If header
is FALSE, a data.frame
of class rwl
with
ring-width measurements in columns is returned, with (calendar) years as
row names.'
The original read.fh()
function is part of the dplR package
(https://github.com/opendendro/dplR) and was developed by Christian Zang,
with new features and patches contributed by Mikko Korpela and Ronald
Visser. This read_fh()
function expands the functionalities of the
original dplR::read.fh()
.
This function is an extension of read.fh()
from the dplR
package (https://github.com/opendendro/dplR), developed and maintained
by Prof. dr. Andy Bunn (Bunn 2008, Bunn 2010, Bunn et al. 2022) on
https://opendendro.org/.
Doel1 <- system.file("extdata", "DOEL1.fh", package = "fellingdater") Doel1_trs <- read_fh(Doel1, verbose = FALSE) head(Doel1_trs, 10) Doel1_header <- read_fh(Doel1, verbose = FALSE, header = TRUE) Doel1_header
Doel1 <- system.file("extdata", "DOEL1.fh", package = "fellingdater") Doel1_trs <- read_fh(Doel1, verbose = FALSE) head(Doel1_trs, 10) Doel1_header <- read_fh(Doel1, verbose = FALSE, header = TRUE) Doel1_header
Sapwood data set for Eastern Estonia, Latvia, Lithuania, published by Sohar et al. in 2012.
Sohar_2012_ELL_c
Sohar_2012_ELL_c
A tibble of 2 variables:
number of sapwood rings
number of times n_sapwood was observed
sample size = 562 observations !!! sapwood determined by _color_
Sohar K., Vitas A. & Läänelaid A. 2012. Sapwood estimates of pedunculate oak (Quercus robur L.) in eastern Baltic, Dendrochronologia 30.1, 49–56. https://doi.org/10.1016/j.dendro.2011.08.001
sw_data_info("Sohar_2012_ELL_c") sw_model("Sohar_2012_ELL_c", plot = TRUE)
sw_data_info("Sohar_2012_ELL_c") sw_model("Sohar_2012_ELL_c", plot = TRUE)
Sapwood data set for Eastern Estonia, Latvia, Lithuania, published by Sohar et al. in 2012.
Sohar_2012_ELL_t
Sohar_2012_ELL_t
A tibble of 2 variables:
number of sapwood rings
number of times n_sapwood was observed
sample size = 533 observations !!! sapwood determined by presence of _tyloses_
Sohar K., Vitas A. & Läänelaid A. 2012. Sapwood estimates of pedunculate oak (Quercus robur L.) in eastern Baltic, Dendrochronologia 30.1, 49–56. https://doi.org/10.1016/j.dendro.2011.08.001
sw_data_info("Sohar_2012_ELL_t") sw_model("Sohar_2012_ELL_t", plot = TRUE)
sw_data_info("Sohar_2012_ELL_t") sw_model("Sohar_2012_ELL_t", plot = TRUE)
Sapwood data set for Southern Finland and western Estonia, published by Sohar et al. in 2012.
Sohar_2012_FWE_c
Sohar_2012_FWE_c
A tibble of 2 variables:
number of sapwood rings
number of times n_sapwood was observed
sample size = 98 observations !!! sapwood determined by _color_
Sohar K., Vitas A. & Läänelaid A. 2012. Sapwood estimates of pedunculate oak (Quercus robur L.) in eastern Baltic, Dendrochronologia 30.1, 49–56. https://doi.org/10.1016/j.dendro.2011.08.001
sw_data_info("Sohar_2012_FWE_c") sw_model("Sohar_2012_FWE_c", plot = TRUE)
sw_data_info("Sohar_2012_FWE_c") sw_model("Sohar_2012_FWE_c", plot = TRUE)
Sapwood data set for Southern Finland and western Estonia, published by Sohar et al. in 2012.
Sohar_2012_FWE_t
Sohar_2012_FWE_t
A tibble of 2 variables:
number of sapwood rings
number of times n_sapwood was observed
sample size = 97 observations !!! sapwood determined by the presence of _tyloses_
Sohar K., Vitas A. & Läänelaid A. 2012. Sapwood estimates of pedunculate oak (Quercus robur L.) in eastern Baltic, Dendrochronologia 30.1, 49–56. https://doi.org/10.1016/j.dendro.2011.08.001
sw_data_info("Sohar_2012_FWE_t") sw_model("Sohar_2012_FWE_t", plot = TRUE)
sw_data_info("Sohar_2012_FWE_t") sw_model("Sohar_2012_FWE_t", plot = TRUE)
This function assesses whether it is possible to combine multiple sapwood estimates into a single felling date range.
sw_combine( x, series = "series", last = "last", n_sapwood = "n_sapwood", waneyedge = "waneyedge", sw_data = "Hollstein_1980", densfun = "lognormal", cred_mass = 0.954, hdi = TRUE, plot = FALSE )
sw_combine( x, series = "series", last = "last", n_sapwood = "n_sapwood", waneyedge = "waneyedge", sw_data = "Hollstein_1980", densfun = "lognormal", cred_mass = 0.954, hdi = TRUE, plot = FALSE )
x |
A |
series |
Name of the column in |
last |
Name of the column in |
n_sapwood |
Name of the column in |
waneyedge |
Name of the column in |
sw_data |
The name of the sapwood data set to use for modelling. It
should be one of the data sets listed in |
densfun |
Name of the density function fitted to the sapwood data set. Should be one of:
|
cred_mass |
A |
hdi |
A |
plot |
A |
Depends on the value of plot. If TRUE
a ggplot-style is returned,
when FALSE
a list
with the combined probability ($raw_data$comb),
the modelling parameters ($sapwood_data, $sapwood_model, $cred_mass),
the Highest Posterior Density Interval for combined combined felling date
interval ($hdi_combine), and the Agreement indices for the model ($A_model)
and individual series ($individual_series$agr_index).
The rationale of the agreement index is outlined by Bronk Ramsey (1995; 2009)
Bronk Ramsey, C. (1995) Radiocarbon calibration and analysis of stratigraphy: the OxCal program. Radiocarbon 37, 425–430. https://doi.org/10.1017/S0033822200030903
Bronk Ramsey, C. (2009) Bayesian analysis of radiocarbon dates. Radiocarbon 51, 337–360. https://doi.org/10.1017/S0033822200033865
# a data set in which all series have preserved sapwood sw_combine(trs_example1, plot = TRUE) # a data set in which one series has an exact felling date (= waney edge preserved) trs_example2 sw_combine(trs_example2, plot = TRUE) # a data set in which multiples series have an exact felling date trs_example3 sw_combine(trs_example3, plot = FALSE)
# a data set in which all series have preserved sapwood sw_combine(trs_example1, plot = TRUE) # a data set in which one series has an exact felling date (= waney edge preserved) trs_example2 sw_combine(trs_example2, plot = TRUE) # a data set in which multiples series have an exact felling date trs_example3 sw_combine(trs_example3, plot = FALSE)
sw_combine()
This function plots the result of sw_combine()
and the
interval for, or the exact felling date of, a group of tree-ring series,
with agreement indices for the global model.
sw_combine_plot(x)
sw_combine_plot(x)
x |
Output of |
A ggplot-style graph, with calendar years on the X-axis and the probability (p) on the Y-axis. Dots represent exact felling dates.
trs_example2 tmp <- sw_combine(trs_example2) sw_combine_plot(tmp)
trs_example2 tmp <- sw_combine(trs_example2) sw_combine_plot(tmp)
This function returns more information on a sapwdood data set. It lists the correct citation for the data set, the area the data set is supposed to represent, the number of observations and summary stats of the raw data.
sw_data_info(x = NULL)
sw_data_info(x = NULL)
x |
The name of a sapwood data set. you can use |
A list
with the following components:
data
: the name of the data set,
citation
: the correct citation for the data set,
area
: the area represented by the data set,
n_observations
: the number of observations in the data set and,
summary_raw_data
: summary stats of the raw data.
# Get detailed information on a sapwood data set sw_data_info("Hollstein_1980") # Retrieve the citation for a specific data set sw_data_info("Sohar_2012_FWE_c")$citation
# Get detailed information on a sapwood data set sw_data_info("Hollstein_1980") # Retrieve the citation for a specific data set sw_data_info("Sohar_2012_FWE_c")$citation
fellingdater
packageThis function provides an overview of the available sapwood data
sets and models within the fellingdater
package.
sw_data_overview()
sw_data_overview()
A character
vector with the names of all available data sets with
sapwood counts in the fellingdater
package.
# Get an overview of available sapwood data sets sw_data_overview()
# Get an overview of available sapwood data sets sw_data_overview()
This function computes the probability density function (PDF) and the highest posterior density interval (hdi) of the felling date range based on the observed number of sapwood rings, their chronological dating, and the selected sapwood data and model.
sw_interval( n_sapwood = NA, last = 1, hdi = FALSE, cred_mass = 0.954, sw_data = "Hollstein_1980", densfun = "lognormal", plot = FALSE )
sw_interval( n_sapwood = NA, last = 1, hdi = FALSE, cred_mass = 0.954, sw_data = "Hollstein_1980", densfun = "lognormal", plot = FALSE )
n_sapwood |
A |
last |
A |
hdi |
A |
cred_mass |
A |
sw_data |
The name of the sapwood data set to use for modelling. It
should be one of the data sets listed in |
densfun |
Name of the density function fitted to the sapwood data set. Should be one of:
|
plot |
A
|
Depends on the value of hdi
.
If hdi = TRUE
, a numeric vector
reporting the upper and lower limit
of the hdi (attributes provide more detail on cred_mass
and the applied
sapwood model (sw_data
)).
If hdi = FALSE
, a data.frame
with scaled p values for each number of
observed sapwood rings.
# 10 sapwood rings observed and the Wazny 1990 sapwood model: sw_interval( n_sapwood = 10, last = 1234, hdi = TRUE, cred_mass = .95, sw_data = "Wazny_1990", densfun = "lognormal", plot = FALSE ) # same example as above, but with numerical output (hdi = FALSE): sw_interval( n_sapwood = 10, last = 1234, hdi = FALSE, cred_mass = .95, sw_data = "Wazny_1990", densfun = "lognormal", plot = FALSE )
# 10 sapwood rings observed and the Wazny 1990 sapwood model: sw_interval( n_sapwood = 10, last = 1234, hdi = TRUE, cred_mass = .95, sw_data = "Wazny_1990", densfun = "lognormal", plot = FALSE ) # same example as above, but with numerical output (hdi = FALSE): sw_interval( n_sapwood = 10, last = 1234, hdi = FALSE, cred_mass = .95, sw_data = "Wazny_1990", densfun = "lognormal", plot = FALSE )
sw_interval()
Returns a ggplot-style graph of the probability density function for the
felling date range, as computed by sw_interval()
.
sw_interval_plot(x, area_fill = "tomato3", line_color = "tomato3")
sw_interval_plot(x, area_fill = "tomato3", line_color = "tomato3")
x |
Output of |
area_fill |
Fill color for the area under fitted distribution. |
line_color |
Line color for the fitted distribution. |
A ggplot-style graph, with calendar years on the X-axis and the probability (p) on the Y-axis.
tmp <- sw_interval( n_sapwood = 10, last = 1000, hdi = FALSE, cred_mass = .95, sw_data = "Hollstein_1980", densfun = "lognormal", plot = FALSE ) sw_interval_plot(tmp, area_fill = "forestgreen", line_color = "forestgreen")
tmp <- sw_interval( n_sapwood = 10, last = 1000, hdi = FALSE, cred_mass = .95, sw_data = "Hollstein_1980", densfun = "lognormal", plot = FALSE ) sw_interval_plot(tmp, area_fill = "forestgreen", line_color = "forestgreen")
This function fits a distribution to a data set of observed sapwood numbers and computes the highest posterior density interval (hdi) for a given credibility mass.
sw_model( sw_data = "Hollstein_1980", densfun = "lognormal", cred_mass = 0.954, source = NA, plot = FALSE )
sw_model( sw_data = "Hollstein_1980", densfun = "lognormal", cred_mass = 0.954, source = NA, plot = FALSE )
sw_data |
The name of the sapwood data set to use for modelling. It
should be one of the data sets listed in |
densfun |
Name of the density function to fit to the sapwood data set. Should be one of:
|
cred_mass |
A |
source |
A character string with info on the data source. This info is
incorporated in the titel of the plot when a sapwood data set is provided
from a user-defined |
plot |
A |
The return value depends on the plot
parameter.
if plot
is TRUE, a ggplot-style graph is returned.
if plot
is FALSE, a list
with the numeric output of the modelling
process is returned.
sw_model(sw_data = "Sohar_2012_ELL_c", densfun = "lognormal", cred_mass = .095, plot = FALSE) sw_model("Hollstein_1980")
sw_model(sw_data = "Sohar_2012_ELL_c", densfun = "lognormal", cred_mass = .095, plot = FALSE) sw_model("Hollstein_1980")
sw_model()
Returns a ggplot-style graph of the probability density function modelled to
a data set of observed sapwood numbers, as computed by sw_model()
.
sw_model_plot( x, bar_fill = "steelblue3", bar_color = "grey60", line_color = "red3" )
sw_model_plot( x, bar_fill = "steelblue3", bar_color = "grey60", line_color = "red3" )
x |
Output of |
bar_fill |
Fill color for the bars (original data). |
bar_color |
Line color for the bars (original data). |
line_color |
Line color for the fitted distribution. |
A ggplot-style graph.
tmp <- sw_model( sw_data = "Hollstein_1980", densfun = "lognormal", cred_mass = .95, plot = FALSE ) sw_model_plot(tmp, bar_fill = "forestgreen", bar_color = "darkgreen", line_color = "tomato3")
tmp <- sw_model( sw_data = "Hollstein_1980", densfun = "lognormal", cred_mass = .95, plot = FALSE ) sw_model_plot(tmp, bar_fill = "forestgreen", bar_color = "darkgreen", line_color = "tomato3")
Computes the summed probability density (SPD) for a set of felling date ranges.
sw_sum( x, series = "series", last = "last", n_sapwood = "n_sapwood", waneyedge = "waneyedge", sw_data = "Hollstein_1980", densfun = "lognormal", cred_mass = 0.954, plot = FALSE, scale_p = FALSE )
sw_sum( x, series = "series", last = "last", n_sapwood = "n_sapwood", waneyedge = "waneyedge", sw_data = "Hollstein_1980", densfun = "lognormal", cred_mass = 0.954, plot = FALSE, scale_p = FALSE )
x |
A |
series |
Name of the column in |
last |
Name of the column in |
n_sapwood |
Name of the column in |
waneyedge |
Name of the column in |
sw_data |
The name of the sapwood data set to use for modelling. It
should be one of the data sets listed in |
densfun |
Name of the density function fitted to the sapwood data set. Should be one of:
|
cred_mass |
A |
plot |
A
|
scale_p |
A |
Depends on the value of plot.
trs_example7 sw_sum(trs_example7, densfun = "lognormal", cred_mass = 0.63, plot = FALSE)
trs_example7 sw_sum(trs_example7, densfun = "lognormal", cred_mass = 0.63, plot = FALSE)
sw_sum()
This function plots the result of sw_sum()
- both the SPD and
the occurrence of exact felling dates - and adds a smoothing spline to the
SPD.
sw_sum_plot( x, bar_col = "steelblue", trend_col = "red3", dot_col = "steelblue4", dot_size = 2, dot_shape = 21, window_smooth = 11 )
sw_sum_plot( x, bar_col = "steelblue", trend_col = "red3", dot_col = "steelblue4", dot_size = 2, dot_shape = 21, window_smooth = 11 )
x |
The output of |
bar_col |
The fill color for the bars. |
trend_col |
The line color of the fitted smoothing spline. |
dot_col |
The color of the shapes that represent exact felling dates. |
dot_size |
A size argument for the shapes that represent exact felling dates. |
dot_shape |
Number corresponding to the point symbol available in R for the shapes that represent exact felling dates. |
window_smooth |
A numeric value for the window width of the trend line |
A ggplot style graph, with calendar years on the X-axis and the probability (p) on the Y-axis.
trs_example6 <- trs_example6 trs_example6 tmp <- sw_sum(trs_example6) sw_sum_plot(tmp, bar_col = "burlywood1", trend_col = "brown", dot_col = "orange", dot_shape = 23, dot_size = 5)
trs_example6 <- trs_example6 trs_example6 tmp <- sw_sum(trs_example6) sw_sum_plot(tmp, bar_col = "burlywood1", trend_col = "brown", dot_col = "orange", dot_shape = 23, dot_size = 5)
A dataset in which all series have preserved sapwood. Unconventional variable names.
trs_example0
trs_example0
A tibble of 4 variables:
unique ID of the tree-ring series
calendar year assigned to the last measured ring
number of observed sapwood rings
waney edge present TRUE/FALSE
trs_example0
trs_example0
A dataset in which all series have preserved sapwood rings.
trs_example1
trs_example1
A tibble of 4 variables:
unique ID of the tree-ring series
calendar year assigned to the last measured ring
number of observed sapwood rings
waney edge present TRUE/FALSE
trs_example1
trs_example1
A dataset in which one series has an exact felling date (= waney edge present).
trs_example2
trs_example2
A tibble of 4 variables:
unique ID of the tree-ring series
calendar year assigned to the last measured ring
number of observed sapwood rings
waney edge present TRUE/FALSE
trs_example2
trs_example2
A dataset with multiple exact felling dates.
trs_example3
trs_example3
A tibble of 4 variables:
unique ID of the tree-ring series
calendar year assigned to the last measured ring
number of observed sapwood rings
waney edge present TRUE/FALSE
trs_example3
trs_example3
A combination of series with and without sapwood rings.
trs_example4
trs_example4
A tibble of 4 variables:
unique ID of the tree-ring series
calendar year assigned to the last measured ring
number of observed sapwood rings
waney edge present TRUE/FALSE
trs_example4
trs_example4
None of the series in this dataset have preserved sapwood rings.
trs_example5
trs_example5
A tibble of 4 variables:
unique ID of the tree-ring series
calendar year assigned to the last measured ring
number of observed sapwood rings
waney edge present TRUE/FALSE
trs_example5
trs_example5
A test dataset for sw_sum().
trs_example6
trs_example6
A tibble of 4 variables:
unique ID of the tree-ring series
calendar year assigned to the last measured ring
number of observed sapwood rings
waney edge present TRUE/FALSE
trs_example6
trs_example6
A test dataset for sw_sum().
trs_example7
trs_example7
A tibble of 4 variables:
unique ID of the tree-ring series
calendar year assigned to the last measured ring
number of observed sapwood rings
waney edge present TRUE/FALSE
trs_example7
trs_example7
Sapwood data set for historical timbers found in the Netherlands en Belgium, with a local provenance. Unpublished data by S. van Daalen (version 19 Dec 2022, Van Daalen Dendrochronologie - <www.dendro.nl>).
vanDaalen_NLBE
vanDaalen_NLBE
A tibble of 2 variables:
number of sapwood rings
number of times n_sapwood was observed
sample size = 644 observations
S. van Daalen, unpublished dataset (version: 19 Dec 2022).
sw_data_info("vanDaalen_NLBE") sw_model("vanDaalen_NLBE", plot = TRUE)
sw_data_info("vanDaalen_NLBE") sw_model("vanDaalen_NLBE", plot = TRUE)
Sapwood data set for historical timbers found in the Netherlands that were imported from Norway. Unpublished data by S. van Daalen (version 19 Dec 2022, Van Daalen Dendrochronologie - <www.dendro.nl>).
vanDaalen_Norway
vanDaalen_Norway
A tibble of 2 variables:
number of sapwood rings
number of times n_sapwood was observed
sample size = 104 observations
S. van Daalen, unpublished dataset (version: 19 Dec 2022).
sw_data_info("vanDaalen_Norway") sw_model("vanDaalen_Norway", plot = TRUE)
sw_data_info("vanDaalen_Norway") sw_model("vanDaalen_Norway", plot = TRUE)
Sapwood data set for Poland, published by Wazny in 1990.
Wazny_1990
Wazny_1990
A tibble of 2 variables:
number of sapwood rings
number of times n_sapwood was observed
sample size = 206 observations
Wazny T. 1990. Aufbau und Anwendung der Dendrochronologie für Eichenholz in Polen (PhD dissertation). Hamburg University, Hamburg.
sw_data_info("Wazny_1990") sw_model("Wazny_1990", plot = TRUE)
sw_data_info("Wazny_1990") sw_model("Wazny_1990", plot = TRUE)