cyt_bp2 | R Documentation |
This function generates a PDF file containing boxplots for each combination of numeric and factor variables in the provided data. It first converts any character columns to factors and checks that the data contains at least one numeric and one factor column. If the scale argument is set to "log2", all numeric columns are log2-transformed. The function then creates boxplots using ggplot2 for each numeric variable grouped by each factor variable.
cyt_bp2(data, pdf_title, scale = NULL, y_lim = NULL)
data |
A matrix or data frame of raw data. |
pdf_title |
A string representing the title
(and filename) of the PDF file. If |
scale |
Transformation option for continuous variables. Options are NULL (default) and "log2". When set to "log2", numeric columns are transformed using the log2 function. |
y_lim |
An optional numeric vector defining the y-axis limits for the plots. |
A PDF file containing the boxplots.
# Loading data
data_df <- ExampleData1[, -c(3, 5:28)]
data_df <- dplyr::filter(data_df, Group == "T2D", Treatment == "Unstimulated")
cyt_bp2(data_df, pdf_title = NULL, scale = "log2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.