From ripley@stats.ox.ac.uk  Wed Jan  8 16:49:28 2003
From: ripley@stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Wed Jan  8 16:49:28 2003
Subject: [Rd] trySilent (was try.Silent)
In-Reply-To: <Pine.LNX.4.44.0301081253140.11942-100000@gauss.est.ufpr.br>
Message-ID: <Pine.LNX.4.31.0301081529370.16172-100000@gannet.stats>

We could, and it had crossed my mind.  Thanky ou for raising it.
However, we could not do that before 1.7.0 (new feature, and
anyway 1.6.2 is in final testing for release in a couple of days).

We have been considering having package methods in the default package
list for 1.7.0, which would provide this.  However, my preference would be
to have this as an argument to try, as in try(..., silent=TRUE)
Note that trySilent actually does two things:

i) it sets options(show.error.messages = FALSE)
ii) it sets options(error = empty.dump) (or equivalently) to suppress
any error handler

and one might just want just one of those two.  Do perhaps

try(..., silent = FALSE, nodump= TRUE)

(or defaulting nodump to silent) might be a comprehensive interface.

Any preferences?


On Wed, 8 Jan 2003, Paulo Justiniano Ribeiro Jr wrote:

> In an email to the help list John Chambers
> wrote about the function helpSilent which is in the methods package,
> pointing out that there is no restrictive reason to be in this package.
>
> I did not know about this function and just incorporate it in several
> functions of the geoR package where a much less elegant solution was
> being used.
>
> I guess other packages could use it as well.
> Therefore, would be an idea to move trySilent() to `base' ?
>
> Cheers
> P.J.
>
> --
> Paulo Justiniano Ribeiro Jr
> Departamento de Estatstica
> Universidade Federal do Paran
> Caixa Postal 19.081
> CEP 81.531-990
> Curitiba, PR  -  Brasil
>
> Tel: (+55) 41 361 3471
> Fax: (+55) 41 361 3141
>
> e-mail: Paulo.Ribeiro@est.ufpr.br
> http://www.est.ufpr.br/~paulojus (portugues)
> http://www.maths.lancs.ac.uk/~ribeiro (english)
>
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-devel
>

-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] trySilent (was try.Silent)
ripley@stats.ox.ac.uk