max(nan,3) returns 3

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

max(nan,3) returns 3

Paul Kienzle-2
Here's a result we may or may not want to change:

  octave> min(nan,3)
  ans = 3
  octave> min(nan,3)
  ans = 3

R gets it right:

  > pmax(3,NaN)
  [1] NA

The current behaviour is compatible with matlab, IDL and python numarray.

- Paul

Reply | Threaded
Open this post in threaded view
|

max(nan,3) returns 3

John W. Eaton-6
On 28-Jun-2005, Paul Kienzle wrote:

| Here's a result we may or may not want to change:
|
|   octave> min(nan,3)
|   ans = 3
|   octave> min(nan,3)
|   ans = 3
|
| R gets it right:
|
|   > pmax(3,NaN)
|   [1] NA
|
| The current behaviour is compatible with matlab, IDL and python numarray.

I think we should probably keep the compatible behavior.

jwe