From dongcan.jiang at gmail.com  Sun May 17 13:13:51 2015
From: dongcan.jiang at gmail.com (Dongcan Jiang)
Date: Sun, 17 May 2015 19:13:51 +0800
Subject: [Rd] The function cummax() seems to have a bug.
Message-ID: <CABwkPcou67H_t_zuncSNbnsyYVstcTT87FAtw9gqRPi7Z00FFQ@mail.gmail.com>

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

-- 
Dongcan Jiang
Team of Search Engine & Web Mining
School of Electronic Engineering & Computer Science
Peking University, Beijing, 100871, P.R.China

	[[alternative HTML version deleted]]



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