random <- function(x, na.rm=TRUE){ if(na.rm) x=x[!is.na(x)] lenx=length(x) if(lenx==0) return(NA) ifelse(lenx==1, x, sample(x, 1)) }
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.