Skip to contents

`scores` exports the scores matrix of a MPCA object.

Usage

scores(Object)

# S4 method for MPCA
scores(Object)

Arguments

Object

a MPCA object

Details

This function takes the whole MPCA object and retrieves the score matrix.

Examples


data(MTBLS579)
# MPCA with mean-centered and scaled data
MTBLS579_mpca <- m_prcomp(MTBLS579, center = TRUE)
# Export scores matrix
scores(MTBLS579_mpca)
#>   Names        PC1       PC2        PC3           PC4           PC5
#> 1  08GB -2508140.9 -937066.4   40646.55 -2.224940e-08 -2.943485e-09
#> 2  09GB -2508140.9 -937066.4   40646.55 -2.224940e-08 -2.943485e-09
#> 3  14GB -1784822.7 1558957.2 -749416.56 -1.439727e-08 -1.505606e-09
#> 4  24GB   277512.5  987227.1 1110137.04  3.789541e-09 -5.898144e-10
#> 5  29GB  3261796.0 -336025.7 -221006.79  2.698099e-08  3.918622e-09
#> 6  34GB  3261796.0 -336025.7 -221006.79  2.698099e-08  3.918622e-09
#>             PC6              Type
#> 1 -6.283813e-09 S. typhy Carriege
#> 2 -6.283813e-09 S. typhy Carriege
#> 3 -3.743423e-09 S. typhy Carriege
#> 4  3.026344e-10           Control
#> 5  9.563252e-09           Control
#> 6  9.563252e-09           Control