fortify.raster: Fortify method for classes from the raster package.

fortify.rasterR Documentation

Fortify method for classes from the raster package.

Description

Fortify method for classes from the raster package.

Usage

## S3 method for class 'RasterLayer'
fortify(x, maxpixels = 50000)

## S3 method for class 'RasterBrick'
fortify(...)

## S3 method for class 'RasterStack'
fortify(...)

Arguments

x

Raster* object to convert into a dataframe.

maxpixels

Integer. Maximum number of pixels to sample

...

not used by this method

Value

Returns a data.frame with coordinates (x,y) and corresponding raster values.

Examples

library(ggplot2)
data(rlogo)
r_df <- fortify(rlogo)
head(r_df)


RStoolbox documentation built on March 18, 2022, 5:37 p.m.