[BioC] Limma error message

Seth Falcon sfalcon at fhcrc.org
Thu Apr 12 00:58:55 CEST 2007


Richard Friedman <friedman at cancercenter.columbia.edu> writes:

> Dear Bioconductor List,
>
> I am using limma to fit a linear model with what
> I believe is called a disconnected design:
>
>
>  > data <- ReadAffy()
>  > eset<-rma(data)
>  > design<-model.matrix(~ -1+factor(c(1,1,1,2,2,2,3,3,3,4,4,4)))
>  > colnames(design)  
> <- 
> c("1A_L5V4_No_Pon_A","1C_L5V4_Pon_A_DHT_24hrs","2A_L5S2_No_Pon_A","2C_L5 
> S2_Pon_A_DHT_24hrs")
>  > fit<-lmFit(eset,design)
>  > contrast.matrix<-makeContrasts(2C_L5S2_Pon_A_DHT_24hrs  
> -2A_L5S2_No_Pon_A -1C_L5V4_Pon_A_DHT_24hrs  
> +1A_L5V4_No_Pon_A,levels=design)
>
> I get the error message:
>
> Error: syntax error in "  
> contrast.matrix<-makeContrasts(2C_L5S2_Pon_A_DHT_24hrs"
>
> I would greatly appreciate any suggestions.

I suspect the issue is that symbols in R (variable names) cannot begin
with numbers and so 2C_L5S2_Pon_A_DHT_24hrs is perhaps a bad choice.
Does the error go away if you do something like:

  colnames(design) <- paste("x", colnames(design), sep="")

+ seth

-- 
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
http://bioconductor.org



More information about the Bioconductor mailing list