#' @export
fillWithPrevious <- function(x, reverse = F){
if(length(x)==1) return(x)
if(reverse) x <- rev(x)
for(i in 2:length(x))
if(is.na(x[i]))
x[i] <- x[i-1]
if(reverse) x <- rev(x)
x
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.