as.matrix.bk | R Documentation |
Returns a matrix representation of the grid data. This is shorthand for
extracting the data using x[]
(single layer) or x[,j]
(multi-layer),
then passing the result to matrix
along with dim(x)
.
## S3 method for class 'bk'
as.matrix(x, rownames.force = NA, layer = 1, ...)
x |
a bk object |
rownames.force |
ignored |
layer |
integer, for multi-layer grids, the layer number to return |
... |
further arguments to as.matrix |
the grid data as a matrix
g = bk_validate(list(gval=rnorm(4^2), gdim=4, gres=0.5))
plot(g)
as.matrix(g)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.