View source: R/limma_aux_functions.R
nicePCA | R Documentation |
nicePCA
This function generate a 3*3 arrangeGrob plot object (that can be subsequently diplayed or saved). Each cell of the 3*3 plot grid correspond to a specific representation of the result of a principal component analysis performed on a measurment dataframe. The first input is a n*m data.frame, where n is the number of measured omic features (genes, proteins, metabolites...) and m is the number of samples. The second input is a basic n*2 target dataframe (such as generated by the generateTarget function), where n is the number of samples.
nicePCA(
df,
targets,
components = c(1, 2, 3),
centering = T,
scaling = F,
pointSize = 4,
no_label = FALSE
)
df |
the measurment n*m dataframe (n is number of omic features, m is number of samples) where columns are ordered by conditions. |
targets |
A n*2 dataframe, where n is the number of samples. First column correspond to samples, second column correspond to conditions. |
components |
a vector of three integers, corresponding to the components to be plotted |
centering |
a boolean parameter to indicate wether samples should be mean centered |
scaling |
a boolean parameter to indicate wether samples should be scaled (x/variance) |
pointSize |
an integer parameter to indicate the desired point size for the components scatter plots. |
an 3*3 arrangeGrob object containing various graphical representation of the result of a PCA.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.