Hans Gardfjell wrote: > Dear list readers, > > Can someone of you explain this behavior. Here's a toy example: > > Start by constructing a function tmp > > >fix(tmp) > > In the default editor enter this one-liner: > hist(rnorm(10)) > > close the editor and run environment on the function. > > > environment(tmp) > <environment: R_GlobalEnv> > > Open the editor and remove the last parenthesis, this will make the > editor choke. > > > fix(tmp) > Error in edit(name, file, title, editor) : > an error occurred on line 4 > use a command like > x <- edit() > to recover > > Put the paranthesis back: > > > edit()->tmp > > > environment(tmp) > <environment: base> > > tmp() > Error in tmp() : could not find function "hist" > > And as you can see, the function doesn't work anymore... > Yes, I know I can manually change the environment back to .GlobalEnv, > but is this the way it supposed to work?
No, but it has already been fixed. Please try the beta version of R-2.3.1. Uwe Ligges > This example is done in > > > R.Version()$version.string > [1] "Version 2.3.0 Patched (2006-04-25 r37924)" > > on WindowsXP > > Cheers, Hans > ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
