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

flip

rearrange data in SpatialPointsDataFrame or SpatialGridDataFrame for plotting with spplot (levelplot/xyplot wrapper)


Description

rearrange SpatialPointsDataFrame for plotting with spplot or levelplot

Usage

flipHorizontal(x)
flipVertical(x)

Arguments

x

object of class SpatialGridDataFrame

Value

object of class SpatialGridDataFrame, with pixels flipped horizontally or vertically. Note that the spatial structure is destroyed (or at least: drastically changed).

Author(s)

Michael Sumner

Examples

data(meuse.grid) # data frame
gridded(meuse.grid) = c("x", "y") # promotes to 
fullgrid(meuse.grid) = TRUE
d = meuse.grid["dist"]
image(d, axes=TRUE)
image(flipHorizontal(d), axes=TRUE)
image(flipVertical(d), axes=TRUE)

sp

Classes and Methods for Spatial Data

v1.4-5
GPL (>= 2)
Authors
Edzer Pebesma [aut, cre], Roger Bivand [aut], Barry Rowlingson [ctb], Virgilio Gomez-Rubio [ctb], Robert Hijmans [ctb], Michael Sumner [ctb], Don MacQueen [ctb], Jim Lemon [ctb], Finn Lindgren [ctb], Josh O'Brien [ctb], Joseph O'Rourke [ctb]
Initial release

We don't support your browser anymore

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