Skip to content

how to pass a function to a function inside a function

2 messages · Al Ehan, Rui Barradas

#
Hello,

Your function creates the vector 'x', then creates the function fs(), 
then returns the function just created. It _never_ reaches the line

     intgrt <- function(lower) {

and therefore never creates this last function. Now supposed it did. In 
the very end you make the same mistake, you simply return the function 
without ever calling it.

Hope this helps,

Rui Barradas

Em 25-09-2012 13:28, Al Ehan escreveu: