Skip to content

Commit

Permalink
Merge pull request #11 from danflop/licenseFiles
Browse files Browse the repository at this point in the history
Add license file, texts, and extras.
  • Loading branch information
bjohnso005 authored Feb 8, 2024
2 parents 9877d6f + acf8e0d commit bc91ff1
Show file tree
Hide file tree
Showing 20 changed files with 1,001 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
^Meta$
^_pkgdown\.yml$
^CRAN-SUBMISSION$
^LICENSE$
^\.github$
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Set default behaviour to automatically normalize line endings.
* text=auto
* eol=lf
# Ignore certain files when exporting
.gitignore export-ignore
.gitattributes export-ignore
^\.github$ export-ignore
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
51 changes: 51 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/setup-tinytex@v2

- uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual", "--as-cran")'
error-on: '"error"'
14 changes: 13 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,19 @@ Authors@R: c(person('Peter J.', 'Galante',email='[email protected]',role=c('aut'
person('Gonzalo E.','Pinilla-Buitrago',email='[email protected]',role=c('aut')),
person('Dan','Rosauer',email='[email protected]',role=c('aut')),
person('Mary E.','Blair',email='[email protected]',role=c('aut','cre')))
Description: Facilitates workflows to reproducibly transform estimates of species’ distributions into metrics relevant for conservation. For example, combining predictions from species distribution models with other maps of environmental data to characterize the proportion of a species’ range that is under protection, calculating metrics used under the IUCN Criteria A and B guidelines (Area of Occupancy and Extent of Occurrence), and calculating more general metrics such as taxonomic and phylogenetic diversity, as well as endemism. Also facilitates temporal comparisons among biodiversity metrics to inform efforts towards complementarity and consideration of future scenarios in conservation decisions. 'changeRangeR' also provides tools to determine the effects of modeling decisions through sensitivity tests.
Description: Facilitates workflows to reproducibly transform estimates of
species’ distributions into metrics relevant for conservation. For
example, combining predictions from species distribution models with other
maps of environmental data to characterize the proportion of a species’
range that is under protection, calculating metrics used under the
International Union for Conservation of Nature (IUCN) Criteria A and B
guidelines (Area of Occupancy and Extent of Occurrence), and calculating
more general metrics such as taxonomic and phylogenetic diversity, as well
as endemism. Also facilitates temporal comparisons among biodiversity
metrics to inform efforts towards complementarity and consideration of
future scenarios in conservation decisions. 'changeRangeR' also provides
tools to determine the effects of modeling decisions through sensitivity
tests.
License: GPL-3
VignetteBuilder: knitr
Encoding: UTF-8
Expand Down
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
changeRangeR 1.1.0
=============
- Removed expiring packages (maptools, rgeos, rgdal)
- Updated vignettes, website, & links
- Moved repo to `wallaceEcoMod`
- Removed expiring packages (maptools, rgeos, rgdal).
- Updated vignettes, website, & links.
- Moved repo to `wallaceEcoMod`.
- Updated licensing.

changeRangeR 1.0.2
=============
Expand Down
22 changes: 22 additions & 0 deletions R/PD_from_rasters.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# changeRangeR: An R package for reproducible biodiversity change metrics
# from species distribution estimates.
#
# PD_from_rasters.R
# File author: Wallace EcoMod Dev Team. 2023.
# --------------------------------------------------------------------------
# This file is part of the changeRangeR R package.
#
# changeRangeR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# changeRangeR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with changeRangeR. If not, see <http://www.gnu.org/licenses/>.
# --------------------------------------------------------------------------
#
# ######Phylogenetic diversity from distribution models in tif format and phylogenies in nexus format######
# ###This script applies to any distribution map in raster format changing only the extension type in line 52###
# #############Last updated January 2014 by Andrea Paz#################
Expand Down
22 changes: 22 additions & 0 deletions R/SE.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# changeRangeR: An R package for reproducible biodiversity change metrics
# from species distribution estimates.
#
# SE.R
# File author: Wallace EcoMod Dev Team. 2023.
# --------------------------------------------------------------------------
# This file is part of the changeRangeR R package.
#
# changeRangeR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# changeRangeR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with changeRangeR. If not, see <http://www.gnu.org/licenses/>.
# --------------------------------------------------------------------------
#
#' @name Species Endemism
#' @title Calculate species endemism
#' @description Calculate species endemism as the number of species in a place divided by the total number of places in which those species are found.
Expand Down
22 changes: 22 additions & 0 deletions R/aooArea.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# changeRangeR: An R package for reproducible biodiversity change metrics
# from species distribution estimates.
#
# aooArea.R
# File author: Wallace EcoMod Dev Team. 2023.
# --------------------------------------------------------------------------
# This file is part of the changeRangeR R package.
#
# changeRangeR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# changeRangeR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with changeRangeR. If not, see <http://www.gnu.org/licenses/>.
# --------------------------------------------------------------------------
#
#' @title Calculate AOO
#' @description Calculate area of occupancy measured in 2km resolution using a binary SDM
#' @param r Raster layer of a binary SDM. Must be either unprojected in the WGS84 datum, or projected in an equal area projection (see IUCN guidelines) measured in meters.
Expand Down
22 changes: 22 additions & 0 deletions R/cRRrmm.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# changeRangeR: An R package for reproducible biodiversity change metrics
# from species distribution estimates.
#
# cRRrmm.R
# File author: Wallace EcoMod Dev Team. 2023.
# --------------------------------------------------------------------------
# This file is part of the changeRangeR R package.
#
# changeRangeR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# changeRangeR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with changeRangeR. If not, see <http://www.gnu.org/licenses/>.
# --------------------------------------------------------------------------
#
#' @title Create metadata objects from 'changeRangeR'
#' @description Creates and populates a 'rangeModelMetadata' object from the output of 'changeRangeR'.
#' See Merow et al. (2019) <doi:10.1111/geb.12993> for more details on the nature of the metadata and the 'rangeModelMetadata' package.
Expand Down
22 changes: 22 additions & 0 deletions R/calc_PE.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# changeRangeR: An R package for reproducible biodiversity change metrics
# from species distribution estimates.
#
# calc_PE.R
# File author: Wallace EcoMod Dev Team. 2023.
# --------------------------------------------------------------------------
# This file is part of the changeRangeR R package.
#
# changeRangeR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# changeRangeR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with changeRangeR. If not, see <http://www.gnu.org/licenses/>.
# --------------------------------------------------------------------------
#
#' @name calc_PE
#' @title Calculate phylogenetic endemism
#' @description Calculates phylogenetic endemism from a tree and a sites by tips (species) matrix.
Expand Down
22 changes: 22 additions & 0 deletions R/complementarity.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# changeRangeR: An R package for reproducible biodiversity change metrics
# from species distribution estimates.
#
# complementarity.R
# File author: Wallace EcoMod Dev Team. 2023.
# --------------------------------------------------------------------------
# This file is part of the changeRangeR R package.
#
# changeRangeR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# changeRangeR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with changeRangeR. If not, see <http://www.gnu.org/licenses/>.
# --------------------------------------------------------------------------
#
#' @name complementarity
#' @title Compare raster values within and outside of a mask
#' @param ras1 `raster` object of categorical values (e.g., a species richness map)
Expand Down
22 changes: 22 additions & 0 deletions R/envChange.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# changeRangeR: An R package for reproducible biodiversity change metrics
# from species distribution estimates.
#
# envChange.R
# File author: Wallace EcoMod Dev Team. 2023.
# --------------------------------------------------------------------------
# This file is part of the changeRangeR R package.
#
# changeRangeR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# changeRangeR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with changeRangeR. If not, see <http://www.gnu.org/licenses/>.
# --------------------------------------------------------------------------
#
#' @title Calculate change in suitable SDM area through time
#' @description Calculate SDM area after masking for environmental variables through time
#' @param binaryRange raster object or shapefile of binary range (SDM, AOO, EOO) with same projection as rStack
Expand Down
22 changes: 22 additions & 0 deletions R/futureOverlap.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# changeRangeR: An R package for reproducible biodiversity change metrics
# from species distribution estimates.
#
# futureOverlap.R
# File author: Wallace EcoMod Dev Team. 2023.
# --------------------------------------------------------------------------
# This file is part of the changeRangeR R package.
#
# changeRangeR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# changeRangeR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with changeRangeR. If not, see <http://www.gnu.org/licenses/>.
# --------------------------------------------------------------------------
#
#' @title Calculate the ratio of future overlap of SDMs with shapefile categories
#' @description Calculate future overlap of SDMs with shapefile categories
#' @param r list of rasters of binary SDMs
Expand Down
22 changes: 22 additions & 0 deletions R/mcp.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# changeRangeR: An R package for reproducible biodiversity change metrics
# from species distribution estimates.
#
# mcp.R
# File author: Wallace EcoMod Dev Team. 2023.
# --------------------------------------------------------------------------
# This file is part of the changeRangeR R package.
#
# changeRangeR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# changeRangeR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with changeRangeR. If not, see <http://www.gnu.org/licenses/>.
# --------------------------------------------------------------------------
#
#' @title Minimum Convex Hull Polygon
#' @param xy Matrix or Data frame of occurrence coordinates
#' @param crs Character of coordinate reference system for minimum convex hull
Expand Down
24 changes: 24 additions & 0 deletions R/mcpSDM.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# changeRangeR: An R package for reproducible biodiversity change metrics
# from species distribution estimates.
#
# mcpSDM.R
# File author: Wallace EcoMod Dev Team. 2023.
# --------------------------------------------------------------------------
# This file is part of the changeRangeR R package.
#
# changeRangeR is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# changeRangeR is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with changeRangeR. If not, see <http://www.gnu.org/licenses/>.
# --------------------------------------------------------------------------
#
#' @name mcpSDM
#' @title SDM-based Minimum Convex Hull Polygon
#' @param p Raster* object of a continuous species distribution model prediction to base hull calculation on
Expand All @@ -19,6 +41,7 @@
#' @return a list of 5 objects.
#' @references Syfert, M. M., Joppa, L., Smith, M. J., Coomes, D. A., Bachman, S. P., & Brummitt, N. A. (2014). Using species distribution models to inform IUCN Red List assessments. Biological Conservation, 177, 174–184. https://doi.org/10.1016/j.biocon.2014.06.012
#' @examples
#' \donttest{
#' # create continuous raster
#' p <- raster::raster(nrows=108, ncols=108, xmn=-50, xmx=50)
#' raster::values(p)<- runif(n = (108*108))
Expand All @@ -31,6 +54,7 @@
#' thr <- 0.5
#' # mcpSDM
#' mcpSDM(p, xy, ch.orig, thr)
#' }
#' @export
#'

Expand Down
Loading

0 comments on commit bc91ff1

Please sign in to comment.