fillIn <- function(x) { for(j in 1:ncol(x)) { nas <- is.na(x[,j]) x[nas,j] <- mean(x[!nas,j]) } x }
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.