Skip to content
Prev 270939 / 398498 Next

Generalizing call to function

. wrote:
You need to replace the line with "dots <- as.list(c(y, lambda))" with this

dots <- list(y, lambda)

You could also replace the two lines

         dots <- as.list(c(y, lambda))
         do.call(dcom, dots)

with the single line

         do.call(dcom, list(y, lambda)) 

See the description of the argument "args" of do.call.

You should now get the same answer as for func1.
Deciding if this is correct is up to you.

Berend


--
View this message in context: http://r.789695.n4.nabble.com/Generalizing-call-to-function-tp3793329p3796637.html
Sent from the R help mailing list archive at Nabble.com.