Hi my question is inspired by this topic:
but I want to use different dataset/list:
library(repurrrsive) data(sw_films) max_len <- max(lengths(sw_films)) df <- purrr::map_df(sw_films, ~ c(., rep('', max_len - length(.)))) df %>% flextable::flextable() %>% flextable::autofit()
but executing that line of code:
df <- purrr::map_df(sw_films, ~ c(., rep('', max_len - length(.))))
I got an error:
Error in `dplyr::bind_rows()`: ! Argument 7 must have names. Run `rlang::last_error()` to see where the error occurred.
First of all how to check here where is an argument 7 ?
Second, how to rectify this error ?
Error persists even if I have tried to assign names:
sw_films <- setNames(sw_films, paste0("Element_", 1:7))
Thank you for your help.