biomod2 (version 3.3-7.1)

FilteringTransformation: Convert species' probability of occurrence into binary presence-absence data using a predefined threshold

Description

Function that converts an object containing probability values into a filtered object according to a pre-defined threshold(s).

Usage

# S4 method for numeric
FilteringTransformation(data, threshold)

# S4 method for matrix FilteringTransformation(data, threshold)

# S4 method for data.frame FilteringTransformation(data, threshold)

# S4 method for array FilteringTransformation(data, threshold)

# S4 method for RasterLayer FilteringTransformation(data, threshold)

# S4 method for RasterStack FilteringTransformation(data, threshold)

Arguments

data

a numeric vector, a matrix, a data.frame, a RasterLayer or a RasterStack containing the data to be converted

threshold

a numeric value or a vector containing the threshold to be used for converting data.

Value

An object of the same class than data with the values of data if suprerior to threshold and 0 if not.

Methods

signature(data = "data.frame")

signature(data = "matrix")

signature(data = "numeric")

signature(data = "RasterBrick")

signature(data = "RasterLayer")

signature(data = "RasterStack")

Details

If data is a vector or a raster object, then the threshold should be a numeric value. If data is matrix,dataframe or rasterStack, then the threshold should have, in theory, as many values as the number of columns or layers to transform. In the particular case that the data to convert is a matrix/data.frame with several columns or a RasterStack with several layers and the threshold is a single numeric value, the same threshold will be applied to all columns (resp. layers).

See Also

help

Examples

Run this code
# NOT RUN {
xx <- rnorm(50,10)
yy <- FilteringTransformation(xx, 10)

cbind(xx,yy)

# }

Run the code above in your browser using DataCamp Workspace