I have a tibble structure result of the following script, using the purrr package:
data %>% group_by(REGIAO , V1023) %>% nest() %>% mutate( teste = map(data, ff))
Where ff is a particular function that I have created to apply to each group REGIAO and V1023. The result is basically like this
# A tibble: 18 x 3
REGIAO V1023 teste
<chr> <int> <list>
1 Norte 1 <data.frame [3 x 6]>
2 Norte 4 <data.frame [3 x 6]>
3 Norte 2 <data.frame [3 x 6]>
4 Nordeste 4 <data.frame [3 x 6]>
5 Nordeste 1 <data.frame [3 x 6]>
6 Nordeste 2 <data.frame [3 x 6]>
7 Nordeste 3 <data.frame [3 x 6]>
8 Sudeste 4 <data.frame [3 x 6]>
9 Sudeste 1 <data.frame [3 x 6]>
10 Sudeste 2 <data.frame [3 x 6]>
11 Sudeste 3 <data.frame [3 x 6]>
12 Sul 2 <data.frame [3 x 6]>
13 Sul 4 <data.frame [3 x 6]>
14 Sul 1 <data.frame [3 x 6]>
15 Centro-Oeste 4 <data.frame [3 x 6]>
16 Centro-Oeste 1 <data.frame [3 x 6]>
17 Centro-Oeste 2 <data.frame [3 x 6]>
18 Centro-Oeste 3 <data.frame [3 x 6]>
The "test column" is made up of dataframes that have the same variables both in their rows and in their columns. That is, it has the same dimensions, as we can see above. I want to turn this into a dataframe. That is, I want to stack each dataframe of the test variable, but without losing its REGIO and neither the V1023 variable. Any solution?