df_epinow | R Documentation |
df_epinow
manipulates a dataset provided by the user to a dataset readily usable for Epinow2 analyses
df_epinow(x, cases, date, regions, period = 14, regional = FALSE)
x |
a vertical dataset typically used in ecological analyses. |
cases |
the vector of cases in the provided dataset. |
date |
the vector of dates in the format yyyy-mm-dd in the provided dataset. |
regions |
if regional = TRUE, the vector of regions in the provided dataset. |
period |
numeric. How many date periods should be left into the dataset? |
regional |
logical. Does the user wants the dataset to be aggregated by regions? |
This function loads a data.frame
object and makes some manipulation of it, in order to make it ready to be run in a Epinow2 local or regional analysis.
## Not run: library("epigraphhub") con <- egh_connection(auto_connect = TRUE, use_env = TRUE, path_env = ".env") df_canton <- dbGetQuery(con, "SELECT datum, \"geoRegion\", entries FROM switzerland.foph_cases") df <- df_epinow(df_canton, cases = "entries", date = "datum", regions = "geoRegion", regional = TRUE, period = 28) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.