coalesceJoin | R Documentation |
Coalesces columns by suffix created by joins. Useful after a full join.
coalesceJoin(df, suffix = c(".x", ".y"), showMessage = TRUE)
df |
the joined data.frame |
suffix |
suffix used to diferentiate the columns needing coalesced. Defaults to c(".x", ".y") |
showMessage |
TRUE/FALSE on whether to print message. Default TRUE. |
df with the join suffixed columns coalesced
## Not run: #Download Case, Death, Test Data cdtData <- MARCDataAPI_read('https://gis2.marc2.org/MARCDataAPI/api/covidcasedeathtest') %>% dplyr::mutate(Date = as.Date(Date), LastUpdated = lubridate::as_datetime(LastUpdated), LastUpdated = lubridate::with_tz(LastUpdated, "America/Chicago")) #Download the Hospital Data hospData <- marcR::MARCDataAPI_read('https://gis2.marc2.org/MARCDataAPI/api/covidhospital') %>% dplyr::mutate(Date = as.Date(Date)) cdtHospSumData <- dplyr::full_join(cdtData, hospData, by = c("GeoID", "Date")) %>% coalesceJoin() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.