MazamaLocationUtils (version 0.1.6)

table_removeColumn: Remove a column of metadata in a table

Description

Remove the column matching columnName. This function can be used in pipelines.

Usage

table_removeColumn(locationTbl = NULL, columnName = NULL,
  verbose = TRUE)

Arguments

locationTbl

Tibble of known locations, Default: NULL

columnName

Name of the colun to be removed, Default: NULL

verbose

Logical controlling the generation of progress messages.

Value

Updated tibble of known locations.

See Also

table_addColumn

table_removeColumn

Examples

Run this code
# NOT RUN {
# Starting table
locationTbl <- get(data("wa_monitors_500")) 
names(locationTbl)

# Add a new column
locationTbl <-
  locationTbl %>%
  table_addColumn("siteName")
  
names(locationTbl)

# Now remove it
locationTbl <-
  locationTbl %>%
  table_removeColumn("siteName")

names(locationTbl)

# }
# NOT RUN {
# Cannot remove "core" metadata
locationTbl <-
  locationTbl %>%
  table_removeColumn("zip")
# }

Run the code above in your browser using DataLab