[BioC] LIMMA: Error in rowMeans(y$exprs, na.rm=TRUE):'x' must be numeric

James W. MacDonald jmacdon at uw.edu
Thu Oct 4 19:05:33 CEST 2012

Hi Kripa,

On 10/4/2012 12:54 PM, Kripa R wrote:
> Hi so I'm trying to do limma fitting on my data but i keep getting the following error
> Error in rowMeans(y$exprs, na.rm=TRUE):'x' must be numeric
> But I'm not sure what the problem is does anyone have suggestions?
> Here's what i've been doing after normalization:
> data<-subset(data_pheno, select=is.na(data_pheno['case',])==FALSE) #remove columns with NA
> group<- factor(data['case',])
> design<- model.matrix(~0+group) #dim 240  2
> expr<-as.data.frame(data[1:39693,]) #only keep rows that need to fit aka expression data, dim 39693 240
> fit<- lmFit(expr,design)
> Error in rowMeans(y$exprs, na.rm=TRUE):'x' must be numeric

The help page for lmFit() lists lots of possible input object types, but 
data.frame is not one of them. Your code is fairly cryptic, so I have no 
idea what is in that data.frame, other than the obvious conclusion that 
there are some non-numeric data.

You would be better served to use existing infrastructure for processing 
your data rather than a data.frame. I think there should be enough 
examples in the limma User's Guide to show you the way.



> Thanks,
> .kripa 		 	   		
> 	[[alternative HTML version deleted]]
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

James W. MacDonald, M.S.
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099

More information about the Bioconductor mailing list