Apply a tranformation function (e.g. square, log, something else) to one or more covariates, pixelwise. These can either overwrite the named covariates, or be added to the covariate set.

Transform(.data, trans = function(x) {     x }, which_cov = NULL,
  replace = TRUE)

Arguments

.data
Internal parameter, do not use in the workflow function. .data is a list of a data frame and a raster object returned from occurrence modules and covariate modules respectively. .data is passed automatically in workflow from the occurrence and covariate modules to the process module(s) and should not be passed by the user.#'
trans
a function defining a transformation to apply to each pixel in the covariate(s) raster. This can be a definition (e.g. function(x) x^2 for a square) or a function defined in base R (e.g. log1p for the log(x + 1) transformation). The default transformation does nothing.#'
which_cov
a character vector naming all of the covariates in the RasterStack to which the new transformation should be applied.#'
replace
a logical, determining whether to overwrite the values of the named layers with the transformed values (if replace = TRUE), or to add extra layers with the transformed covariates. If additional layers are added, they will be renamed accoring to the raster package's renaming conventions. This normally involves adding a '.2' at the end of the name.

Details

This module is essentially a wrapper around the raster function calc.

Data type

presence-only, presence/absence, presence/background, abundance, proportion

Version

0.1

See also

Other process: AddRandomUniformPredictors, BackgroundAndCrossvalid, Background, Bootstrap, Clean, Crossvalidate, JitterOccurrence, MESSMask, NoProcess, OneHundredBackground, OneThousandBackground, PartitionDisc, StandardiseCov, TargetGroupBackground, addInteraction

Author

ZOON Developers, zoonproject@gmail.com