deflation <- function(X, y){
# Computation of the residual matrix R
# Computation of the vector p.
# p <- t(X)%*%y/as.vector(crossprod(y))
p <- apply(t(X),1,miscrossprod,y)/as.vector(crossprod(y))
R <- X - y%*%t(p)
return(list(p=p,R=R))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.