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
downside is that attributes tend to disappear with
subsetting.

* If you only have two types, you might be able to
get away with using NaN as the second type of NA.

On 14/02/2010 14:33, 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.

Thanks

John MAcInnes





______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

--
Patrick Burns
pbu...@pburns.seanet.com
http://www.burns-stat.com
(home of 'The R Inferno' and 'A Guide for the Unwilling S User')

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to