Nothing
####################
# auxiliary function
# extracts offdiagonal elements of symmetric matrix or builds matrix with a given offdiagonal
# input:
# x: matrix or vector
# at: number of off-diagonal
# output: offdiagonal as vector
####################
offdiag <- function (x, at = 0) {
if (is.matrix(x)) {
result <- x[row(x) == col(x) - at]
} else {
len <- length(x)
result <- matrix(0, nrow = len + abs(at), ncol = len + abs(at))
result[row(result) == col(result) - at] <- x
}
return(result)
}
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.