run_cca: Run regularized canonical correlation analysis edited from...

View source: R/run_cca.R

run_ccaR Documentation

Run regularized canonical correlation analysis edited from Estelle https://github.com/estelleyao0530/Canonical_Correlation_Function based on http://mixomics.org/methods/rcca/

Description

Input: matrix A (rows as samples, cols as variables(drugs, genes)) matrix B (rows as samples, cols as variables(drugs, genes))

Usage

run_cca(df1, df2, ncomp, save_cca.obj = F, savename)

Arguments

df1

numeric dataframe/matrix A

df2

numeric dataframe/matrix B

ncomp

int, numbers of components to output

save_cca.obj

logical, default = F; option to save cca object

savename

string, name of the output file

Details

Note: 1) matrix A and B need to be matched by samples 2) both matrices should be numeric - so sample names should be rownames or removed, not the first column 3) numbers of variables (columns) > numbers of samples (rows)

Output: saves cca object from mixOmics package (optional) writes to file average variate scores and projected loadings of decomposed matrices that maximize the correlation between A and B

Value

cca object


graeberlab-ucla/glab.library documentation built on Oct. 28, 2024, 10:48 a.m.