fill_run | R Documentation |
Fill NA
with last non-NA element.
fill_run(x, run_for_first = FALSE, only_within = FALSE)
x |
( |
run_for_first |
If first elements are filled with |
only_within |
|
vector - x
containing all x
elements with NA
replaced with previous non-NA element.
fill_run(c(NA, NA, 1:10, NA, NA), run_for_first = TRUE)
fill_run(c(NA, NA, 1:10, NA, NA), run_for_first = TRUE)
fill_run(c(NA, NA, 1:10, NA, NA), run_for_first = FALSE)
fill_run(c(NA, NA, 1, 2, NA, NA, 2, 2, NA, NA, 1, NA, NA), run_for_first = TRUE, only_within = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.