| fillDown | R Documentation | 
Takes a vector of values and fills any empty strings or NAs with the last non-empty value.
fillDown(x, emptyStrings = c(NA, ""), errorIfFirstEmpty = TRUE)
| x | a vector to be filled | 
| emptyStrings | a vector of strings to be considered empty. Defaults to empty string and NA. | 
| errorIfFirstEmpty | if TRUE then throw an error if the first entry is empty | 
a vector of the same length as x with empty entries filled
fillDown(c(1:5,NA,NA,6,NA,7))
fillDown(c('a','c','d','Z',NA),'Z')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.