canCorrPlot: Canonical Correlation Analysis

Description Usage Arguments Examples

View source: R/canCorrPlot.R

Description

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.

Usage

1
canCorrPlot(df1, df2, plotType = "obs", pair = 1, labels)

Arguments

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

Examples

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)

s-huebler/rotateS21 documentation built on Dec. 22, 2021, 8:21 p.m.