#' Function
#'
#' @export
bottom_tri <- function(x, diag=TRUE){
x <- as.matrix(x)
if(diag){
col(x)- 1 + row(x) -1 > nrow(x) ##-1 Since the first column is the row name
}else col(x)- 1 + row(x)> nrow(x) ##-1 Since the first column is the row name
}
"bottom_tri<-" <- function(x, diag=TRUE, value){
x[bottom_tri(x, diag=diag)] <- value
return(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.