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

> ### Name: cor.matrix
> ### Title: Correlation Matrix with Statistical Significance Testing
> ### Aliases: cor.matrix
> 
> ### ** Examples
> 
> dat <- data.frame(group = c("a", "a", "a", "a", "a",
+                             "b", "b", "b", "b", "b"),
+                   x = c(5, NA, 6, 4, 6, 7, 9, 5, 8, 7),
+                   y = c(3, 3, 5, 6, 7, 4, 7, NA, NA, 8),
+                   z = c(1, 3, 1, NA, 2, 4, 6, 5, 9, 6))
> 
> # Pearson product-moment correlation coefficient matrix using pairwise deletion
> cor.matrix(dat[, c("x", "y", "z")])
 Pearson Product-Moment Correlation Coefficient

       x    y z
  x            
  y 0.38       
  z 0.68 0.58  
> 
> # Spearman's rank-order correlation matrix using pairwise deletion
> cor.matrix(dat[, c("x", "y", "z")], method = "spearman")
 Spearman's Rank-Order Correlation Coefficient

       x    y z
  x            
  y 0.43       
  z 0.72 0.56  
> 
> # Kendall's Tau-b correlation matrix using pairwise deletion
> cor.matrix(dat[, c("x", "y", "z")], method = "kendall-b")
 Kendall's Tau-b Correlation Coefficient

       x    y z
  x            
  y 0.31       
  z 0.59 0.47  
> 
> # Pearson product-moment correlation coefficient matrix using pairwise deletion,
> # print sample size and significance values
> cor.matrix(dat[, c("x", "y", "z")], print = "all")
 Pearson Product-Moment Correlation Coefficient

       x    y z
  x            
  y 0.38       
  z 0.68 0.58  

 Sample Size Using Pairwise Deletion

    x y z
  x      
  y 7    
  z 8 7  

 Significance Value (p-value)

        x     y z
  x              
  y 0.401        
  z 0.066 0.168  

  Adjustment for multiple testing: none
> 
> # Pearson product-moment correlation coefficient matrix using listwise deletion,
> # print sample size and significance values
> cor.matrix(dat[, c("x", "y", "z")], use = "listwise", print = "all")
 Pearson Product-Moment Correlation Coefficient

       x    y z
  x            
  y 0.55       
  z 0.86 0.64  

 Sample Size Using Listwise Deletion
  n = 6 

 Significance Value (p-value)

        x     y z
  x              
  y 0.262        
  z 0.030 0.173  

  Adjustment for multiple testing: none
> 
> # Pearson product-moment correlation coefficient matrix using listwise deletion,
> # print sample size and significance values with Bonferroni correction
> cor.matrix(dat[, c("x", "y", "z")], use = "listwise", print = "all", p.adj = "bonferroni")
 Pearson Product-Moment Correlation Coefficient

       x    y z
  x            
  y 0.55       
  z 0.86 0.64  

 Sample Size Using Listwise Deletion
  n = 6 

 Significance Value (p-value)

        x     y z
  x              
  y 0.787        
  z 0.089 0.518  

  Adjustment for multiple testing: bonferroni
> 
> # Pearson product-moment correlation coefficient matrix using pairwise deletion,
> # results for group "a" and "b" separately
> cor.matrix(dat[, c("x", "y", "z")], group = dat$group, print = "all")
Error in dimnames(x) <- dn : 
  length of 'dimnames' [1] not equal to array extent
Calls: cor.matrix ... print.cor.matrix -> row.names<- -> row.names<-.default -> rownames<-
Execution halted