-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Rmd
91 lines (61 loc) · 2.81 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
out.width = "100%"
)
library(fishtree)
```

[](https://cran.r-project.org/package=fishtree)
[](https://cran.r-project.org/package=fishtree)
[](https://doi.org/10.1111/2041-210x.13182)
# 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.
```{r}
library(fishtree)
tax <- fishtree_taxonomy()
head(tax)
```
Retrieve a phylogeny for the surgeonfishes and plot the phylogeny and lineage through time plot.
```{r}
library(ape)
phy <- fishtree_phylogeny(rank = "Acanthuridae")
phy
```
```r
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](https://CRAN.R-project.org) with:
```r
install.packages("fishtree")
```
Alternatively, download the development version with devtools:
```r
if (!requireNamespace("remotes", quietly = TRUE))
install.packages("remotes")
remotes::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, 10(7) 1118-1124. doi: [10.1111/2041-210x.13182](https://doi.org/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., Kaschner, K., Garilao, C., Near, T. J., Coll, 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](https://doi.org/10.1038/s41586-018-0273-1)
## License
The `fishtree` package is licensed under a [2-clause BSD license](https://opensource.org/licenses/BSD-2-Clause).
## Sponsorship
Please consider sponsoring the maintenance of `fishtree` via [GitHub Sponsors](https://github.com/sponsors/jonchang).
## Releasing
```
withr::with_envvar(c("NOT_CRAN" = "true"), devtools::release())
```