as_data: transform Raster* to data frame ready for ggplot2

Description Usage Arguments Details Value

Description

transform Raster* to data frame ready for ggplot2

Usage

1
as_data(r, na.rm = FALSE, melt = TRUE)

Arguments

r

Raster* object transform

na.rm

boolean should NA pixels be removed

melt

boolean should the raster be melted (default is TRUE)

Details

melt is used to facilitate ploting of raster stacks

Value

a data frame containing x, y, the coordinates; variable, the layer names; value the pixel value.


etiennebr/visualraster documentation built on May 16, 2019, 9:06 a.m.