Problem creating a contrast matrix
7
0
Entering edit mode
@siarhei-manakou-2255
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070704/ fe06dc69/attachment.pl
• 1.9k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 hour ago
United States
Hi Sergei, You can't start a variable name with a number in R, so you can either change to something like day.025, or you can construct your contrasts matrix by hand, using something like contrast <- matrix(c(-1,0,0,1,0,0,0,-1,0,0,0,1,0,0,-1,0,0,0,0,1,0,-1,0,0,0,0,0,0,1 ), ncol=4, dimnames=list(colnames(design), paste(colnames(design)[c(4:7)], colnames(design)[1])) I often construct the contrasts matrix by hand as it gives you more control over the dimnames attribute. Best, Jim BTW, you only need to send a question once. Sending it thrice may well result in no response ;-D Siarhei Manakou wrote: > Hello, > > Im a first year PhD student in Sanger institute - just started working with bioconductor and encoutered problem while building a contrast matrix. I first made the desing matrix: > > >> design<-model.matrix(~-1 + pData(eset)$days) >> colnames(design)<-levels(pData(eset)$days) >> colnames(design) >> > [1] "025days" "12days" "16days" "1days" "2days" "4days" "8days" > > > Then attempted to make a contrast matrix: > > >> contr_matrix<-makeContrasts(1days-025days, 2days-025days, 4days- 025days, 8days-025days, 12days-025days, 16days-025days, levels=design) >> > > but it produces the following error message: > > Error: syntax error, unexpected SYMBOL, expecting ',' in "contr_matrix<-makeContrasts(1days" > > I would be very grateful if somebody could point out what the problem could be. I am using R-2.5.0 under Linux. > > Thanks a lot! > Sergei > > > > -------------------------------------------------------------------- ---- > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
ADD COMMENT
0
Entering edit mode
@siarhei-manakou-2255
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070704/ 106dbc4a/attachment.pl
ADD COMMENT
0
Entering edit mode
@siarhei-manakou-2255
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070704/ b638fa9e/attachment.pl
ADD COMMENT
0
Entering edit mode
@siarhei-manakou-2255
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070704/ ad4f764a/attachment.pl
ADD COMMENT
0
Entering edit mode
@siarhei-manakou-2255
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070704/ cdf6aabb/attachment.pl
ADD COMMENT
0
Entering edit mode
@siarhei-manakou-2255
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070704/ dc78073e/attachment.pl
ADD COMMENT
0
Entering edit mode
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070704/ 4c1a2fe3/attachment.pl
ADD REPLY
0
Entering edit mode
@siarhei-manakou-2255
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070704/ ade87bd4/attachment.pl
ADD COMMENT

Login before adding your answer.

Traffic: 871 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6