[BioC] Error: incorrect number of dimensions AND (subscript) logical subscript too long

Adaikalavan Ramasamy ramasamy at cancer.org.uk
Tue Aug 17 19:17:28 CEST 2004


First thing first. Are you sure justRMA is returning expression for 49
arrays when you have 50 files in the working directory ?

getwd()
library(affy)
length(list.celfiles())

If you accidentally deleted one CEL file, this could be the reason later
calls also fail.


On Tue, 2004-08-17 at 17:44, S Peri wrote:
> Dear Group, 
>  
> I am analyzing Affy dataset from Harvard Brain CEL
> database. 
> 
> I am working on the data from an experiment where 50
> samples were analyzed.  I exported the expressions to
> a matrix. 
> 
> >gliexp <- exprs(justRMA())
> > dim(gliexp)
> [1] 12625    49
> 
> 
> I sorted out samples on the pathological state (4
> categories).  Now I want to do SAM and t-test on any
> of the 2 samples. 
> 
> I made these 4 categories into 0,1,2 and 3. This was
> made in a class file : Brain.cl
> 
> I wrote a function where values from 0 and 1 will give
> me the means from 0 and 1.
> 
> My function:
> 
> >BrainFc <- function(exp,cl){
> +X0 = X[,cl==0]
> +X1 = X[,cl==1]
> +return(apply(X0,1,mean) - apply(X1,1,mean))}
> 
> >myBrainFcs <- BrainFc(gliexp,Brain.cl)
> Error in X[, CL == 0] : incorrect number of dimensions
> 
> 
> I do not understand why am I getting this error.
> 
> I checked to see dim of my expression matrix:
> > dim(gliexp)
> [1] 12625    49
> 
> I have 50 samples, here I see 49.
> 
> Is this is the source of error? If so what should I
> do?
> 
> 
> I also did the following by reading previous messages
> from BioC mailing lists:
> 
> > gliexp_genes <- gliexp[1:12625,]
> > myBrainFcs <- BrainFc(gliexp_genes,Brain.cl)
> 
> Error in BrainFc(gliexp_genes, Brain.cl) : (subscript)
> logical subscript too long
> 
> 
> After this I do not have any option to write to BioC
> for some help. 
> 
> Please help me where I am doing wrong.
> 
> Thank you
> 
> PS
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
>



More information about the Bioconductor mailing list