0

I have a dataframe where one of the columns has a tibble inside it as a value. It looks like this click here to see it

I tried to eexport this dataframe to csv file but then the tibbles can't be read on excel, then I tried to to export to xlsx file but I get the error : Error in if (is.na(value)) { : the condition has length > 1

My second problem is, I want to convert the tibbles to actual line and columns, so for each tibble, the first 4 columns would be repeated as much as needed for the column that contains the tibble to be replaced by the columns of the tibble but I don't know how to do that ! maybe using mutate?

Akram H
  • 33
  • 4
  • Perhaps you can use `unnest_wider` or `unnest` i.e. `library(tidyr);library(dplyr);df1 %>% unnest(outcomes)` – akrun Jun 15 '22 at 15:15

1 Answers1

0

One way to do this would be with tidyr::unnest():

df %>%
  unnest(outcomes)
JudgedGem
  • 121
  • 4