| isbinarymap {lacunaritycovariance} | R Documentation |
Test if an im object is a binary map
Description
Tests whether xi is a binary map.
The pixel values must be of logical type (TRUE, FALSE and NA only), or numerical (1, 0 or NA).
Usage
isbinarymap(xi, requiretrue = FALSE)
Arguments
xi |
an image object |
requiretrue |
Logical. If TRUE then |
Value
Logical value. TRUE if xi is a binary map. Otherwise FALSE.
If requiretrue = TRUE and xi is not a binary map then an error will occur.
Examples
# The following return TRUE
isbinarymap(as.im(heather$coarse, na.value = 0))
isbinarymap(as.im(heather$coarse, na.value = FALSE, value = TRUE))
# The following return FALSE
isbinarymap(as.im(heather$coarse, na.value = 0.2, value = 1))
isbinarymap(as.im(heather$coarse, na.value = 0, value = 1.5))
[Package lacunaritycovariance version 1.1-7 Index]