Displaying 1 result from an estimated 1 matches for "innerfunctionlist".
2012 Oct 05
2
Using variables from different environments in one function
...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)
}
################################################
#And we have a main script with a number of pre...