Rui Barradas <ruipbarradas <at> sapo.pt> writes: > My solution works but it is incorrect. We should force the argument 'c', > > faux <- function(c) { > force(c) > function (x) get(paste0(c,"gamma"))(x,k,scale=theta) > }
Thanks a lot, Rul. I think I have to learn a bit more about lazy evaluation of arguments, as someone else told me at the beginning of this discussion. -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.