| ursa_match | R Documentation |
ursa_match creates raster mask, which is corresponded to vector of reference values
## S3 method for class 'ursaRaster'
mtfrm(x)
ursa_match(obj, value)
x, obj |
Object of class |
value |
Vector of reference values, generally, numeric. If |
ursa_match(obj,c("blue","yellow") is equal to obj=="blue" | obj=="yellow"
Object of class ursaRaster as a mask of correspondence to reference values
Nikita Platonov platonov@sev-in.ru
Comparison `==` in groupGeneric
session_grid(NULL)
a <- colorize(ursa_dummy(1),name=c("low","medium","high"),stretch="equal")
ta <- as.table(a)
ta
c('category value for "low"'=category_value(a,"low"))
res <- c('match to single char'=ursa_match(a,c("medium"))
,'match to multiple num'=ursa_match(a,c(0,category_value(a,"high")))
,'match to multiple char'=ursa_match(a,c("low","high"))
,'logical OR' = a=="low" | a=="high")
res
c(band_n(res)[1]==ta[2],band_n(res)[3]==sum(ta[c(1,3)]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.