RE: [R] seeking help with with()

2003-08-27 Thread Simon Fear
Brian Ripley [mailto:[EMAIL PROTECTED] > Sent: 27 August 2003 14:08 > To: Simon Fear > Cc: [EMAIL PROTECTED] > Subject: Re: [R] seeking help with with() > > > Security Warning: > If you are not sure an attachment is safe to open please conta

Re: [R] seeking help with with()

2003-08-27 Thread Peter Dalgaard BSA
"Simon Fear" <[EMAIL PROTECTED]> writes: > I tried to define a function like: > > fnx <- function(x, by.vars=Month) > print(by(x, by.vars, summary)) > > But this doesn't work (does not find x$Month; unlike other functions, > such as > subset(), the INDICES argument to "by" does not look for va

Re: [R] seeking help with with()

2003-08-27 Thread Prof Brian Ripley
On Wed, 27 Aug 2003, Simon Fear wrote: > I tried to define a function like: > > fnx <- function(x, by.vars=Month) > print(by(x, by.vars, summary)) > > But this doesn't work (does not find x$Month; unlike other functions, > such as > subset(), the INDICES argument to "by" does not look for vari

[R] seeking help with with()

2003-08-27 Thread Simon Fear
I tried to define a function like: fnx <- function(x, by.vars=Month) print(by(x, by.vars, summary)) But this doesn't work (does not find x$Month; unlike other functions, such as subset(), the INDICES argument to "by" does not look for variables in dataset x. Is fully documented, but I forget ev