NAer: Replace Missing Values (NA)

Description Usage Arguments Value Examples

View source: R/NAer.R

Description

Replace missing values (NA) in a vector or dataframe.

Usage

1
NAer(x, replace = 0)

Arguments

x

A vector or dataframe with missing values (NA).

replace

The value to replace missing values (NA) with.

Value

Returns a vector or dataframe with missing values replaced.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
set.seed(10)              
(x <- sample(c(rep(NA, 4), 1:10), 20, rep=T))
NAer(x)

set.seed(10)
(y <- data.frame(matrix(x, 5, 4))                           )
NAer(y)
NAer(y, "MISSING")  

## End(Not run)

trinker/qdap documentation built on Sept. 30, 2020, 6:28 p.m.