{"id":164899,"name":"letsR","description":"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.","url":"https://github.com/macroecology/letsr","last_synced_at":"2026-08-11T06:51:59.041Z","repository":{"id":16103091,"uuid":"18848072","full_name":"macroecology/letsR","owner":"macroecology","description":"Tools for data handling and analysis in macroecology","archived":false,"fork":false,"pushed_at":"2026-07-24T21:03:54.000Z","size":31767,"stargazers_count":30,"open_issues_count":1,"forks_count":8,"subscribers_count":14,"default_branch":"master","last_synced_at":"2026-07-24T21:17:59.641Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://brunovilela.github.io/letsR/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macroecology.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2014-04-16T16:58:33.000Z","updated_at":"2026-07-24T21:00:11.000Z","dependencies_parsed_at":"2026-03-15T03:01:51.674Z","dependency_job_id":null,"html_url":"https://github.com/macroecology/letsR","commit_stats":{"total_commits":321,"total_committers":9,"mean_commits":"35.666666666666664","dds":"0.19937694704049846","last_synced_commit":"cd130eaaaebd272f1ea8242ba4028dd1d412d843"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/macroecology/letsR","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macroecology%2FletsR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macroecology%2FletsR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macroecology%2FletsR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macroecology%2FletsR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macroecology","download_url":"https://codeload.github.com/macroecology/letsR/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macroecology%2FletsR/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36328166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-08-06T02:00:07.852Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"macroecology","name":"macroecology","uuid":"6784164","kind":"organization","description":"","email":null,"website":null,"location":null,"twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/6784164?v=4","repositories_count":17,"last_synced_at":"2023-08-30T09:27:02.609Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/macroecology","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-08T00:40:15.459Z","updated_at":"2023-08-30T09:27:03.124Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macroecology","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macroecology/repositories"},"packages":[],"commits":{"id":1404325,"full_name":"macroecology/letsR","default_branch":"master","total_commits":375,"total_committers":14,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":26.785714285714285,"dds":0.2426666666666667,"past_year_total_commits":44,"past_year_total_committers":6,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":7.333333333333333,"past_year_dds":0.6136363636363636,"last_synced_at":"2026-08-11T05:29:15.459Z","last_synced_commit":"bbe70ff0fcbf01160b409c33ea99a93e90412a55","created_at":"2023-10-25T13:38:07.033Z","updated_at":"2026-08-11T05:29:15.412Z","committers":[{"name":"Bruno Vilela de Moraes e Silva","email":"brunovilelasilva@hotmail.com","login":"BrunoVilela","count":284},{"name":"Fabricio Villalobos","email":"fabricio.villalobos@gmail.com","login":"fabro","count":45},{"name":"Bruna Farina","email":"82400814+BrunaFarina","login":"BrunaFarina","count":16},{"name":"Bruno Vilela","email":"brunovilela@Brunos-MacBook-Pro-2.local","login":null,"count":6},{"name":"Bruno Vilela de Moraes e Silva","email":"bvilela@192.168.0.12","login":null,"count":5},{"name":"Bruno Vilela de Moraes e Silva","email":"bvilela@Brunos-MacBook-Air-5.local","login":null,"count":3},{"name":"Bruno Vilela","email":"bvilela@boteromacserver2.wustl.edu","login":null,"count":3},{"name":"Bruno Vilela","email":"bvilela@Brunos-MacBook-Pro.local","login":null,"count":3},{"name":"Sara Varela","email":"svarela@paleobiogeography.org","login":"SaraVarela","count":2},{"name":"LuisDVA","email":"luisd@ciencias.unam.mx","login":"luisDVA","count":2},{"name":"Fabricio Villalobos","email":"fabro@Mac-d-Fab.local","login":null,"count":2},{"name":"Bruno Vilela de Moraes e Silva","email":"bvilela@192.168.0.35","login":null,"count":2},{"name":"Bruno Vilela de Moraes e Silva","email":"bvilela@192.168.0.56","login":null,"count":1},{"name":"Bruno Vilela","email":"brunovilela@l-145-118-226-200.leidenuniv.nl","login":null,"count":1}],"past_year_committers":[{"name":"BrunoVilela","email":"brunovilelasilva@hotmail.com","login":"BrunoVilela","count":17},{"name":"Bruna Farina","email":"82400814+BrunaFarina","login":"BrunaFarina","count":16},{"name":"Bruno Vilela de Moraes e Silva","email":"bvilela@192.168.0.12","login":null,"count":5},{"name":"Bruno Vilela de Moraes e Silva","email":"bvilela@Brunos-MacBook-Air-5.local","login":null,"count":3},{"name":"Bruno Vilela de Moraes e Silva","email":"bvilela@192.168.0.35","login":null,"count":2},{"name":"Bruno Vilela de Moraes e Silva","email":"bvilela@192.168.0.56","login":null,"count":1}],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/macroecology%2FletsR/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-08-11T00:00:06.485Z","repositories_count":6628851,"commits_count":918348729,"contributors_count":39032660,"owners_count":1331265,"committers_count":3293181,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"macroecology/letsR","html_url":"https://github.com/macroecology/letsR","last_synced_at":"2026-08-10T09:38:06.389Z","status":"error","issues_count":15,"pull_requests_count":5,"avg_time_to_close_issue":16992556.866666667,"avg_time_to_close_pull_request":42958221.5,"issues_closed_count":15,"pull_requests_closed_count":4,"pull_request_authors_count":4,"issue_authors_count":13,"avg_comments_per_issue":1.8,"avg_comments_per_pull_request":0.8,"merged_pull_requests_count":2,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":1,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":325045.0,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":1,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":1,"past_year_avg_comments_per_issue":1.0,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"created_at":"2023-05-10T22:45:23.116Z","updated_at":"2026-08-10T09:38:06.389Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/macroecology%2FletsR","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/macroecology%2FletsR/issues","issue_labels_count":{},"pull_request_labels_count":{},"issue_author_associations_count":{"NONE":15},"pull_request_author_associations_count":{"NONE":3,"MEMBER":1,"CONTRIBUTOR":1},"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},"pull_request_authors":{"luisDVA":2,"SaraVarela":1,"Rekyt":1,"tpoisot":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-08-10T00:00:23.081Z","repositories_count":14796799,"issues_count":28449068,"pull_requests_count":93938023,"authors_count":11427582,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{"NONE":1},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{"jgomezd":1},"past_year_pull_request_authors":{},"maintainers":[{"login":"SaraVarela","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/SaraVarela"}],"active_maintainers":[]},"events":{"total":{"PullRequestEvent":1,"IssuesEvent":4,"WatchEvent":1,"IssueCommentEvent":2,"PushEvent":30},"last_year":{"PushEvent":20}},"keywords":[],"dependencies":[{"ecosystem":"cran","filepath":"DESCRIPTION","sha":null,"kind":"manifest","created_at":"2022-08-18T18:31:40.191Z","updated_at":"2022-08-18T18:31:40.191Z","repository_link":"https://github.com/macroecology/letsR/blob/master/DESCRIPTION","dependencies":[{"id":1933287841,"package_name":"R","ecosystem":"cran","requirements":"\u003e= 3.1.0","direct":true,"kind":"depends","optional":false},{"id":1933287842,"package_name":"raster","ecosystem":"cran","requirements":"*","direct":true,"kind":"depends","optional":false},{"id":1933287843,"package_name":"maps","ecosystem":"cran","requirements":"*","direct":true,"kind":"depends","optional":false},{"id":1933287844,"package_name":"XML","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":1933287845,"package_name":"geosphere","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":1933287846,"package_name":"fields","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":1933287847,"package_name":"maptools","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":1933287848,"package_name":"sp","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":1933287849,"package_name":"rgdal","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":1933287850,"package_name":"rgeos","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":1933287851,"package_name":"methods","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":1933287852,"package_name":"testthat","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":1933287853,"package_name":"devtools","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/pkgdown.yaml","sha":null,"kind":"manifest","created_at":"2026-03-15T03:01:51.021Z","updated_at":"2026-03-15T03:01:51.021Z","repository_link":"https://github.com/macroecology/letsR/blob/master/.github/workflows/pkgdown.yaml","dependencies":[{"id":25839059089,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false},{"id":25839059118,"package_name":"r-lib/actions/setup-pandoc","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":25839059132,"package_name":"r-lib/actions/setup-r","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":25839059149,"package_name":"r-lib/actions/setup-r-dependencies","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":25839059162,"package_name":"JamesIves/github-pages-deploy-action","ecosystem":"actions","requirements":"v4.4.1","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/R-CMD-check.yaml","sha":null,"kind":"manifest","created_at":"2023-01-11T20:24:31.463Z","updated_at":"2023-01-11T20:24:31.463Z","repository_link":"https://github.com/macroecology/letsR/blob/master/.github/workflows/R-CMD-check.yaml","dependencies":[{"id":6871328158,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":6871328159,"package_name":"r-lib/actions/setup-pandoc","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":6871328160,"package_name":"r-lib/actions/setup-r","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":6871328161,"package_name":"r-lib/actions/setup-r-dependencies","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":6871328162,"package_name":"r-lib/actions/check-r-package","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/test-coverage.yaml","sha":null,"kind":"manifest","created_at":"2023-01-11T20:24:31.486Z","updated_at":"2023-01-11T20:24:31.486Z","repository_link":"https://github.com/macroecology/letsR/blob/master/.github/workflows/test-coverage.yaml","dependencies":[{"id":6871328171,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":6871328172,"package_name":"r-lib/actions/setup-r","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":6871328173,"package_name":"r-lib/actions/setup-r-dependencies","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false}]}],"score":6.073044534100404,"created_at":"2024-01-03T00:06:18.639Z","updated_at":"2026-08-11T06:51:59.043Z","avatar_url":"https://github.com/macroecology.png","language":"R","category":"Biosphere","sub_category":"Biodiversity Analysis and Metrics","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"# letsR \u003ca href=\"https://brunovilela.github.io/letsR/\"\u003e\u003cimg src=\"man/figures/logo.png\" align=\"right\" height=\"139\" alt=\"letsR website\" /\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n\n[![R-CMD-check](https://github.com/BrunoVilela/letsR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/BrunoVilela/letsR/actions/workflows/R-CMD-check.yaml)\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/letsR)](https://CRAN.R-project.org/package=letsR)\n[![CRAN downloads](https://cranlogs.r-pkg.org/badges/letsR)](https://github.com/r-hub/cranlogs.app)\n[![Total CRAN downloads](https://cranlogs.r-pkg.org/badges/grand-total/letsR)](https://github.com/r-hub/cranlogs.app)\n[![codecov](https://codecov.io/github/BrunoVilela/letsR/graph/badge.svg?token=PAsk54dmff)](https://codecov.io/github/BrunoVilela/letsR)\n\n\u003c!-- badges: end --\u003e\n\n## The package\nThe 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.\n\nAll 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. \nFor 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`.  \nThe package's primary functions create and work on a particular S3 object class called `PresenceAbsence`. \nSuch `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. \nAlso, some package's functions allow the user to input customary R objects (e.g. `vector`, `matrix`, `data.frame`). \n\nThe letsR package is in continuous development, and suggestions are more than welcome!\n\nWe hope you enjoy it and find it helpful.\n\n## Package publication\nhttps://besjournals.onlinelibrary.wiley.com/doi/abs/10.1111/2041-210X.12401\n\n\n## Install\n\nInstall `letsR` from CRAN\n\n```coffee\ninstall.packages(\"letsR\")\nlibrary(\"letsR\")\n```\nInstall `letsR` developers version from github\n\n\n```coffee\ninstall.packages(\"devtools\")\nlibrary(devtools)\ninstall_github(\"macroecology/letsR\")\nlibrary(letsR)\n```\n\nOBS.: To download the developers version you will need to have the git software installed (https://git-scm.com/).\nIf you are a windows user you will also need to download the Rtools (https://cran.r-project.org/bin/windows/Rtools/).\n\n## Documentation guide and annotated vignette index\n\nThe 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.\n\n### Create and manage presence-absence matrices\n\n- [Create a presence-absence matrix](https://brunovilela.github.io/letsR/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html): 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`, or `lets.presab.grid`.\n- [Crop or subset a presence-absence matrix](https://brunovilela.github.io/letsR/articles/cropping-and-subsetting-your-presence-absence-matrix.html): Select focal species with `lets.subsetPAM` or restrict a `PresenceAbsence` object to a geographic region with `lets.pamcrop`.\n- [Add environmental or polygon variables](https://brunovilela.github.io/letsR/articles/Adding-variables-to-a-presenceabsence-object.html): Append raster-based variables with `lets.addvar` or polygon attributes with `lets.addpoly`.\n- [Save and load a `PresenceAbsence` object](https://brunovilela.github.io/letsR/articles/save-load-presenceabsence.html): Use `lets.save` and `lets.load` to preserve objects containing spatial raster components.\n\n### Analyze biodiversity patterns\n\n- [Map species traits at the community level](https://brunovilela.github.io/letsR/articles/mapping-species-traits.html): Aggregate species-level attributes within grid cells using `lets.maplizer` and visualize their geographic variation.\n- [Conduct species-level macroecological analyses](https://brunovilela.github.io/letsR/articles/species-level-macroecological-analysis.html): Summarize geographic and environmental information by species using functions such as `lets.rangesize`, `lets.midpoint`, and `lets.summarizer`.\n\n### Work across geographic, environmental, and attribute spaces\n\n- [Map species richness in environmental space](https://brunovilela.github.io/letsR/articles/Mapping-species-richness-in-environmental-space.html): Transform a geographic PAM into an environmental-space PAM with `lets.envpam` and examine richness and structural descriptors across environmental gradients.\n- [Map species richness in attribute space](https://brunovilela.github.io/letsR/articles/Mapping-species-richness-in-attribute-space.html): Construct and visualize an attribute-space PAM with `lets.attrpam`, then quantify cell-level structure with `lets.attrcells`.\n- [Cross-map biodiversity metrics across spaces](https://brunovilela.github.io/letsR/articles/Cross-mapping-biodiversity-metrics-Phyllomedusa.html): Integrate environmental, geographic, and attribute spaces by calculating metrics in one space and projecting them into the others.\n\nFor documentation on individual functions and their arguments, consult the [function reference](https://brunovilela.github.io/letsR/reference/index.html).\n\n\n## Note\nDue 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.  \n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/164899","html_url":"https://ost.ecosyste.ms/projects/164899"}