[R] Trying to build up functions with its names by means of lapply
gunter.berton at gene.com
Thu Jun 6 17:48:36 CEST 2013
Unfair answer: My personal hangup. To my taste, get() makes R like a
macro language instead of doing functional programming. force() makes
me nervous about how I'm passing arguments. I won't attempt to defend
either of these claims, so feel free to dismiss.
On Thu, Jun 6, 2013 at 8:28 AM, Julio Sergio <juliosergio at gmail.com> wrote:
> Bert Gunter <gunter.berton <at> gene.com> writes:
>> Another equivalent way to do it?
>> f2 <- function(c,nm = "gamma",...)
>> probFunc <- paste0(c,nm)
>> more <- list(...)
>> This avoids the explicit use of get() and force(), I believe, but are
>> there problems here I'm missing?
> Thanks Bert. Since I'm relatively new in using this language, a question
> arises in my mind: why should the use of get() and force() be avoided? Is it
> just for syntactic clarity or is there another computational reason?
> Best regards,
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Genentech Nonclinical Biostatistics
Internal Contact Info:
More information about the R-help