Learn R Programming

guess (version 0.1)

nona: No NAs

Description

Converts NAs to 0s

Usage

nona(vec = NULL)

Arguments

vec
Required. Character or Numeric vector.

Value

Character vector.

Examples

Run this code
x <- c(NA, 1, 0); nona(x)
x <- c(NA, "dk", 0); nona(x)

Run the code above in your browser using DataLab