Prepare a simple treatment.

# S3 method for simple_plan
prepare(treatmentplan, dframe, ...)

Arguments

treatmentplan

A simple treatment plan.

dframe

data.frame to be treated.

...

not used, present for S3 signature consistency.

See also

Examples

d <- wrapr::build_frame( "x1", "x2", "x3" | 1 , 4 , "A" | NA , 5 , "B" | 3 , 6 , NA ) plan <- design_missingness_treatment(d) prepare(plan, d)
#> x1 x1_isBAD x2 x3 #> 1 1 0 4 A #> 2 2 1 5 B #> 3 3 0 6 _invalid_
prepare(plan, data.frame(x1=NA, x2=NA, x3="E"))
#> x1 x1_isBAD x2 x3 #> 1 2 1 5 _invalid_