mean.matrix<-function(x, na.rm=FALSE, ...){
if(is.matrix(x)){
if(na.rm){
object<-na.omit(x)
} else {
object<-x
}
SampleSize<-nrow(object)
out<-(t(object)%*%object)/SampleSize
return(out)
} else {warning("x has to be a matrix")}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.