Julio Sergio Santana <juliosergio <at> gmail.com> writes:

> ...
>     Producer <- function(f) function(x) 1/f(x)
> 

Counsulting a previous post, I got to the solution, I just need to rewrite 
the function Producer forcing it to eavaluate its argument, as follows

    Producer <- function(f) {f ;function(x) 1/f(x)}

Then, 

    linv <- lapply(lf, Producer)

    linv[[1]](3)
   [1] 0.125

    linv[[2]](3)
   [1] 0.1666667

Which is the desired result.

Thanks everybody for reading.

  -Sergio.

______________________________________________
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