as.raster | R Documentation |
as.raster
transforms object of class ursaRaster
to the object of class raster
(package grDevices)
## S3 method for class 'ursaRaster'
as.raster(x, ...)
x |
|
... |
Set of arguments, which are recognized via their names (using regular expressions) and classes:
|
A raster
object. It is a matrix. The values of matrix are colors.
Nikita Platonov platonov@sevin.ru
as.array
session_grid(NULL)
session_grid(regrid(mul=1/2))
a <- ursa_dummy(4,min=0,max=255)
a[a<70] <- NA
compose_open(layout=c(1,4),legend=NULL)
for (i in seq(4)) {
panel_new()
panel_plot(as.raster(a[seq(i)]),interpolate=FALSE)
panel_annotation(paste("Number of channels:",i))
}
compose_close()
op <- par(mfrow=c(2,2),mar=rep(0.5,4))
plot(as.raster(a[1:1]),interpolate=FALSE)
plot(as.raster(a[1:2]),interpolate=FALSE)
plot(as.raster(a[1:3]),interpolate=FALSE)
plot(as.raster(a[1:4]),interpolate=FALSE)
par(op)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.