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_removeColumn
library(MazamaLocationUtils) # Starting table locationTbl <- get(data("wa_monitors_500")) names(locationTbl)#> [1] "locationID" "locationName" "longitude" "latitude" "elevation" #> [6] "countryCode" "stateCode" "countyName" "timezone" "houseNumber" #> [11] "street" "city" "zip"#> [1] "locationID" "locationName" "longitude" "latitude" "elevation" #> [6] "countryCode" "stateCode" "countyName" "timezone" "houseNumber" #> [11] "street" "city" "zip" "siteName"#> [1] "locationID" "locationName" "longitude" "latitude" "elevation" #> [6] "countryCode" "stateCode" "countyName" "timezone" "houseNumber" #> [11] "street" "city" "zip"if (FALSE) { # Cannot remove "core" metadata locationTbl <- locationTbl %>% table_removeColumn("zip") }