R/plot-raster.R
plot_raster.Rd
Plot points as a raster
plot_raster(data, field, fun = "sum", nrow = 100, ncol = 100, ...)
a spatial feature data.
the field to rasterize.
the function
number of rows
Other arguments passed on to geom_raster.
geom_raster
a ggplot.
x <- get_qma("CRA") pts <- st_sample(x, size = 1000) %>% st_sf() %>% mutate(z = rnorm(1:n())) ggplot() + plot_raster(data = pts, field = "z")