Description Usage Arguments Details Value Author(s) Examples
as.matrix(coords=TRUE) prepares a list from the first band of ursaRaster, which is suitable as input parameter for functions image, contour and filled.contour.
| 1 2 3 4 | 
| x | Object of class  | 
| ... | Set of argumetns, which are recognized via their names (using regular expressions) and classes. 
 | 
| i | Positive integer or character of lentg. If integer, then band index. If character, then band name. If missing, then first band (value  | 
Item colortable is mainly for internal usage, e. g., for mapping. Item proj is useful for convertion back to ursaRaster object by calling as.ursa function.
Extract operator x[[i]] is a wrapper for as.matrix(x[i],coords=TRUE)
Depending of argument coords.
If coords=FALSE, then it is a two-dimensional matrix c(samples*lines, bands), unclassed from ursaValue class.
If coords=TRUE, then it is a list:
| x | Numeric. Midpoints of cells on horizontal axis | 
| y | Numeric. Midpoints of cells on vertical axis | 
| z | Numeric. Matrix of values | 
| attr(*,"proj") | PROJ.4 string for grid, defined by  | 
| attr(*,"colortable") | Optional. Object of class  | 
Nikita Platonov platonov@sevin.ru
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | session_grid(NULL)
a <- ursa_dummy(nband=3,min=0,max=100)
a <- a[a>=20 & a<=80]
ignorevalue(a) <- 121
str(ursa_value(a[2]))
str(as.matrix(a[2]))
b1 <- a[[2]]
str(b1)
image(b1,asp=1)
b2 <- as.matrix(a[2:3],coords=TRUE)
print(c('theSame?'=identical(b1,b2)))
a2 <- as.ursa(b2)
res <- c(src=a[2],exported_then_imported=a2,diff=a[2]-a2)
print(res)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.