0 votes
in R Basics by

Say I have...

fn(a, b, c, d, e) a + b * c - d / e

How do I call fn on the vector c(1, 2, 3, 4, 5) so that I get the same result as fn(1, 2, 3, 4, 5)? (No need to tell me the result, just how to do it.)

1 Answer

0 votes
by
do.call(fn, as.list(c(1, 2, 3, 4, 5)))
...