fill_na: Fills in (replaces) NAs with non-NA values

Description Usage Arguments Value

View source: R/fill_na.R

Description

Fills in (replaces) NAs with non-NA values

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
fill_na(.data, .fill, ..., .args = NULL, .warning = TRUE,
  .inplace = FALSE)

fill_na_mean(.data, ..., .args = NULL, .warning = TRUE, .inplace = FALSE)

fill_na_mean_(.data, ..., .dots, .args = NULL, .warning = TRUE,
  .inplace = FALSE)

fill_na_median(.data, ..., .args = NULL, .warning = TRUE,
  .inplace = FALSE)

fill_na_mode(.data, ..., .dots, .args = NULL, .warning = TRUE,
  .inplace = FALSE)

Arguments

.data

a data.frame, data.table, matrix, list, or vector

.fill

x

...

a selection of columns to fill when .data is a data.frame, data.table, matrix, or list, or arguments to .fill when .data is a vector.

If .data is a data.frame, data.table, matrix, or list, a specification of columns to fill, leaving blank will select all columns. Use bare variable names. Select all variables between x and z with x:z, exclude y with -y. For more options, see the dplyr::select documentation. For lists, elements are treated as columns.

If .data is a vector, ... are arguments to pass to .fill. You can still use .args to supply arguments to .fill, but you cannot use both ... and .args at the same time.

.args

for non-vector inputs, a list of arguments to .fill if .fill is a function (note that the first argument to .fill is .data)

.warning

TRUE by default, display a warning when the type of .fill is different from the type of .data

.inplace

FALSE by default, if .data is a data.table, fill in the NAs in place (modify .data by reference) if this argument is TRUE

.dots

Use fill_na_() to do standard evaluation. See dplyr's NSE vignette for more information with vignette("nse", "dplyr").

Value

an object of the same class as .data with the NAs filled in


jakesherman/missr documentation built on May 18, 2019, 9:08 a.m.