Description Usage Arguments Examples
This function will perform a canonical correlation analysis between the 2 data sets entered as arguments and plot one or all of the observations and the variables in the component space for any of the different pairs of linear combinations.
1 | canCorrPlot(df1, df2, plotType = "obs", pair = 1, labels)
|
df1 |
, df1 is a data frame with numerical columns |
df2 |
, df2 is a data frame with numerical columns |
plotType, |
either "obs" for observation plot or "bi" for plots of the differnt variables from both data sets or "tri" for all scores |
pair, |
pair tells which pair of linear combinations will make up the axes |
labels, |
label all names of variables in df1 and df2 in order |
1 2 3 4 5 | data <- rotateS21::covidWrangled
demographics <- data[,9:15]
severity <- data[,16:19]
lab <- c("Male", "Asian", "Black", "MultiRace", "NativePI", "White", "Ethnicity", "Symptomatic", "Hospital", "ICU", "Death")
canCorrPlot(demographics,severity, labels=lab)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.