{"id":297067,"name":"gdm","description":"Provides functions to fit, plot, summarize, and apply Generalized Dissimilarity Models.","url":"https://github.com/fitzlab-al/gdm","last_synced_at":"2026-06-13T07:30:20.990Z","repository":{"id":26786740,"uuid":"30245001","full_name":"fitzLab-AL/gdm","owner":"fitzLab-AL","description":"R package for Generalized Dissimilarity Modeling","archived":false,"fork":false,"pushed_at":"2026-02-10T15:51:31.000Z","size":18513,"stargazers_count":38,"open_issues_count":9,"forks_count":14,"subscribers_count":8,"default_branch":"master","last_synced_at":"2026-06-06T04:05:14.462Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"teqneers/ext-application","license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fitzLab-AL.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2015-02-03T13:52:13.000Z","updated_at":"2026-02-19T06:09:29.000Z","dependencies_parsed_at":"2024-09-30T09:30:32.589Z","dependency_job_id":"2184bb82-123c-4f88-8df3-8b432e3e9e4b","html_url":"https://github.com/fitzLab-AL/gdm","commit_stats":{"total_commits":192,"total_committers":4,"mean_commits":48.0,"dds":"0.21354166666666663","last_synced_commit":"564a69513e220b1aeb306b020e54a2aca2418b90"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fitzLab-AL/gdm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzLab-AL%2Fgdm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzLab-AL%2Fgdm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzLab-AL%2Fgdm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzLab-AL%2Fgdm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fitzLab-AL","download_url":"https://codeload.github.com/fitzLab-AL/gdm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzLab-AL%2Fgdm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34139178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"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":"fitzLab-AL","name":"Fitzpatrick Lab","uuid":"6588590","kind":"user","description":"Spatial Modeling \u0026 Biodiversity Group based at the University of Maryland Center for Environmental Science - Appalachian Lab","email":"","website":"http://mfitzpatrick.al.umces.edu/Site/Welcome.html","location":"Frostburg, MD","twitter":null,"company":"University of Maryland Center for Environmental Science - Appalachian Lab","icon_url":"https://avatars.githubusercontent.com/u/6588590?u=c104a7d207b0c87a20aa16ffdc58a835fa54f0bc\u0026v=4","repositories_count":2,"last_synced_at":"2023-02-28T02:10:35.152Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/fitzLab-AL","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-11T07:19:46.022Z","updated_at":"2023-02-28T02:10:35.154Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fitzLab-AL","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fitzLab-AL/repositories"},"packages":[{"id":395992,"name":"gdm","ecosystem":"cran","description":"Generalized Dissimilarity Modeling","homepage":"https://mfitzpatrick.al.umces.edu/gdm/","licenses":"GPL (≥ 3)","normalized_licenses":["CNRI-Python-GPL-Compatible"],"repository_url":"https://github.com/fitzLab-AL/gdm","keywords_array":[],"namespace":null,"versions_count":36,"first_release_published_at":"2015-03-27T20:58:00.000Z","latest_release_published_at":"2021-11-16T08:50:00.000Z","latest_release_number":"1.5.0","last_synced_at":"2026-06-10T08:47:46.147Z","created_at":"2022-04-06T16:37:35.665Z","updated_at":"2026-06-10T08:47:46.147Z","registry_url":"https://cran.r-project.org/package=gdm","install_command":null,"documentation_url":"http://cran.r-project.org/web/packages/gdm/gdm.pdf","metadata":{},"repo_metadata":{"id":26786740,"uuid":"30245001","full_name":"fitzLab-AL/gdm","owner":"fitzLab-AL","description":"R package for Generalized Dissimilarity Modeling","archived":false,"fork":false,"pushed_at":"2024-09-27T20:41:46.000Z","size":15364,"stargazers_count":33,"open_issues_count":6,"forks_count":11,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-09-28T07:30:53.904Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"teqneers/ext-application","license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fitzLab-AL.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2015-02-03T13:52:13.000Z","updated_at":"2024-09-27T20:38:02.000Z","dependencies_parsed_at":"2024-09-20T04:40:37.121Z","dependency_job_id":null,"html_url":"https://github.com/fitzLab-AL/gdm","commit_stats":{"total_commits":169,"total_committers":4,"mean_commits":42.25,"dds":"0.20710059171597628","last_synced_commit":"55cf11dbdbee0e2743b14c1a8ce224ec36a8e2ae"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzLab-AL%2Fgdm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzLab-AL%2Fgdm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzLab-AL%2Fgdm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzLab-AL%2Fgdm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fitzLab-AL","download_url":"https://codeload.github.com/fitzLab-AL/gdm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219876147,"owners_count":16554739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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_record":{"login":"fitzLab-AL","name":"Fitzpatrick Lab","uuid":"6588590","kind":"user","description":"Spatial Modeling \u0026 Biodiversity Group based at the University of Maryland Center for Environmental Science - Appalachian Lab","email":"","website":"http://mfitzpatrick.al.umces.edu/Site/Welcome.html","location":"Frostburg, MD","twitter":null,"company":"University of Maryland Center for Environmental Science - Appalachian Lab","icon_url":"https://avatars.githubusercontent.com/u/6588590?u=c104a7d207b0c87a20aa16ffdc58a835fa54f0bc\u0026v=4","repositories_count":2,"last_synced_at":"2023-02-28T02:10:35.152Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/fitzLab-AL","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-11T07:19:46.022Z","updated_at":"2023-02-28T02:10:35.154Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fitzLab-AL","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fitzLab-AL/repositories"},"tags":[]},"repo_metadata_updated_at":"2024-10-30T03:11:52.273Z","dependent_packages_count":1,"downloads":1031,"downloads_period":"last-month","dependent_repos_count":1,"rankings":{"downloads":17.8806767586821,"dependent_repos_count":23.92252894033838,"dependent_packages_count":18.14781834372217,"stargazers_count":10.605520926090827,"forks_count":7.3018699910952805,"docker_downloads_count":null,"average":15.571682991985753},"purl":"pkg:cran/gdm","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/cran/gdm","docker_dependents_count":1,"docker_downloads_count":44,"usage_url":"https://repos.ecosyste.ms/usage/cran/gdm","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/cran/gdm/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2024-10-30T00:00:38.904Z","issues_count":41,"pull_requests_count":8,"avg_time_to_close_issue":38114261.24242424,"avg_time_to_close_pull_request":6254442.625,"issues_closed_count":33,"pull_requests_closed_count":8,"pull_request_authors_count":3,"issue_authors_count":27,"avg_comments_per_issue":2.317073170731707,"avg_comments_per_pull_request":0.25,"merged_pull_requests_count":6,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":11,"past_year_pull_requests_count":7,"past_year_avg_time_to_close_issue":5987415.25,"past_year_avg_time_to_close_pull_request":978142.4285714285,"past_year_issues_closed_count":4,"past_year_pull_requests_closed_count":7,"past_year_pull_request_authors_count":2,"past_year_issue_authors_count":7,"past_year_avg_comments_per_issue":3.1818181818181817,"past_year_avg_comments_per_pull_request":0.2857142857142857,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":6,"issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzLab-AL%2Fgdm/issues","maintainers":[{"login":"fitzLab-AL","count":2,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/fitzLab-AL"},{"login":"xinxxxin","count":2,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/xinxxxin"}],"active_maintainers":[{"login":"xinxxxin","count":2,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/xinxxxin"},{"login":"fitzLab-AL","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/fitzLab-AL"}]},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/gdm/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/gdm/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/gdm/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/gdm/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/gdm/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages/gdm/codemeta","maintainers":[{"uuid":"mfitzpatrick@umces.edu","login":null,"name":"Matt Fitzpatrick","email":"mfitzpatrick@umces.edu","url":null,"packages_count":1,"html_url":null,"role":null,"created_at":"2022-11-14T17:14:37.043Z","updated_at":"2022-11-14T17:14:37.043Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/maintainers/mfitzpatrick@umces.edu/packages"}],"registry":{"name":"cran.r-project.org","url":"https://cran.r-project.org","ecosystem":"cran","default":true,"packages_count":28706,"maintainers_count":15952,"namespaces_count":0,"keywords_count":8933,"github":"r-project-org","metadata":{"icon_url":"https://cran.r-project.org/CRANlogo.png","funded_packages_count":556},"icon_url":"https://cran.r-project.org/CRANlogo.png","created_at":"2022-04-06T16:32:25.637Z","updated_at":"2026-06-10T05:17:56.420Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/packages","maintainers_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/maintainers","namespaces_url":"https://packages.ecosyste.ms/api/v1/registries/cran.r-project.org/namespaces"}}],"commits":{"id":1403660,"full_name":"fitzLab-AL/gdm","default_branch":"master","total_commits":209,"total_committers":4,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":52.25,"dds":0.19617224880382778,"past_year_total_commits":3,"past_year_total_committers":1,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":3.0,"past_year_dds":0.0,"last_synced_at":"2026-06-10T06:01:37.588Z","last_synced_commit":"1b86ce16f359d87ca6c7480fefd9a895aec1ac1a","created_at":"2023-10-25T13:21:19.516Z","updated_at":"2026-06-10T06:01:21.999Z","committers":[{"name":"Fitzpatrick Lab","email":"mfitzpatrick@umces.edu","login":"fitzLab-AL","count":168},{"name":"Matthew D. Lisk","email":"mlisk@al.umces.edu","login":"mliskAL","count":21},{"name":"Valavi, Roozbeh (Environment, Clayton)","email":"Roozbeh.Valavi@csiro.au","login":"rvalavi","count":17},{"name":"Xin Chen","email":"94563058+xinxxxin","login":"xinxxxin","count":3}],"past_year_committers":[{"name":"Fitzpatrick Lab","email":"mfitzpatrick@umces.edu","login":"fitzLab-AL","count":3}],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzLab-AL%2Fgdm/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-06-12T00:00:28.150Z","repositories_count":6257615,"commits_count":882544136,"contributors_count":35077777,"owners_count":1165455,"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":"fitzLab-AL/gdm","html_url":"https://github.com/fitzLab-AL/gdm","last_synced_at":"2026-04-28T09:03:41.321Z","status":"error","issues_count":52,"pull_requests_count":17,"avg_time_to_close_issue":31007268.38095238,"avg_time_to_close_pull_request":4507000.5,"issues_closed_count":42,"pull_requests_closed_count":14,"pull_request_authors_count":3,"issue_authors_count":33,"avg_comments_per_issue":2.1923076923076925,"avg_comments_per_pull_request":0.23529411764705882,"merged_pull_requests_count":11,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":5,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":6410159.5,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":4,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":4,"past_year_avg_comments_per_issue":2.2,"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:13:03.761Z","updated_at":"2026-04-28T09:03:41.321Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzLab-AL%2Fgdm","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/fitzLab-AL%2Fgdm/issues","issue_labels_count":{},"pull_request_labels_count":{},"issue_author_associations_count":{"NONE":49,"OWNER":3},"pull_request_author_associations_count":{"CONTRIBUTOR":13,"COLLABORATOR":3,"NONE":1},"issue_authors":{"Basquill":6,"sponslerdb":5,"fsdias":4,"fitzLab-AL":3,"Leitemfa":2,"marcelglueck":2,"francisvolh":2,"dinilu":2,"JulFrey":2,"03rcooke":1,"catarras":1,"jamiemkass":1,"claraqin":1,"grcolli":1,"n8layman":1,"kmgiljo":1,"kostask84":1,"njm-data":1,"burbrink":1,"ecologytales":1,"LafontRapnouilTristan":1,"willright28":1,"jamesryan1896":1,"richardastantonjr":1,"Otoliths":1,"lesteryuan":1,"anwar79melb":1,"jivelasquezt":1,"jsocolar":1,"talkinser":1,"leorjorge":1,"rvalavi":1,"prisilveira":1},"pull_request_authors":{"rvalavi":13,"xinxxxin":3,"howl-anderson":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-06-12T00:00:21.419Z","repositories_count":14791606,"issues_count":33191850,"pull_requests_count":109488893,"authors_count":11302458,"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":2},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{"Basquill":1,"prisilveira":1},"past_year_pull_request_authors":{},"maintainers":[{"login":"fitzLab-AL","count":3,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/fitzLab-AL"},{"login":"xinxxxin","count":3,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/xinxxxin"}],"active_maintainers":[]},"events":{"total":{"PullRequestEvent":9,"ForkEvent":1,"IssuesEvent":17,"WatchEvent":3,"IssueCommentEvent":43,"PushEvent":37},"last_year":{"IssuesEvent":1,"IssueCommentEvent":1,"PushEvent":1}},"keywords":[],"dependencies":[{"ecosystem":"cran","filepath":"DESCRIPTION","sha":null,"kind":"manifest","created_at":"2022-06-26T10:02:57.468Z","updated_at":"2022-06-26T10:02:57.468Z","repository_link":"https://github.com/fitzLab-AL/gdm/blob/master/DESCRIPTION","dependencies":[{"id":64794012,"package_name":"R","ecosystem":"cran","requirements":"\u003e= 3.5.0","direct":true,"kind":"depends","optional":false},{"id":64794013,"package_name":"parallel","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":64794014,"package_name":"methods","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":64794015,"package_name":"raster","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":64794016,"package_name":"Rcpp","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":64794017,"package_name":"reshape2","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":64794018,"package_name":"vegan","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":64794019,"package_name":"doParallel","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":64794020,"package_name":"foreach","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":64794021,"package_name":"pbapply","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/pkgdown.yaml","sha":null,"kind":"manifest","created_at":"2023-01-14T08:45:18.000Z","updated_at":"2023-01-14T08:45:18.000Z","repository_link":"https://github.com/fitzLab-AL/gdm/blob/master/.github/workflows/pkgdown.yaml","dependencies":[{"id":6893632571,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":6893632572,"package_name":"r-lib/actions/setup-pandoc","ecosystem":"actions","requirements":"v1","direct":true,"kind":"composite","optional":false},{"id":6893632573,"package_name":"r-lib/actions/setup-r","ecosystem":"actions","requirements":"v1","direct":true,"kind":"composite","optional":false},{"id":6893632574,"package_name":"r-lib/actions/setup-r-dependencies","ecosystem":"actions","requirements":"v1","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/R-CMD-check.yaml","sha":null,"kind":"manifest","created_at":"2024-04-16T20:31:07.853Z","updated_at":"2024-04-16T20:31:07.853Z","repository_link":"https://github.com/fitzLab-AL/gdm/blob/master/.github/workflows/R-CMD-check.yaml","dependencies":[{"id":17447518483,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false},{"id":17447518484,"package_name":"r-lib/actions/setup-pandoc","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":17447518485,"package_name":"r-lib/actions/setup-r","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":17447518486,"package_name":"r-lib/actions/setup-r-dependencies","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":17447518487,"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":"2024-04-16T20:31:07.897Z","updated_at":"2024-04-16T20:31:07.897Z","repository_link":"https://github.com/fitzLab-AL/gdm/blob/master/.github/workflows/test-coverage.yaml","dependencies":[{"id":17447518488,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false},{"id":17447518489,"package_name":"r-lib/actions/setup-r","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":17447518490,"package_name":"r-lib/actions/setup-r-dependencies","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":17447518491,"package_name":"actions/upload-artifact","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false}]}],"score":12.220231928088083,"created_at":"2024-07-24T00:07:27.041Z","updated_at":"2026-06-13T07:30:21.001Z","avatar_url":"https://github.com/fitzLab-AL.png","language":"R","category":"Biosphere","sub_category":"Biodiversity Analysis and Metrics","monthly_downloads":1031,"total_dependent_repos":1,"total_dependent_packages":1,"readme":"---\noutput: github_document\n---\n\n\u003c!-- DO NOT EDIT BY HAND! README.Rmd is generated from README.md. Please edit that file. --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# gdm \u003cimg src=\"man/figures/gdmLogo.png\" align=\"right\" width=\"120\" /\u003e\n\n\u003c!-- badges: start --\u003e\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/gdm?color=blue)](https://CRAN.R-project.org/package=gdm)\n[![Downloads](https://cranlogs.r-pkg.org/badges/gdm?color=blue)](https://CRAN.R-project.org/package=gdm)\n[![R-CMD-check](https://github.com/fitzLab-AL/gdm/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/fitzLab-AL/gdm/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\nThe `gdm` package provides functions to fit, plot, summarize, and apply Generalized Dissimilarity Models.\n\n# Installation\n\nThe **gdm** package is available on CRAN, development versions are available on GitHub.\n\n* Install from CRAN:\n\n```{r loadPackages CRAN, warning=F, message=F, eval=F}\ninstall.packages(\"gdm\")\n```\n\n* Install latest development version from GitHub (requires [devtools](https://github.com/r-lib/devtools) package):\n\n```{r loadPackages github, warning=F, message=F, eval=F}\nif (!require(\"devtools\")) {\n  install.packages(\"devtools\")\n}\ndevtools::install_github(\"fitzLab-AL/gdm\")\n\n```\n\n# Package Citation\n\nFitzpatrick MC, Mokany K, Manion G, Nieto-Lugilde D, Ferrier S. (2024) gdm: Generalized Dissimilarity Modeling. R package version 1.6.\n\n# New update of v1.6\n\nThe `gdm` package has been updated to leverage the [`terra`](https://cran.r-project.org/package=terra) package as its raster processing engine, leading to faster raster file processing. Preferably, inputs should be provided as `SpatRaster` objects, or any convertible object to `terra`, such as [`raster`](https://cran.r-project.org/package=raster) package objects or [`stars`](https://cran.r-project.org/package=stars) objects.\n\nWith the transition to `terra`, the `gdm` package is now capable of efficiently handling very large raster files, thanks to the underlying `terra` functionalities. Memory management is handled automatically by `terra`, but in the event of encountering out-of-memory errors, you can utilize `terra::terraOptions(steps = ...)` to increase the number of processing steps for large files.\n\n\n# Getting Started\n\nGDM has been used in many published studies. In addition to working through the examples here and those throughout the package documentation, we recommend reading these publications for background information:\n\nFerrier S, Manion G, Elith J, Richardson, K (2007) Using generalized dissimilarity modelling to analyse and predict patterns of beta diversity in regional biodiversity assessment. Diversity \u0026 Distributions 13: 252-264.[https://doi.org/10.1111/j.1472-4642.2007.00341.x](https://doi.org/10.1111/j.1472-4642.2007.00341.x)\n\nMokany K, Ware C, Woolley, SNC, Ferrier S, Fitzpatrick MC (2022) A working guide to harnessing generalized dissimilarity modelling for biodiversity analysis and conservation assessment. Global Ecology and Biogeography, 31, 802– 821. [https://doi.org/10.1111/geb.13459](https://doi.org/10.1111/geb.13459) \n\n# Introduction\n\nThe R package **gdm** implements Generalized Dissimilarity Modeling [Ferrier et al. 2007](https://doi.org/10.1111/j.1472-4642.2007.00341.x) to analyze and map spatial patterns of biodiversity. GDM models biological variation as a function of environment and geography using distance matrices – specifically by relating biological dissimilarity between sites to how much sites differ in their environmental conditions (environmental distance) and how isolated they are from one another (geographical distance). Here we demonstrate how to fit, apply, and interpret GDM in the context of analyzing and mapping species-level patterns. GDM also can be used to model other biological levels of organization, notably genetic [Fitzpatrick \u0026 Keller 2015](https://doi.org/10.1111/ele.12376), phylogenetic [Rosauer et al. 2014](https://doi.org/10.1111/j.1600-0587.2013.00466.x), or function/traits [Thomassen et al. 2010](https://doi.org/10.1111/j.1752-4571.2009.00093.x), and the approaches for doing so are largely identical to the species-level case with the exception of using a different biological dissimilarity metric depending on the type of response variable.  \n\n## Preparing the data for GDM: The site-pair table.\n\nThe initial step in fitting a generalized dissimilarity model is to combine the biological and environmental data into \"site-pair\" table format using the `formatsitepair` function. \n\nGDM can use several data formats as input. Most common are site-by-species tables (sites in rows, species across columns) for the response and site-by-environment tables (sites in rows, predictors across columns) as the predictors, though distance matrices and rasters also are accommodated as demonstrated below. \n\nThe **gdm** package comes with two example biological data sets and two example environmental data sets in a number of formats. Example data include:\n  - `southwest`: A data frame that contains x-y coordinates, 10 columns of predictors (five soil and five bioclimatic variables), and occurrence data for 900+ species of plants from southwest Australia (representing a subset of the data used in [@fitzpatrick_2013]). Note that the format of the `southwest` table is an x-y species list (i.e., `bioFormat = 2`, see below) where there is one row *per species record rather than per site*. These biological data are similar to what would be obtained from online databases such as [GBIF](https://www.gbif.org/).\n  - `gdmDissim`: A pairwise biological dissimilarity matrix derived from the species data provided in `southwest`. `gdmDissim` is provided to demonstrate how to proceed when you when you want to fit GDM using an existing biological distance matrix (e.g., pairwise Fst) as the response variable (i.e., `bioFormat = 3`, see below). Note however that distance matrices can also be used as predictors (e.g., to model compositional variation in one group as a function of compositional variation in another group [Jones et al 2013](https://doi.org/10.1111/1365-2745.12053).\n  - `swBioclims`: a raster stack of the five bioclimatic predictors provided in the `southwest` data.\n  \nNote that for all input data the rows and their order must match in the biological and environmental data frames and must not include NAs. This is best accomplished by making sure your tables have a column with a unique identifier for each site and that the order of these IDs are the same across all tables.  \n  \nTo build a site-pair table, we need individual tables for the biological and environmental data, so we first index the `southwest` table to create a table for the species data and a second for the environmental data:  \n\n```{r prepEnvdata, warning=FALSE, message=FALSE}\nlibrary(gdm)\n# have a look at the southwest data set\nstr(southwest)\n\n# biological data\n# get columns with xy, site ID, and species data\nsppTab \u003c- southwest[, c(\"species\", \"site\", \"Long\", \"Lat\")]\n\n# # columns 3-7 are soils variables, remainder are climate\n# get columns with site ID, env. data, and xy-coordinates\nenvTab \u003c- southwest[, c(2:ncol(southwest))]\n```\n\nBecause the `southwest` data is x-y species list format, we use `bioFormat=2`. Otherwise, we just need to provide the required column names to create the site-pair table:\n\n```{r sitepairTab, warning=FALSE, message=FALSE}\n# x-y species list example\ngdmTab \u003c- formatsitepair(bioData=sppTab, \n                         bioFormat=2, #x-y spp list\n                         XColumn=\"Long\", \n                         YColumn=\"Lat\",\n                         sppColumn=\"species\", \n                         siteColumn=\"site\", \n                         predData=envTab)\n```\n```{r echo=F}\ngdmTab[1:3,]\n```\n\nThe first column of a site-pair table contains a biological distance measure (the default is Bray-Curtis distance though any measure scaled between 0-1 is acceptable). The second column contains the weight to be assigned to each data point in model fitting (defaults to 1 if equal weighting is used, but can be customized by the user or can be scaled to site richness, see below). The remaining columns are the coordinates and environmental values at a site (s1) and those at a second site (s2) making up a site pair. Rows represent individual site-pairs. While the site-pair table format can produce extremely large data frames and contain numerous repeat values (because each site appears in numerous site-pairs), it also allows great flexibility. Most notably, individual site pairs easily can be excluded from model fitting.\n\nA properly formatted site-pair table will have at least six columns (distance, weights, s1.xCoord, s1.yCoord, s2.xCoord, s2.yCoord) and some number more depending on how many predictors are included. See `?formatsitepair` and `?gdm` for more details.\n\n### Formatting a site-pair table using a distance matrix.\n\nWhat if you already have a biological distance matrix because you are working with, say, genetic data? In that case, it is simple as changing the `bioFormat` argument and providing that matrix as the `bioData` object to the `sitepairformat` function. However, in addition to the pairwise dissimilarity values, the object must include a column containing the site IDs. Let’s have a quick look at `gdmDissim`, a pairwise biological distance matrix provided with the package (note that the first column contains site IDs):\n\n```{r}\n# Biological distance matrix example\ndim(gdmDissim)\ngdmDissim[1:5, 1:5]\n```\n\nWe can provide the `gdmDissim` object to `formatsitepair` as follows:\n\n```{r}\ngdmTab.dis \u003c- formatsitepair(bioData=gdmDissim, \n                             bioFormat=3, #diss matrix \n                             XColumn=\"Long\", \n                             YColumn=\"Lat\", \n                             predData=envTab, \n                             siteColumn=\"site\")\n```\n```{r echo=F}\ngdmTab[1:3,]\n```\n\nIn addition to starting with tablular data, environmental data can be extracted directly from rasters, assuming the x-y coordinates of sites are provided in either a site-species table (`bioFormat=1`) or as a x-y species list (`bioFormat=2`).\n\n```{r sitepairRaster, warning=FALSE, message=FALSE}\n# environmental raster data for sw oz\nswBioclims \u003c- terra::rast(system.file(\"./extdata/swBioclims.grd\", package=\"gdm\"))\n\ngdmTab.rast \u003c- formatsitepair(bioData=sppTab, \n                              bioFormat=2, # x-y spp list\n                              XColumn=\"Long\", \n                              YColumn=\"Lat\", \n                              sppColumn=\"species\",\n                              siteColumn=\"site\",\n                              predData=swBioclims) #raster stack\n```\n\nBecause some sites might not overlap with the rasters, we should check for and remove NA values from the site-pair table:\n\n```{r}\nsum(is.na(gdmTab.rast))\ngdmTab.rast \u003c- na.omit(gdmTab.rast)\n```\n\nNote that the `formatsitepair` function assumes that the coordinates of the sites are in the same coordinate system as the rasters. At present, no checking is performed to ensure this is the case. Note also that if your site coordinates are longitude-latitude that the calculation of geographic distances between sites will have errors, the size of which will depend on the geographic extent and location of your study region. We hope to deal with this in a later release, but for now you can avoid these problems by using a projected coordinate system (e.g., equidistant).\n\n### Dealing with biases associated with presence-only data\n\nThe ideal biological data for fitting a GDM are occurrence records (presence-absence or abundance) from a network of sites where all species (from one or more taxonomic groups) have been intensively sampled such that compositional dissimilarity can be reliably estimated between sites.  However most species data are collected as part of ad hoc surveys and are presence-only. Under these circumstances, there is no systematic surveying and no sites per se, but rather grid cells with some number of occurrence records depending on the number of species observed, with many grid cells having none, a few, or even a single species record. When these data are used to calculate compositional dissimilarity, erroneously high values will result, which will bias the model. \n\nThe `formatsitepair` function provides a few options for dealing with this potential bias, including (i) weighting sites relative to the number of species observed (`weightType=\"richness\"`), (ii) removing sites with few species (e.g., `speciesFilter=10`) or (iii) both. Decisions regarding which approach to use will depend on the nature of the data and study system. See Ferrier et al. (2007) for further discussion.\n\n```{r sitepairFilter richness, warning=FALSE, message=FALSE}\n# weight by site richness using weightType=\"richness\"\ngdmTab.rw \u003c- formatsitepair(bioData=sppTab, \n                            bioFormat=2, \n                            XColumn=\"Long\", \n                            YColumn=\"Lat\",\n                            sppColumn=\"species\", \n                            siteColumn=\"site\", \n                            predData=envTab, \n                            weightType=\"richness\")\n\n# weights based on richness (number of species records)\ngdmTab.rw[1:5, 1:5]\n```\n\n```{r sitepairFilter species, warning=FALSE, message=FALSE, eval=T}\n# remove sites with \u003c 10 species records using\n# sppFilter = 10\ngdmTab.sf \u003c- formatsitepair(bioData=sppTab, \n                            bioFormat=2, \n                            XColumn=\"Long\", \n                            YColumn=\"Lat\",\n                            sppColumn=\"species\", \n                            siteColumn=\"site\", \n                            predData=envTab, \n                            sppFilter=10)\n```\n\n## GDM fitting\n\nGDM is a nonlinear extension of permutational matrix regression that uses flexible splines and generalized linear modeling (GLM) to accommodate two types of nonlinearity common in ecological datasets: (1) variation in the rate of compositional turnover (non-stationarity) along environmental gradients, and (2) the curvilinear relationship between biological distance and environmental and geographical distance. \n\nThe function `gdm` fits generalized dissimilarity models and is simple to use once the biological and predictor data have been formatted to a site-pair table. In addition to specifying whether or not the model should be fit with geographical distance as a predictor variable, the user has the option to specify (i) the number of I-spline basis functions (the default is three, with larger values producing more complex splines) and (ii) the locations of \"knots\" along the splines (defaults to 0 (minimum), 50 (median), and 100 (maximum) quantiles when three I-spline basis functions are used). Even though these option are available, using the default values for these parameters will work fine for most applications. In other words, unless you have a good reason, you should probably use the default settings for splines and knots. The effects (and significance) of altering the number of splines and knot locations has not been systematically explored.\n\nHere we fit GDM with geo=T and default settings for all other parameters.\n\n```{r fitGDM, warning=FALSE, message=FALSE}\ngdm.1 \u003c- gdm(data=gdmTab, geo=TRUE)\n\n```\n\nThe `summary` function provides an overview of the model, the most important items to note are:\n\n* Percent Deviance Explained: goodness-of-fit \n* Intercept: expected dissimilarity between sites that do not differ in the predictors\n* Summary of the fitted I-splines for each predictor, including the values of the coefficients and their sum. The sum indicates the amount of compositional turnover associated with that variable, holding all other variables constant. I-spline summaries are order by coefficient sum. Variables with all coefficients=0 have no relationship with the modeled biological pattern. \n\n```{r summaryGDM, warning=FALSE, message=FALSE}\nsummary(gdm.1)\n```\n\n## GDM plots\n\nThe fitted splines represent one of the most informative components of a fitted GDM and so plotting and scrutinizing the splines is a major part of interpreting GDM and the analyzed biological patterns. The fitted model and I-splines can be viewed using the `plot` function, which produces a multi-panel plot that includes two model summary plots showing (i) the fitted relationship between predicted ecological distance and observed compositional dissimilarity and (ii) predicted versus observed biological distance, followed by a series of panels showing each I-spline with at least one non-zero coefficient (plotted in order by sum of the I-spline coefficients). Note that in the example bio18 is not plotted because all three coefficients equaled zero and so had no relationship with the response.\n\nThe maximum height of each spline indicates the magnitude of total biological change along that gradient and thereby corresponds to the relative importance of that predictor in contributing to biological turnover while holding all other variables constant (i.e., is a partial ecological distance). The spline’s shape indicates how the rate of biological change varies with position along that gradient. Thus, the splines provide insight into the total magnitude of biological change as a function of each gradient and where along each gradient those changes are most pronounced. In this example, compositional turnover is greatest along gradients of bio19 (winter precipitation) and phTotal (soil phosphorus) and most rapid near the low ends of these gradients.  \n\n```{r plotGDM, warning=FALSE, message=FALSE, fig.height=9, fig.width=6, fig.cap=\"The fitted model (first two panels) and I-splines (remaining panels).\"}\nlength(gdm.1$predictors) # get ideal of number of panels\nplot(gdm.1, plot.layout=c(4,3))\n```\n\nTo allow easy customization of I-spline plots, the `isplineExtract` function will extract the plotted values for each I-spline. \n\n```{r extractSplines, warning=FALSE, message=FALSE, fig.height=4, fig.width=4, fig.cap=\"Custom I-spline plot for geographic distance.\"}\ngdm.1.splineDat \u003c- isplineExtract(gdm.1)\nstr(gdm.1.splineDat)\nplot(gdm.1.splineDat$x[,\"bio19\"], \n     gdm.1.splineDat$y[,\"bio19\"], \n     lwd=3,\n     type=\"l\", \n     xlab=\"Winter precipitation (mm)\", \n     ylab=\"Partial ecological distance\")\n```\n\n## GDM predictions\n\nThe I-splines provide an indication of how species composition (or any other fitted biological response variable) changes along each environmental gradient. Beyond these insights, a fitted model also can be used to (i) predict biological dissimilarity between site pairs in space or between times using the `predict` function and (ii) transform the predictor variables from their arbitrary environmental scales to a common biological importance scale using the `gdm.transform` function.  \n\nThe following examples show predictions between site pairs in space and locations through time, and transformation of both tabular and raster data. For the raster example, the transformed layers are used to map spatial patterns of biodiversity.    \n\n##  Using a fitted GDM to predict biological dissimilarity between sites\n\nThe `predict` function requires a site-pair table in the same format as that used to fit the model. For demonstration purposes, we use the same table as that was used to fit the model, though predictions to new sites (or times) can be made as well assuming the same set of environmental/spatial predictors are available at those locations (or times). \n\n```{r predictSpaceGDM, warning=FALSE, message=FALSE, fig.height=4, fig.width=4, fig.cap=\"Predicted vs. observed compositional dissimilarity.\"}\ngdm.1.pred \u003c- predict(object=gdm.1, data=gdmTab)\n\nhead(gdm.1.pred)\n\nplot(gdmTab$distance, \n     gdm.1.pred, \n     xlab=\"Observed dissimilarity\", \n     ylab=\"Predicted dissimilarity\", \n     xlim=c(0,1), \n     ylim=c(0,1), \n     pch=20, \n     col=rgb(0,0,1,0.5))\nlines(c(-1,2), c(-1,2))\n```\n\n##  Predicting biological change through time\n\nThe `predict` function can be used to make predictions through time, for example, under climate change scenarios to estimate the magnitude of expected change in biological composition in response to environmental change [@fitzpatrick_2011]. In this case, rasters must be provided for two time periods of interest.\n\nFirst we fit a new model using only the climate variables and then create some fake future climate rasters to use as example data.\n\n```{r}\n# fit a new gdm using a table with climate data only (to match rasters)\ngdm.rast \u003c- gdm(gdmTab.rast, geo=TRUE)\n\n# make some fake climate change data\nfutRasts \u003c- swBioclims\n##reduce winter precipitation by 25% \u0026 increase temps\nfutRasts[[3]] \u003c- futRasts[[3]]*0.75\nfutRasts[[4]] \u003c- futRasts[[4]]+2\nfutRasts[[5]] \u003c- futRasts[[5]]+3\n```\n\nWe again use the `predict` function, but with `time=TRUE` and provide the current and future climate raster stacks. Th resulting map shows the expected magnitude of change in vegetation composition, which can be interpreted as a biologically-scaled metric of climate stress. \n\n```{r, echo=F}\nlibrary(colorRamps)\n```\n\n```{r predictTimeGDM, warning=FALSE, message=FALSE, fig.height=4, fig.width=4, fig.cap=\"Predicted magnitude of biological change through time\"}\ntimePred \u003c- predict(gdm.rast, swBioclims, time=TRUE, predRasts=futRasts)\nterra::plot(timePred, col=colorRamps::rgb.tables(1000))\n```\n\n##  Transforming spatial predictor layers using a fitted GDM\n\nUsing GDM to transform environmental data rescales the individual predictors to a common scale of biological importance. Spatially explicit predictor data to be transformed can be a raster stack or brick with one layer per predictor. If the model was fit with geographical distance and raster data are provided to the `transform` function, there is no need to provide x- or y-raster layers as these will be generated automatically. However, the character names of the x- and y-coordinates (e.g., \"Long\" and \"Lat\") used to fit the model need to be provided.\n\nFirst we fit a new model using only the climate variables.\n\n```{r fit GDM for transform}\n# fit the GDM\ngdmRastMod \u003c- gdm(data=gdmTab.rast, geo=TRUE)\n```\n\nWe then use the `gdm.transform` function to rescale the rasters.\n\n```{r transformGDM, warning=FALSE, message=FALSE}\ntransRasts \u003c- gdm.transform(model=gdmRastMod, data=swBioclims)\nterra::plot(transRasts, col=colorRamps::rgb.tables(1000))\n```\n\n## Visualizing multi-dimensional biological patterns\n\nSite-pair based biological distances are difficult to visualize. However, if the `transform` function is applied to rasters, the resulting multi-dimensional biological space can be mapped to reveal biological patterns in geographic space. Alternatively, a biplot can be used to depict where sites fall relative to each other in biological space and therefore how sites differ in predicted biological composition. In either case, the multi-dimensional biological space can be most effectively visualized by taking a PCA to reduce dimensionality and assigning the first three components to an RGB color palette. In the resulting map, color similarity corresponds to the similarity of expected plant species composition (in other words, cells with similar colors are expected to contain similar plant communities).    \n\n```{r, warning=FALSE, message=FALSE, fig.height=3, fig.width=3, fig.cap=\"Predicted spatial variation in plant species composition. Colors represent gradients in species composition derived from transformed environmental predictors. Locations with similar colors are expected to contain similar plant communities.\"}\n\n# Perform the principle components analysis on the gdm transformed rasters\npcaSamp \u003c- terra::prcomp(transRasts, maxcell = 5e5)\n \n# Predict the first three principle components for every cell in the rasters\n# note the use of the 'index' argument\npcaRast \u003c- terra::predict(transRasts, pcaSamp, index=1:3)\n\n# Stretch the PCA rasters to make full use of the colour spectrum\npcaRast \u003c- terra::stretch(pcaRast)\n\n# Plot the three PCA rasters simultaneously, each representing a different colour \n#  (red, green, blue)\nterra::plotRGB(pcaRast, r=1, g=2, b=3)\n```\n\n\n# SECTION 2 - Advanced spatial analyses using GDM\n\n\n\n\n","funding_links":[],"readme_doi_urls":["https://doi.org/10.1111/j.1472-4642.2007.00341.x","https://doi.org/10.1111/geb.13459","https://doi.org/10.1111/ele.12376","https://doi.org/10.1111/j.1600-0587.2013.00466.x","https://doi.org/10.1111/j.1752-4571.2009.00093.x","https://doi.org/10.1111/1365-2745.12053"],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/297067","html_url":"https://ost.ecosyste.ms/projects/297067"}