Returns a list of lists with each sub-list being a row of the data frame.
df_rows_to_list(x, named = TRUE)
x | [ |
---|---|
named | [ |
List of (named) lists.
Other data frame helpers:
df_add_category()
,
df_add_constant_columns()
,
df_explode()
,
df_split_col()
#> [[1]] #> [[1]]$x #> [1] 1 #> #> [[1]]$y #> [1] "c" #> #> #> [[2]] #> [[2]]$x #> [1] 2 #> #> [[2]]$y #> [1] "d" #> #> #> [[3]] #> [[3]]$x #> [1] 3 #> #> [[3]]$y #> [1] "e" #> #>df_rows_to_list(x, named = FALSE)#> [[1]] #> [[1]][[1]] #> [1] 1 #> #> [[1]][[2]] #> [1] "c" #> #> #> [[2]] #> [[2]][[1]] #> [1] 2 #> #> [[2]][[2]] #> [1] "d" #> #> #> [[3]] #> [[3]][[1]] #> [1] 3 #> #> [[3]][[2]] #> [1] "e" #> #>#> [[1]] #> [[1]][[1]] #> [1] 1 #> #> [[1]][[2]] #> [1] "c" #> #> #> [[2]] #> [[2]][[1]] #> [1] 2 #> #> [[2]][[2]] #> [1] "d" #> #> #> [[3]] #> [[3]][[1]] #> [1] 3 #> #> [[3]][[2]] #> [1] "e" #> #>