knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(utilitaiR)
compte_NA <- function(df) { tmp <- is.na(df) nb1 <- sum(tmp) nb2 <- apply(tmp, 2, sum) return(list(nb1, nb2)) }
toto <- data.frame(var1 = 1:4, var2 = c("a", "b", NA, "d"), var3 = c(NA, NA, TRUE, FALSE)) compte_NA(toto)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.