[BioC] R/Bioconductor and golub datasets

Hrishi D fotos4me2003 at yahoo.com
Tue Sep 16 16:51:26 MEST 2003


Hi All,

I want to analyze golub data set and apply kkn.cv (knn
with cross validation) but i keep getting this error
(please scroll down, please)

library(golubEsets)
    X <- exprs(golubTrain)
    X[X < 100] <- 100
    X[X  16000] <- 16000
    mmfilt <- function(r = 5, d = 500, na.rm = TRUE) {
   + function(x) {
   + minval <- min(x,na.rm=na.rm)
   + maxval <- max(x, na.rm = na.rm)
   + (maxval/minval  r) && (maxval - minval  d)
   + }
   + }
   
       ffun <- filterfun(mmfun)
    sub <- genefilter(X,ffun)
    sum(sub)
   [1] 3051
   
    X<-X[sub,]
    X<-log2(X)
   
   
   
    golubTrainSub <- golubTrain[sub,]
    slot(golubTrainSub,"exprs")<-X
    golubTrainSub
   Expression Set (exprSet) with
          3051 genes
          38 samples
                   phenoData object with 11 variables
and 38 cases
           varLabels
                  Samples: Sample index
                  ALL.AML: Factor, indicating ALL or
AML
                  BM.PB: Factor, sample from marrow or
peripheral
 blood                 T.B.cell: Factor, T cell or B
cell leuk.
                  FAB: Factor, FAB classification
                  Date: Date sample obtained
                  Gender: Factor, gender of patient
                  pctBlasts: pct of cells that are
blasts
                  Treatment: response to treatment
                  PS: Prediction strength
                  Source: Source of sample
   

    knn.cv(golubTrainSub, cl, k =3, l = 0, prob =
FALSE, use.all
 =
  TRUE) Error in knn.cv(golubTrainSub, cl, k = 3, l =
0, prob =
  FALSE,
   use.all = TRUE) : 
          k = -1 must be at least 1
   In addition: Warning message:
   k = 3 exceeds number -1 of patterns in:
knn.cv(golubTrainSub,
 cl, k = 3, l = 0, prob = FALSE, use.all = TRUE)
    
  
   Why is there an error????!!!!
  When i check dim(golubTrainSub) it says NULL!!!!
Please help
Thanks in advance



More information about the Bioconductor mailing list