[Rd] require(..., quietly=TRUE) does not suppress warning

2016-12-08 Thread Dan Tenenbaum
Hi, The `quietly` argument of `require` is documented as follows: quietly: a logical. If ‘TRUE’, no message confirming package attaching is printed, and most often, no errors/warnings are printed if package attaching fails. However: > require(foo, quietly=TRUE) Warning mes

[Rd] wish list: generalized apply

2016-12-08 Thread John P. Nolan
Dear All, I regularly want to "apply" some function to an array in a way that the arguments to the user function depend on the index on which the apply is working. A simple example is: A <- array( runif(160), dim=c(5,4,8) ) x <- matrix( runif(32), nrow=4, ncol=8 ) b <- runif(8) f1 <- function

Re: [Rd] require(..., quietly=TRUE) does not suppress warning

2016-12-08 Thread John P. Nolan
Well, it says "most often" no errors/warnings are given, so it is not contradicting the docs! It looks like the person/team that coded require( ) decided you should get an error when the package doesn't exist. If you want a silent loading, consider aaa <- try( library(foo,verbose=FALSE,q

Re: [Rd] require(..., quietly=TRUE) does not suppress warning

2016-12-08 Thread Dan Tenenbaum
Well, I'm getting a warning (not an error) when the package doesn't exist. I interpreted "most often" to mean that suppressing warnings/errors is why you'd most often use this argument, as most packages don't emit startup messages. And technically there isn't a problem with attaching the packag

Re: [Rd] require(..., quietly=TRUE) does not suppress warning

2016-12-08 Thread Kevin Ushey
IMHO the strongest argument for suppressing the warning message here is the fact that requireNamespace("foo", quietly = TRUE) does not emit any warning message when the package 'foo' does not exist. On Thu, Dec 8, 2016 at 12:51 PM, Dan Tenenbaum wrote: > Well, I'm getting a warning (not an

Re: [Rd] wish list: generalized apply

2016-12-08 Thread David Winsemius
> On Dec 8, 2016, at 12:09 PM, John P. Nolan wrote: > > Dear All, > > I regularly want to "apply" some function to an array in a way that the > arguments to the user function depend on the index on which the apply is > working. A simple example is: > > A <- array( runif(160), dim=c(5,4,8) )

[Rd] methods(`|`) lists all functions?

2016-12-08 Thread frederik
Dear R-Devel, I was attempting an exercise in Hadley Wickam's book "Advanced R". The exercise is to find the generic with the greatest number of methods. I found that 'methods(`|`)' produces a list of length 2506, in R 3.3.1. Similar behavior is found in 3.4.0. It seems to include all functions a

Re: [Rd] getGraphicsEvent() alternative for cairo graphics device?

2016-12-08 Thread frederik
Hi Paul, Thanks for your efforts. Do you have an idea when my patch(es) might be committed? Is there anything I can do to help move this along? Thanks, Frederick On Mon, Nov 14, 2016 at 08:55:20AM +1300, Paul Murrell wrote: > Hi > > The current status is that I am keen for people to contribute

Re: [Rd] getGraphicsEvent() alternative for cairo graphics device?

2016-12-08 Thread Paul Murrell
Hi Just taking a bit more of a look at this today (currently fixated on making sure I can build some good regression tests). The best thing you can do is to keep reminding me like this :) Paul On 09/12/16 11:19, frede...@ofb.net wrote: Hi Paul, Thanks for your efforts. Do you have an idea

Re: [Rd] getGraphicsEvent() alternative for cairo graphics device?

2016-12-08 Thread frederik
Hi Paul, Thanks for keeping me posted and letting me know what I should do. Are there regression tests for other graphics functions in R? To me that sounds a bit unnecessary. I think you get more testing from people who use R; and having a good turnaround for applying patches (some have been wait

Re: [Rd] getGraphicsEvent() alternative for cairo graphics device?

2016-12-08 Thread Paul Murrell
Hi Yes, we have regression tests for graphics. In general, but especially for core R code, I would rather have confidence that a fix has not broken existing behaviour before I commit it. I cannot argue with the point that we could respond to some bug reports faster. Paul On 09/12/16 12:58

Re: [Rd] wish list: generalized apply

2016-12-08 Thread John P. Nolan
-Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Thursday, December 8, 2016 4:59 PM To: John P. Nolan Cc: Charles C. Berry Subject: Re: [Rd] wish list: generalized apply > On Dec 8, 2016, at 12:09 PM, John P. Nolan wrote: > > Dear All, > > I regularly

Re: [Rd] methods(`|`) lists all functions?

2016-12-08 Thread Martin Morgan
On 12/08/2016 05:16 PM, frede...@ofb.net wrote: Dear R-Devel, I was attempting an exercise in Hadley Wickam's book "Advanced R". The exercise is to find the generic with the greatest number of methods. I found that 'methods(`|`)' produces a list of length 2506, in R 3.3.1. Similar behavior is f

Re: [Rd] methods(`|`) lists all functions?

2016-12-08 Thread frederik
On Thu, Dec 08, 2016 at 09:37:59PM -0500, Martin Morgan wrote: > On 12/08/2016 05:16 PM, frede...@ofb.net wrote: > > Dear R-Devel, > > > > I was attempting an exercise in Hadley Wickam's book "Advanced R". The > > exercise is to find the generic with the greatest number of methods. > > > > I foun