Canonical correlation plot
ruv_cancorplot(Y, X, ctl, W1 = NULL, W2 = NULL)The data matrix. Rows are observations and columns are features (e.g. genes).
Factor(s) of interest. Can be a vector, factor, matrix, or dataframe. Must have the same length (or number of rows) as the number of row of Y.
Index of negative controls.
Optional. The left singular vectors of Y. Can be included to speed up execution.
Optional. The left singular vectors of Y[,ctl]. Can be included to speed up execution.
A ggplot.
Plots, as a function of k, the square of of the first canonical correlation of X and the first k left singular vectors of Y (and also, similarly, Y[,ctl]).