'How to make a tibble or dataframe out of a list of lists in r with tydiverse and spark
I have this structure
List of 120
$ :List of 4
..$ name : chr "Id"
..$ type : chr "string"
..$ nullable: logi TRUE
..$ metadata: Named list()
and I basically want to create a table with two columns, $name and %type, with the corresponding value from each list element in the list. So a 120x2 table.
So far I tried with
flatten %>% as.data.frame() but does not provide the right output
flatten %>% enframe %>% pivot_wider() but dont know how to assign the values to columns
Is there really not a way to do it strightforward or do i need to use map(),lapply() and such functions for this to work in spark?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
