[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Difference between NaN and NA?
From: |
Søren Hauberg |
Subject: |
Re: Difference between NaN and NA? |
Date: |
Wed, 07 Apr 2010 23:25:40 -0700 |
tor, 08 04 2010 kl. 08:13 +0200, skrev Matthias Brennwald:
> What is the difference between NaN and NA?
Well, "NaN" means "Not a Number" and should be used to represent that
something went wrong in the numerics (usually zero divided by zero).
"NA" on the other hand means "Not Available" and should be used to
indicate missing data. For example, if you have observations of the
height and weight of three people, but for what-ever reason you did not
get a weight observation from the second person you might represent that
as
height = [180, 172, 177];
weight = [90, NA, 72];
Technically, both NA is represented as a special-case of NaN, so 'isnan
(NA)' is true.
Hope that helps,
Søren
- Difference between NaN and NA?, Matthias Brennwald, 2010/04/08
- Re: Difference between NaN and NA?,
Søren Hauberg <=
- Re: Difference between NaN and NA?, Jaroslav Hajek, 2010/04/08
- Re: Difference between NaN and NA?, David Bateman, 2010/04/08
- Re: Difference between NaN and NA?, Jaroslav Hajek, 2010/04/08
- Re: Difference between NaN and NA?, John W. Eaton, 2010/04/08
- Re: Difference between NaN and NA?, Jaroslav Hajek, 2010/04/08
- Re: Difference between NaN and NA?, John W. Eaton, 2010/04/08
- Re: Difference between NaN and NA?, Jaroslav Hajek, 2010/04/08
- Re: Difference between NaN and NA?, Søren Hauberg, 2010/04/09
- Re: Difference between NaN and NA?, Jaroslav Hajek, 2010/04/09
- Re: Difference between NaN and NA?, Søren Hauberg, 2010/04/09