x <- matrix( 12 + rnorm( 100, 10, 10 ), 10, 10 )
par( mfrow = c(2, 2) )
image.plot( thresholder( x, th = 12 ), main = "binary" )
image.plot( thresholder( x, type = "replace.below", th = 12 ),
main = "replace.below" )
image.plot( thresholder( x, th = 12, rule = "<=" ),
main = "binary with rule <=" )
image.plot( thresholder( x, type = "replace.below", th = 12, rule = "<=" ),
main = "replace.below with rule <=" )
par( mfrow = c(1,1) )
if (FALSE) {
data("geom000")
data("geom004")
data("ICPg240Locs")
hold <- make.SpatialVx( geom000, geom004, thresholds = c(0.01, 50.01),
projection = TRUE, map = TRUE, loc = ICPg240Locs, loc.byrow = TRUE,
field.type = "Geometric Objects Pretending to be Precipitation",
units = "mm/h", data.name = "ICP Geometric Cases", obs.name = "geom000",
model.name = "geom004" )
# Note: th = 1 means threshold = 0.01.
look <- thresholder( hold, th = 1 )
image.plot( look$X )
contour( look$Xhat, add = TRUE, col = "white" )
# Note: th = 2, means threshold = 50.01
look <- thresholder( hold, th = 2 )
image.plot( look$X )
contour( look$Xhat, add = TRUE, col = "white" )
look <- thresholder( hold, th = 1, rule = "<" )
image.plot( look$X )
contour( look$Xhat, add = TRUE, col = "white" )
}
Run the code above in your browser using DataLab