I have a data frame with one column of values. How do I make this into a raster image with the following parameters? I would also like to save it as a .tif raster image.
dimensions: (6,7,42) (nrow, ncol, ncell)
resolution (30,30) (x,y)
extent: (286695, 286905, 4620945, 4621125) (xmin, xmax, ymin, ymax)
crs: +proj=utm +zone=17 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0
values: 0, 65535 (min, max)
Thanks for your help!
library(raster)
#making dataframe
b1DF <- data.frame("b1" = c(18880, 19364, 20446, 21070, 23001, 22981, 23362,
19538,18902, 19013, 18676, 20998, 23206, 24784, 21979, 20804, 20496, 19993,
20830, 22396, 24246, 19877, 21002, 21771, 21478, 20827, 21267, 23036, 20103,
21220, 22308, 21443, 20780, 21874, 23029, 19521, 20173, 20826, 21000, 21693,
23388, 23935))