fill_na.mcmcr: Fill Missing Values

Description Usage Arguments Details Value Methods (by class) See Also Examples

View source: R/fill_na.R

Description

Fills all of an object's missing values while preserving the object's dimensionality and class.

Usage

1
2
## S3 method for class 'mcmcr'
fill_na(x, value = 0, ...)

Arguments

x

An object.

value

A scalar of the value to replace values with.

...

Other arguments passed to methods.

Details

It should only be defined for objects with values of consistent class ie not standard data.frames.

Value

The modified object.

Methods (by class)

See Also

Other fill: fill_all()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# logical
fill_na(c(TRUE, NA))

# integer
fill_na(c(1L, NA), 0)

# numeric
fill_na(c(1, NA), Inf)

# character
fill_na(c("text", NA))
fill_na(matrix(c("text", NA)), value = Inf)

mcmcr documentation built on Sept. 7, 2021, 1:07 a.m.