View source: R/table_removeColumn.R
table_removeColumn | R Documentation |
Remove the column matching columnName
. This function
can be used in pipelines.
table_removeColumn(locationTbl = NULL, columnName = NULL, verbose = TRUE)
locationTbl |
Tibble of known locations. |
columnName |
Name of the colun to be removed. |
verbose |
Logical controlling the generation of progress messages. |
Updated tibble of known locations.
table_addColumn
table_removeColumn
library(MazamaLocationUtils)
# Starting table
locationTbl <- get(data("wa_monitors_500"))
names(locationTbl)
# Add a new column
locationTbl <-
locationTbl %>%
table_addColumn("AQSID")
names(locationTbl)
# Now remove it
locationTbl <-
locationTbl %>%
table_removeColumn("AQSID")
names(locationTbl)
try({
# Cannot remove "core" metadata
locationTbl <-
locationTbl %>%
table_removeColumn("longitude")
}, silent = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.