- epiflows class inherits the epicontacts class. This class is built from two
data frames describing a linlist (referred here as
locations
) and contacts (referred here asflows
). This was chosen over the previous implementation of two named vectors of inward and outward flows with a data frame of locations to allow the user to flexibly store more than one focus. An extra element calledvars
has been added, storing a dictionary of variables that are present in the data frame for use withestimate_risk_spread()
. These variables are accessible viaglobal_vars()
- The function is now a generic with a default and an epiflows method.
- The number of options have been reduced by combining the function and parameter arguments into one.
- All errors are collected and reported if multiple arguments are missing or misspelled
- Default varaibles have been set
- a new parameter,
return_all_simulations
has been added.
make_epiflows()
is now a generic with methods for data frame, integer, and numeric input.
plot()
defaults to an interactive network plot fromvisNetwork()
if no coordinates are available.map_epiflows()
places flows on a mapvis_epiflows()
places flows on a networkgrid_epiflows()
places flows on a bubble plot/grid
get_flows()
returns the flows data frame optionally specifying flows from/to a given locationget_locations()
returns the locations data frameget_coordinates()
returns coordinates orNULL
from the locations data frameget_id()
returns the identifier of all locationsget_n()
returns a numeric vector of cases from/to a given locationget_pop_size()
returns a vector of population sizes for locationsget_vars()
returns a specified variable from the locations data frame OR returns the defined variables if no arguments are given.set_vars()
allows the user to set or reset the global variables.global_vars()
can return, set, and reset globally recognized variablesas.SpatialLinesDataFrame()
converts an epiflows object with coordinates to aSpatialLinesDataFrame
class from the sp package.
Brazil_epiflows
is an epiflows object created from theYF_Brazil
dataYF_flows
is the data frame of flows fromYF_Brazil
YF_locations
is the data frame of locations fromYF_Brazil
YF_coordinates
are the coordinates for the locations inYF_Brazil
get_codes()
has been removed in favor ofget_id()
get_flow_data()
has been removed in favor ofget_n()
andget_flows()
get_location_data()
has been removed in favor ofget_locations()
Mex_travel_2009
has been removed
add_coordinates()
can now take a data frame input- Magrittr pipes are no longer imported.
- visNetwork is imported
- vdiffr is used for visual tests
- continuous integration and automated tests have been set up
- A new vignette describing the epiflows class has been added
- README and introduction vignette have been updated.
- Added a
NEWS.md
file to track changes to the package.