Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fortify.raster

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

Tools for Remote Sensing Data Analysis

v0.2.6
GPL (>= 3)
Authors
Benjamin Leutner [cre, aut], Ned Horning [aut], Jakob Schwalb-Willmann [aut], Robert J. Hijmans [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.