View source: R/qc_median_intensities.R
qc_median_intensities | R Documentation |
Median intensities per run are returned either as a plot or a table.
qc_median_intensities(
data,
sample,
grouping,
intensity,
plot = TRUE,
interactive = FALSE
)
data |
a data frame that contains at least the input variables. |
sample |
a character or factor column in the |
grouping |
a character column in the |
intensity |
a numeric column in the |
plot |
a logical value that indicates whether the result should be plotted. |
interactive |
a logical value that specifies whether the plot should be interactive (default is FALSE). |
A plot that displays median intensity over all samples. If plot = FALSE
a data
frame containing median intensities is returned.
set.seed(123) # Makes example reproducible
# Create example data
data <- create_synthetic_data(
n_proteins = 100,
frac_change = 0.05,
n_replicates = 3,
n_conditions = 2,
method = "effect_random"
)
# Calculate median intensities
qc_median_intensities(
data = data,
sample = sample,
grouping = peptide,
intensity = peptide_intensity_missing,
plot = FALSE
)
# Plot median intensities
qc_median_intensities(
data = data,
sample = sample,
grouping = peptide,
intensity = peptide_intensity_missing,
plot = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.