| table_updateSingleRecord {MazamaLocationUtils} | R Documentation |
Update a single known location record in a table
Description
Information in the locationList is used to replace
existing information found in locationTbl. This function can be used
for small tweaks to an existing locationTbl. Wholesale replacement of
records should be performed with table_removeRecord() followed by
table_addLocation().
Usage
table_updateSingleRecord(
locationTbl = NULL,
locationList = NULL,
verbose = TRUE
)
Arguments
locationTbl |
Tibble of known locations. |
locationList |
List containing |
verbose |
Logical controlling the generation of progress messages. |
Value
Updated tibble of known locations.
See Also
Examples
library(MazamaLocationUtils)
locationTbl <- get(data("wa_monitors_500"))
# Wenatchee
wenatcheeRecord <-
locationTbl %>%
dplyr::filter(city == "Wenatchee")
str(wenatcheeRecord)
wenatcheeID <- wenatcheeRecord$locationID
locationTbl <- table_updateSingleRecord(
locationTbl,
locationList = list(
locationID = wenatcheeID,
locationName = "Wenatchee-Fifth St"
)
)
# Look at the new record
locationTbl %>%
dplyr::filter(city == "Wenatchee") %>%
str()
[Package MazamaLocationUtils version 0.4.3 Index]