fill_na: Fill NA with the last no-NA value

Description Usage Arguments Value Examples

Description

See more: tidyselect::vars_select().

Usage

1

Arguments

data

a data.frame or a vector

...

col names character vector or just bare name.

Value

data.frame or a vector

Examples

1
2
3
4
5
6
7
8
x <- c(1, NA, NA, 2, 3)
y <- c(NA, NA, 1, NA, 3)
xy <- data.frame(x,y)
fill_na(x)
fill_na(y)
fill_na(xy, x, y)
fill_na(xy, c("x","y"))
fill_na(xy, starts_with("x"))

BruceZhaoR/mypkg documentation built on May 14, 2019, 6:04 a.m.