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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: RnpdMAP
> ### Title: Generate Random NPD R matrices from a user-supplied population R
> ### Aliases: RnpdMAP
> ### Keywords: fungible
> 
> ### ** Examples
> 
> 
> library(MASS)
> 
> Nvar = 20
> Nfac = 4
> NSubj = 600
> Seed = 123    
> 
> set.seed(Seed)
> 
> ## Generate a vector of classical item difficulties
> p <- runif(Nvar)
> 
> cat("\nClassical Item Difficulties:\n")

Classical Item Difficulties:
> 
> print(rbind(1:Nvar,round(p,2)) )
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
[1,] 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00
[2,] 0.29 0.79 0.41 0.88 0.94 0.05 0.53 0.89 0.55  0.46  0.96  0.45  0.68  0.57
     [,15] [,16] [,17] [,18] [,19] [,20]
[1,]  15.0  16.0 17.00 18.00 19.00 20.00
[2,]   0.1   0.9  0.25  0.04  0.33  0.95
> 
> summary(p)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
0.04206 0.31783 0.53977 0.55081 0.88537 0.95683 
> 
> 
> ## Convert item difficulties to quantiles
> b <- qnorm(p)
> 
> 
> ## fnc to compute root mean squared standard deviation
> RMSD <- function(A, B){
+   sqrt(mean( ( A[lower.tri(A, diag = FALSE)] - B[lower.tri(B, diag = FALSE)] )^2))
+ }
> 
> 
> ## Generate vector of eigenvalues with clear factor structure
>   L <- eigGen(nDimensions = Nvar, 
+             nMajorFactors = Nfac, 
+             PrcntMajor = .60, 
+             threshold  = .50)
>           
> 
> ## Generate a population R matrix with the eigenvalues in L
>   Rpop <- rGivens(eigs = L)$R
>   
> ## Generate continuous data that will reproduce Rpop (exactly)
>   X <- mvrnorm(n = NSubj, mu = rep(0, Nvar), 
+                Sigma = Rpop, empirical = TRUE)
>                
> if( any(colSums(X) == 0) ){
+   stop("One or more variables have zero variance. Generate a new data set.")               
+  }
Error: One or more variables have zero variance. Generate a new data set.
Execution halted