Re: [R] A question about R environment

2007-01-10 Thread François Pinard
[Philippe Grosjean] >Please, don't reinvent the wheel: putting functions in a dedicated >environment is one of the things done by R packages (together with a >good documentation of the function, and making them easily installable >on any R implementation). >[...] this is probably the time for

Re: [R] A question about R environment

2007-01-09 Thread Prof Brian Ripley
le", env) and that has worked since well before 2.0.0. > > > tong > > - Original Message - > From: Henrik Bengtsson <[EMAIL PROTECTED]> > Date: Monday, January 8, 2007 10:40 pm > Subject: Re: [R] A question about R environment > To: Gabor Grothendieck

Re: [R] A question about R environment

2007-01-09 Thread Tong Wang
Monday, January 8, 2007 10:40 pm Subject: Re: [R] A question about R environment To: Gabor Grothendieck <[EMAIL PROTECTED]> Cc: Tong Wang <[EMAIL PROTECTED]>, R help > sourceTo() in R.utils will allow you to source() a file into an > environment. > /Henrik > > On 1

Re: [R] A question about R environment

2007-01-09 Thread Tong Wang
nks a lot. Happy new year every one! cheers tong - Original Message - From: Philippe Grosjean <[EMAIL PROTECTED]> Date: Monday, January 8, 2007 10:09 pm Subject: Re: [R] A question about R environment To: François Pinard <[EMAIL PROTECTED]>, Tong Wang <[EMAIL PROTECTED]&

Re: [R] A question about R environment

2007-01-08 Thread Henrik Bengtsson
sourceTo() in R.utils will allow you to source() a file into an environment. /Henrik On 1/9/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Try this: > > > e <- new.env() > > e$f <- function(x)x > > attach(e) > > search() > [1] ".GlobalEnv""e" "package:stats" > [4] "

Re: [R] A question about R environment

2007-01-08 Thread Philippe Grosjean
Please, don't reinvent the wheel: putting functions in a dedicated environment is one of the things done by R packages (together with a good documentation of the function, and making them easily installable on any R implementation). So, this is probably the time for you to read the "Writing R e

Re: [R] A question about R environment

2007-01-08 Thread François Pinard
[Tong Wang] >I created environment "mytoolbox" by : mytoolbox <- >new.env(parent=baseenv()). Is there anyway I put it in the search >path? In a project, I often write some small functions, and load them >into my workspace directly, so when I list the objects with ls(), it >looks pretty messy

Re: [R] A question about R environment

2007-01-08 Thread Gabor Grothendieck
Try this: > e <- new.env() > e$f <- function(x)x > attach(e) > search() [1] ".GlobalEnv""e" "package:stats" [4] "package:graphics" "package:grDevices" "package:utils" [7] "package:datasets" "package:methods" "Autoloads" [10] "package:base" > f function(x)x On 1/8/07

[R] A question about R environment

2007-01-08 Thread Tong Wang
Hi all, I created environment "mytoolbox" by : mytoolbox <- new.env(parent=baseenv()) Is there anyway I put it in the search path ? If you need some background : In a project, I often write some small functions, and load them into my workspace directly, so when I list the objec