raster_colors,SpatRaster-method | R Documentation |
This function is used internally by plot_layer
to convert a
SpatRaster object to a data.frame of colors for each pixel that can be used
for plotting with ggplot2. Note that this function assumes that the
SpatRaster objects use RGB values.
## S4 method for signature 'SpatRaster'
raster_colors(x)
x |
A SpatRaster object |
A data.frame with 3 columns and length(raster_object)
rows
## Not run:
wi_leaf_off_layer <- get_image_layer(wi_leaf_off_url, wis_poly)
wi_leaf_off_data <- raster_colors(wi_leaf_off_layer)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.