Learn R Programming

cartographer (version 0.2.1)

add_geometry: Convert input data frame into a spatial data frame

Description

Convert input data frame into a spatial data frame

Usage

add_geometry(x, location, feature_type = NA, geom_name = "geometry")

Value

A spatial data frame containing all of the columns from the input data frame.

Arguments

x

Data frame with a feature name column.

location

Feature names (tidy evaluation).

feature_type

The registered map corresponding to values in location. If NA (the default), the type is guessed from the values in location.

geom_name

Name for the new column to contain the geometry.

Examples

Run this code
add_geometry(nc_type_example_2, county, feature_type = "sf.nc")

Run the code above in your browser using DataLab