This is a convenience function for making data.frame
s that are easily
indexed on a block-wise basis.
See also
Main methods: asca
, apca
, limmpca
, msca
, pcanova
, prc
and permanova
.
Workhorse function underpinning most methods: asca_fit
.
Extraction of results and plotting: asca_results
, asca_plots
, pcanova_results
and pcanova_plots
Examples
# Random data
M <- matrix(rnorm(200), nrow = 10)
# .. with dimnames
dimnames(M) <- list(LETTERS[1:10], as.character(1:20))
# A named list for indexing
inds <- list(B1 = 1:10, B2 = 11:20)
X <- block.data.frame(M, inds)
str(X)
#> 'data.frame': 10 obs. of 2 variables:
#> $ B1: 'AsIs' num [1:10, 1:10] 0.0528 0.2792 1.2753 0.822 0.2547 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:10] "A" "B" "C" "D" ...
#> .. ..$ : chr [1:10] "1" "2" "3" "4" ...
#> $ B2: 'AsIs' num [1:10, 1:10] -0.0296 1.4873 -1.9407 1.0311 -2.4404 ...
#> ..- attr(*, "dimnames")=List of 2
#> .. ..$ : chr [1:10] "A" "B" "C" "D" ...
#> .. ..$ : chr [1:10] "11" "12" "13" "14" ...