Learn R Programming

nlist (version 0.4.0)

fill_na.nlists: Fill Missing Values

Description

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

Usage

# S3 method for nlists
fill_na(x, value = 0L, ...)

Value

The modified object.

Arguments

x

An object.

value

A scalar of the value to replace values with.

...

Other arguments passed to methods.

Methods (by class)

  • fill_na(logical): Fill Missing Values for logical Objects

  • fill_na(integer): Fill Missing Values for integer Objects

  • fill_na(numeric): Fill Missing Values for numeric Objects

  • fill_na(character): Fill Missing Values for character Objects

Details

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

See Also

Other fill: fill_all()

Examples

Run this code
fill_na(nlist(x = c(2, NA), y = matrix(c(1:3, NA), nrow = 2)))

Run the code above in your browser using DataLab