# NOT RUN {
# list of two pixel images
Y <- solapply(bei.extra, scaletointerval)
plot(Y)
im.apply(Y, max)
im.apply(Y, sum)
## Example with incompatible patterns of NA values
B <- owin(c(438, 666), c(80, 310))
Y[[1]][B] <- NA
opa <- par(mfrow=c(2,2))
plot(Y[[1]])
plot(Y[[2]])
#' Default action: NA -> NA
plot(im.apply(Y, mean))
#' Use NA handling in mean.default
plot(im.apply(Y, mean, na.rm=TRUE, fun.handles.na=TRUE))
par(opa)
# }
Run the code above in your browser using DataLab