On 4/4/06, Henrik Bengtsson <[EMAIL PROTECTED]> wrote:
> On 4/4/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> > On 4/4/06, Henrik Bengtsson <[EMAIL PROTECTED]> wrote:
> > > On 4/4/06, Thomas Lumley <[EMAIL PROTECTED]> wrote:
> > > > On Tue, 4 Apr 2006, Henrik Bengtsson wrote:
> > > >
> > > >
On 4/4/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> On 4/4/06, Henrik Bengtsson <[EMAIL PROTECTED]> wrote:
> > On 4/4/06, Thomas Lumley <[EMAIL PROTECTED]> wrote:
> > > On Tue, 4 Apr 2006, Henrik Bengtsson wrote:
> > >
> > > > Hi,
> > > >
> > > > this relates to the question "How to set a fo
On 4/4/06, Prof Brian Ripley <[EMAIL PROTECTED]> wrote:
> On Tue, 4 Apr 2006, Roger D. Peng wrote:
>
> > In R 2.3.0-to-be, I think you can do
> >
> > foo <- function(huge) {
> > scale <- mean(huge)
> > g <- function(x) { scale * x }
> > environment(g) <- emptyenv()
> > g
> >
> "Roger" == Roger D Peng <[EMAIL PROTECTED]>
> on Tue, 04 Apr 2006 10:38:29 -0400 writes:
Roger> In R 2.3.0-to-be, I think you can do
Roger> foo <- function(huge) {
Roger> scale <- mean(huge)
Roger> g <- function(x) { scale * x }
Roger> environment(g) <- emptyenv(
On 4/4/06, Henrik Bengtsson <[EMAIL PROTECTED]> wrote:
> On 4/4/06, Thomas Lumley <[EMAIL PROTECTED]> wrote:
> > On Tue, 4 Apr 2006, Henrik Bengtsson wrote:
> >
> > > Hi,
> > >
> > > this relates to the question "How to set a former environment?" asked
> > > yesterday. What is the best way to to r
On 4/4/06, Thomas Lumley <[EMAIL PROTECTED]> wrote:
> On Tue, 4 Apr 2006, Henrik Bengtsson wrote:
>
> > Hi,
> >
> > this relates to the question "How to set a former environment?" asked
> > yesterday. What is the best way to to return a function with a
> > minimal environment from a function? Here
On Tue, 4 Apr 2006, Roger D. Peng wrote:
> In R 2.3.0-to-be, I think you can do
>
> foo <- function(huge) {
> scale <- mean(huge)
> g <- function(x) { scale * x }
> environment(g) <- emptyenv()
> g
> }
You can, but you really don't want to and you will get the same error.
In R 2.3.0-to-be, I think you can do
foo <- function(huge) {
scale <- mean(huge)
g <- function(x) { scale * x }
environment(g) <- emptyenv()
g
}
-roger
Henrik Bengtsson wrote:
> Hi,
>
> this relates to the question "How to set a former environment?" asked
> yeste
On Tue, 4 Apr 2006, Henrik Bengtsson wrote:
> Hi,
>
> this relates to the question "How to set a former environment?" asked
> yesterday. What is the best way to to return a function with a
> minimal environment from a function? Here is a dummy example:
>
> foo <- function(huge) {
> scale <- mean