From 44fcbc7a37df6f271e06b97c5836313e11c38319 Mon Sep 17 00:00:00 2001 From: flaviomoc Date: Tue, 19 Mar 2024 09:31:49 -0600 Subject: [PATCH] document new function --- DESCRIPTION | 2 +- NAMESPACE | 1 + man/suit.change.Rd | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 man/suit.change.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 227dc66..6cbf515 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -30,4 +30,4 @@ VignetteBuilder: Config/testthat/edition: 3 Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 diff --git a/NAMESPACE b/NAMESPACE index a93c74e..f70e265 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -6,4 +6,5 @@ export(spat.alpha) export(spat.beta) export(spat.rand) export(spat.trait) +export(suit.change) export(temp.beta) diff --git a/man/suit.change.Rd b/man/suit.change.Rd new file mode 100644 index 0000000..6a35dd4 --- /dev/null +++ b/man/suit.change.Rd @@ -0,0 +1,34 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/suit_change.R +\name{suit.change} +\alias{suit.change} +\title{Species suitability change between climate scenarios} +\usage{ +suit.change(r1, r2, filename = "") +} +\arguments{ +\item{r1}{A SpatRaster with presence-absence data (0 or 1) +for a set of species.} + +\item{r2}{A SpatRaster with presence-absence data (0 or 1) +for a set of species.} + +\item{filename}{Character. Save results if a name is provided.} +} +\value{ +A SpatRaster with suitability change (gain, loss, +unchanged, and unsuitable). +} +\description{ +Species suitability change between climate scenarios +} +\examples{ +#' \donttest{ +library(terra) +r1 <- terra::rast(system.file("extdata", "ref.tif", +package = "divraster")) +r2 <- terra::rast(system.file("extdata", "fut.tif", +package = "divraster")) +suit.change(r1, r2) +} +}