Nothing
#' @export
dg <- function(x) {
if (length(x) == 1) {
return(x)
}
if (is.vector(x) || nrow(x) == 1 || ncol(x) == 1) {
return(diag(c(x)))
} else {
return(diag(x))
}
}
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.