-
Notifications
You must be signed in to change notification settings - Fork 5
/
README.Rmd
92 lines (47 loc) · 2.92 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
helminthR
=======
[![R build status](https://github.com/ropensci/helminthR/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci/helminthR/actions)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/rmq9euldm5gy9qup?svg=true)](https://ci.appveyor.com/project/taddallas/helminthr)
[![codecov.io](https://codecov.io/github/ropensci/helminthR/coverage.svg?branch=master)](https://codecov.io/github/ropensci/helminthR?branch=master)
[![rstudio mirror downloads](http://cranlogs.r-pkg.org/badges/helminthR)](https://github.com/metacran/cranlogs.app)
> Programmatically access the London Natural History Museum's [helminth database](http://www.nhm.ac.uk/research-curation/scientific-resources/taxonomy-systematics/host-parasites/index.html).
See software note in _Ecography_ ([available here](http://onlinelibrary.wiley.com/doi/10.1111/ecog.02131/full))
### Installation
From GitHub
```{r eval=FALSE}
# install.packages("devtools")
devtools::install_github("rOpenSci/helminthR")
library("helminthR")
```
From CRAN
```{r eval=FALSE}
install.packages("helminthR")
```
### Main functions
#### `findHost()`
Given a host genus and (optionally) species and location, this function returns all host-parasite associations of a given host species. The example below determines all parasite records for helminth infections of _Gorilla gorilla_.
```{r eval=FALSE}
gorillaParasites <- findHost('Gorilla', 'gorilla')
head(gorillaParasites)
```
#### `findParasite()`
Given a helminth parasite genus (and optionally species, and location), this function returns a list of host-parasite records for that parasite. In the example below, I query the database for occurrences of the genus _Strongyloides_.
```{r eval=FALSE}
strongHosts <- findParasite(genus='Strongyloides')
str(strongHosts)
```
### `data(locations)` and `findLocation()`
A data file containing all the location names that can be queried, along with putative latitude and longitude coordinates for the centroid of each location can be found in `data(locations)`. Note that this will replace any object in the global environment named `locations`. These names can be given to the `findLocation()` function, which finds all host-parasite associations that have occurred in the given location. Below, I look at host-parasite associations recorded in France.
```{r eval=FALSE}
FrenchHostPars <- findLocation(location='France')
str(FrenchHostPars)
```
### Contribute!
Feel free to fork it and contribute some functionality.
## Meta
* Please [report any issues or bugs](https://github.com/ropensci/helminthR/issues).
* License: GPL-3
* Get citation information for `helminthR` in R doing `citation(package = 'helminthR')`
* Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md).
By participating in this project you agree to abide by its terms.
[![ropensci_footer](https://ropensci.org/public_images/github_footer.png)](https://ropensci.org)