Description Usage Arguments Value Author(s) Examples
DETAILED DESCRIPTION NEEDED
1 |
dt |
|
r |
|
val |
The name of the column in |
A RasterLayer
object.
Alex Chubaty
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(data.table)
library(sp)
library(raster)
r <- raster(nrows = 10, ncols = 10)
r[] <- 10
# using x,y coordinates
#dt1 <- data.table(X = , Y = , value = r[])
# using pixel ids
dt2 <- data.table(ID = 1L:ncell(r), VALUE = r[])
dt2[, VALUE := sample(1L:10L, ncell(r), replace = TRUE)]
if (interactive())
plot(dt2raster(dt2, r, "VALUE"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.