| as.s2pp.s2im | R Documentation | 
Convert an Image/Raster on the Sphere to a Marked Point Pattern on the Sphere
## S3 method for class 's2im' as.s2pp(X, ...)
X | 
 Object of class   | 
... | 
 Ignored.  | 
Marked point pattern of class s2pp. The points are the image cell
centers and the marks are the corresponding values.
poly <- s2polygon(cbind(lon = c(-20,-10,10,20,10,-10), lat = c(0, -10, -10, 0, 10, 10)))
f <- function(lon, lat){ sin(lon) }
im <- as.s2im.function(f, poly, level = 6)
pp <- as.s2pp(im)
plot(pp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.