knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
crestr
produces probabilistic reconstructions of past climate change from fossil assemblage data (Chevalier, 2022). crestr
works by analysing how certain biological indicators (like plant or animal remains) respond to climate factors, using statistical methods to estimate these relationships. These relationships are mdelled as probability density functions (PDFs; see Chevalier et al. (2014) and Chevalier (2019)). The theory underpinning this package is explained in section A bit of theory and is illustrated with an application based on pseudo-data in section Get Started. The different vignettes present different aspects of the structure of the package and the data it contains, along with applications based on real data.
Why choose crestr
? Unlike traditional methods, crestr uses probabilistic techniques to provide more accurate and flexible climate reconstructions. Its focus on accessibility means you don’t need to be an expert coder to get meaningful results.
NOTE: While active development of crestr has concluded, its robust features will continue to provide valuable insights for palaeoclimate research. The available documentation and resources will remain accessible for independent use. In addition, I am committed to maintaining this bug-free. As such, please reach out at paleo@manuelchevalier.com if you encounter technical issues.
Ready to explore the climate history hidden in your data? Install crestr
now and leverage its robust tools for your research.
The package is available from GitHub and can be installed as follow:
if(!require(devtools)) install.packages("devtools") devtools::install_github("mchevalier2/crestr")
crestr
The package is fully documented and the help of each function can be accessed
with ?function
. More detailed information as well as documented examples are
available from https://www.manuelchevalier.com/crestr/.
The following example illustrates the basics of crestr
using pseudo-data
(i.e. randomly generated data).
library(crestr) ## loading example data data(crest_ex) data(crest_ex_pse) data(crest_ex_selection)
Let's first have a look at the data. The dataset is composed of 20 fossil samples from which 7 taxa have been identified. The data are expressed in percentages.
## the first 6 samples head(crest_ex) ## ## the structure of the data frame str(crest_ex)
For each reconstruction, a proxy-species equivalency ('pse') table must be provided. Here, with the 7 pseudo-taxa, it looks like:
crest_ex_pse
Finally, unique sets of taxa can be specified to reconstruct each climate variable. In the example, bio1 (mean annual temperature) and bio12 (annual precipitation) will be reconstructed. The dataset has been designed so that Taxa 1, 2, 3 and 7 are sensitive to bio1 while Taxa 1, 4, 5 and 7 are sensitive to bio12. Check https://www.manuelchevalier.com/crestr/articles/get-started.html for more details on this selection.
crest_ex_selection
These pseudo-data can be provided to the crest function and provided some parameters (see the full vignettes for a detail of these parameters), the reconstructions will be processed.
recons <- crest( df = crest_ex, pse = crest_ex_pse, taxaType = 0, site_info = c(7.5, 7.5), site_name = 'crest_example', climate = c("bio1", "bio12"), bin_width = c(2, 50), shape = c("normal", "lognormal"), selectedTaxa = crest_ex_selection, dbname = "crest_example" )
A specific print function was created to summarise the crestObj.
recons
The climate sampled by the data can be graphically represented for a quick assessment of the calibration dataset.
plot_climateSpace(recons)
Additional graphical tools can be used to assess which taxa should/could be used for each variable. On the following example, it is clear that Taxon2 has a much stronger correlation with bio1 than to bio12, hence its selection for bio1 only.
plot_taxaCharacteristics(recons, taxanames='Taxon2')
The results can be quickly visualised using the plot function and the
reconstructed climate values can be accessed from the nested recons
object:
names(recons) lapply(recons$reconstructions, names)
head(recons$reconstructions$bio1$optima) str(recons$reconstructions$bio1$optima)
signif(recons$reconstructions$bio1$likelihood[1:6, 1:6], 3) str(recons$reconstructions$bio1$likelihood)
plot(recons, climate = 'bio1') plot(recons, climate = 'bio12', simplify=TRUE, uncertainties=c(0.4, 0.6, 0.8))
If satisfying, the results can be directly exported from the R environment in unique spreadsheets for each variables (or csv files) and the crest object is exported as an RData file to enable easy reuse in the future.
export(recons, loc=getwd(), dataname='crest-test') list.files(file.path(getwd(), 'crest-test'))
unlink(file.path(getwd(), 'crest-test'), recursive=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.