add_geometry: Convert input data frame into a spatial data frame

View source: R/add_geometry.R

add_geometryR Documentation

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")

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.

Value

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

Examples

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

cartographer documentation built on May 29, 2024, 10:50 a.m.