renameCleanSfFields: RENAME AND SUBSET FIELDS IN SF OBJECT ACCORDING TO TABLE

View source: R/spatialTools.R

renameCleanSfFieldsR Documentation

RENAME AND SUBSET FIELDS IN SF OBJECT ACCORDING TO TABLE

Description

RENAME AND SUBSET FIELDS IN SF OBJECT ACCORDING TO TABLE

Usage

renameCleanSfFields(sfObj, namesTable, rmNAs = TRUE)

Arguments

sfObj

is an sf object from the sf package

namesTable

is a two-column data.frame with the names to be replaced (1st column) and the new names (2nd column) if there are NAs in the second columns, the original columns will be removed if rmNAs == TRUE

rmNAs

determines whether columns with missing new names are removed or not. Defaults to TRUE

Value

an sf object


CeresBarros/ToolsCB documentation built on Aug. 23, 2024, 4:22 p.m.