Nothing
tr <-
function(X)
{
if (is.matrix(X)) {
y <- sum(diag(X))
n <- nrow(X)
p <- ncol(X)
if(n != p) {
cat("warning: X is not square\n")
}
} else if (is.vector(X)) {
cat("warning: X is not a matrix\n")
y <- sum(X)
} else {
cat("warning: X is nor matrix nor vector\n")
y <- NA
}
return(y)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.