Learn R Programming

nlist (version 0.1.1)

fill_na: Fill Missing Values

Description

Fills missing values.

Usage

fill_na(x, ...)

# S3 method for logical fill_na(x, value = FALSE, ...)

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

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

# S3 method for character fill_na(x, value = "0", ...)

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

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

Arguments

x

The object.

...

Unused.

value

A scalar of the value to replace missing values with.

Value

The object with missing values filled.

Methods (by class)

  • logical: Fill missing values of logical object

  • integer: Fill missing values of integer object

  • numeric: Fill missing values of numeric object

  • character: Fill missing values of character object

  • nlist: Fill missing values of nlist object

  • nlists: Fill missing values of nlist object

Examples

Run this code
# NOT RUN {
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))))
# }

Run the code above in your browser using DataLab