Extracts the imputed datasets contained within an imputations object generated
by impute().
Usage
extract_imputed_dfs(
imputations,
index = seq_along(imputations$imputations),
delta = NULL,
idmap = FALSE
)Arguments
- imputations
An
imputationsobject as created byimpute().- index
The indexes of the imputed datasets to return. By default, all datasets within the
imputationsobject will be returned.- delta
A
data.framecontaining the delta transformation to be applied to the imputed dataset. Seeanalyse()for details on the format and specification of thisdata.frame.- idmap
Logical. The subject IDs in the imputed
data.frame's are replaced with new IDs to ensure they are unique. Setting this argument toTRUEattaches an attribute, calledidmap, to the returneddata.frame's that will provide a map from the new subject IDs to the old subject IDs.
See also
delta_template() for creating delta data.frames.
Examples
if (FALSE) { # \dontrun{
extract_imputed_dfs(imputeObj)
extract_imputed_dfs(imputeObj, c(1:3))
} # }
