Re: [Rd] linking environments

2009-03-25 Thread Steven McKinney
> > -Original Message- > From: r-devel-boun...@r-project.org on behalf of Joerg Betzin > Sent: Wed 3/25/2009 8:47 AM > To: r-devel@r-project.org > Subject: [Rd] linking environments > > Dear R-helpers, > > I try to use nested R-functions as follows: Lo

Re: [Rd] linking environments

2009-03-25 Thread Duncan Murdoch
On 3/25/2009 11:47 AM, Joerg Betzin wrote: Dear R-helpers, I try to use nested R-functions as follows: You didn't use nested functions. They would look like this: help1 <- function(){ help2 <- function(){ if (x == 1) cat("Hello world x = 1") } x <-

[Rd] linking environments

2009-03-25 Thread Joerg Betzin
Dear R-helpers, I try to use nested R-functions as follows: help1 = function(){ x = 1 help2() } with help2 = function(){ if (x == 1) cat("Hello world x = 1") } If I compile these functions and run help1() an error message occurs Fehler in help2()