Message-ID: <1336569182974-4620390.post@n4.nabble.com>
Date: 2012-05-09T13:13:02Z
From: jackl
Subject: as.function parameters
Hi,
i have a question regarding the as.function functionality.
I need to save multiple functions with adjusted parameters in a list.
The adjusted parameters are changed via variables in a loop.
The problem I'm facing right now is that the functions saved in
the list don't have the values of the parameters but the variable parameter
itself. Is there a way to force a call-by-value instead of a
call-by-address?
Example(not the real function):
tmp <- 4
f <- as.function(alist(y=,x=tmp,y+x)
f(1) > 5
tmp <- 2
f(1) > 3
thanks ahead and sorry if this question has already been asked before.
I could not really grasp the problem to one Subject.
--
View this message in context: http://r.789695.n4.nabble.com/as-function-parameters-tp4620390.html
Sent from the R help mailing list archive at Nabble.com.