Description Usage Arguments Value Note Author(s) Examples
Transform raster to data.table
1 2 |
x |
Raster* object |
row.names |
'NULL' or character vector giving row names for data frame. Missing values are not allowed |
optional |
logical. If 'TRUE', setting row names and converting column names (to syntactic names: see make.names) is optional |
xy |
logical. If 'TRUE', also return the spatial coordinates |
... |
Additional arguments (none) passed to 'raster::as.data.frame' |
centroids |
logical. If TRUE return the centroids instead of all spatial coordinates (only relevant if xy=TRUE) |
sepNA |
logical. If TRUE the parts of the spatial objects are separated by lines that are NA (only if xy=TRUE and, for polygons, if centroids=FALSE |
returns a data.table object
This has been amended to fix the blocksize parameter, which was set to 2.
etiennebr, from https://gist.github.com/etiennebr/9515738/download#
1 2 | logo <- brick(system.file("external/rlogo.grd", package="raster"))
v <- as.data.table(logo)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.