Re: [R] How to pass expression as an argument

2006-09-27 Thread Gabor Grothendieck
On 27 Sep 2006 10:57:15 +0200, Peter Dalgaard <[EMAIL PROTECTED]> wrote: > Tong Wang <[EMAIL PROTECTED]> writes: > > > Hi, > > I am writing a function and need to pass a function expression as an > > argument, for instance, > > myfun <- function( express) { > >

Re: [R] How to pass expression as an argument

2006-09-27 Thread Peter Dalgaard
Tong Wang <[EMAIL PROTECTED]> writes: > Hi, > I am writing a function and need to pass a function expression as an > argument, for instance, > myfun <- function( express) { >x<- c(1,2,3) > y<-express > } > > if I call the ab

[R] How to pass expression as an argument

2006-09-27 Thread Tong Wang
Hi, I am writing a function and need to pass a function expression as an argument, for instance, myfun <- function( express) { x<- c(1,2,3) y<-express } if I call the above function by myfun( x*2 ), I get 2 as the result,