Re: [Rd] Why is there no within.environment function?

2012-03-21 Thread Gavin Simpson
r-project.org] > > On Behalf > > Of Richard Cotton > > Sent: Wednesday, March 21, 2012 2:51 PM > > To: r-devel@r-project.org > > Subject: [Rd] Why is there no within.environment function? > > > > If I want to assign some variables into an environment, it see

Re: [Rd] Why is there no within.environment function?

2012-03-21 Thread peter dalgaard
; wdunlap tibco.com > > >> -Original Message- >> From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] >> On Behalf >> Of Richard Cotton >> Sent: Wednesday, March 21, 2012 2:51 PM >> To: r-devel@r-project.org >> Subje

Re: [Rd] Why is there no within.environment function?

2012-03-21 Thread William Dunlap
nts simpler if within.environment existed. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On > Behalf > Of Richard Cotton > Sent: Wednesday, March 21, 2

Re: [Rd] Why is there no within.environment function?

2012-03-21 Thread Gabor Grothendieck
On Wed, Mar 21, 2012 at 5:51 PM, Richard Cotton wrote: > If I want to assign some variables into an environment, it seems > natural to do something like > > e <- new.env() > within(e, >    { >      x <- 1:5 >      y <- runif(5) >    } > ) > > This throws an error, since within.environment doesn't

[Rd] Why is there no within.environment function?

2012-03-21 Thread Richard Cotton
If I want to assign some variables into an environment, it seems natural to do something like e <- new.env() within(e, { x <- 1:5 y <- runif(5) } ) This throws an error, since within.environment doesn't exist.  I realise I can work around it using as.environment(within(as.lis