Search
Question: automating makeContrasts call in limma
2
gravatar for Greg Finak
11.5 years ago by
Greg Finak50
Greg Finak50 wrote:
The following line should do what you want. > myContrasts<-c("t1-t2","t1-3","t2-t3") contrast.matrix <- eval(as.call(c(as.symbol("makeContrasts"),as.list (myContrasts),levels=list(design)))) It's the same convention as making calls to R functions through C code. Cheers, On 11-Mar-06, at 3:16 PM, Francois Pepin wrote: > Hi everyone, > > is there a way to automate calls to makeContrasts? Right now, all the > contrasts have to be typed in or hard-coded. We're dealing with a > couple > of hundreds of samples and it would make my life a lot easier if we > could generate everything automatically. I've looked briefly in the > archives but didn't find anything. > > Ideally, I would want to have a way to do: > > myContrasts<-c("t1-t2","t1-3","t2-t3") > contrast.matrix<-makeContrasts(myContrasts,levels=design) > > I haven't found a way to properly go around the 'substitute(list > (...))' > call inside of makeContrasts. > > Right now, I'm writing code to output the proper call and copy/ > paste it > back in the console. > > Another alternative would be to create the contrast matrix myself. > That > would be a more elegant way of doing it, but I don't quite feel > comfortable enough (yet) with design matrices for that. > > Francois > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor Greg Finak PhD Candidate McGill Center For Bioinformatics (W)(514)398-7071 x09317 finak at mcb.mcgill.ca
go
ADD COMMENTlink written 11.5 years ago by Greg Finak50
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 206 users visited in the last hour