fill_na.nlist {nlist}R Documentation

Fill Missing Values

Description

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

Usage

## S3 method for class 'nlist'
fill_na(x, value = 0L, ...)

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

fill_na(nlist(x = c(2, NA), y = matrix(c(1:3, NA), nrow = 2)))
fill_na(nlists(nlist(x = c(2, NA)), nlist(x = c(NA_real_, NA))))

[Package nlist version 0.3.3 Index]