nullifyNA: Convert all NAs in dataset to 0

Description Usage Arguments Value Note Examples

Description

Converts any NA in a given dataset to 0, assuming substitution is meaningful. The input data must either be a data.frame with numeric data or a numeric vector.

Usage

1

Arguments

data

The data in which the substitution should be done.

Value

An object identical to the input object with NA -> 0 substitution

Note

This is only a convenience function for a common task.

Examples

1
2
3
4
5
6
7
## Not run: 
  # This works as intended
  nullifyNA(data = c(0, 3, NA, 1, 4))
  # This refuses to do anything
  nullifyNA(data = c("f", "l", "5", NA))

## End(Not run)

jemus42/wurstmineR documentation built on May 19, 2019, 4:03 a.m.