[R] how to use apply with a function created by ourselfs...?
spencer.graves at pdf.com
Sun Apr 20 22:05:22 CEST 2003
By default, arithmetic in R is vectorized, with a scalar being a vector
of length 1.
Consider the following example:
prediction <- function(a, b)
> prediction(1:3, 4:6)
 5 7 9
hope this helps, spencer graves
ana kozomara wrote:
> I'm a real newbie in R, so
> I don't know how to apply, a function created by myself...
> to a vector...
> It doesn't seem to understand
> lapply(vector, prediction())...
> Anyone can help me?
> Thanks in advance,
> R-help at stat.math.ethz.ch mailing list
More information about the R-help