I have the following data frame that looks like this (3 columns as list).
A tibble: 14 x 4
clinic_name drop_
Here's another option that may be a little simpler.
Depending on the data, comma separated values could get complicated, so I'm using a bar |
for separating values in list columns:
library(tidyverse)
starwars %>%
rowwise() %>%
mutate_if(is.list, ~paste(unlist(.), collapse = '|')) %>%
write.csv('df_starwars.csv', row.names = FALSE)
starwars
is one of the dplyr
sample dataframes.