Learn R Programming

clinpubr (version 1.1.1)

fill_with_last: Fill NA values with the last valid value

Description

Fill NA values with the last valid value. Can be used to fill excel combined cells.

Usage

fill_with_last(x)

Value

A vector.

Arguments

x

A vector.

Examples

Run this code
fill_with_last(c(1, 2, NA, 4, NA, 6))

Run the code above in your browser using DataLab