View source: R/subset-by-frequency.R
subset_by_frequency | R Documentation |
Subset a Binary Matrix By Alteration Frequency Threshold
subset_by_frequency(gene_binary, t = 0.1, other_vars = NULL, by = NULL)
gene_binary |
A data frame with a row for each sample and column for each
alteration. Data frame must have a |
t |
Threshold value between 0 and 1 to subset by. Default is 10% (.1). |
other_vars |
One or more column names (quoted or unquoted) in data to be retained in resulting data frame. Default is NULL. |
by |
Variable used to subset the data. Default is NULL. |
a data frame with a sample_id
column and columns for
alterations over the given prevalence threshold of t
.
samples <- unique(gnomeR::mutations$sampleId)
gene_binary <- create_gene_binary(
samples = samples, mutation = mutations, cna = cna,
mut_type = "somatic_only",
include_silent = FALSE,
specify_panel = "impact"
)
gene_binary %>%
subset_by_frequency()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.