#' Column-normalize a sparse, symmetric matrix (using the l1 norm) so that each
#' column sums to 1.
#'
#' @param A matrix
#' @usage l1NormalizeColumns(A)
#' @return column-normalized sparse matrix object
#' @keywords internal
l1NormalizeColumns <- function(A) {
return(Matrix::t(Matrix::t(A)/Matrix::colSums(A)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.