View source: R/table_updateSingleRecord.R
| table_updateSingleRecord | R Documentation |
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().
table_updateSingleRecord(
locationTbl = NULL,
locationList = NULL,
verbose = TRUE
)
locationTbl |
Tibble of known locations. |
locationList |
List containing |
verbose |
Logical controlling the generation of progress messages. |
Updated tibble of known locations.
table_addLocation
table_addSingleLocation
table_removeRecord
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.