Re: [R] max and pmax of NA and NaN

2018-01-20 Thread peter dalgaard
> On 20 Jan 2018, at 07:53 , Suharto Anggono Suharto Anggono via R-help > wrote: > > Extremes.Rd, that documents 'max' and 'pmax', has this in "Details" section, > in the paragraph before the last. > By definition the min/max of a numeric vector containing an NaN is NaN, > except that the

Re: [R] max and pmax of NA and NaN

2018-01-19 Thread Suharto Anggono Suharto Anggono via R-help
Extremes.Rd, that documents 'max' and 'pmax', has this in "Details" section, in the paragraph before the last. By definition the min/max of a numeric vector containing an NaN is NaN, except that the min/max of any vector containing an NA is NA even if it also contains an NaN. --

Re: [R] max and pmax of NA and NaN

2018-01-15 Thread Martin Maechler
> Michal Burda > on Mon, 15 Jan 2018 12:04:13 +0100 writes: > Dear R users, is the following OK? >> max(NA, NaN) > [1] NA >> max(NaN, NA) > [1] NA >> pmax(NaN, NA) > [1] NA >> pmax(NA, NaN) > [1] NaN > ...or is it a bug? > Documentation

[R] max and pmax of NA and NaN

2018-01-15 Thread Michal Burda
Dear R users, is the following OK? > max(NA, NaN) [1] NA > max(NaN, NA) [1] NA > pmax(NaN, NA) [1] NA > pmax(NA, NaN) [1] NaN ...or is it a bug? Documentation says that NA has a higher priority over NaN. Best regards, Michal Burda [[alternative HTML version deleted]] ___