powered by
Restore factors in data.frame as numeric
restoreData(data)
A data.frame
fit=lm(mpg~factor(cyl)*factor(am),data=mtcars) fit=lm(mpg~wt*factor(am),data=mtcars) fit=lm(mpg~wt*hp,data=mtcars) restoreData(fit$model)
Run the code above in your browser using DataLab