Learn R Programming

cwhmisc (version 2.0.1)

like: Prepare new data for prediction

Description

Prepare data to conform to structure of data used in a model, for use as new data

Usage

like(X, ...)

Arguments

X
...

Value

  • Data usable for predict which are now compatible, all factors have the same level set, and so forth.

Examples

Run this code
foo <- lm(formula, data=foe)
 fie <- like(foe, sex="F", age=20:25, smoke="1-7")
 predict(foo, newdata=fie)

Run the code above in your browser using DataLab