na2zero: Set na to 0

View source: R/utils.R

na2zeroR Documentation

Set na to 0

Description

Set na to 0

Usage

na2zero(x)

Arguments

x

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

Value

matrix, where na values are set to 0

Examples

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

na2zero(x)

laurenhsu1/corral documentation built on Feb. 19, 2023, 10:37 p.m.