prepare.simple_plan: Prepare a simple treatment.

Description Usage Arguments See Also Examples

View source: R/design_missing_Z.R

Description

Prepare a simple treatment.

Usage

1
2
## S3 method for class '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

design_missingness_treatment, prepare

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
d <- wrapr::build_frame(
  "x1", "x2", "x3" |
  1   , 4   , "A"  |
  NA  , 5   , "B"  |
  3   , 6   , NA   )

plan <- design_missingness_treatment(d)
prepare(plan, d)

prepare(plan, data.frame(x1=NA, x2=NA, x3="E"))

vtreat documentation built on June 11, 2021, 5:13 p.m.