[Rd] Re: autoload error in profile {was anova-bug in R-version 1.0.0?} (PR#473)

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Tue, 7 Mar 2000 12:03:41 +0100 (MET)


On Tue, 7 Mar 2000, Martin Maechler wrote:

> >>>>> "BDR" == Prof Brian D Ripley <ripley@stats.ox.ac.uk> writes:
> 
>     BDR> On Tue, 7 Mar 2000, Trenkler, Dietrich wrote:
>     >> I think I've discovered what went wrong.
>     >> 
>     >> My workspace included a function wilcox.test formerly copied from
>     >> ctest. Now ctest ist part of the distribution and because of that I
>     >> always got the message:
>     >> 
>     >> [Previously saved workspace restored]
>     >> 
>     >> Error in autoload("wilcox.test", "ctest") :
>     >> Object already exists
>     >> 
>     >> I didn't take care of this message. Now I removed wilcox.test, saved
>     >> the WS, restarted R without the vanilla-option and alas, anova
>     >> now works.
>     >> 
>     >> It seems that R stops initializing after encountering the error
>     >> mentioned above. Is this correct?   
> 
>     BDR> Yes, in that the rest of the system Rprofile file is skipped
>     BDR> and hence options show.signif.stars and show.coef.Pvalues are not set.
> but other options as well..
> I think this shouldn't happen and *is* a bug.
> 
>     BDR> It looks to me as if a bit more protection is needed in print.coefmat,
>     BDR> at least.
> In extrapolation, wouldn't all R functions using non-internal *)
> options() {i.e. getOption() nowadays} need protection against these options
> being wrong or non existent ?
> I feel that this is exaggerated..

Yes, they should, and when I write them I do check for sensible values.

> *) Currently, the following options are "internal"
>    (i.e. changing them does some consistency checks in src/main/options.c):
> 
>    Option	       Requirements
>    ------	       ------------
>    width	       integer    MIN_WIDTH..MAX_WIDTH
>    digits	       integer    MIN_DIGITS..MAX_DIGITS
>    expressions	       integer    MIN_EXPRESSIONS..MAX_EXPRESSIONS
>    editor	       character  {not NA nor character(0)}
>    continue	       character  {not NA nor character(0)}
>    prompt	       character  {not NA nor character(0)}
>    contrasts	       character(2)
>    warn		       numeric(1)
>    warning.expression  expression or language
>    error	       expression or language
>    show.error.messages logical(1)
>    echo		       logical(1)
> 
> ------------
> 
> However, I wonder if we shouldn't do consistency checks on other options as
> well,  e.g. na.action seems to be more important than the show.* ones ...

We do have some consistency checks on na.action in model.frame.default.

> For the 1.0.x patches, at least, I'll move the autoload()'s to the end of
> profile/Common.R

I _think_ they should have try() around them, which is what S-PLUS 
now does with all startup code.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._