MakeComDimScoresTable: MakeComDimTable

View source: R/MakeComDimScoresTable.R

MakeComDimScoresTableR Documentation

MakeComDimTable

Description

Creates a long dataframe with the global and local scores (Q.scores and T.scores) suitable for ggplot.

Usage

MakeComDimScoresTable(
  model,
  blocks = NULL,
  dim = NULL,
  dim.ort = NULL,
  include = c("Q.scores", "T.scores", "Q.scores.ort", "T.scores.ort")[1:2]
)

Arguments

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.

include

The list of ComDim information that will be added into a table. Facultative.

Value

A table with the selected information

Examples

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)

f-puig/R.ComDim documentation built on Feb. 20, 2024, 6:49 a.m.