Learn R Programming

lava (version 1.8.0)

NA2x: Convert to/from NA

Description

Convert vector to/from NA

Usage

NA2x(s, x = 0)

Value

A vector with same dimension and class as s.

Arguments

s

The input vector (of arbitrary class)

x

The elements to transform into NA resp. what to transform NA into.

Author

Klaus K. Holst

Examples

Run this code
##' 
x2NA(1:10, 1:5)
NA2x(x2NA(c(1:10),5),5)##'

Run the code above in your browser using DataLab