Re: [Rd] Error messages in replayPlot()

2017-05-15 Thread Paul Murrell
Hi The "figure margins too large" message is suppressed on replay because that replay code is also played when resizing a graphics device (so if it was printed to the console you could get millions of error messages as you resized a window) - on replay, the message is drawn on the graphics

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Hervé Pagès
On 05/15/2017 07:28 AM, peter dalgaard wrote: I think Hervé's idea was just that if switch can evaluate arguments selectively, so can stopifnot(). Yep. Thanks, H. But switch() is .Primitive, so does it from C. I think it is almost a no-brainer to implement a sequential stopifnot if

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Hervé Pagès
Hi, On 05/15/2017 10:41 AM, luke-tier...@uiowa.edu wrote: This is getting pretty convoluted. The current behavior is consistent with the description at the top of the help page -- it does not promise to stop evaluation once the first non-TRUE is found. That seems OK to me -- if you want

[R-pkg-devel] doMC dependency

2017-05-15 Thread Christopher Lalansingh
Hi everyone, I'm preparing to release a package which uses doMC for parallelization in certain functions. I've used require(doMC) to specify this for these functions, and importFrom("doMC", "registerDoMC") in my NAMESPACE. I ran all the R CMD --as-cran checks under 3.4.0 and R-devel on

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread luke-tierney
This is getting pretty convoluted. The current behavior is consistent with the description at the top of the help page -- it does not promise to stop evaluation once the first non-TRUE is found. That seems OK to me -- if you want sequencing you can use stopifnot(A) stopifnot(B) or

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Serguei Sokol
Le 15/05/2017 à 17:44, Martin Maechler a écrit : ... So this needs even more sophistication, using withCallingHandlers(.) and maybe that really get's too sophisticated and no more "readable" to 99.9% of the R users ... ? I'd say the current version is of minimal sophistication to reach both the

[Rd] [bug] droplevels() also drop object attributes (comment…)

2017-05-15 Thread Serge Bibauw
Hi, Just reporting a small bug… not really a big deal, but I don’t think that is intended: droplevels() also drops all object’s attributes. Example: > > test <- c("hello", "something", "hi") > > test <- factor(test) > > comment(test) <- "this is a test" > > attr(test, "description") <- "this

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Martin Maechler
> Serguei Sokol > on Mon, 15 May 2017 16:32:20 +0200 writes: > Le 15/05/2017 à 15:37, Martin Maechler a écrit : >>> Serguei Sokol >>> on Mon, 15 May 2017 13:14:34 +0200 writes: >> > I see in the archives that

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread peter dalgaard
However, it doesn't look much of a hassle to fuse my suggestion into the current stopifnot: Basically, just use eval(as.name(paste0("..",i))) instead of ll[[i]] and base the initial calculation of n on match.call() rather than on list(...). -pd > On 15 May 2017, at 17:04 , Martin Maechler

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Martin Maechler
> peter dalgaard > on Mon, 15 May 2017 16:28:42 +0200 writes: > I think Hervé's idea was just that if switch can evaluate arguments selectively, so can stopifnot(). But switch() is .Primitive, so does it from C. if he just meant that, then "yes, of course"

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Serguei Sokol
Le 15/05/2017 à 15:37, Martin Maechler a écrit : Serguei Sokol on Mon, 15 May 2017 13:14:34 +0200 writes: > I see in the archives that the attachment cannot pass. > So, here is the code: [... MM: I needed to reformat etc to match closely to

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread peter dalgaard
I think Hervé's idea was just that if switch can evaluate arguments selectively, so can stopifnot(). But switch() is .Primitive, so does it from C. I think it is almost a no-brainer to implement a sequential stopifnot if dropping to C code is allowed. In R it gets trickier, but how about this:

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Martin Maechler
> Serguei Sokol > on Mon, 15 May 2017 13:14:34 +0200 writes: > I see in the archives that the attachment cannot pass. > So, here is the code: [... MM: I needed to reformat etc to match closely to the current source code which is in

Re: [Bioc-devel] Build problem with malbec2

2017-05-15 Thread Janssen-10, R.R.E.
Dear Michael, Do you have any indication on when we can expect the fix? This is currently keeping Linux users from getting our latest bugfixed version. Kind regards, Roel Janssen From: Bioc-devel [bioc-devel-boun...@r-project.org] on behalf of

[Rd] Error messages in replayPlot()

2017-05-15 Thread Jeroen Ooms
I was wondering if there is something that can be done to improve error messages when replaying a recorded plot. For example a graphics device that is too small usually results in a helpful error message: png(height = 100) plot(1) # Error in plot.new() : figure margins too large dev.off()

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Serguei Sokol
I see in the archives that the attachment cannot pass. So, here is the code: 8< stopifnot_new <- function (...) { mc <- match.call() n <- length(mc)-1 if (n == 0L) return(invisible()) Dparse <- function(call, cutoff = 60L) { ch <- deparse(call, width.cutoff =

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Serguei Sokol
Hello, I am a new on this list, so I introduce myself very briefly: my background is applied mathematics, more precisely scientific calculus applied for modeling metabolic systems, I am author/maintainer of few packages (Deriv, rmumps, arrApply). Now, on the subject of this discussion, I must

Re: [Rd] stopifnot() does not stop at first non-TRUE argument

2017-05-15 Thread Martin Maechler
> Hervé Pagès > on Wed, 3 May 2017 12:08:26 -0700 writes: > On 05/03/2017 12:04 PM, Hervé Pagès wrote: >> Not sure why the performance penalty of nonstandard evaluation would >> be more of a concern here than for something like switch(). > which