[R] Missing values
Stephen Liu
satimis at yahoo.com
Tue Aug 17 15:25:29 CEST 2010
----- Original Message ----
From: Michael Bedward <michael.bedward at gmail.com>
To: Stephen Liu <satimis at yahoo.com>
Cc: r-help at r-project.org
Sent: Tue, August 17, 2010 3:57:05 PM
Subject: Re: [R] Missing values
>NA is a value that you can use for "missing" or inapplicable. It is
>also the value returned by R functions to indicate missing (e.g. if
>you use the match function to search a vector for a particular value,
>but the value isn't present, match will return NA).
H Michael,
I understand above explanation.
I don't understand follow;
The function is.na(x) gives a logical vector of the same size as x with value
TRUE if and only if the corresponding element in x is NA.
> z <- c(1:3,NA); ind <- is.na(z)
>?is.na
....
Usage:
NA
is.na(x)
## S3 method for class 'data.frame':
is.na(x)
is.na(x) <- value
....
>NaN means that the value wasn't missing but can't be expressed as a
>number. 0/0 is NaN because the result is mathematically undefined
>(sometimes called 'indeterminate').
What is following expression;
> Inf - Inf
?
TIA
B.R.
Stephen L
More information about the R-help
mailing list