R/class_generics_and_maybes.R
, R/class_spflow_network_multi.R
, R/class_spflow_model.R
spflow_map.Rd
This generic is used as an interface to map_flows()
, where all information
available in the object is extracted and provided as arguments.
spflow_map(object, ...)
# S4 method for spflow_network_multi
spflow_map(object, id_net_pair = id(object)[["pairs"]][[1]], ..., flow_var)
# S4 method for spflow_model
spflow_map(object, ..., flow_type = "resid", add_title = TRUE)
arguments passed to methods and map_flows()
A character indicating the id of a spflow_network_pair()
(only relevant if
the spflow_network_multi()
contains multiple spflow_network_pair
-objects:
defaults to the of them)
A character, indicating one variable from the network pair data
A character indicating what to values to show. Should be one of c("resid", "fitted", "actual").
A logical, if TRUE
the flow_type is added as title.
# Used with a spflow_network_multi ...
spflow_map(multi_net_usa_ge, "ge_ge",flow_var = "y9")
# Used with a model...
gravity_ge <- spflow(
y1 ~ . + P_(DISTANCE),
multi_net_usa_ge,
"ge_ge",
spflow_control(model = "model_1"))
spflow_map(gravity_ge)
spflow_map(gravity_ge, flow_type = "fitted")
spflow_map(gravity_ge, flow_type = "actual")