| na2miss | R Documentation | 
Converts missing values (NAs) to or from a user specified value.
From smwrBase package.
na2miss(x, to = -99999)
miss2na(x, from = -99999)
x | 
 a vector. Missing values (  | 
to | 
 the replacement value for   | 
from | 
 the target value to match and replace with   | 
An object like x with each target value replaced by the
specified value.
The function na2miss converts missing values (NA) to the
value to and is useful to prepare a vector for export and subsequent
use by software external to R that does not handle NAs.
 The function
miss2na converts the value from to NA and can be used to
recode data imported from external software that uses a special value to
indicate missing values.
## Construct simple substitutions
na2miss(c(1, 2, 3, NA, 5, 6))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.