View source: R/carry_over_values.R
carry_over_values | R Documentation |
This function takes a value, and then replaces empty elements (NA or zero-length character values) with the last non-empty preceding element it encountered.
carry_over_values(x, noId = "no_id")
x |
The vector |
noId |
The value to add for the first empty elements |
The vector with the carries over elements
rock::carry_over_values(
c(
NA, NA, 3, NA, NA, 7, NA, NA
)
);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.