letsR
Allow users to build presence-absence matrices, the primary analytical tool in macroecology, from species' geographical distributions and merge them with species' traits, conservation information and spatial environmental layers.
https://github.com/macroecology/letsr
Category: Biosphere
Sub Category: Biodiversity Analysis and Metrics
Last synced: about 5 hours ago
JSON representation
Repository metadata
Tools for data handling and analysis in macroecology
- Host: GitHub
- URL: https://github.com/macroecology/letsr
- Owner: macroecology
- Created: 2014-04-16T16:58:33.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2026-07-24T21:03:54.000Z (18 days ago)
- Last Synced: 2026-07-24T21:17:59.641Z (18 days ago)
- Language: R
- Homepage: http://brunovilela.github.io/letsR/
- Size: 30.3 MB
- Stars: 30
- Watchers: 14
- Forks: 8
- Open Issues: 1
- Releases: 2
-
Metadata Files:
- Readme: README.md
README.md
letsR
The package
The letsR package is being developed to help researchers handle, process, and analyze macroecological data. It aims to integrate these methodological processes into a single software platform for macroecological analyses. The package's main functions allow users to build presence-absence matrices, the primary analytical tool in macroecology, from species' geographical distributions and merge them with species' traits, conservation information and spatial environmental layers. In addition, other packages' functions enable users to summarize and visualize data from presence-absence matrices.
All functions in this package use a prefix and a suffix separated by a dot; the prefix refers to the package's name, and the suffix to the actual function. This nomenclature avoids confusion with potentially similarly-named functions from other R packages.
For instance, the letsR function used to create presence-absence matrices is called lets.presab (but see also lets.presab.birds and lets.presab.points), whereas the one used to add variables to a presence-absence matrix is called lets.addvar.
The package's primary functions create and work on a particular S3 object class called PresenceAbsence.
Such PresenceAbsence object class allows storing information beyond presence-absence data (e.g. user-defined grid-cell system) and using the generic plot, summary and print functions of R.
Also, some package's functions allow the user to input customary R objects (e.g. vector, matrix, data.frame).
The letsR package is in continuous development, and suggestions are more than welcome!
We hope you enjoy it and find it helpful.
Package publication
https://besjournals.onlinelibrary.wiley.com/doi/abs/10.1111/2041-210X.12401
Install
Install letsR from CRAN
install.packages("letsR")
library("letsR")
Install letsR developers version from github
install.packages("devtools")
library(devtools)
install_github("macroecology/letsR")
library(letsR)
OBS.: To download the developers version you will need to have the git software installed (https://git-scm.com/).
If you are a windows user you will also need to download the Rtools (https://cran.r-project.org/bin/windows/Rtools/).
Documentation guide and annotated vignette index
The vignettes below provide a suggested pathway through the main letsR workflows. New users should begin by creating a presence-absence matrix and then proceed to the sections most relevant to their data and research questions.
Create and manage presence-absence matrices
- Create a presence-absence matrix: Start here to transform species ranges, occurrence records, or a user-defined spatial grid into a presence-absence matrix using
lets.presab,lets.presab.points, orlets.presab.grid. - Crop or subset a presence-absence matrix: Select focal species with
lets.subsetPAMor restrict aPresenceAbsenceobject to a geographic region withlets.pamcrop. - Add environmental or polygon variables: Append raster-based variables with
lets.addvaror polygon attributes withlets.addpoly. - Save and load a
PresenceAbsenceobject: Uselets.saveandlets.loadto preserve objects containing spatial raster components.
Analyze biodiversity patterns
- Map species traits at the community level: Aggregate species-level attributes within grid cells using
lets.maplizerand visualize their geographic variation. - Conduct species-level macroecological analyses: Summarize geographic and environmental information by species using functions such as
lets.rangesize,lets.midpoint, andlets.summarizer.
Work across geographic, environmental, and attribute spaces
- Map species richness in environmental space: Transform a geographic PAM into an environmental-space PAM with
lets.envpamand examine richness and structural descriptors across environmental gradients. - Map species richness in attribute space: Construct and visualize an attribute-space PAM with
lets.attrpam, then quantify cell-level structure withlets.attrcells. - Cross-map biodiversity metrics across spaces: Integrate environmental, geographic, and attribute spaces by calculating metrics in one space and projecting them into the others.
For documentation on individual functions and their arguments, consult the function reference.
Note
Due to changes in the IUCN API and limitations in data distribution established by IUCN terms of use, we are no longer maintaining the functions lets.iucn, lets.iucn.hist and lets.iucn.ha. These functions will be removed from the package in the next version. We apologize for any inconvenience this may cause.
Owner metadata
- Name: macroecology
- Login: macroecology
- Email:
- Kind: organization
- Description:
- Website:
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/6784164?v=4
- Repositories: 17
- Last ynced at: 2023-08-30T09:27:02.609Z
- Profile URL: https://github.com/macroecology
GitHub Events
Total
- Pull request event: 1
- Issues event: 4
- Watch event: 1
- Issue comment event: 2
- Push event: 30
Last Year
- Push event: 20
Committers metadata
Last synced: about 7 hours ago
Total Commits: 375
Total Committers: 14
Avg Commits per committer: 26.786
Development Distribution Score (DDS): 0.243
Commits in past year: 44
Committers in past year: 6
Avg Commits per committer in past year: 7.333
Development Distribution Score (DDS) in past year: 0.614
| Name | Commits | |
|---|---|---|
| Bruno Vilela de Moraes e Silva | b****a@h****m | 284 |
| Fabricio Villalobos | f****s@g****m | 45 |
| Bruna Farina | 8****a | 16 |
| Bruno Vilela | b****a@B****l | 6 |
| Bruno Vilela de Moraes e Silva | b****a@1****2 | 5 |
| Bruno Vilela de Moraes e Silva | b****a@B****l | 3 |
| Bruno Vilela | b****a@b****u | 3 |
| Bruno Vilela | b****a@B****l | 3 |
| Sara Varela | s****a@p****g | 2 |
| LuisDVA | l****d@c****x | 2 |
| Fabricio Villalobos | f****o@M****l | 2 |
| Bruno Vilela de Moraes e Silva | b****a@1****5 | 2 |
| Bruno Vilela de Moraes e Silva | b****a@1****6 | 1 |
| Bruno Vilela | b****a@l****l | 1 |
Committer domains:
- l-145-118-226-200.leidenuniv.nl: 1
- 192.168.0.56: 1
- 192.168.0.35: 1
- ciencias.unam.mx: 1
- paleobiogeography.org: 1
- boteromacserver2.wustl.edu: 1
- 192.168.0.12: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 15
Total pull requests: 5
Average time to close issues: 7 months
Average time to close pull requests: over 1 year
Total issue authors: 13
Total pull request authors: 4
Average comments per issue: 1.8
Average comments per pull request: 0.8
Merged pull request: 2
Bot issues: 0
Bot pull requests: 0
Past year issues: 1
Past year pull requests: 0
Past year average time to close issues: 4 days
Past year average time to close pull requests: N/A
Past year issue authors: 1
Past year pull request authors: 0
Past year average comments per issue: 1.0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- jpramirez10 (2)
- zbyxinalice03 (2)
- Marialejandra (1)
- cmzambranat (1)
- jgomezd (1)
- queziaramalho (1)
- jenifferteles (1)
- boris191055 (1)
- rsbivand (1)
- maxfarrell (1)
- VirginiaMorera (1)
- rhijmans (1)
- Tao-Liang (1)
Top Pull Request Authors
- luisDVA (2)
- SaraVarela (1)
- Rekyt (1)
- tpoisot (1)
Top Issue Labels
Top Pull Request Labels
Dependencies
- R >= 3.1.0 depends
- maps * depends
- raster * depends
- XML * imports
- fields * imports
- geosphere * imports
- maptools * imports
- methods * imports
- rgdal * imports
- rgeos * imports
- sp * imports
- devtools * suggests
- testthat * suggests
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v2 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
Score: 6.073044534100404