Re: [Rd] quiet namespace load is noisy

2019-07-22 Thread Lionel Henry
Hello,

I think `quietly` should only silence normal masking messages
intended for users and providing information about normal
behaviour, such as masking.  This is not the case here as the
message is about overriding of S3 methods, which has global
effect and is rather problematic. It may change behaviour of
package and script code in unpredictable ways.

This is not something that the user can act upon, the developers
of the parties involved need to be contacted by users so they can
fix it (the developers of the conflicting methods might not be
aware if the generic is from a third party package, such as
base::print()). In the case of ggplot2 vs rlang, you can update
ggplot2 to the latest version to fix these messages.

> After all, other package startup messages ARE suppressed, and
> even error messages are suppressed

Note that `quietly = TRUE` does not really suppress error
messages for missing packages. The errors are converted to a
boolean return value, and thus become normal behaviour, for which
it makes sense to suppress the message. This does not imply the
S3 overriding message should be suppressed as well.

Best,
Lionel


> On 23 Jul 2019, at 06:29, Lenth, Russell V  wrote:
> 
> Dear R-devel,
> 
> Consider the following clip (in R version 3.6.0, Windows):
> 
>> requireNamespace("ggplot2", quietly = TRUE)
>Registered S3 methods overwritten by 'ggplot2':
>  method from 
>  [.quosures rlang
>  c.quosures rlang
>  print.quosures rlang
> 
> It seems to me that if one specifies 'quietly = TRUE', then messages about S3 
> method overrides should be quieted along with everything else. After all, 
> other package startup messages ARE suppressed, and even error messages are 
> suppressed:
> 
>> requireNamespace("xyz", quietly = TRUE)
>> ## (it is silent even though there is no "xyz" package)
> 
> Thanks
> 
> Russ Lenth
> U of Iowa
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] quiet namespace load is noisy

2019-07-22 Thread Lenth, Russell V
Dear R-devel,

Consider the following clip (in R version 3.6.0, Windows):

> requireNamespace("ggplot2", quietly = TRUE)
Registered S3 methods overwritten by 'ggplot2':
  method from 
  [.quosures rlang
  c.quosures rlang
  print.quosures rlang

It seems to me that if one specifies 'quietly = TRUE', then messages about S3 
method overrides should be quieted along with everything else. After all, other 
package startup messages ARE suppressed, and even error messages are suppressed:

> requireNamespace("xyz", quietly = TRUE)
> ## (it is silent even though there is no "xyz" package)

Thanks

Russ Lenth
U of Iowa

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Minor typo in R-exts

2019-07-22 Thread Josh O'Brien
Section 1.1.3 of the "R-exts" manual currently refers to "imports or
importFrom directives" where it means to say "import or importFrom
directives". Results of a diff between R-exts.texi at SVN revision
76864 and a corrected version are copied below.



*** R-exts.texi Mon Jul 22 14:41:19 2019
--- R-exts.texi.modified Mon Jul 22 14:45:32 2019
***
*** 902,904 
  @code{library(@var{pkgname})} should be listed in the @samp{Imports} field
! and not in the @samp{Depends} field.  Packages listed in @code{imports}
  or @code{importFrom} directives in the @file{NAMESPACE} file should
--- 902,904 
  @code{library(@var{pkgname})} should be listed in the @samp{Imports} field
! and not in the @samp{Depends} field.  Packages listed in @code{import}
  or @code{importFrom} directives in the @file{NAMESPACE} file should

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel