#' remove_na_cols
#'
#' Remove all columns with nothing but NA values
#' @param df A data frame
#' @export
remove_na_cols <- function(df) {
require(data.table)
df <- as.data.table(df)
df <- df[,which(unlist(lapply(df, function(x)!all(is.na(x))))),with=F]
df <- as_tibble(df)
return(df)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.