# NOT RUN {
pm <- polyMgen.d(2,2,rawData=ch2pn(c("1","x^2","x","0")))
pm # 1, z^2\\ z, 0
predict(pm,2) # matrix(c(1,4,2,0),2)
# predict the result of a linear model
x <- 1:5;y <- rnorm(5);predict(lm(y~x)) # the used method: predict.lm()
# clean up
# rm(pm, x, y)
# }
Run the code above in your browser using DataLab