This repository has been archived by the owner on Sep 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
95 lines (68 loc) · 2.29 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
92
93
94
95
taxview
=======
```{r echo=FALSE}
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
warning = FALSE
)
```
[![Project Status: Suspended – Initial development has started, but there has not yet been a stable, usable release; work has been stopped for the time being but the author(s) intend on resuming work.](https://www.repostatus.org/badges/latest/suspended.svg)](https://www.repostatus.org/#suspended)
[![R-check](https://github.com/ropensci/taxview/workflows/R-check/badge.svg)](https://github.com/ropensci/taxview/actions)
Summarise and visualize data sets taxonomically
The proposed workflow with `taxview`:
- input:
- data.frame with data, indicate which column has names or ids
- vector/list of names or ids (not associated with data)
- gather taxonomic classification data for each taxon
- from previously collected data, compute summary statistics/etc.
- visualize data among taxonomic groups, etc.
## install
```{r eval=FALSE}
remotes::install_github("ropensci/taxview")
```
```{r}
library(taxview)
```
## use
get some data
```{r}
x <- system.file("examples/plant_spp.csv", package = "taxview")
```
prepare data: clean, etc.
```{r}
dat <- tibble::as_tibble(
data.table::fread(x, stringsAsFactors = FALSE,
data.table = FALSE))
out <- tv_prep_ids(x, ids = dat$id, db = "ncbi")
```
Prepare summary. The output of `tv_summarise()` is an S3 class, with a summary of the groupings.
```{r}
res <- tv_summarise(out)
res
```
The `$summary` slot has the number of taxa in the dataset
```{r}
res$summary
```
The `$by_rank` slot has the breakdown of taxa within each rank category, as a count and percentage.
```{r}
res$by_rank
```
The `$by_rank_name` slot has the breakdown of taxa ...
```{r}
res$by_rank_name
```
The `$by_within_rank` slot has the breakdown of number of records within each taxon within each rank grouping.
```{r}
res$by_within_rank[1:2]
```
visualize (NOT WORKING YET)
```{r eval=FALSE}
tv_viz(res)
```
## Meta
* Please [report any issues or bugs](https://github.com/ropensci/taxview/issues).
* License: MIT
* Get citation information for `taxview` in R doing `citation(package = 'taxview')`
* Please note that this package is released with a [Contributor Code of Conduct](https://ropensci.org/code-of-conduct/). By contributing to this project, you agree to abide by its terms.