st_drop_geometry_if: Drop geometry

View source: R/fun-drop_geometry.R

st_drop_geometry_ifR Documentation

Drop geometry

Description

the function can remove geometry from a data set with class 'sf' i.e removes the crs and geometry information. 'SC_boundary' is a shape file with class 'sf' and 'data.frame'. When the shape file is viewed it has two polygons, each with attributes (columns of) for 'State', 'Area', 'Name', 'Shape_Area', 'Shape_Len', 'XCoord', 'YCoord', 'geometry', and CRS information. After using this function, the attribute columns are preserved, except geometry column. Thereby converting the shape file into a regular data frame.

Usage

st_drop_geometry_if(x)

Arguments

x

a shape file with class 'sf' and 'data.frame'

Value

a data.frame


capellett/scsf documentation built on Sept. 6, 2024, 7:46 a.m.