Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
UMR-ASTRE
mapMCDA
Commits
1f903689
Commit
1f903689
authored
Jun 12, 2019
by
Facundo Muñoz
®️
Browse files
risk_layer(): improve doc
parent
185c400d
Changes
3
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
1f903689
Package: mapMCDA
Title: Produce an epidemiological risk map by weighting multiple risk
factors
Version: 0.4.1
1
Date: 2019-06-
05
Version: 0.4.1
2
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 =
...
...
R/risk_layer.R
View file @
1f903689
#' 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.
...
...
man/risk_layer.Rd
View file @
1f903689
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment