ruv_svdplot {ruv} | R Documentation |
RUV SVD Plot
Description
A generalization of a PC (principal component) plot.
Usage
ruv_svdplot(Y.data, Y.space = NULL, info = NULL, k = c(1, 2), Z = 1, left = TRUE)
Arguments
Y.data |
The data matrix. Rows are observations and columns are features (e.g. genes). |
Y.space |
Either a data matrix of the same dimension as |
info |
Additional data to be included in the ggplot, which can be used for setting aesthetics such as color. Converted to a dataframe, which should have a number of rows equal to the number of rows of |
k |
A numeric vector of length 2. The singular vectors to be plotted. Typically integers, but fractional values can also be specified. For example, a value of 2.5 corresponds to the linear combination (singular vector 2) + (singular vector 3), rescaled to have unit length. Similarly, a value of 2.2 corresponds to the (rescaled) linear combination 8*(singular vector 2) + 2*(singular vector 3), and -2.2 corresponds to the (rescaled) linear combination 8*(singular vector 2) - 2*(singular vector 3). Note that the vectors defined by 2.2 and -2.8 are orthogonal to each other, as are those defined by 2.3 and -2.7, etc. |
Z |
Any variables to regress out of |
left |
Plot the left singular vectors (if TRUE) or the right singular vectors (if FALSE). |
Details
When Y.space = NULL
and Z = 1
and the values of k
are integers, this is a standard PC plot.
Value
A ggplot.
Author(s)
Johann Gagnon-Bartsch