This function is designed to behave similar to the ESRI
Spatial Analyst Con
function. The purpose of this function is to
provide R with a raster safe ifelse
function.
Arguments
- condition
raster or numeric; an expression that results in a boolean, matching the type of the condition.
- true_value
raster, constant; Input true raster or constant value.
- false_value
raster, constant; Input false raster or constant value.
Details
This function was proposed by Spacedman on gis.stackexchange way back in 2013, What is the equivalent of arcpy "Con" in QGIS and/or R raster-package?