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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: pamr.adaptthresh
> ### Title: A function to adaptive choose threshold scales, for use in
> ###   pamr.train
> ### Aliases: pamr.adaptthresh
> 
> ### ** Examples
> 
> set.seed(120)
> x <- matrix(rnorm(1000*20),ncol=20)
> y <- sample(c(1:4),size=20,replace=TRUE)
> mydata <- list(x=x,y=y)
> mytrain <-   pamr.train(mydata)
Warning: a class contains only 1 sample123456789101112131415161718192021222324252627282930> new.scales <- pamr.adaptthresh(mytrain)
Initial errors: 0.30000 0.00000 0.83333 1.33333 Roc 3.70632 
Update 1 
Warning: a class contains only 1 sample1234567891011
Errors 1.00000 0.00000 3.81818 3.72727 Roc 8.9713 
Update 2 
Warning: a class contains only 1 sample1234567891011
Errors 1.00000 0.00000 3.27273 3.63636 Roc 8.27937 
Update 3 
Warning: a class contains only 1 sample1234567891011
Errors 1.00000 0.00000 4.45455 3.72727 Roc 8.8552 
Update 4 
Warning: a class contains only 1 sample1234567891011
Errors 1.00000 0.63636 3.36364 3.63636 Roc 8.5763 
Update 5 
Warning: a class contains only 1 sample1234567891011
Errors 1.00000 0.45455 5.00000 3.72727 Roc 10.21781 
Update 6 
Warning: a class contains only 1 sample1234567891011
Errors 1.00000 0.81818 3.45455 3.72727 Roc 9.10592 
Update 7 
Warning: a class contains only 1 sample1234567891011
Errors 1.00000 0.63636 5.09091 3.72727 Roc 10.50998 
Update 8 
Warning: a class contains only 1 sample1234567891011
Errors 1.00000 0.81818 3.45455 3.72727 Roc 9.20987 
Update 9 
Warning: a class contains only 1 sample1234567891011
Errors 1.00000 0.63636 5.09091 3.72727 Roc 10.50998 
Update 10 
Warning: a class contains only 1 sample1234567891011
Errors 1.00000 0.81818 3.45455 3.72727 Roc 9.20987 
> 
>  
> mytrain2 <- pamr.train(mydata, threshold.scale=new.scales)
Warning: a class contains only 1 sample123456789101112131415161718192021222324252627282930> 
> myresults2 <- pamr.cv(mytrain2, mydata)
1234Fold 1 :Error in dimnames(Y) <- list(NULL, names(n.class)) : 
  length of 'dimnames' [2] not equal to array extent
Calls: pamr.cv -> nsccv -> nsc
Execution halted