Package: letsR 6.1

Bruno Vilela

letsR: Data Handling and Analysis in Macroecology

Tools for handling, processing, and analyzing species geographic distributions, environmental data, and biodiversity patterns across geographical, environmental, and attribute spaces. Includes functions for constructing and analyzing species distributions, estimating geographic ranges from occurrence records, and conducting spatial analyses in macroecology. See Vilela and Villalobos (2015) <doi:10.1111/2041-210X.12401> and Vilela et al. (2026) <doi:10.1111/2041-210X.70421> for details.

Authors:Bruno Vilela [aut, cre], Bruna M. Farina [ctb], Ricardo Dobrovolski [ctb], Sidney F. Gouveia [ctb], José Alexandre F. Diniz-Filho [ctb], Thiago F. Rangel [ctb], Trevor S. Fristoe [ctb], Carlos Calderón del Cid [ctb], Marco Túlio Pacheco Coelho [ctb], Catherine H. Graham [ctb], Fabricio Villalobos [aut]

letsR_6.1.tar.gz
letsR_6.1.zip(r-4.7-any)letsR_6.1.zip(r-4.6-any)letsR_6.1.zip(r-4.5-any)
letsR_6.1.tgz(r-4.6-any)letsR_6.1.tgz(r-4.5-any)
letsR_6.1.tar.gz(r-4.7-any)letsR_6.1.tar.gz(r-4.6-any)
letsR_6.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
letsR/json (API)

# Install 'letsR' in R:
install.packages('letsR', repos = c('https://macroecology.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/macroecology/letsr/issues

Pkgdown/docs site:https://brunovilela.github.io

Datasets:
  • IUCN - IUCN evaluation for frogs of the genus Phyllomedusa
  • PAM - PresenceAbsence object for frogs of the genus Phyllomedusa
  • Phyllomedusa - Phyllomedusa
  • prec - Annual Precipitation raster for the world.
  • temp - Mean temperature raster for the world.
  • wrld_simpl - Simplified world country polygons

On CRAN:

Conda:

8.80 score 32 stars 758 downloads 9 mentions 38 exports 15 dependencies

Last updated from:f4555cb8b0. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK291
source / vignettesOK323
linux-releaseOK265
macos-releaseOK177
macos-oldrelOK215
windows-develOK147
windows-releaseOK141
windows-oldrelOK199
wasm-releaseOK156

Exports:lets.addpolylets.addvarlets.attrcellslets.attrpamlets.classvarlets.correllets.distmatlets.envcellslets.envpamlets.fieldlets.gridirizerlets.iucncontlets.loadlets.maplizerlets.maplizer.attrlets.maplizer.envlets.midpointlets.overlaplets.pamcroplets.plot.attrcellslets.plot.attrpamlets.plot.envcellslets.plot.envpamlets.presablets.presab.birdslets.presab.gridlets.presab.grid.pointslets.presab.pointslets.rangelets.rangesizelets.savelets.shFilterlets.subsetPAMlets.subsetPAMattlets.subsetPAMenvlets.summarizerlets.summaryze.cellslets.transf

Dependencies:classclassIntDBIdbscane1071genericsgeosphereKernSmoothproxyRcpps2sfterraunitswk

Saving and loading letsR objects
Overview | Saving and loading a PresenceAbsence object | Saving and loading an environmental PAM | Saving and loading an attribute PAM | Final considerations

Last update: 2026-11-18
Started: 2023-11-15

Exploring autocorrelation across distances with lets.correl()
Overview | Moran's I and distance classes | Prepare temperature observations across Brazil | Calculate geographical distances | Construct a Moran's I correlogram | Understand the returned matrix | Compare distance-class definitions | Compare observed and permuted temperatures | Analyse multiple variables | Distances beyond geographical space | References

Last update: 2026-11-13
Started: 2026-11-13

A guide to transform species distributions into a presence absence matrix based on a user-defined grid in R
IUCN shapefiles | Quick start | Using different projections | Other features | Occurrence data (e.g. GBIF) | Using your own grid

Last update: 2026-11-13
Started: 2023-11-15

Estimating species geographic ranges with lets.range()
Overview | Prepare reproducible occurrence records | Estimate geographic ranges | How clustering changes the result | How buffer width and hull concavity change the result | Restrict ranges to Brazilian land | Work with the output: from multiple ranges to a presence-absence matrix | IUCN extent of occurrence and lets.range(): different purposes | Choosing an approach | Recommendations and limitations | Citation

Last update: 2026-11-13
Started: 2026-11-13

Adding variables to a PresenceAbsence object
Adding variables in raster format | Adding variables in polygon format

Last update: 2026-11-13
Started: 2023-11-15

Cropping and subsetting your presence absence matrix

Last update: 2026-11-13
Started: 2026-07-24

Cross-mapping biodiversity metrics across spaces
Overview | Data and environmental PAM (example with Phyllomedusa) | Environmental descriptors per environmental cell | Attribute-space PAM for Phyllomedusa species | Cross-mapping an environmental metric into geographic and attribute spaces | A. Into geographic space | B. Into attribute space | Cross-mapping attribute metrics back to geography

Last update: 2026-11-13
Started: 2025-10-17

Mapping species richness in attribute space
Overview | Simulating trait data and building the attribute space PAM | Visualizing richness in attribute space | Computing attribute-space descriptors | Summarizing descriptors by species | Linking attribute space to geographic space | References

Last update: 2026-11-13
Started: 2025-10-17

Mapping species richness in environmental space
Loading data | Creating a PAM in environmental space | Visualizing environmental richness | Highlighting a single species | Mapping traits in environmental space | Describing environmental–geographical structure | Summarize descriptors per environmental cell | Plot the descriptors | Diagnosing centrality vs. richness (optional) | References

Last update: 2026-11-13
Started: 2025-07-07

Mapping species traits: community level analysis
Community level analysis

Last update: 2026-11-13
Started: 2023-11-15

Macroecological analysis at the species level
Example 1: Species level test of Rapoport's rule on Phyllomedusa frogs. | Example 2: Extinction risk correlation with temperature

Last update: 2026-11-13
Started: 2023-11-15

Readme and manuals

Help Manual

Help pageTopics
Tools for Data Handling and Analysis in Macroecology.letsR-package letsR
IUCN evaluation for frogs of the genus PhyllomedusaIUCN
Add polygon coverage to a PresenceAbsence objectlets.addpoly
Add variables (in raster format) to a PresenceAbsence objectlets.addvar
Descriptors of position, centrality, and isolation in attribute spacelets.attrcells
Attribute-space Presence–Absence Matrix (attrPAM)lets.attrpam
Frequency distribution of a variable within a species' rangelets.classvar
Spatial correlogram based on Moran's Ilets.correl
Compute a geographic distance matrixlets.distmat
Environmental descriptors for Presence–Absence in environmental spacelets.envcells
Create a presence–absence matrix in environmental spacelets.envpam
Create species' values based on the species co-occurrence within focal rangeslets.field
Fits a grid into a PresenceAbsence objectlets.gridirizer
Transform IUCN RedList conservation status to continuous valueslets.iucncont
Load a letsR objectlets.load
Create a matrix summarizing species' attributes within cells of a PresenceAbsence objectlets.maplizer
Map species-level attributes over the attribute-space gridlets.maplizer.attr
Map species attributes in both environmental and geographic spaceslets.maplizer.env
Compute the midpoint of species' geographic rangeslets.midpoint
Compute pairwise species' geographic overlapslets.overlap
Crop a PresenceAbsence object based on an input shapefilelets.pamcrop
Map AttrPAM descriptor layerslets.plot.attrcells
Plot attrPAM resultslets.plot.attrpam
Map envPAM descriptorslets.plot.envcells
Plot species richness in environmental and geographical spacelets.plot.envpam
Create a presence-absence matrix of species' geographic ranges within a gridlets.presab
Create a presence-absence matrix of species' geographic ranges within a grid for the Birdlife spatial datalets.presab.birds
Create a presence-absence matrix of species' geographic ranges within a user's grid shapefile (beta version)lets.presab.grid
Create a presence-absence matrix based on species' point occurrences within a user's grid shapefile (beta version)lets.presab.grid.points
Create a presence-absence matrix based on species' point occurrenceslets.presab.points
Estimate species geographic ranges from occurrence recordslets.range
Compute species' geographic range sizeslets.rangesize
Save a letsR objectlets.save
Filter species' shapefiles based on its presence, origin, and seasonlets.shFilter
Subset a PresenceAbsence object based on species nameslets.subsetPAM
Subset an attribute PAM by species nameslets.subsetPAMatt
Subset an environmental PAM by species nameslets.subsetPAMenv
Summarize variable(s) values in a presence-absence matrix within species' rangeslets.summarizer
Aggregate cell-wise metrics across occupied cells per specieslets.summaryze.cells
Transform values of a vectorlets.transf
PresenceAbsence object for frogs of the genus PhyllomedusaPAM
PhyllomedusaPhyllomedusa
Plot an object of class PresenceAbsenceplot.PresenceAbsence
Annual Precipitation raster for the world.prec
PresenceAbsence ClassPresenceAbsence PresenceAbsence-class
Print for object of class PresenceAbsenceprint.PresenceAbsence
Print summary for object of class PresenceAbsenceprint.summary.PresenceAbsence
Summary for object of class PresenceAbsencesummary.PresenceAbsence
Mean temperature raster for the world.temp
Simplified world country polygonswrld_simpl