[BioC] Functions
James W. MacDonald
jmacdon at uw.edu
Tue Jun 11 16:23:47 CEST 2013
Hi Steve,
On 6/10/2013 7:36 PM, Steve Lianoglou wrote:
> ... au contraire mon frere ...
>
> On Mon, Jun 10, 2013 at 2:06 PM, James W. MacDonald<jmacdon at uw.edu> wrote:
> [snip]
>>> Data<- ReadAffy( sampleNames=as.character( Cov$Label
>>> ),phenoData=tmp, verbose=TRUE )
>>> }
>>
>> This function doesn't return anything. You can end the function in one of
>> three ways. The last lines can be
> As the opportunity to correct Jim doesn't arise too often, you've got
> to keep your sense sharp and your keyboard ready plugged in.
>
> R> nothing<- function(x) {
> y<- x + 10
> }
>
> R> something<- nothing(10)
> R> something
> [1] 20
Hrmm. Grumble grumble grumble.
Oddly enough (to me at least) what you say is true. Howeva, it is
dependent on assignment to an object:
> nothing <- function(x) y <- x+10
> nothing(10)
> something <- nothing(10)
> something
[1] 20
> nothing2 <- function(x) {
+ y <- x+10
+ y
+ }
> nothing2(10)
[1] 20
Best,
Jim
>
> Behold: we have created something from .. well .. you get the idea.
>
> And now for my next trick: I'll make myself disappear.
>
> -ste**poof**
--
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099
More information about the Bioconductor
mailing list