Displaying 1 result from an estimated 1 matches for "innerfunction1".
Did you mean:
innerfunction
2012 Oct 05
2
Using variables from different environments in one function
...periencing this issue with functions within a function and
I can kind of feel where the problem is (environments, closures etc),
but I don't manage to solve it.
I will sketch it with an example:
#We have two simple "inner" functions:
############## INNER FUNCTION1 #################
innerfunction1<-function()
{
ab<-a+b
cd<-c+d
innerfunctionlist<-list("ab"=ab,"cd"=cd)
}
################################################
############## INNER FUNCTION2 #################
innerfunction2<-function()
{
print(AB+CD)
}
################...