rcompadre
R tools for obtaining and manupulating data from the COMPADRE and COMADRE Plant and Animal Matrix Databases
Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
2 of 128 committers (1.6%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (18.7%) to scientific vocabulary
Last synced: 7 months ago
·
JSON representation
Repository
R tools for obtaining and manupulating data from the COMPADRE and COMADRE Plant and Animal Matrix Databases
Basic Info
- Host: GitHub
- Owner: jonesor
- Language: R
- Default Branch: main
- Homepage: https://jonesor.github.io/Rcompadre/
- Size: 5.8 MB
Statistics
- Stars: 11
- Watchers: 5
- Forks: 11
- Open Issues: 12
- Releases: 8
Created over 8 years ago
· Last pushed over 1 year ago
Metadata Files
Readme
Changelog
Codemeta
README.Rmd
---
output: github_document
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
eval = TRUE
)
```
# Rcompadre
| Project | Main branch | Devel branch |
|---------|:------------|:--------------|
| [](https://www.gnu.org/licenses/gpl-3.0.html) | [](https://github.com/jonesor/Rcompadre/actions/workflows/main_check.yaml) | [](https://github.com/jonesor/Rcompadre/actions/workflows/devel_build_check.yaml) |
| [](https://www.repostatus.org/#active) | [](https://app.codecov.io/gh/jonesor/Rcompadre) | |
|  |[](https://cran.r-project.org/package=Rcompadre)|
| | | |
An R package to facilitate working with the [COM(P)ADRE](https://compadre-db.org/) Plant and Animal Matrix Population Databases.
## Installation
Install the stable release package from CRAN with:
```{r, eval=FALSE}
install.packages("Rcompadre")
```
Install the package from GitHub with:
```{r, eval=FALSE}
# install package 'remotes' if necessary
# will already be installed if 'devtools' is installed
install.packages("remotes")
# argument 'build_opts = NULL' only needed if you want to build vignettes
remotes::install_github("jonesor/Rcompadre", build_opts = NULL)
```
To install from the development branch use:
```{r, eval=FALSE}
remotes::install_github("jonesor/Rcompadre", ref = "devel")
```
## Usage
```{r, eval=FALSE}
library(Rcompadre)
```
#### Fetching a database
Fetch the most recent database version from [compadre-db.org](https://compadre-db.org/) with
```{r, eval=FALSE}
compadre <- cdb_fetch("compadre") # or use 'comadre' for the animal database
```
or load from a local `.RData` file with
```{r, eval=FALSE}
compadre <- cdb_fetch("path/to/file/COMPADRE_v.4.0.1.RData")
```
If you prefer using `load()` to load your local copy of a legacy database, use `as_cdb()` to convert it to the `CompadreDB` class
```{r, eval=FALSE}
load("COMPADRE_v.4.0.1.RData") # loads object 'compadre'
compadre <- as_cdb(compadre)
```
#### Subsetting
For the most part `CompadreDB` objects work like a data frame. They can be subset using `[`, `subset()` or `filter()`
```{r, eval=FALSE, results="hide"}
# subset to the first 10 rows
compadre[1:10, ]
# subset to the species 'Echinacea angustifolia'
subset(compadre, SpeciesAccepted == "Echinacea angustifolia")
# subset to the species 'Echinacea angustifolia'
filter(compadre, SpeciesAccepted == "Echinacea angustifolia")
```
#### Example analysis: calculating population growth rates
First we'll use the function `cdb_flag()` to add columns to the database flagging potential issues with the projection matrices, such as missing values, or matrices that don't meet assumptions like ergodicity, irreducibility, or primitivity.
```{r,eval=FALSE}
compadre_flags <- cdb_flag(compadre)
```
We'll only be able to calculate population growth rates from matrices that don't contain missing values, and we only want to use matrices that meet the assumption of ergodicity, so we'll subset the database accordingly.
```{r, eval=FALSE}
compadre_sub <- subset(
compadre_flags,
check_NA_A == FALSE & check_ergodic == TRUE
)
```
Finally, we'll use the `eigs()` function from the [popdemo](https://CRAN.R-project.org/package=popdemo) package to calculate the population growth rate for every matrix in `compadre_sub`.
```{r, eval=FALSE}
compadre_sub$lambda <- sapply(matA(compadre_sub), popdemo::eigs, what = "lambda")
```
In the code above, the accessor function `matA()` is used to extract a list of projection matrices (the full matrix, `matA`) from every row of `compadre_sub`. There are also accessor functions for the matrix subcomponents (`matU()`, `matF()`, `matC()`), and for many other parts of the database too.
## Previous releases
Specific earlier releases of this package can be installed using the appropriate `@` tag.
For example to install version 0.1.0:
```{r, eval=FALSE}
remotes::install_github("jonesor/Rcompadre@v0.1.0")
```
See the Changelog for more details.
## Citation
Jones, Owen R., Patrick Barks, Iain M. Stott, Tamora D. James, Sam C. Levin, William K. Petry, Pol Capdevila, et al. 2022. "Rcompadre and Rage -- Two R Packages to Facilitate the Use of the COMPADRE and COMADRE Databases and Calculation of Life History Traits from Matrix Population Models." _Methods in Ecology and Evolution_. doi: 10.1111/2041-210X.13792.
## Contributions
All contributions are welcome. Please note that this project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By participating in this project you agree to abide by its terms.
There are numerous ways of contributing.
1. You can submit bug reports, suggestions etc. by [opening an issue](https://github.com/jonesor/Rcompadre/issues).
2. You can copy or fork the repository, make your own code edits and then send us a pull request. [Here's how to do that](https://jarv.is/notes/how-to-pull-request-fork-github/).
3. You can get to know us and join as a collaborator on the main repository.
4. You are also welcome to email us.
Owner
- Name: Owen Jones
- Login: jonesor
- Kind: user
- Location: Odense, Denmark
- Company: University of Southern Denmark
- Website: https://ecoevo.social/@jonesor
- Twitter: jonesor
- Repositories: 24
- Profile: https://github.com/jonesor
I'm an Associate Professor working on life history evolution, senescence/aging and population dynamics at the University of Southern Denmark.
CodeMeta (codemeta.json)
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"identifier": "Rcompadre",
"description": "Utility functions for interacting with the 'COMPADRE' and 'COMADRE' databases of matrix population models. Described in Jones et al. (2021) <doi:10.1101/2021.04.26.441330>.",
"name": "Rcompadre: Utilities for using the 'COM(P)ADRE' Matrix Model Database",
"codeRepository": "https://github.com/jonesor/Rcompadre",
"issueTracker": "https://github.com/jonesor/Rcompadre/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "1.4.0",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.4.1 (2024-06-14)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"author": [
{
"@type": "Person",
"givenName": "Patrick",
"familyName": "Barks",
"email": "barks@biology.sdu.dk",
"@id": "https://orcid.org/0000-0002-5947-8151"
},
{
"@type": "Person",
"givenName": "Danny",
"familyName": "Buss",
"email": "dlb50@cam.ac.uk"
},
{
"@type": "Person",
"givenName": "Roberto",
"familyName": "Salguero-Gomez",
"email": "rob.salguero@zoo.ox.ac.uk",
"@id": "https://orcid.org/0000-0002-6085-4433"
},
{
"@type": "Person",
"givenName": "Iain",
"familyName": "Stott",
"email": "stott@biology.sdu.dk",
"@id": "https://orcid.org/0000-0003-2724-7436"
},
{
"@type": "Person",
"givenName": "William K.",
"familyName": "Petry",
"email": "wpetry@ncsu.edu",
"@id": "https://orcid.org/0000-0002-5230-5987"
},
{
"@type": "Person",
"givenName": "Tamora",
"familyName": "James",
"email": "tamoradjames@protonmail.com",
"@id": "https://orcid.org/0000-0003-1363-4742"
},
{
"@type": "Person",
"givenName": "Owen",
"familyName": "Jones",
"email": "jones@biology.sdu.dk",
"@id": "https://orcid.org/0000-0001-5720-4686"
},
{
"@type": "Person",
"givenName": "Julia",
"familyName": "Jones",
"email": "juagjones@gmail.com",
"@id": "https://orcid.org/0000-0001-9223-1778"
},
{
"@type": "Person",
"givenName": "Gesa",
"familyName": "Römer",
"email": "gesa@biology.sdu.dk",
"@id": "https://orcid.org/0000-0002-4859-5870"
},
{
"@type": "Person",
"givenName": "Sam",
"familyName": "Levin",
"email": "levisc8@gmail.com",
"@id": "https://orcid.org/0000-0002-3289-9925"
}
],
"maintainer": [
{
"@type": "Person",
"givenName": "Owen",
"familyName": "Jones",
"email": "jones@biology.sdu.dk",
"@id": "https://orcid.org/0000-0001-5720-4686"
}
],
"softwareSuggestions": [
{
"@type": "SoftwareApplication",
"identifier": "dplyr",
"name": "dplyr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=dplyr"
},
{
"@type": "SoftwareApplication",
"identifier": "ggplot2",
"name": "ggplot2",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=ggplot2"
},
{
"@type": "SoftwareApplication",
"identifier": "knitr",
"name": "knitr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=knitr"
},
{
"@type": "SoftwareApplication",
"identifier": "maps",
"name": "maps",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=maps"
},
{
"@type": "SoftwareApplication",
"identifier": "rcrossref",
"name": "rcrossref",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rcrossref"
},
{
"@type": "SoftwareApplication",
"identifier": "rmarkdown",
"name": "rmarkdown",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rmarkdown"
},
{
"@type": "SoftwareApplication",
"identifier": "testthat",
"name": "testthat",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=testthat"
}
],
"softwareRequirements": {
"1": {
"@type": "SoftwareApplication",
"identifier": "R",
"name": "R",
"version": ">= 2.10"
},
"2": {
"@type": "SoftwareApplication",
"identifier": "methods",
"name": "methods"
},
"3": {
"@type": "SoftwareApplication",
"identifier": "popdemo",
"name": "popdemo",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=popdemo"
},
"4": {
"@type": "SoftwareApplication",
"identifier": "stats",
"name": "stats"
},
"5": {
"@type": "SoftwareApplication",
"identifier": "tibble",
"name": "tibble",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=tibble"
},
"6": {
"@type": "SoftwareApplication",
"identifier": "utils",
"name": "utils"
},
"SystemRequirements": null
},
"fileSize": "553.715KB",
"citation": [
{
"@type": "ScholarlyArticle",
"datePublished": "2022",
"author": [
{
"@type": "Person",
"givenName": [
"Owen",
"R."
],
"familyName": "Jones"
},
{
"@type": "Person",
"givenName": "Patrick",
"familyName": "Barks"
},
{
"@type": "Person",
"givenName": [
"Iain",
"M."
],
"familyName": "Stott"
},
{
"@type": "Person",
"givenName": [
"Tamora",
"D."
],
"familyName": "James"
},
{
"@type": "Person",
"givenName": [
"Sam",
"C."
],
"familyName": "Levin"
},
{
"@type": "Person",
"givenName": [
"William",
"K."
],
"familyName": "Petry"
},
{
"@type": "Person",
"givenName": "Pol",
"familyName": "Capdevila"
},
{
"@type": "Person",
"givenName": "Judy",
"familyName": "Che-Castaldo"
},
{
"@type": "Person",
"givenName": "John",
"familyName": "Jackson"
},
{
"@type": "Person",
"givenName": "Gesa",
"familyName": "Römer"
},
{
"@type": "Person",
"givenName": "Caroline",
"familyName": "Schuette"
},
{
"@type": "Person",
"givenName": [
"Chelsea",
"C"
],
"familyName": "Thomas"
},
{
"@type": "Person",
"givenName": "Roberto",
"familyName": "Salguero-Gómez"
}
],
"name": "Rcompadre and Rage - two {R} packages to facilitate the use of\n the {COMPADRE} and {COMADRE} databases and calculation of life\n history traits from matrix population models",
"identifier": "10.1111/2041-210X.13792",
"pagination": "770-781",
"@id": "https://doi.org/10.1111/2041-210X.13792",
"sameAs": "https://doi.org/10.1111/2041-210X.13792",
"isPartOf": {
"@type": "PublicationIssue",
"datePublished": "2022",
"isPartOf": {
"@type": [
"PublicationVolume",
"Periodical"
],
"volumeNumber": "13",
"name": "Methods in Ecology and Evolution"
}
}
}
],
"releaseNotes": "https://github.com/jonesor/Rcompadre/blob/master/NEWS.md",
"readme": "https://github.com/jonesor/Rcompadre/blob/main/README.md",
"contIntegration": [
"https://github.com/jonesor/Rcompadre/actions/workflows/main_check.yaml",
"https://github.com/jonesor/Rcompadre/actions/workflows/devel_build_check.yaml",
"https://app.codecov.io/gh/jonesor/Rcompadre"
],
"developmentStatus": "https://www.repostatus.org/#active",
"relatedLink": "https://CRAN.R-project.org/package=Rcompadre"
}
GitHub Events
Total
- Push event: 5
Last Year
- Push event: 5
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Owen Jones | j****s@b****k | 315 |
| Owen Jones | j****r@g****m | 182 |
| patrickbarks | p****s@g****m | 149 |
| levisc8 | l****8@g****m | 26 |
| iainmstott | i****t@g****m | 20 |
| Tamora James | t****1@s****k | 7 |
| bartholdja | j****s@g****m | 6 |
| dannylbuss | d****4@e****k | 4 |
| wpetry | w****y | 3 |
| Julia Barthold | b****a@g****m | 3 |
| Julia Barthold | V****a@V****l | 2 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| runner | r****r@M****l | 1 |
| and 98 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 50
- Total pull requests: 55
- Average time to close issues: 6 months
- Average time to close pull requests: 5 days
- Total issue authors: 9
- Total pull request authors: 6
- Average comments per issue: 1.46
- Average comments per pull request: 0.35
- Merged pull requests: 50
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- jonesor (30)
- patrickbarks (7)
- wpetry (3)
- levisc8 (3)
- iainmstott (2)
- bramdhondt (1)
- GesaRoemer (1)
- darrennorris (1)
- DannyLBuss (1)
Pull Request Authors
- jonesor (46)
- patrickbarks (5)
- wpetry (1)
- levisc8 (1)
- GesaRoemer (1)
- darrennorris (1)
Top Labels
Issue Labels
help wanted (8)
enhancement (7)
devel-resolved (5)
bug (3)
good first issue (1)
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 385 last-month
- Total dependent packages: 3
- Total dependent repositories: 2
- Total versions: 6
- Total maintainers: 1
cran.r-project.org: Rcompadre
Utilities for using the 'COM(P)ADRE' Matrix Model Database
- Homepage: https://github.com/jonesor/Rcompadre
- Documentation: http://cran.r-project.org/web/packages/Rcompadre/Rcompadre.pdf
- License: GPL-3
-
Latest release: 1.4.0
published over 1 year ago
Rankings
Forks count: 5.8%
Dependent packages count: 10.9%
Average: 15.6%
Stargazers count: 15.8%
Dependent repos count: 19.2%
Downloads: 26.5%
Maintainers (1)
Last synced:
8 months ago
Dependencies
DESCRIPTION
cran
- R >= 2.10 depends
- methods * imports
- popdemo * imports
- tibble * imports
- covr * suggests
- dplyr * suggests
- ggplot2 * suggests
- knitr * suggests
- maps * suggests
- rcrossref * suggests
- rmarkdown * suggests
- spelling * suggests
- testthat * suggests
.github/workflows/devel_build_check.yaml
actions
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/upload-artifact main composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite
.github/workflows/devel_pull_check.yaml
actions
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/upload-artifact main composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite
.github/workflows/main_check.yaml
actions
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/upload-artifact main composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite
.github/workflows/weekly-build-check.yml
actions
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/upload-artifact main composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite