## S3 method for class 'numeric':
BinaryTransformation(data, threshold)## S3 method for class 'matrix':
BinaryTransformation(data, threshold)
## S3 method for class 'data.frame':
BinaryTransformation(data, threshold)
## S3 method for class 'array':
BinaryTransformation(data, threshold)
## S3 method for class 'RasterLayer':
BinaryTransformation(data, threshold)
## S3 method for class 'RasterStack':
BinaryTransformation(data, threshold)
matrix
, a data.frame
, a RasterLayer
or a RasterStack
containing the data to be converteddata
with binary (0 or 1) values, usually presence-absence.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).help
xx <- rnorm(50,10)
yy <- BinaryTransformation(xx, 10)
cbind(xx,yy)
Run the code above in your browser using DataLab