Hello Petr,

> but I think this is how your code really works. Did you try it?

it does, but the R documentation says somewhere:
"Warning: for() loops are used in R code much less often than in
compiled languages. Code that takes a `whole object' view is likely to
be both clearer and faster in R."

So I am wondering in what way the "whole object view" could be applied
to my function.

Best regards,
        Jan

> > The function should work on the nth elements of the two input vectors
> > and put the result into the nth element of the output vector. So it
> > would work like c <- a + b, only instead of '+' there are more complex
> > calculations.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to