vtreat (version 1.6.2)

prepare.simple_plan: Prepare a simple treatment.

Description

Prepare a simple treatment.

Usage

# 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

design_missingness_treatment, prepare

Examples

Run this code
# NOT RUN {
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"))

# }

Run the code above in your browser using DataCamp Workspace