Re: [R-pkg-devel] Warning that are Unintentionally OS-Specific (Maybe Bug in warning?)

2016-07-20 Thread Bill Denney
Max and Ben got the right answer. It is a bug with mclapply dropping warnings. I confirmed by a quick change to the code to just use lapply, and the warnings appeared as expected. I've submitted the bug at https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17122 Thanks for the help!

Re: [R-pkg-devel] Warning that are Unintentionally OS-Specific (Maybe Bug in warning?)

2016-07-20 Thread Ben Bolker
Digging into the code (specifically by setting options(warn=2,error=recover), I see that the warning is happening during this call: tmp.results <- parallel::mclapply(X = conc.dose, FUN = pk.nca.intervals, intervals = data$intervals, options = data$options) Since mclapply "relies on

Re: [R-pkg-devel] Warning that are Unintentionally OS-Specific (Maybe Bug in warning?)

2016-07-20 Thread MTurgeon
Hi Bill, This is just a hypothesis, but it could have something to do with the fact that you're using parallel::mclapply inside your function pk.nca? This would certainly explain why you have different behaviours on Windows and Unix systems. It would also explain why you get a different

Re: [R-pkg-devel] Warning that are Unintentionally OS-Specific (Maybe Bug in warning?)

2016-07-20 Thread Bill Denney
Hi François, I thought that was the issue, too, but I confirmed it wasn't that by adding a print statement right above the warning in my code. The print statement displays the message even when the warning (one line below with no conditionals between) doesn't show anything. Also, why would

Re: [R-pkg-devel] Warning that are Unintentionally OS-Specific (Maybe Bug in warning?)

2016-07-20 Thread François Michonneau
Hi Bill, The problem is not with the warning() function but with your if() test that triggers the warning. It probably has something to do with slight differences in rounding. I suggest you use debug() or browser() on each platform to see why your condition is TRUE or FALSE. Cheers, --

[R-pkg-devel] Warning that are Unintentionally OS-Specific (Maybe Bug in warning?)

2016-07-20 Thread Bill Denney
Hi, I'm developing the PKNCA package, and I've got an odd difference between warning behavior on different operating systems that I can't figure out. When I run the following code on Windows 10 (with R 3.3.0), I get the following warning: library(PKNCA)