na2zero: Set na to 0

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Set na to 0

Usage

1

Arguments

x

matrix of values for which na values should be changed to 0

Value

matrix, where na values are set to 0

Examples

1
2
3
4
x <- matrix(sample(0:10, 5000, replace = TRUE), ncol = 25)
x[sample(1:5000, 10)] <- NA

na2zero(x)

corral documentation built on Nov. 8, 2020, 8:25 p.m.