#' Removes columns/proteins based on fraction of entries equal 0
#'
#' @param data expression data
#' @param threshold minimum fraction of entries to be above 0
#'
#' @return
#' @export
#'
#'
cm0 <- function(data, threshold = 1) {
v <- apply(data, 2, FUN = function(x) {sum(x > 0) / length(x) >= threshold})
data[, v]
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.