predict.linmod <-
function(object, newdata=NULL, ...){
if(is.null(newdata))
y <- fitted(object)
else{
if(!is.null(object$formula)){
## model has been fitted using formula interface
x <- model.matrix(object$formula, newdata)
}
else{
x <- newdata
}
y <- as.vector(x %*% coef(object))
}
y
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.