| lastNotNa | R Documentation | 
A convenience function to return the last value which is not NA in a vector
lastNotNa(x, default = "Unknown")
| x | a vector to look for the last value in | 
| default | a default value to use when all values are NA in a vector | 
a single element from the last non NA value in x (or the default)
lastNotNa(c(1:4,NA,NA))
lastNotNa(c(letters[1:4],NA,'z',NA))
lastNotNa(c(NA,NA))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.