Displaying 1 result from an estimated 1 matches for "innerfunction2".
Did you mean:
innerfunction
2012 Oct 05
2
Using variables from different environments in one function
...tions:
############## 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 predefined variables.
#This shapes an environment in which variables that will be used
#by the inner function are defined.
############# MAIN SCRIPT ##########...