attr_names: read attributes from a recognized file type

View source: R/attribute-utils.R

attr_namesR Documentation

read attributes from a recognized file type

Description

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

Usage

attr_names(x)

Arguments

x

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

Value

the attributes as a character vector

Examples

# 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 April 28, 2024, 3:31 a.m.