remove_list_cols <- function(df) {
require(tidyverse)
cols_to_remove <- tibble()
for (i in 1:ncol(df)) {
test <- df %>%
select(i)
test_vals <- test %>%
pull()
if (is.list(test_vals) == TRUE) {
cols_to_remove <- bind_cols(test,cols_to_remove)
}
}
cols_to_remove <- names(cols_to_remove)
cols_to_keep <- names(df)[!names(df) %in% cols_to_remove]
df <- df %>%
select(cols_to_keep)
return(df)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.