[Rd] The function cummax() seems to have a bug.

2015-05-17 Thread Dongcan Jiang
Hi, The function cummax() seems to have a bug. > x <- c(NA, 0) > storage.mode(x) <- "integer" > cummax(x) [1] NA 0 The correct result of this case should be NA NA. The mistake in [ https://github.com/wch/r-source/blob/trunk/src/main/cum.c#L130-L136] may be the reason. Best Regards, Dongcan --

Re: [Rd] That 'make check-all' problem with the survival package

2015-05-17 Thread Hin-Tak Leung
-- On Sat, May 16, 2015 2:33 PM BST Marc Schwartz wrote: > >> On May 16, 2015, at 6:11 AM, Hin-Tak Leung >> wrote: >> >> >> >> -- >> On Sat, May 16, 2015 8:04 AM BST Uwe Ligges wrote: >> >> Not sure why this goes to R-devel. You just co

[Rd] install.packages() / update.packages() sometimes outputs to stdout and sometimes to stderr [and menu() & readline()]

2015-05-17 Thread Henrik Bengtsson
I've noticed that install.packages() [https://svn.r-project.org/R/trunk/src/library/utils/R/packages.R] and update.packages() [https://svn.r-project.org/R/trunk/src/library/utils/R/packages2.R] sometimes output to stdout and sometimes to stderr. It looks like stderr is used (e.g. via cat()) when t

Re: [Rd] The function cummax() seems to have a bug.

2015-05-17 Thread Henrik Bengtsson
Below is some further troubleshooting on this: >From code inspection this bug happens for only: * for integer values * when the first element is NA_integer_ and the second is not. Examples: # Numeric/doubles works as expected > cummax(c(NA_real_, 0, 1, 2, 3)) [1] NA NA NA NA NA # It does not