Skip to content
The R interface to the Fish Tree of Life
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE
R
inst
man
tests
vignettes
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
LICENSE
Makefile
NAMESPACE
NEWS.md
README.Rmd
README.md
cran-comments.md
fishtree.Rproj

README.md

Build Status CRAN status

fishtree

The goal of fishtree is to provide an easy interface in R to the Fish Tree of Life API, to download taxonomies, phylogenies, diversification rate information, and other data for ray-finned fishes. It should seamlessly integrate with the rest of the R ecosystem, especially the package ape.

Example

See a list of taxa available to download.

library(fishtree)

tax <- fishtree_taxonomy()
head(tax)
#>         rank        name
#> 1      class Actinopteri
#> 2      class   Cladistia
#> 3   subclass Chondrostei
#> 4   subclass Neopterygii
#> 5 infraclass    Holostei
#> 6 infraclass   Teleostei

Retrieve a phylogeny for the surgeonfishes and plot the phylogeny and lineage through time plot.

library(ape)
phy <- fishtree_phylogeny(rank = "Acanthuridae")
phy
#> 
#> Phylogenetic tree with 67 tips and 66 internal nodes.
#> 
#> Tip labels:
#>  Acanthurus_mata, Acanthurus_blochii, Acanthurus_xanthopterus, Acanthurus_bariene, Acanthurus_dussumieri, Acanthurus_leucocheilus, ...
#> 
#> Rooted; includes branch lengths.
par(mfrow=c(2, 1))
plot(phy, show.tip.label = FALSE)
ltt.plot(phy)

You can also check out the vignettes for more detailed examples.

Installation

You can install the released version of fishtree from CRAN with:

install.packages("fishtree")

Alternatively, download the development version with devtools:

devtools::install_github("jonchang/fishtree")

References

To cite fishtree in publications use:

Chang, J., Rabosky, D. L., Smith, S. A., & Alfaro, M. E. (2019). An R package and online resource for macroevolutionary studies using the ray‐finned fish tree of life. Methods in Ecology and Evolution. doi: 10.1111/2041-210x.13182

The primary data source for fishtree was published as a part of:

Rabosky, D. L., Chang, J., Title, P. O., Cowman, P. F., Sallan, L., Friedman, M., … Alfaro, M. E. (2018). An inverse latitudinal gradient in speciation rate for marine fishes. Nature, 559(7714), 392–395. doi: 10.1038/s41586-018-0273-1

License

The fishtree package is licensed under a 2-clause BSD license.

Releasing

withr::with_envvar(c("NOT_CRAN" = "true"), devtools::release())
You can’t perform that action at this time.