[R] how to use apply with a function created by ourselfs...?

Thomas Lumley tlumley at u.washington.edu
Mon Apr 21 16:16:04 CEST 2003


On Mon, 21 Apr 2003, ANA KOZOMARA wrote:

>
> ..hey thanks for the answer, both of you...
> but :-(, I don't seem to have an answer to my problem...
> I tried with what u suggested, but it doesn't work yet...
> so I will precise it...
> I have a data frame...
> and I would like to apply the function "prediction" which acts on two
> vectors
> prediction(linear,ind),
> to my data frame,I mean to all the rows of my data frame...
> something like a function "Map" in Mathematica...
> Shortly, I want to apply function "prediction" to a list of arguments, not
> to a single argument...

I don't know Mathemtica but it sounds like you want mapply() (in R 1.7.0).

	-thomas



More information about the R-help mailing list