Description Usage Arguments Value Author(s) Examples
View source: R/make_epiflows.R
Takes a list of location data and a matrix of flows, and creates an object of class 'epiflows'. An error is thrown if the input is invalid.
1 | make_epiflows(linelist, flows)
|
linelist |
A data frame of location data. Locations should be uniquely identified by codes from the 'code' column. |
flows |
A numeric matrix of flows between locations. Row and column names must denote location codes. |
An epiflows
object.
Pawel Piatkowski
1 2 3 4 | input_data <- Mex_travel_2009
flows <- make_epiflows(input_data[[2]], input_data[[1]])
print(subset(flows$linelist, code == "MEX")) # print the data for Mexico
print(flows$flows["MEX", ]) # ...and flows from Mexico to other countries
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.