View source: R/MakeComDimLoadingsTable.R
| MakeComDimLoadingsTable | R Documentation |
Creates a long (tidy) data frame with the local P-loadings from a ComDim model, suitable for use with ggplot2.
MakeComDimLoadingsTable(model, blocks = NULL, dim = NULL, dim.ort = NULL)
model |
The output from a ComDim analysis (a |
blocks |
The blocks from which loadings will be extracted. A vector of integers (block indices) or block names. When omitted, all blocks are included. |
dim |
Integer vector of predictive component indices to include. When omitted, all predictive components in the model are included. |
dim.ort |
Integer vector of orthogonal component indices to include. When |
A long data frame with one row per variable–component combination, containing the following columns:
variable.idVariable name (factor).
variable.id.numberPosition of the variable across all blocks (factor).
block.idInteger index of the block.
block.nameName of the block (factor).
dimComponent number.
valueLoading value (from P.loadings or Orthogonal$P.loadings.ort).
MakeComDimScoresTable, ComDim_PCA
b1 <- matrix(rnorm(500), 10, 50) # 10 rows and 50 columns
b2 <- matrix(rnorm(800), 10, 80) # 10 rows and 80 columns
mb <- MultiBlock(Data = list(b1 = b1, b2 = b2))
model <- ComDim_PCA(mb, ndim = 2)
tbl <- MakeComDimLoadingsTable(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.