Skip to contents

GitHub R package versioncodecov Github Open Issues Github Closed Issues DOI NSF-1458603 NSF-0905606 NSF-1458572 R-CMD-check

Get a phylogenetic tree with branch lengths proportional to geologic time (aka a chronogram) of any two or more lineages of interest to you.

Use the datelife R package locally, or through DateLife’s website to search for chronograms available for your lineages in Open Tree of Life’s tree store.

You can also date a phylogenetic tree of your own making (or choosing one from the literature), using node ages from chronograms found with datelife, using the congruification method (Eastman et al. 2013) implemented with geiger (Harmon et al. 2008).

datelife has been developed as part of the phylotastic (NSF-funded) project, and is still under development.

  1. Installation
  2. Citation
  3. Feedback and info for developers
  4. License

1. Installation

Once accepted on CRAN, datelifes stable version will be available for installation with:

install.packages("datelife")

For now, you can install the development version from the GitHub repository:

devtools::install_github("phylotastic/datelife")

2. Citation

If you use datelife for a publication, please cite the R package and the accompanying paper:

O’Meara B, Sanchez-Reyes L, Eastman J, Heath T, Wright A, Schliep K, Chamberlain S, Midford P, Harmon L, Brown J, Pennell M, Alfaro M (2022). datelife: Go from a List of Taxa or a Tree to a Chronogram using Open Scientific Data on Time of Lineage Divergence. R package version 0.5.0.

Sanchez-Reyes L, O’Meara B (2019). “datelife: Leveraging databases and analytical tools to reveal the dated Tree of Life.” bioRxiv, 782094. doi: 10.1101/782094.

You can get these citations and the bibtex entry with:

citation("datelife")
toBibtex(citation("datelife"))

.bibtex files are available

3. Feedback and Information for Developers

We welcome and encourage to post a GitHub issue with any comments, ideas and questions about datelife’s software and website. If you want to contribute with code directly, we welcome and encourage pull requests.

Function documentation:

Package and function documentation was generated with roxygen2:

roxygen2::roxygenise()

Styling code:

We used the package lintr to check for coding style:

lintr::lint_package()

Calculating test coverage:

Code coverage was calculated with the package covr:

cov <- covr::package_coverage()

usethis::use_data(cov, overwrite = TRUE)

You can see an interactive report of testing coverage:

covr::report(cov)

And, find code with zero coverage:

covr::zero_coverage(cov)

Releasing to CRAN:

To be able to release to CRAN, the first step is to pass a check. To run a local check, you can use the command R CMD check from your terminal. For that, change directories to the one above your working clone of the datelife repo:

Generate a tar ball for your package by running R CMD build package-name:

Finally, run R CMD check package-tar-ball on the tar ball that you just generated:

If you do not have access to different OS to test your package on, the rhub package allows remote testing on a variety of OS with the command:

Generating datelife’s hexsticker:

Code used to generate current datelife’s logo hexsticker is in data-raw/hexsticker-current.R

Rendering the vignettes:

knitr::knit("vignettes/Getting_started_with_datelife.Rmd")

Creating a website for the package

Using pkgdown for this is quite straightforwrd and fun:

usethis::use_pkgdown()
pkgdown::build_site()

Submitting to CRAN

devtools::release()

4. License

This package is free and open source software, licensed under GPL.