Commit 1f903689 authored by Facundo Muñoz's avatar Facundo Muñoz ®️
Browse files

risk_layer(): improve doc

parent 185c400d
Package: mapMCDA
Title: Produce an epidemiological risk map by weighting multiple risk
factors
Version: 0.4.11
Date: 2019-06-05
Version: 0.4.12
Date: 2019-06-12
Authors@R: c( person("Andrea", "Apolloni", email =
"andrea.apolloni@cirad.fr", role = c("ctb"), comment = "Animal
mobility algorithm"), person("Elena", "Arsevska", email =
......
#' Compute risk layer
#'
#' Rescale a raster with a linear relationship.
#' Compute a raster map from the input layer and rescale with a linear
#' relationship.
#'
#' If you need an inverse relationship, just reverse the target scale.
#' For Spatial* objects (geometries such as point, lines or polygons),
#' compute the \code{distance_map()}, which gives a RasterLayer. For
#' \code{igraph} objects (from network data), compute a RasterLayer
#' with the relative importance of the nearest node. For a RasterLayer
#' mask, extend or crop to the \code{boundaries} as needed.
#'
#' Finally, scale the RasterLayer outcome of any of the three input
#' types. If you need an inverse relationship, just reverse the target
#' scale.
#'
#' @param x a RasterLayer object
#' @param x a Spatial*, RasterLayer or igraph object
#' @param boundaries a Spatial* object, used to determine the boundaries of the
#' computed risk layer.
#' @param scale_target numeric vector of length 2. New scale.
......
......@@ -7,7 +7,7 @@
risk_layer(x, boundaries, scale_target = c(0, 100))
}
\arguments{
\item{x}{a RasterLayer object}
\item{x}{a Spatial*, RasterLayer or igraph object}
\item{boundaries}{a Spatial* object, used to determine the boundaries of the
computed risk layer.}
......@@ -18,10 +18,19 @@ computed risk layer.}
A RasterLayer object in the new scale.
}
\description{
Rescale a raster with a linear relationship.
Compute a raster map from the input layer and rescale with a linear
relationship.
}
\details{
If you need an inverse relationship, just reverse the target scale.
For Spatial* objects (geometries such as point, lines or polygons),
compute the \code{distance_map()}, which gives a RasterLayer. For
\code{igraph} objects (from network data), compute a RasterLayer
with the relative importance of the nearest node. For a RasterLayer
mask, extend or crop to the \code{boundaries} as needed.
Finally, scale the RasterLayer outcome of any of the three input
types. If you need an inverse relationship, just reverse the target
scale.
}
\examples{
ad <- mapMCDA_datasets()$animal.density
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment