Learn R Programming

muStat (version 1.7.0)

NAtoZer: Dealing With Missing Values

Description

Any missing values in input data will be converted to 0.

Usage

NAtoZer(x)

Arguments

x
data object

Value

Returns the input data object x with all missing values replaced by 0.

Examples

Run this code
NAtoZer(c(2, 4, NA, 5))
# [1] 2 4 0 5

Run the code above in your browser using DataLab