datelife
?datelife
is an R package that allows researchers and the
general audience to obtain open scientific data on the age of any
organism they are interested in, by retrieving organism ages from a
database of dated phylogenetic trees (aka chronograms), that
have been peer-reviewed and published as part of a scientific research
article, in an indexed journal (Open Tree of Life’s tree
store). As such, organism ages retrieved by datelife
constitute state-of-the-art, peer-reviewed, public scientific knowledge,
that can be accessed and reused by experts and non-experts in the field
alike.
datelife
?You can install the datelife
R package on your own
computer and use it locally.
If you do not want/have time to deal with installation and R code, you can use DateLife’s interactive website application.
To learn more, please go to datelife
’s
documentation website.
datelife
R packagedatelife
’s most recent stable version can be installed
with:
install.packages("datelife")
datelife
’s previous stable versions are available for
installation from the CRAN repository. For example, to install
version 0.6.1
, you can run:
::install_version("datelife", version="0.6.1") devtools
You can install datelife
’s development version from its
GitHub repository with:
::install_github("phylotastic/datelife") devtools
datelife
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: Scientific Data on Time of Lineage Divergence for Your Taxa. R package version 0.6.5, https://doi.org/10.5281/zenodo.593938.
Sanchez-Reyes L, O’Meara B (2019). “datelife: Leveraging databases and analytical tools to reveal the dated Tree of Life.” bioRxiv, 782094. https://doi.org/10.1101/782094.
You can get these citations and the bibtex entry with:
citation("datelife")
toBibtex(citation("datelife"))
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.
Package and function documentation was generated with roxygen2:
::roxygenise() roxygen2
We used the package lintr to check for coding style:
::lint_package() lintr
Code coverage was calculated with the package covr:
<- covr::package_coverage()
cov
::use_data(cov, overwrite = TRUE) usethis
You can see an interactive report of testing coverage:
::report(cov) covr
And, find code with zero coverage:
::zero_coverage(cov) covr
datelife
’s hexsticker:Code used to generate current datelife
’s logo hexsticker
is in data-raw/hexsticker-current.R
Vignettes are rendered automatically upon built. However, if you wish
to see how they look rendered before releasing the package, you can do
this with knitr::knit()
. The following command renders the
vignette Getting_started_with_datelife
as html:
::knit("vignettes/Getting_started_with_datelife.Rmd") knitr
Using pkgdown
for this is quite straightforward and
fun:
::use_pkgdown()
usethis::build_site() pkgdown
Run the following function from the package usethis
to update R CMD Check on GitHub:
::use_github_action_check_standard() usethis
This downloads the standard R CMD check workflow from r-lib action examples.
To be able to release to CRAN, the first step is to pass the checks
locally. 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:
cd ../
Generate a tar ball for your package by running
R CMD build package-name
:
R CMD build datelife
Finally, run R CMD check package-tar-ball
on the tar
ball that you just generated:
R CMD check --as-cran datelife_0.6.0.tar.gz
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:
::check_for_cran() rhub
For more rhub
useful workflows, check out its documentation.
For example
<- rhub::list_package_checks(".",
previous_checks email = "sanchez.reyes.luna@gmail.com",
howmany = 4)
<- rhub::get_check(previous_checks$group[1])
group_check
group_check
<- check_for_cran()
cran_prep $cran_summary() cran_prep
To submit to CRAN call devtools::release()
and answer
the prompted questions. If the answer to all of these is yes,
the package will be submitted to CRAN :rocket:
To check for URL validity specifically, use:
::check_win_release() devtools
This package is free and open source software, licensed under GPL.
datelife
has been developed as part of the phylotastic (NSF-funded) project, and
is still under development.