[R] ...listable functions...

Pierre Mallard pierremallard at yahoo.fr
Sat May 24 14:23:43 CEST 2003

Hi R-helpers.
I have the following problem:
I would like to apply my function gain(df,X,A) to a
list of arguments.
df is a data frame
X,A are the varibales od data frame.
When I do
> gain(kyphosis,"Kyphosis",c("Start","Number"))
[1] "Start"  "Number"
I get the following error...
Error in unique.default(x) : unique() applies only to
I tried lapply and apply, it didn't seem to work...

Can anybody tell me how to apply my function gain to a
list of argument(in this case, my third argument
Thanks in advance,

More information about the R-help mailing list