Running examples in ‘matrixStrucTest-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: matrixStrucTest
> ### Title: Permutation p-values for Gamma and t-statistics
> ### Aliases: matrixStrucTest
> 
> ### ** Examples
> 
> # example for matrixStrucTest package
> library(matrixStrucTest)
> data("big5")
> 
> # get column numbers for questionnaire items
> items <- grep("[0-9]", colnames(big5))
> 
> # compute Spearman's correlation matrix
> A <- cor(big5[, items], use = "complete.obs", method = "spearman")
> 
> # specify the groups
> groups <- "extrovert ~ E1 + E2 + E3 + E4 + E5 + E6 + E7 + E8 + E9 + E10
+            neurotic ~ N1 + N2 + N3 + N4 + N5 + N6 + N7 + N8 + N9 + N10
+            agreeable ~ A1 + A2 + A3 + A4 + A5 + A6 + A7 + A8 + A9 + A10
+            conscientious ~ C1 + C2 + C3 + C4 + C5 + C6 + C7 + C8 + C9 + C10
+            open ~ O1 + O2 + O3 + O4 + O5 + O6 + O7 + O8 + O9 + O10"
> 
> # compute permutation p-values
> # Note: Using small B for fast checking on CRAN. Set B >= 1000 in practice.
> result <- matrixStrucTest(A = A, groups = groups, B = 100, absolute = TRUE)
> 
> # Note: two-sided p-values from Hubert's Gamma printed by default
> #       other results available by directing accessing them from the
> #       returned object
> result
    Test of matrix structure   

100 Monte Carlo resamples, two-sided p-values

Overall Hubert's Gamma
Gamma0 = 0.783, p-val < 0.01

Block-specific Hubert's Gamma
              Gamma0   pval
extrovert      0.784 < 0.01
neurotic       0.771 < 0.01
agreeable      0.667 < 0.01
conscientious  0.712 < 0.01
open           0.727 < 0.01
> 
> # Alternative approach for specifying the groups as a list of column/row indices
> extrovert <- grep("E", colnames(A))
> neurotic <- grep("N", colnames(A))
> agreeable <- grep("A", colnames(A))
> conscientious <- grep("C", colnames(A))
> open <- grep("O", colnames(A))
> 
> # put blocks/groups in list
> group_list <- list(extrovert = extrovert, 
+                    neurotic = neurotic, 
+                    agreeable = agreeable, 
+                    conscientious = conscientious,
+                    open = open)
> 
> # Note: Using small B for fast checking on CRAN. Set B >= 1000 in practice.
> result <- matrixStrucTest(A = A, group_list = group_list, B = 100, absolute = TRUE)
> 
> # Note: two-sided p-values from Hubert's Gamma printed by default
> #       other results available by directing accessing them from the
> #       returned object
> result
    Test of matrix structure   

100 Monte Carlo resamples, two-sided p-values

Overall Hubert's Gamma
Gamma0 = 0.783, p-val < 0.01

Block-specific Hubert's Gamma
              Gamma0   pval
extrovert      0.784 < 0.01
neurotic       0.771 < 0.01
agreeable      0.667 < 0.01
conscientious  0.712 < 0.01
open           0.727 < 0.01
> 
> # Visualize groups
> library(ggplot2)
Error in library(ggplot2) : there is no package called ‘ggplot2’
Execution halted