John wrote:
...
Does anyone know, or know documentation that describes, how to declare
multiple values in R as missing that does not involve coding them as NA? I
wish to be able to treate values as missing, while still retaining codes
that describe the reason for the value being missing.
I woul
om: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Frank E Harrell Jr
Sent: Sunday, February 14, 2010 9:39 AM
To: Patrick Burns
Cc: r-help@r-project.org; john.macin...@ed.ac.uk
Subject: Re: [R] Multiple missing values
Patrick Burns wrote:
> I can think of a f
Patrick Burns wrote:
I can think of a few solutions, none perfect.
* You could have a master dataset that has the
missing value codes you want, and a dataset that
you use which is a copy of it with real NA's in it.
* You could add an attribute that gives the types
of missing values in the vario
I can think of a few solutions, none perfect.
* You could have a master dataset that has the
missing value codes you want, and a dataset that
you use which is a copy of it with real NA's in it.
* You could add an attribute that gives the types
of missing values in the various positions. The
dow
NA, Inf, -Inf, NaN would give you 4 possibilities and is.finite would
check if its any of them:
> x <- c(1, NA, 2, Inf, 3, -Inf, 4, NaN, 5)
> is.finite(x)
[1] TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE
You might need to map them all to NA before using it with various
functions dependin
Does anyone know, or know documentation that describes, how to declare
multiple values in R as missing that does not involve coding them as NA? I
wish to be able to treate values as missing, while still retaining codes
that describe the reason for the value being missing.
Thanks
John MAcInnes
-
6 matches
Mail list logo