raster_colors,RasterLayer-method {arcpullr}R Documentation

Convert RasterLayer into data.frame of colors that can be used for plotting

Description

This function is used internally by plot_layer to convert a RasterLayer object to a data.frame of colors for each pixel that can be used for plotting with ggplot2

Usage

## S4 method for signature 'RasterLayer'
raster_colors(x)

Arguments

x

A RasterLayer object

Value

A data.frame with 3 columns and length(raster_object) rows

Examples

## Not run: 
wi_landcover <- get_map_layer(wi_landcover_url, wis_poly)
wi_landcover_data <- raster_colors(wi_landcover)

## End(Not run)

[Package arcpullr version 0.2.5 Index]