Learn R Programming

ggspatial (version 1.0.2)

df_spatial: Create a ggplot-friendly data frame from a spatial object

Description

Create a ggplot-friendly data frame from a spatial object

Usage

df_spatial(x, ...)

Arguments

x

A spatial object

...

Passed to specific methods

Value

A tibble with coordinates as .x and .y, and features as .feature

Examples

Run this code
# NOT RUN {
load_longlake_data()
df_spatial(longlake_osm)
df_spatial(longlake_depthdf)
df_spatial(as(longlake_depthdf, "Spatial"))

# }

Run the code above in your browser using DataLab