powered by
This convenience function will return a named vector containing the number of cases flowing to or from a given region.
get_n(x, from = NULL, to = NULL, ...)# S3 method for epiflows get_n(x, from = NULL, to = NULL, ...)
# S3 method for epiflows get_n(x, from = NULL, to = NULL, ...)
a character vector
an epiflows object
a character vector of length one specifying the location from which the flows originate
a character vector of length one specifying the location to which the flows terminate
unused
There are three possible outputs of this function:
no options specified: an un-named vector, equivalent to get_flows(x)$n
get_flows(x)$n
from = X: a named vector of cases flowing from X
to = X: a named vector of cases flowing to X
get_flows(); For location metadata: get_vars(), get_pop_size(), get_coordinates()
get_flows()
get_vars()
get_pop_size()
get_coordinates()
data(Brazil_epiflows) get_n(Brazil_epiflows, from = "Espirito Santo") get_n(Brazil_epiflows, to = "Espirito Santo")
Run the code above in your browser using DataLab