[BioC] variable as argument to makeContrasts (limma)

Gordon K Smyth smyth at wehi.EDU.AU
Fri Jun 5 01:06:44 CEST 2009


Dear Saroj,

This isn't a solution to your general question about ..., but 
makeContrasts in limma already accepts character vector arguments:

   x <- c("a-b","b-c")
   makeContrasts(contrasts=x, levels=c("a","b","c"))

Best wishes
Gordon

> Date: Wed, 03 Jun 2009 09:44:44 -0400
> From: Saroj K Mohapatra <saroj at vt.edu>
> Subject: Re: [BioC] variable as argument to makeContrasts (limma)
> To: Martin Morgan <mtmorgan at fhcrc.org>
> Cc: Georg Otto <georg.otto at tuebingen.mpg.de>,
> 	bioconductor at stat.math.ethz.ch
>
> Martin Morgan wrote:
>>
>> One way is to aim for
>>
>>   do.call(makeConstrasts, myargs)
>>
>> where the 'myargs' is a list that you can construct any way you like,
>> e.g.,
>>
>>   myargs = list("B-A", "C-B", "C-A", levels=design)
>>   do.call(makeContrasts, myargs)
>>
> Perfect!
>
> Saroj
>
>
>
>> Martin
>>
>>>>
>>>> So my question is: how can I make this work, and - more generally - how
>>>> can I replace the "..." option in a function by a variable?
>>>>
>>>> Thanks,
>>>>
>>>> Georg



More information about the Bioconductor mailing list