attr_names: read attributes from a recognized file type

Description Usage Arguments Value Examples

View source: R/attribute-utils.R

Description

return just the header names (attributes) for delimited files or shapefiles

Usage

1

Arguments

x

the full path for the file(s) or an object

Value

the attributes as a character vector

Examples

1
2
3
4
5
6
# attribute names from a shapefile:
attr_names(system.file(package='meddle','extdata','example_shapefile'))

# attribute names from a Spatial object:
sf <- read_data(system.file(package='meddle','extdata','example_shapefile'))
attr_names(sf)

USGS-R/meddle documentation built on Nov. 21, 2020, 7:44 p.m.