data(DataMix) # database
data <- DataMix[,2:ncol(DataMix)]
rownames(data) <- DataMix[,1]
X <- data[,1:2]
Y <- data[,5:6]
res <- CCA(X, Y, type = 2, test = "Bartlett", sign = 0.05) # performs CCA
tit <- c("Scree-plot","Correlations","Scores of the group X","Scores of the group Y")
Plot.CCA(res, titles = tit, xlabel = NA, ylabel = NA,
color = TRUE, savptc = FALSE, width = 3236,
height = 2000, res = 300, casc = TRUE)
Run the code above in your browser using DataLab