Skip to content

Using variables from different environments in one function

3 messages · Rik Verdonck, Ista Zahn, Duncan Murdoch

#
Hi Rik,

I don't fully understand it, but setting local=TRUE to your source()
calls will avoid the specific error you noted.

Best,
Ista

On Fri, Oct 5, 2012 at 3:47 PM, Rik Verdonck
<Rik.Verdonck at bio.kuleuven.be> wrote:
#
On 12-10-05 3:47 PM, Rik Verdonck wrote:
Simply define the "inner" functions within the main function.  They'll 
have access to all of its local variables, just as they currently have 
access to all the variables in the global environment where they are 
defined in the current version.

Duncan Murdoch