Learn R Programming

divDyn

R package for quantifying diversity dynamics using fossil sampling data

News

  • The next update of the package (V0.8.2) is now availble from the CRAN servers! As this is a major update, I suggest everyone to update their copy. See the change log below for the changes.

  • The paper describing the package is available from the Wiley Online Library. You can download it from this link:

https://besjournals.onlinelibrary.wiley.com/doi/10.1111/2041-210X.13161 (or contact me, if you have problems). If you decide to use the methods implemented in this package, please refer to this document. The examples implemented can be reproduced with the files deposited at https://github.com/divDyn/ddPhanero using this (updated) vignette: https://github.com/divDyn/ddPhanero/blob/master/doc/dd_phanero_web.html

About the package

If you are interested in what this package does, or have questions about its use, please check out the first vignette: 'Handout to the R package 'divDyn' v0.8.2 for diversity dynamics from fossil occurrence data' here: https://github.com/divDyn/r-package/blob/master/vignettes/handout.pdf

As the package is still getting developed, please note that some interface changes might occurr based on the feedback of people and my own experience on what is easier to use. If you have any requirements or recommendations about what to add (or more importantly, if you find a mistake), do not hesitate to contact me at adam.kocsis@fau.de.

Installing

1. From CRAN (v0.8.2)

You can install the appropriate binaries normally, by running install.packages("divDyn")

2. Using the source tarball to install (v0.8.2)

This you can do with running

install.packages(
  "https://github.com/divDyn/assets/raw/master/r_archive/source/divDyn_0.8.2.tar.gz", 
  repos=NULL, type="source")

from the R console. Note that there is some code in the package that requires compilation. To do this, the most straightforward way is to install/use Rtools (https://cran.r-project.org/bin/windows/Rtools/) on Windows, and XCode https://developer.apple.com/xcode/ on Mac.

The sources of the older versions are also in the _archive/source folder. You can access earlier versions by changing the version number in the command above.

3. Using the repository files and 'devtools' to install (v0.8.2)

To do this:

  • You need a compiler, as for method 2
  • Make sure that the 'devtools' package is installed
  • Run devtools::install_github("divDyn/r-package")

If the frist method is not working for you, and you do not want to mess around with a compiler and such, then contact me and I will find a way to compile binaries for you.

Change log

See the change log here: Change Log

Copy Link

Version

Install

install.packages('divDyn')

Monthly Downloads

484

Version

0.8.3

License

CC BY 4.0

Maintainer

Adam Kocsis

Last Published

November 21st, 2024

Functions in divDyn (0.8.3)

shades

Quantile plot of time series
omit

Omission of taxa that have a poor occurrence record
indices

Scalar indices of diversity
ratesplit

Test of rate split (selectivity)
matchtime

Match the dates of a time-dependent variable with a predefined vector
repmatch

Replicate matching and merging
modeltab

Origination/extinction response table for statistical modelling.
keys

Keys to process stratigraphic, environmental and lithological information from the Paleobiology Database
parts

Plot time series counts or proportions as polygons
singletons

List of singleton taxa
streaklog

Utility functions for slicing gappy time series
stratkeys

The FossilWorks-based lookup table for the stratigraphic assignments of collections in the Paleobiology Database
stages2018

95 bin Phanerozoic time scale based on the stratigraphic stages of Ogg et al. (2016) with updated dates in some intervals (2018).
stages

95 bin Phanerozoic time scale based on the stratigraphic stages of Gradstein et al. 2020.
tabinate

Apply function to TAxon/BIN subset of occurrences and iterATE
tens

The 10 million year resolution timescale of the Paleobiology Database
subtrialCR

Subsampling trial functions
subsample

Subsampling wrapper function
slice

Discretization of continuous time dimension - slicing
tsbars

Function to plot a series a values with bars that have variable widths
tsplot

Time series plotting using a custom time scale
sumstat

Occurrence database summary
survivors

Proportions of survivorship
divDyn

Time series from metrics of diversity dynamics
categorize

Mapping multiple entries to categories
affinity

Environmental affinities of taxa
seqduplicated

Determination and omission of consecutive duplicates in a vector.
binstat

Sampling statistics and diversity indices in every bin
fadlad

FAD - LAD matrix from occurrence data
fill

Filling of missing values in a vector, based on the marginal values of the gaps
cleansp

Cleanse Species Name Vector
georange

Estimation of geographic ranges from occurrence data
corals

Fossil occurrences of scleractinian (stony) corals from the Paleobiology Database
ranges

Plotting ranges and occurrence distributions through time