Learn R Programming

basecamb (version 1.1.2)

apply_function_to_imputed_data: Apply function to dataframes in a mice object

Description

Wrapper function to apply a function on each dataframe in an imputed dataset created with mice::mice().

Usage

apply_function_to_imputed_data(mice_data, fun, ...)

Value

a mids object with transformed data.

Arguments

mice_data

a mids object generated by mice::mice().

fun

the function to apply to each dataframe. May only take one positional argument of type data.frame.

...

other arguments passed to fun()

Author

J. Peter Marquardt