miss_locf | R Documentation |
Last observation carried forward
miss_locf(x, reverse = F)
x |
A vector |
reverse |
Whether to do it in reverse |
A vector
c(NA, 1, NA, 2, NA) %>% miss_locf()
c(NA, 1, NA, 2, NA) %>% miss_locf(reverse = T)
c(NA, 1, NA, 2, NA, NA, NA) %>% miss_locf()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.