[BioC] need help in Contrast. Treatment design

Vishnuvardhana, Ashwin [BSD] - SRF avishnuv at bsd.uchicago.edu
Tue Oct 5 22:35:07 CEST 2010


Hi,

I am working on 2x2 Factorial Experiment(ANOVA With interaction factor)and following Limma user guide( chapter 11.4 Estrogen Data). Basically I am interested in knowing how "gender" variable is effecting outcome of experiment(please see attached file for sample information)  is effecting  

But I am getting error at 

"colnames(design)"

Error in dimnames(x) <- dn :   length of 'dimnames' [2] not equal to array extent

 

This is list of R codes that I ran for getting to this point 

 

Þ     targets <- readTargets("phenoData.txt",sep=",",row.names="filename")

Þ     contrasts(treatments) <- cbind(Type=c(0,0,0,0,1,1),MMut=c(0,1,0,0,0,0),FWT=c(0,0,1,0,0,0),MWT =c(1,0,0,0,0,0),FMut=c(0,0,0,1,0,0),NonTgM=c(0,0,0,0,0,1),NonTgF=c(0,0,0,0,1,0)) 

Þ     > contrasts(treatments) 

Þ            Gender MMut FWT MWT FMut

Þ     MMut        0    0   0   1    0

Þ     MWT         0    1   0   0    0

Þ     FMut        0    0   1   0    0

Þ     FWT         0    0   0   0    1

Þ     NonTGM      1    0   0   0    0

Þ     NonTGF      1    0   0   0    0

> design <- model. Matrix(~treatments)

> design 

   (Intercept) treatments Type treatmentsMMut treatmentsFWT treatmentsMWT treatmentsFMut

1            1              0              0             0             1              0

2            1              0              0             0             1              0

3            1              0              0             0             1              0

4            1              0              0             0             1              0

5            1              0              1             0             0              0

6            1              0              1             0             0              0

7            1              0              1             0             0              0

8            1              0              1             0             0              0

9            1              0              0             1             0              0

10           1              0              0             1             0              0

11           1              0              0             1             0              0

12           1              0              0             1             0              0

13           1              0              0             0             0              1

14           1              0              0             0             0              1

15           1              0              0             0             0              1

16           1              0              0             0             0              1

17           1              1              0             0             0              0

18           1              1              0             0             0              0

19           1              1              0             0             0              0

20           1              1              0             0             0              0

21           1              1              0             0             0              0

22           1              1              0             0             0              0

23           1              1              0             0             0              0

24           1              1              0             0             0              0

 

Any help is greatly appreciated.

 

Ash

 

 

 

 

 



This email is intended only for the use of the individual or entity to which it is addressed and may contain information that is privileged and confidential. If the reader of this email message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is prohibited. If you have received this email in error, please notify the sender and destroy/delete all copies of the transmittal. Thank you.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: PhenoData.txt
URL: <https://stat.ethz.ch/pipermail/bioconductor/attachments/20101005/6117f2ac/attachment.txt>


More information about the Bioconductor mailing list