View source: R/MakeComDimLoadingsTable.R
MakeComDimLoadingsTable | R Documentation |
Creates a long dataframe with the global and local scores (Q.scores and T.scores) suitable for ggplot.
MakeComDimLoadingsTable(model, blocks = NULL, dim = NULL, dim.ort = NULL)
model |
The output from a ComDim analysis. |
blocks |
The blocks from which the data will be extracted. It can be a vector of integers or a vector with the block names. Facultative. |
dim |
The dimensions from which the data will be extracted. It can be a vector of integers. Facultative. |
dim.ort |
The orthogonal dimensions from which the data will be extracted. It can be a vector of integers. If NULL, all orthogonal components are extracted. If 0, none of the orthogonal components are extracted. Facultative. |
A table with the selected information
b1 = matrix(rnorm(500),10,50) # 10 rows and 50 columns
b2 = matrix(rnorm(800),10,80) # 10 rows and 80 columns
b3 = matrix(rnorm(700),10,70) # 10 rows and 70 columns
b4 = matrix(rnorm(500),10,50) # 10 rows and 50 columns
# Build multi-block by adding one data block at a time:
mb <- BuildMultiBlock(b1, newSamples = paste0('sample_',1:10))
mb <- BuildMultiBlock(b2, growingMB = mb)
mb2 <- BuildMultiBlock(b3, newSamples = paste0('sample_',1:10))
mb2 <- BuildMultiBlock(b4, growingMB = mb2)
# Combine the two multi-blocks:
mb3 <- CombineMultiBlock(newMB = mb1, growingMB = mb2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.