Learn R Programming

spbabel (version 0.6.0)

sp: Convert from dplyr tbl form to Spatial*DataFrame.

Description

Convert from dplyr tbl form to Spatial*DataFrame.

Usage

sp(x, ...)

# S3 method for data.frame sp(x, attr_tab = NULL, crs, ...)

Value

Spatial*

Arguments

x

tibble as created by sptable

...

unused

attr_tab

remaining data from the attributes

crs

projection, defaults to NA_character_

Examples

Run this code
library(dplyr)
semap1 <- semap  %>% dplyr::filter(y_ > -89.9999)
sp_obj <- sp(semap1, attr_tab = seatt, crs = "+proj=longlat +ellps=WGS84")
## look, seamless Antarctica!
## library(rgdal); plot(spTransform(sp_obj, "+proj=laea +lat_0=-70"))

Run the code above in your browser using DataLab