I have an error that occurs with various dataset but always occurs with a
particular dataset. The dataset is not large and has no missing values.
I am using R 2.6.1 as a suggestion to isolate the error. Later versions of R
can cause this error(I am told) and can confirm that this works better under
2.6.1.

copied from below (The error:):

>
pred=pamr.predict(pamr.fit,newx=as.matrix(t(d.mv2[,pamrimp])),threshold=Thresh)
Error in diag.disc((newx - centroid.overall)/sd, delta.shrunk, prior,  :
  (subscript) logical subscript too long

If there is other information needed please let me know.

> pamr.fit<-pamr.train(mydata,n.threshold=50);
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950>
pamcv<-pamr.cv(pamr.fit,mydata);
12Fold 1
:1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
Fold 2
:1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
Fold 3
:1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
Fold 4
:1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
Fold 5
:1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
Fold 6
:1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
Fold 7
:1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
Fold 8
:1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
Fold 9
:1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
Fold 10
:1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
>
> Thresh<-max(pamcv$threshold[pamcv$error== min(pamcv$error)]);
> Thresh
[1] 3.692809
> pamrimplist<-pamr.listgenes(fit=pamr.fit, data=mydata,
 threshold=Thresh,genenames=TRUE);
      id name                  1-score 2-score
 [1,] 1  MMSE                  -1.2997 1.2759
 [2,] 2  Ab1.42                -0.3874 0.3803
 [3,] 3  Tau                   0.2667  -0.2618
 [4,] 4  P.Tau.181P            0.2084  -0.2045
 [5,] 48 HIPPL.uas             -0.1698 0.1667
 [6,] 49 HIPPR.uas             -0.1557 0.1529
 [7,] 10 VENTVOL.bsi           0.1162  -0.114
 [8,] 6  LEFTHIPPO.ucsfsntvol  -0.0931 0.0914
 [9,] 7  RIGHTHIPPO.ucsfsntvol -0.0825 0.081
[10,] 11 VENTVOL.uwo           0.0538  -0.0528
> pamrimp<-pamrimplist[,2];
> Thresh
[1] 3.692809
>
pred=pamr.predict(pamr.fit,newx=as.matrix(t(d.mv2[,pamrimp])),threshold=Thresh)
Error in diag.disc((newx - centroid.overall)/sd, delta.shrunk, prior,  :
  (subscript) logical subscript too long
In addition: Warning messages:
1: In newx - centroid.overall :
  longer object length is not a multiple of shorter object length
2: In (newx - centroid.overall)/sd :
  longer object length is not a multiple of shorter object length
> sessionInfo()
R version 2.6.1 (2007-11-26)
i386-pc-mingw32

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] splines   stats     graphics  grDevices utils     datasets  methods
base

other attached packages:
[1] pamr_1.31      survival_2.34  cluster_1.11.9
>

	[[alternative HTML version deleted]]

