Reproducible example using documentation example species list:
install.packages("datelife")
library(datelife)
datelifeQuery <- make_datelife_query(input = c("Delphinus_delphis",
"Gallus gallus",
"elephas Maximus",
"felis_catus",
"homo-sapiens"))
datelifeSearch <- datelife_search(datelifeQuery, summary_format = "phylo_median") # fails with any _median or _sdm
Output:
> install.packages("datelife")
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.2/datelife_0.6.6.tgz'
Content type 'application/x-gzip' length 4106977 bytes (3.9 MB)
==================================================
downloaded 3.9 MB
The downloaded binary packages are in
/var/folders/44/cwblklps305_5z72cp5d1z5w0000gn/T//RtmprtSRBc/downloaded_packages
>
> library(datelife)
>
> datelifeQuery <- make_datelife_query(input = c("Delphinus_delphis",
+ "Gallus gallus",
+ "elephas Maximus",
+ "felis_catus",
+ "homo-sapiens"))
---> Phylo-processing 'input'.
* 'input' is not a phylogeny.
---> Making a DateLife query.
---> Runnning TNRS to match input names to reference taxonomy (OTT).
|====================================================================================================================================================================================================================================| 100%
---> Working with the following 5 taxa: Delphinus delphis | Gallus gallus | Elephas maximus | Felis silvestris | Homo sapiens.
DateLife query done!
>
> datelifeSearch <- datelife_search(datelifeQuery, summary_format = "phylo_median")
... Running a DateLife search.
... Searching DateLife's OpenTree chronogram database version v2022.01.28
Search done!
Input taxon names were found in 17 chronograms.
Trying with overlap = 2
Success!
... Calculating a median summary chronogram.
... No target_tree was provided, obtaining a tree topology from Open Tree synthetic phylogeny.
|====================================================================================================================================================================================================================================| 100%
Error in if (is.numeric(input$ott_id) & !is.na(input$ott_id)) { :
the condition has length > 1
Using any of the functions to summarise chronograms currently fails on the CRAN release.
The error seems to be associated with this line of code. I would try to fix it myself but for some reason the github version of the package fails to install for me: https://github.com/phylotastic/datelife/blob/0ee199af40aa259618bb8dd37fb8c813be9cad23/R/opentree_taxonomy.R#L93
Reproducible example using documentation example species list:
Output:
Session info: