fill_all.nlist {nlist} | R Documentation |
Fill All Values
Description
Fills all of an object's (missing and non-missing) values while preserving the object's dimensionality and class.
Usage
## 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)
-
logical
: Fill All for logical Objects -
integer
: Fill All for integer Objects -
numeric
: Fill All for numeric Objects -
character
: Fill All for character Objects
See Also
Other fill:
fill_na()
Examples
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)
[Package nlist version 0.3.3 Index]