fill_all.nlist: Fill All Values

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

View source: R/fill-all.R

Description

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

Usage

1
2
## S3 method for class 'nlist'
fill_all(x, value = 0L, nas = TRUE, ...)

Arguments

x

An object.

value

A scalar of the value to replace values with.

nas

A flag specifying whether to also fill missing values.

...

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_na()

Examples

1
2
fill_all(nlist(x = c(2, NA), y = matrix(c(1:3, NA), nrow = 2)))
fill_all(nlist(x = c(2, NA), y = matrix(c(1:3, NA), nrow = 2)), nas = FALSE)

nlist documentation built on Sept. 5, 2021, 6:05 p.m.