Extracts data from metric graphs to be used by 'INLA' and 'inlabru'.
Usage
graph_data_rspde(
graph_rspde,
name = "field",
repl = NULL,
repl_col = NULL,
group = NULL,
group_col = NULL,
only_pred = FALSE,
time = NULL,
bru = FALSE,
tibble = FALSE,
drop_na = FALSE,
drop_all_na = TRUE
)Arguments
- graph_rspde
An
inla_metric_graph_spdeorinla_rspde_spacetimeobject built with therspde.metric_graph()orrspde.spacetime()function.- name
A character string with the base name of the effect.
- repl
Which replicates? If there is no replicates, one can set
repltoNULL. If one wants all replicates, then one sets toreplto.all.- repl_col
Which "column" of the data contains the replicate variable?
- group
Which groups? If there is no groups, one can set
grouptoNULL. If one wants all groups, then one sets togroupto.all.- group_col
Which "column" of the data contains the group variable?
- only_pred
Should only return the
data.frameto the prediction data?- time
Column containing times for space time models. Not needed when using inlabru. Only for INLA implementation of space time model.
- bru
Should the data be processed for
inlabru?- tibble
Should the data be returned as a
tidyr::tibble?- drop_na
Should the rows with at least one NA for one of the columns be removed? DEFAULT is
FALSE. This option is turned toFALSEifonly_predisTRUE.- drop_all_na
Should the rows with all variables being NA be removed? DEFAULT is
TRUE. This option is turned toFALSEifonly_predisTRUE.
