diff --git a/CRAN-RELEASE b/CRAN-RELEASE deleted file mode 100644 index 725f70cf..00000000 --- a/CRAN-RELEASE +++ /dev/null @@ -1,2 +0,0 @@ -This package was submitted to CRAN on 2019-12-06. -Once it is accepted, delete this file and tag the release (commit e5d2f6e56f). diff --git a/NEWS.md b/NEWS.md index 9e69e113..50fb557d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,11 +1,13 @@ # datelife 0.6.1 - - functions: + - Functions: - `get_otol_chronograms` was updated and renamed to `get_opentree_chronograms` - - update `match_all_calibrations` - - documentation: - - added a "More" section describing return value attributes (will rename to "Attributes") - - eliminated unecessary examples - - vignettes: added case study vignette + - Update `match_all_calibrations` + - Added a `summary` method for `datelifeResult` objects + - Documentation: + - Added a "More" section describing return value attributes (will rename to "Attributes") + - Eliminated unnecessary examples + - Vignettes: added case study vignette + - Description: added `BiocManager` package to imports # datelife 0.6.0 diff --git a/R/data.R b/R/data.R index f2b5b4bb..038de0a5 100644 --- a/R/data.R +++ b/R/data.R @@ -256,7 +256,7 @@ #' usethis::use_data(subset2_taxa) "subset2_taxa" -#' A list with datelieQuery and datelifeResult objects from a search of taxon names from subset2_taxa +#' A list with datelifeQuery and datelifeResult objects from a search of taxon names from subset2_taxa #' #' @name subset2_search #' @docType data diff --git a/R/datelife_internal.R b/R/datelife_internal.R index 589b6421..67b3d2ca 100644 --- a/R/datelife_internal.R +++ b/R/datelife_internal.R @@ -110,7 +110,7 @@ patristic_matrix_array_subset_both <- function(patristic_matrix_array, taxa, phy #' Subset a patristic matrix array #' @inheritParams patristic_matrix_array_subset_both -#' @return A list with a paristic maytrix array and a `$problem` if any. +#' @return A list with a patristic matrix array and a `$problem` if any. patristic_matrix_array_subset <- function(patristic_matrix_array, taxa, phy4 = NULL) { # gets a subset of the patristic_matrix_array. If you give it a phylo4 object, it can check to see if taxa are a clade patristic_matrix_array <- patristic_matrix_array[rownames(patristic_matrix_array) %in% taxa, colnames(patristic_matrix_array) %in% taxa, ] @@ -428,7 +428,7 @@ phylo_congruify <- function(reference_tree, } # Used inside: patristic_matrix_array_phylo_congruify and phylo_congruify. -#' Congruify and check. +#' Congruify and Check. #' @inheritParams geiger::congruify.phylo #' @inheritParams ape::is.ultrametric #' @param attempt_fix Default to `TRUE`. If congruification results in NA branch diff --git a/R/groves.R b/R/groves.R index 11955e56..6f49082f 100644 --- a/R/groves.R +++ b/R/groves.R @@ -17,7 +17,7 @@ is_n_overlap <- function(names_1, names_2, n = 2) { #' Find the grove for a group of chronograms and build a matrix. #' -#' @description This function implements theorem 1.1 of Anéet al. (2009) \doi{10.1007/s00026-009-0017-x} +#' @description This function implements theorem 1.1 of Ané et al. (2009) \doi{10.1007/s00026-009-0017-x} #' to find a grove for a given group of chronograms. #' @param datelife_result A `datelifeResult` object. #' @param n The degree of taxon name overlap among input chronograms. Defaults diff --git a/R/opentree_chronograms.R b/R/opentree_chronograms.R index 36d20054..d59e62b0 100644 --- a/R/opentree_chronograms.R +++ b/R/opentree_chronograms.R @@ -8,7 +8,7 @@ #' \describe{ #' \item{authors}{A list of lists of author names of the original studies that #' published chronograms in the Open Tree of Life database.} -#' \item{curators}{A list of lists of curator names that uplodaded chronograms +#' \item{curators}{A list of lists of curator names that uploaded chronograms #' to the Open Tree of Life database.} #' \item{studies}{A list of study identifiers.} #' \item{trees}{A `multiPhylo` object storing the chronograms from Open Tree of @@ -116,7 +116,7 @@ phylo_has_brlen <- function(phy) { #' \describe{ #' \item{authors}{A list of lists of author names of the original studies that #' published chronograms currently stored in the Open Tree of Life database.} -#' \item{curators}{A list of lists of curator names that uplodaded chronograms +#' \item{curators}{A list of lists of curator names that uploaded chronograms #' to the Open Tree of Life database.} #' \item{studies}{A list of study identifiers from original studies that #' published chronograms currently stored in the Open Tree of Life database.} diff --git a/README.Rmd b/README.Rmd index c7d38d5e..dc43ab08 100644 --- a/README.Rmd +++ b/README.Rmd @@ -15,6 +15,9 @@ knitr::opts_chunk$set( ) IS_README <- TRUE library(datelife) +if (!requireNamespace("versions")) { + install.packages("versions") +} ``` @@ -52,13 +55,13 @@ You can also date a phylogenetic tree of your own making (or choosing one from t ## 1. Installation -`datelife`s stable version is currently available for installation from CRAN with: +`datelife`'s **stable version `r versions::available.versions("datelife")$datelife$version`** is available for installation from CRAN with: ```{r eval = FALSE} install.packages("datelife") ``` -You can install the development version from the GitHub repository: +You can install `datelife`'s **development versions** from the GitHub repository with: ```{r eval = FALSE} devtools::install_github("phylotastic/datelife") @@ -78,7 +81,7 @@ citation("datelife") toBibtex(citation("datelife")) ``` -.bibtex files are available +".bibtex" files are also available. ## 3. Feedback and Information for Developers diff --git a/README.md b/README.md index 5bfc3c3a..6a37f319 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ - [![CRAN @@ -23,7 +22,7 @@ Issues](https://img.shields.io/github/issues-closed-raw/phylotastic/datelife.svg [![NSF-1458572](https://img.shields.io/badge/NSF-1458572-white.svg)](https://nsf.gov/awardsearch/showAward?AWD_ID=1458572) -# Welcome to DateLife’s R package GitHub repository\! +# Welcome to DateLife’s R package GitHub repository! Get a phylogenetic tree with branch lengths proportional to geologic time (aka a ***chronogram***) of any two or more lineages of interest to @@ -47,43 +46,39 @@ still under development. 3. [Feedback and info for developers](#feedback) 4. [License](#license) -## 1\. Installation +## 1. Installation -`datelife`s stable version is currently available for installation from +`datelife`’s **stable version 0.6.0** is available for installation from CRAN with: ``` r install.packages("datelife") ``` -You can install the development version from the GitHub repository: +You can install `datelife`’s **development versions** from the GitHub +repository with: ``` r devtools::install_github("phylotastic/datelife") ``` -## 2\. Citation +## 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: Scientific Data on Time of Lineage Divergence for Your -Taxa. R package version 0.6.0, +Taxa. R package version 0.6.1, 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: @@ -93,9 +88,9 @@ citation("datelife") toBibtex(citation("datelife")) ``` -.bibtex files are available +“.bibtex” files are also available. -## 3\. Feedback and Information for Developers +## 3. Feedback and Information for Developers We welcome and encourage to post a [GitHub issue](https://github.com/phylotastic/datelife/issues/new) with any @@ -182,8 +177,8 @@ working clone of the `datelife` repo: cd ../ ``` -Generate a tar ball for your package by running `R CMD build -package-name`: +Generate a tar ball for your package by running +`R CMD build package-name`: ``` bash R CMD build datelife @@ -210,6 +205,6 @@ 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: -## 4\. License +## 4. License This package is free and open source software, licensed under GPL. diff --git a/cran-comments.md b/cran-comments.md index dbdd9912..8f345476 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,7 +1,8 @@ -## New submission +## New submission v 0.6.1 This is a new submission where I have: -* Fixed examples with functions that use Internet resources that were not failing gracefully. +* Fixed examples with functions from dependent packages that use Internet resources that were not failing properly. +* Fixed note: "undeclared package ‘BiocManager’ in Rd xrefs" for r-devel-linux-x86_64-fedora-clang ### Test environments: diff --git a/docs/articles/Getting_started_with_datelife.html b/docs/articles/Getting_started_with_datelife.html index 166a00e6..01429bbd 100644 --- a/docs/articles/Getting_started_with_datelife.html +++ b/docs/articles/Getting_started_with_datelife.html @@ -66,7 +66,8 @@
-
+ +
-

make_datelife_query output 1

-
+
+make_datelife_query output 1 +
 #> ... Making a DateLife query.
 #> ... Phylo-processing 'input'.
 #> 'input' is not a phylogeny.
@@ -140,8 +142,9 @@ 

a) From a set of organism taxo elephas Maximus, felis_catus, homo-sapiens")

-

make_datelife_query output 2

-
+
+make_datelife_query output 2 +
 #> ... Making a DateLife query.
 #> ... Phylo-processing 'input'.
 #> 'input' is not a phylogeny.
@@ -167,8 +170,9 @@ 

b) From a tre
 newick <- "((Elephas_maximus,(Homo_sapiens,(Delphinus_delphis, Felis_silvestris))), Gallus_gallus);"
 datelife::make_datelife_query(input = newick)
-

make_datelife_query output 3

-
+
+make_datelife_query output 3 +
 #> ... Making a DateLife query.
 #> ... Phylo-processing 'input'.
 #> 'input' is a phylogeny and it is correcly formatted.
@@ -195,8 +199,9 @@ 

b) From a tre
 phylo <- ape::read.tree(text = newick)
 datelife::make_datelife_query(input = phylo)
-

make_datelife_query output 4

-
+
+make_datelife_query output 4 +
 #> ... Making a DateLife query.
 #> ... Phylo-processing 'input'.
 #> 'input' is a phylogeny and it is correcly formatted.
@@ -224,7 +229,7 @@ 

b) From a tre my_datelife_query <- datelife::make_datelife_query(input = phylo) #> ... Making a DateLife query. #> ... Phylo-processing 'input'. -#> 'input' is a phylogeny and it is correcly formatted. +#> 'input' is a phylogeny and it is correctly formatted. #> DateLife query done!

@@ -234,8 +239,9 @@

2. Searching the chronogram database<

The datelife_search function takes a datelifeQuery object and goes through the datelife chronogram database to find all chronograms matching at least two taxon names:

 datelife::datelife_search(input = my_datelife_query)
-

datelife_search default output

-
+
+datelife_search default output +
 #> ... Running a DateLife search.
 #> ... Getting a DateLife result.
 #> DateLife result obtained!
@@ -268,8 +274,9 @@ 

Citations
 citations <- datelife::datelife_search(input = my_datelife_query,
                           summary_format = "citations")

-

datelife_search output “citations”

-
+
+datelife_search output “citations” +
 #> ... Running a DateLife search.
 #> ... Getting a DateLife result.
 #> DateLife result obtained!
@@ -360,8 +367,9 @@ 

MRCA ages
 mrca <- datelife::datelife_search(input = my_datelife_query,
                           summary_format = "mrca")

-

datelife_search output “mrca”

-
+
+datelife_search output “mrca” +
 #> ... Running a DateLife search.
 #> ... Getting a DateLife result.
 #> DateLife result obtained!
@@ -461,8 +469,9 @@ 

Newick strings
 newick_all <- datelife::datelife_search(input = my_datelife_query,
                           summary_format = "newick_all")

-

datelife_search output “newick_all”

-
+
+datelife_search output “newick_all” +
 #> ... Running a DateLife search.
 #> ... Getting a DateLife result.
 #> DateLife result obtained!
@@ -557,15 +566,17 @@ 

Newick strings
 newick_sdm <- datelife::datelife_search(input = my_datelife_query,
                           summary_format = "newick_sdm")

-

datelife_search output “newick_sdm”

-
+
+datelife_search output “newick_sdm” +
 

summary_format = "newick_median"

 newick_median <- datelife::datelife_search(input = my_datelife_query,
                           summary_format = "newick_median")
-

datelife_search output “newick_median”

-
+
+datelife_search output “newick_median” +
 #> ... Running a DateLife search.
 #> ... Getting a DateLife result.
 #> DateLife result obtained!
@@ -665,15 +676,17 @@ 

 phylo_sdm <- datelife::datelife_search(input = my_datelife_query,
                           summary_format = "phylo_sdm")
-

datelife_search output

-
+
+datelife_search output +
 

summary_format = "phylo_median"

 phylo_median <- datelife::datelife_search(input = my_datelife_query,
                           summary_format = "phylo_median")
-

datelife_search output “phylo_median”

-
+
+datelife_search output “phylo_median” +
 #> ... Running a DateLife search.
 #> ... Getting a DateLife result.
 #> DateLife result obtained!
@@ -708,8 +721,9 @@ 

 phylo_all <- datelife::datelife_search(input = my_datelife_query,
                           summary_format = "phylo_all")
-

datelife_search output “phylo_all”

-
+
+datelife_search output “phylo_all” +
 #> ... Running a DateLife search.
 #> ... Getting a DateLife result.
 #> DateLife result obtained!
@@ -733,8 +747,9 @@ 

 phylo_biggest <- datelife::datelife_search(input = my_datelife_query,
                           summary_format = "phylo_biggest")
-

datelife_search output “phylo_biggest”

-
+
+datelife_search output “phylo_biggest” +
 #> ... Running a DateLife search.
 #> ... Getting a DateLife result.
 #> DateLife result obtained!
@@ -769,8 +784,9 @@ 

Summary tables
 html <- datelife::datelife_search(input = my_datelife_query,
                           summary_format = "html")

-

datelife_search output “html”

-
+
+datelife_search output “html” +
 #> ... Running a DateLife search.
 #> ... Getting a DateLife result.
 #> DateLife result obtained!
@@ -853,8 +869,9 @@ 

Summary tables
 data_frame <- datelife::datelife_search(input = my_datelife_query,
                           summary_format = "data_frame")

-

datelife_search output “data_frame”

-
+
+datelife_search output “data_frame” +
 #> ... Running a DateLife search.
 #> ... Getting a DateLife result.
 #> DateLife result obtained!
diff --git a/docs/articles/fringiliidae.html b/docs/articles/fringiliidae.html
index 5ca7d480..8c66069c 100644
--- a/docs/articles/fringiliidae.html
+++ b/docs/articles/fringiliidae.html
@@ -66,7 +66,8 @@
     
   
-
+ +
-

names on our datelifeResult object

-
+
+names on our datelifeResult object +
 #> [1] "Hooper, Daniel M., Trevor D. Price. 2017. Chromosomal inversion differences correlate with range overlap in passerine birds. Nature Ecology & Evolution 1 (10): 1526-1534"
 
 #> [2] "Hedges, S. Blair, Julie Marin, Michael Suleski, Madeline Paymer, Sudhir Kumar. 2015. Tree of life reveals clock-like speciation and diversification. Molecular Biology and Evolution 32 (4): 835-845"
diff --git a/docs/index.html b/docs/index.html
index 9d407ec7..f1c2dc6a 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -119,10 +119,10 @@
 

1. Installation

-

datelifes stable version is currently available for installation from CRAN with:

+

datelife’s stable version 0.6.0 is available for installation from CRAN with:

 install.packages("datelife")
-

You can install the development version from the GitHub repository:

+

You can install datelife’s development versions from the GitHub repository with:

 devtools::install_github("phylotastic/datelife")
@@ -131,18 +131,16 @@

2. Citationhttps://doi.org/10.5281/zenodo.593938.

-

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.0, 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.

-

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"))
-

.bibtex files are available

+

“.bibtex” files are also available.

3. Feedback and Information for Developers @@ -204,11 +202,11 @@

Releasing to CRANLocal checks

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 ../
+
cd ../

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

-
R CMD build datelife
+
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
+
R CMD check --as-cran datelife_0.6.0.tar.gz
Remote checks diff --git a/docs/news/index.html b/docs/news/index.html index 0a768722..a9036897 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -53,13 +53,20 @@

datelife 0.6.1

-
  • functions: get_opentree_chronograms was updated and renamed to get_opentree_chronograms +
    • Functions: +
      • +get_otol_chronograms was updated and renamed to get_opentree_chronograms +
      • +
      • Update match_all_calibrations
      • -
      • documentation: -
        • added a “More” section describing return value attributes (will rename to “Attributes”)
        • -
        • eliminated unecessary examples
        • +
        • Added a summary method for datelifeResult objects
        • +
      • +
      • Documentation: +
        • Added a “More” section describing return value attributes (will rename to “Attributes”)
        • +
        • Eliminated unnecessary examples
      • -
      • vignettes: added case study vignette
      • +
      • Vignettes: added case study vignette
      • +
      • Description: added BiocManager package to imports

datelife 0.6.0

CRAN release: 2022-01-17

diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 013e4dad..2ca862cc 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,8 +1,8 @@ -pandoc: 2.7.3 +pandoc: 2.14.0.3 pkgdown: 2.0.1 pkgdown_sha: ~ articles: Getting_started_with_datelife: Getting_started_with_datelife.html fringiliidae: fringiliidae.html -last_built: 2022-01-19T20:52Z +last_built: 2022-01-31T07:00Z diff --git a/docs/reference/build_grove_list.html b/docs/reference/build_grove_list.html index 7ba3a6f1..e05586ca 100644 --- a/docs/reference/build_grove_list.html +++ b/docs/reference/build_grove_list.html @@ -1,7 +1,7 @@ -Build grove list — build_grove_list • datelifeBuild grove list — build_grove_list • datelifeFind the grove for a group of chronograms and build a matrix. — build_grove_matrix • datelifeFind the grove for a group of chronograms and build a matrix. — build_grove_matrix • datelifeCongruify and check. — congruify_and_check • datelifeCongruify and Check. — congruify_and_check • datelife @@ -47,13 +47,13 @@
-

Congruify and check.

+

Congruify and Check.

diff --git a/docs/reference/datelife_search.html b/docs/reference/datelife_search.html index f4f9b85d..b4b9c374 100644 --- a/docs/reference/datelife_search.html +++ b/docs/reference/datelife_search.html @@ -104,9 +104,9 @@

Argumentstnrs_match(), a wrapper of rotl::tnrs_match_names().

get_spp_from_taxon

Whether to search ages for all species belonging to a given taxon or not. Default to FALSE. If TRUE, it must have same length as input. @@ -341,7 +341,6 @@

Examples#> DateLife search done! plot(ages.again) library(ape) -#> Warning: package ‘ape’ was built under R version 4.1.2 ape::axisPhylo() mtext("Time (million years ago)", side = 1, line = 2, at = (max(get("last_plot.phylo", envir = .PlotPhyloEnv diff --git a/docs/reference/datelife_use.html b/docs/reference/datelife_use.html index 34b05629..2766194f 100644 --- a/docs/reference/datelife_use.html +++ b/docs/reference/datelife_use.html @@ -101,9 +101,9 @@

Argumentsmake_datelife_query

use_tnrs
-

Whether to use OpenTree's Taxonomic Name Resolution Service (TNRS) +

Whether to use Open Tree of Life's Taxonomic Name Resolution Service (TNRS) to process input taxon names. Default to TRUE, it corrects misspellings and -taxonomic name variations.

+taxonomic name variations with tnrs_match(), a wrapper of rotl::tnrs_match_names().

get_spp_from_taxon

Whether to search ages for all species belonging to a diff --git a/docs/reference/extract_calibrations_dateliferesult.html b/docs/reference/extract_calibrations_dateliferesult.html index b4651b21..0c95cba5 100644 --- a/docs/reference/extract_calibrations_dateliferesult.html +++ b/docs/reference/extract_calibrations_dateliferesult.html @@ -1,15 +1,15 @@ Extract secondary calibrations from a given datelifeResult object — extract_calibrations_dateliferesult • datelifeExtract secondary calibrations from a given datelifeResult object — extract_calibrations_dateliferesult • datelife @@ -64,11 +64,11 @@

This function extracts node ages for each taxon -pair given as input. It applies the congruification method described in Eastman et al. -(2013) doi: 10.1111/2041-210X.12051 +pair given in input$tip.labels. It applies the congruification method +described in Eastman et al. (2013) doi: 10.1111/2041-210X.12051 , -to create a matrix of suitable secondary calibrations for each taxon pair. -Congruification is implemented with the function geiger::congruify.phylo().

+implemented with the function geiger::congruify.phylo(), to create a +data.frame of taxon pair node ages that can be used as secondary calibrations.

@@ -87,10 +87,10 @@

Arguments

Value

-

An object of class datelifeCalibrations, i.e., a data.frame (if -each = FALSE) or a list of data.frames (if each = TRUE) of secondary -calibrations, for each pair of taxon names in input. The attribute -chronograms stores the input data from which the calibrations were extracted.

+

An object of class congruifiedCalibrations, which is a data.frame (if +each = FALSE) or a list of data.frames (if each = TRUE) of node +ages for each pair of taxon names. You can access the input data from which +the calibrations were extracted with attributes(output)$chronograms.

Details

diff --git a/docs/reference/extract_calibrations_phylo.html b/docs/reference/extract_calibrations_phylo.html index c8ddd421..17790464 100644 --- a/docs/reference/extract_calibrations_phylo.html +++ b/docs/reference/extract_calibrations_phylo.html @@ -1,17 +1,17 @@ Extract secondary calibrations from a phylo or multiPhylo -object with branch lengths proportional to time using congruification. — extract_calibrations_phylo • datelifeUse congruification to extract secondary calibrations from a phylo or multiPhylo +object with branch lengths proportional to time. — extract_calibrations_phylo • datelife @@ -59,19 +59,19 @@

This function extracts node ages for each taxon -pair given as input. It applies the congruification method described in Eastman et al. -(2013) doi: 10.1111/2041-210X.12051 +pair given in input$tip.labels. It applies the congruification method +described in Eastman et al. (2013) doi: 10.1111/2041-210X.12051 , -to create a matrix of suitable secondary calibrations for each taxon pair. -Congruification is implemented with the function geiger::congruify.phylo().

+implemented with the function geiger::congruify.phylo(), to create a +data.frame of taxon pair node ages that can be used as secondary calibrations.

@@ -91,10 +91,10 @@

Arguments

Value

-

An object of class datelifeCalibrations, i.e., a data.frame (if -each = FALSE) or a list of data.frames (if each = TRUE) of secondary -calibrations, for each pair of taxon names in input. The attribute -chronograms stores the input data from which the calibrations were extracted.

+

An object of class congruifiedCalibrations, which is a data.frame (if +each = FALSE) or a list of data.frames (if each = TRUE) of node +ages for each pair of taxon names. You can access the input data from which +the calibrations were extracted with attributes(output)$chronograms.

References

diff --git a/docs/reference/extract_ott_ids.html b/docs/reference/extract_ott_ids.html index 69e455af..05e990bd 100644 --- a/docs/reference/extract_ott_ids.html +++ b/docs/reference/extract_ott_ids.html @@ -90,7 +90,7 @@

Examples#> 000ott5338951' #> #> NAs removed. -# get the problematic elements from input +# Get the problematic elements from input canis_taxonomy$tip_label[attr(my_ott_ids, "na.action")] #> [1] "Canissp.KEB-2016ott5925604" "'Canissp.Russia/33" #> [3] "500ott5338950'" "'Canissp.Belgium/36" diff --git a/docs/reference/get_all_calibrations.html b/docs/reference/get_all_calibrations.html index 75a7147f..2280ac61 100644 --- a/docs/reference/get_all_calibrations.html +++ b/docs/reference/get_all_calibrations.html @@ -90,10 +90,10 @@

Arguments

Value

-

An object of class datelifeCalibrations, i.e., a data.frame (if -each = FALSE) or a list of data.frames (if each = TRUE) of secondary -calibrations, for each pair of taxon names in input. The attribute -chronograms stores the input data from which the calibrations were extracted.

+

An object of class congruifiedCalibrations, which is a data.frame (if +each = FALSE) or a list of data.frames (if each = TRUE) of node +ages for each pair of taxon names. You can access the input data from which +the calibrations were extracted with attributes(output)$chronograms.

Details

diff --git a/docs/reference/get_calibrations_vector.html b/docs/reference/get_calibrations_vector.html index 4f681ea5..f7cba16b 100644 --- a/docs/reference/get_calibrations_vector.html +++ b/docs/reference/get_calibrations_vector.html @@ -84,10 +84,10 @@

Arguments

Value

-

An object of class datelifeCalibrations, i.e., a data.frame (if -each = FALSE) or a list of data.frames (if each = TRUE) of secondary -calibrations, for each pair of taxon names in input. The attribute -chronograms stores the input data from which the calibrations were extracted.

+

An object of class congruifiedCalibrations, which is a data.frame (if +each = FALSE) or a list of data.frames (if each = TRUE) of node +ages for each pair of taxon names. You can access the input data from which +the calibrations were extracted with attributes(output)$chronograms.

Details

diff --git a/docs/reference/get_datelife_result.html b/docs/reference/get_datelife_result.html index b2bb364b..4a0759f0 100644 --- a/docs/reference/get_datelife_result.html +++ b/docs/reference/get_datelife_result.html @@ -115,9 +115,9 @@

Argumentsmake_datelife_query

use_tnrs
-

Whether to use OpenTree's Taxonomic Name Resolution Service (TNRS) +

Whether to use Open Tree of Life's Taxonomic Name Resolution Service (TNRS) to process input taxon names. Default to TRUE, it corrects misspellings and -taxonomic name variations.

+taxonomic name variations with tnrs_match(), a wrapper of rotl::tnrs_match_names().

get_spp_from_taxon

Whether to search ages for all species belonging to a diff --git a/docs/reference/get_datelife_result_datelifequery.html b/docs/reference/get_datelife_result_datelifequery.html index 05aec961..e41c1f95 100644 --- a/docs/reference/get_datelife_result_datelifequery.html +++ b/docs/reference/get_datelife_result_datelifequery.html @@ -96,9 +96,9 @@

Argumentstnrs_match(), a wrapper of rotl::tnrs_match_names().

get_spp_from_taxon

Whether to search ages for all species belonging to a diff --git a/docs/reference/get_opentree_chronograms.html b/docs/reference/get_opentree_chronograms.html index 0c5912cb..70559d52 100644 --- a/docs/reference/get_opentree_chronograms.html +++ b/docs/reference/get_opentree_chronograms.html @@ -73,7 +73,7 @@

Value

curators
-

A list of lists of curator names that uplodaded chronograms +

A list of lists of curator names that uploaded chronograms to the Open Tree of Life database.

studies
diff --git a/docs/reference/get_otol_chronograms.html b/docs/reference/get_otol_chronograms.html index 1b8c3b0b..1a90acd1 100644 --- a/docs/reference/get_otol_chronograms.html +++ b/docs/reference/get_otol_chronograms.html @@ -73,7 +73,7 @@

Value

curators
-

A list of lists of curator names that uplodaded chronograms +

A list of lists of curator names that uploaded chronograms to the Open Tree of Life database.

studies
diff --git a/docs/reference/get_taxon_summary.html b/docs/reference/get_taxon_summary.html index 2be7a2c2..5dff97d1 100644 --- a/docs/reference/get_taxon_summary.html +++ b/docs/reference/get_taxon_summary.html @@ -1,5 +1,5 @@ -Get a taxon summary of a datelifeResult object — get_taxon_summary • datelifeGet a taxon summary of a datelifeResult object. — get_taxon_summary • datelife @@ -47,13 +47,13 @@
-

Get a taxon summary of a datelifeResult object

+

Get a taxon summary of a datelifeResult object.

@@ -74,13 +74,19 @@

Value

Data as a presence/absence matrix of taxon names across chronograms.

$summary
-

A data.frame with taxon names as row.names() and two columns, one with the number of chronograms that contain a taxon name and the other one with the total number of chronograms that have at least 2 taxon names.

+

A data.frame with taxon names as row.names() and two +columns, one with the number of chronograms that contain a taxon name and +the other one with the total number of chronograms that have at least 2 +taxon names.

$summary2
-

A data.frame with chronogram citations as row.names() and two columns, one with the number of taxon names found in each chronogram and the other one with the total number of taxon names.

+

A data.frame with chronogram citations as row.names() +and two columns, one with the number of taxon names found in each chronogram +and the other one with the total number of taxon names.

$absent_taxa
-

A character vector of taxon names that are not found in the chronogram database.

+

A character vector of taxon names that are not found +in the chronogram database.

diff --git a/docs/reference/index.html b/docs/reference/index.html index 7abee41b..c26075ab 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -126,7 +126,7 @@

All functionscongruify_and_check() -
Congruify and check.
+
Congruify and Check.
contributor_cache @@ -209,8 +209,8 @@

All functionsextract_calibrations_phylo()

-
Extract secondary calibrations from a phylo or multiPhylo -object with branch lengths proportional to time using congruification.
+
Use congruification to extract secondary calibrations from a phylo or multiPhylo +object with branch lengths proportional to time.
extract_ott_ids() @@ -332,7 +332,7 @@

All functionsget_taxon_summary()

-
Get a taxon summary of a datelifeResult object
+
Get a taxon summary of a datelifeResult object.
get_valid_children() @@ -388,8 +388,7 @@

All functionsmake_datelife_query()

-
Go from taxon names from a character vector, a phylo object or a newick character -string to a datelifeQuery object
+
Go from taxon names to a datelifeQuery object
make_mrbayes_runfile() @@ -436,7 +435,7 @@

All functionsmatch_all_calibrations()

-
Match calibrations to nodes of a tree
+
Match calibrations to nodes of a given tree
message_multiphylo() @@ -638,7 +637,7 @@

All functionssubset2_search

-
A list with datelieQuery and datelifeResult objects from a search of taxon names from subset2_taxa
+
A list with datelifeQuery and datelifeResult objects from a search of taxon names from subset2_taxa
subset2_taxa @@ -663,7 +662,13 @@

All functionssummary(<datelifeResult>)

-
Summarize a datelifeResult object
+
Summarize a datelifeResult object.
+
+ + summary(<matchedCalibrations>) +
+
Summarize a matchedCalibrations object +summary.matchedCalibrations gets the node age distribution from a matchedCalibrations object.
summary_matrix_to_phylo() diff --git a/docs/reference/is_datelife_query.html b/docs/reference/is_datelife_query.html index 82d6f258..0ee40476 100644 --- a/docs/reference/is_datelife_query.html +++ b/docs/reference/is_datelife_query.html @@ -1,11 +1,27 @@ -Check if input is a datelifeQuery object — is_datelife_query • datelifeCheck if input is a datelifeQuery object — is_datelife_query • datelife @@ -59,11 +75,16 @@

-

is_datelife_query checks (1) if a given object is a list that contains the -elements of a datelifeQuery object: cleaned_names: A character -vector of taxon names, and phy: Either NA or a phylo object; and (2) -if the object is of class datelifeQuery.

-
+

is_datelife_query checks for two things to be TRUE or FALSE. +First, that input is of class datelifeQuery. +Second, that input is a list that contains at least two elements of a datelifeQuery object:

cleaned_names
+

A character vector of taxon names.

+ +
phy
+

Either NA or a phylo object.

+ + +

Usage

@@ -73,16 +94,16 @@

Usage

Arguments

input
-

Any object that will be checked to have the format of a 'datelifeQuery' class.

+

An object to be checked as an object with essential properties of a 'datelifeQuery' object.

Value

-

boolean

+

Is determined by the second condition.

Details

-

If the object has the correct format but is not a datelifeQuery -object, it will not be assigned the correct class.

+

If the object has the correct format but it has a class different than +datelifeQuery, the class is not modified.

Value

diff --git a/docs/reference/make_datelife_query.html b/docs/reference/make_datelife_query.html index fa215f61..fcd56d06 100644 --- a/docs/reference/make_datelife_query.html +++ b/docs/reference/make_datelife_query.html @@ -1,9 +1,5 @@ -Go from taxon names from a character vector, a phylo object or a newick character -string to a datelifeQuery object — make_datelife_query • datelifeGo from taxon names to a datelifeQuery object — make_datelife_query • datelife @@ -51,15 +47,13 @@
-

Go from taxon names from a character vector, a phylo object or a newick character -string to a datelifeQuery object

+

Go from taxon names to a datelifeQuery object

@@ -84,9 +78,9 @@

Argumentstnrs_match(), a wrapper of rotl::tnrs_match_names().

get_spp_from_taxon

Whether to search ages for all species belonging to a given taxon or not. Default to FALSE. If TRUE, it must have same length as input. diff --git a/docs/reference/match_all_calibrations.html b/docs/reference/match_all_calibrations.html index 75453c46..91c90a3c 100644 --- a/docs/reference/match_all_calibrations.html +++ b/docs/reference/match_all_calibrations.html @@ -1,7 +1,7 @@ -Match calibrations to nodes of a tree — match_all_calibrations • datelifeMatch calibrations to nodes of a given tree — match_all_calibrations • datelife @@ -49,14 +49,14 @@

-

match_all_calibrations summarizes nodes in tree that match -to any pair of given taxon names in a data frame of secondary calibrations.

+

match_all_calibrations searches a given tree for the most recent common +ancestor (mrca) of all taxon name pairs in a datelifeCalibration. It uses phytools::findMRCA().

@@ -69,30 +69,28 @@

Argumentsget_all_calibrations().

+

A congruifiedCalibrations object, an output of +get_all_calibrations().

Value

-

A list with:

phy
-

A phylo object with additional data of calibration distributions per node.

+

A list of two elements:

phy
+

A phylo object with nodes renamed with tree_add_nodelabels().

matched_calibrations
-

A data frame of summarized calibrations.

+

A matchedCalibrations object, which is the input calibrations +object with two additional columns storing results from the mrca search with +phytools::findMRCA(): $mrca_node_number and $mrca_node_name.

-
present_calibrations
-

A data frame of summarized calibrations.

- -

TODO: Explain the difference between present_calibrations and matched_calibrations

-
+

Details

The function takes pairs of taxon names in a secondary calibrations data frame, and looks for them in the vector of tip labels of the tree. If both are present, -then it gets the node that represents the Most Recent -Common Ancestor for that pair of taxa in the tree. -Nodes of phy can be named or not.

+then it gets the node that represents the most recent +common ancestor (mrca) for that pair of taxa in the tree. +Nodes of input phy can be named or not.