BinaryTransformation-methods: Convert species' probability of occurrence into binary...

Description Usage Arguments Details Value Author(s) Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
BinaryTransformation(data, threshold)

## S4 method for signature 'data.frame'
BinaryTransformation(data, threshold)

## S4 method for signature 'matrix'
BinaryTransformation(data, threshold)

## S4 method for signature 'numeric'
BinaryTransformation(data, threshold)

## S4 method for signature 'array'
BinaryTransformation(data, threshold)

## S4 method for signature 'RasterLayer'
BinaryTransformation(data, threshold)

## S4 method for signature 'RasterStack'
BinaryTransformation(data, threshold)

## S4 method for signature 'RasterBrick'
BinaryTransformation(data, threshold)

Arguments

data

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

threshold

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

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).

Value

An object of the same class than data with binary (0 or 1) values, usually presence-absence.

Author(s)

Wilfried Thuiller, Damien Georges

Examples

1
2
3
4
  xx <- rnorm(50,10)
  yy <- BinaryTransformation(xx, 10)

  cbind(xx,yy)

biomod2 documentation built on May 2, 2019, 5:08 p.m.