#' Returns column names/proteins that have more entries above 0 in both data sets
#'
#' @param data1 expression data
#' @param data2 expression data
#' @param threshold min fraction of samples with value above 0
#'
#' @return
#' @export
#'
#'
cmv02 <- function(data1, data2, threshold = 1) {
v1 <- apply(data1, 2, FUN = function(x) {sum(x > 0) / length(x) >= threshold})
v2 <- apply(data2, 2, FUN = function(x) {sum(x > 0) / length(x) >= threshold})
intersect(colnames(data1)[v1], colnames(data2)[v2])
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.