get_n {epiflows} | R Documentation |
get the number of cases per flow
Description
This convenience function will return a named vector containing the number of cases flowing to or from a given region.
Usage
get_n(x, from = NULL, to = NULL, ...)
## S3 method for class 'epiflows'
get_n(x, from = NULL, to = NULL, ...)
Arguments
x |
an epiflows object |
from |
a character vector of length one specifying the location from which the flows originate |
to |
a character vector of length one specifying the location to which the flows terminate |
... |
unused |
Details
There are three possible outputs of this function:
-
no options specified: an un-named vector, equivalent to
get_flows(x)$n
-
from = X: a named vector of cases flowing from X
-
to = X: a named vector of cases flowing to X
Value
a character vector
See Also
get_flows()
;
For location metadata: get_vars()
, get_pop_size()
, get_coordinates()
Examples
data(Brazil_epiflows)
get_n(Brazil_epiflows, from = "Espirito Santo")
get_n(Brazil_epiflows, to = "Espirito Santo")
[Package epiflows version 0.2.1 Index]