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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: iclust
> ### Title: iclust: Item Cluster Analysis - Hierarchical cluster analysis
> ###   using psychometric principles
> ### Aliases: ICLUST iclust
> ### Keywords: multivariate cluster
> 
> ### ** Examples
> 
> test.data <- Harman74.cor$cov
> ic.out <- iclust(test.data,title="ICLUST of the Harman data")
Warning in if (class(R.inv) == as.character("try-error")) { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(R.inv) == as.character("try-error")) { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(p.loading) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(phi.inv) == as.character("try-error")) { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(R.inv) == as.character("try-error")) { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(p.loading) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(phi.inv) == as.character("try-error")) { :
  the condition has length > 1 and only the first element will be used
> summary(ic.out)
ICLUST (Item Cluster Analysis)Call: iclust(r.mat = test.data, title = "ICLUST of the Harman data")
ICLUST of the Harman data 

Purified Alpha:
[1] 0.91

 Guttman Lambda6* 
[1] 0.94

Original Beta:
[1] 0.63

Cluster size:
[1] 24

Purified scale intercorrelations
 reliabilities on diagonal
 correlations corrected for attenuation above diagonal: 
     [,1]
[1,] 0.91
> 
> #use all defaults and stop at 4 clusters
> ic.out4 <- iclust(test.data,nclusters =4,title="Force 4 clusters")  
Warning in if (class(R.inv) == as.character("try-error")) { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(R.inv) == as.character("try-error")) { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(p.loading) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(R.inv) == as.character("try-error")) { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(p.loading) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(phi.inv) == as.character("try-error")) { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(R.inv) == as.character("try-error")) { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(p.loading) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(phi.inv) == as.character("try-error")) { :
  the condition has length > 1 and only the first element will be used
> summary(ic.out4)
ICLUST (Item Cluster Analysis)Call: iclust(r.mat = test.data, nclusters = 4, title = "Force 4 clusters")
Force 4 clusters 

Purified Alpha:
 C13  C20  C15   V2 
0.90 0.84 0.81 0.48 

 Guttman Lambda6* 
 C13  C20   V2  C15 
0.90 0.87 0.52 0.84 

Original Beta:
 C13  C20   V2  C15 
0.79 0.74   NA 0.74 

Cluster size:
C13 C20 C15  V2 
  5  12   5   2 

Purified scale intercorrelations
 reliabilities on diagonal
 correlations corrected for attenuation above diagonal: 
     C13  C20  C15   V2
C13 0.90 0.69 0.54 0.52
C20 0.60 0.84 0.71 0.75
C15 0.46 0.59 0.81 0.39
V2  0.34 0.48 0.24 0.48
> ic.out1 <- iclust(test.data,beta=3,beta.size=3)  #use more stringent criteria
Warning in if (class(R.inv) == as.character("try-error")) { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(R.inv) == as.character("try-error")) { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(p.loading) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(phi.inv) == as.character("try-error")) { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(R.inv) == as.character("try-error")) { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(p.loading) == "try-error") { :
  the condition has length > 1 and only the first element will be used
Warning in if (class(phi.inv) == as.character("try-error")) { :
  the condition has length > 1 and only the first element will be used
> ic.out  #more complete output 
ICLUST (Item Cluster Analysis)
Call: iclust(r.mat = test.data, title = "ICLUST of the Harman data")

Purified Alpha:
[1] 0.91

G6* reliability:
[1] 1

Original Beta:
[1] 0.63

Cluster size:
[1] 24

Item by Cluster Structure matrix:
                       [,1]
VisualPerception       0.60
Cubes                  0.38
PaperFormBoard         0.43
Flags                  0.48
GeneralInformation     0.67
PargraphComprehension  0.66
SentenceCompletion     0.64
WordClassification     0.66
WordMeaning            0.66
Addition               0.47
Code                   0.57
CountingDots           0.48
StraightCurvedCapitals 0.61
WordRecognition        0.43
NumberRecognition      0.40
FigureRecognition      0.53
ObjectNumber           0.48
NumberFigure           0.54
FigureWord             0.46
Deduction              0.62
NumericalPuzzles       0.61
ProblemReasoning       0.61
SeriesCompletion       0.69
ArithmeticProblems     0.66

With eigenvalues of:
[1] 7.6

Purified scale intercorrelations
 reliabilities on diagonal
 correlations corrected for attenuation above diagonal: 
     [,1]
[1,] 0.91

Cluster fit =  0.8   Pattern fit =  0.94  RMSR =  0.1 
> plot(ic.out4)    #this shows the spatial representation
Use ICLUST.diagram to see the  hierarchical structure
> #use a dot graphics viewer on the out.file
> dot.graph <- ICLUST.graph(ic.out,out.file="test.ICLUST.graph.dot")  
>  #show the equivalent of a factor solution 
> fa.diagram(ic.out4$pattern,Phi=ic.out4$Phi,main="Pattern taken from iclust") 
Error in fa.sort(fa.results) : object 'factors' not found
Calls: fa.diagram -> fa.sort
Execution halted