powered by
Internal function to flatten a nested list
flatten_list( lis, levels = 1:100, level = 1, key_parent = "", lis_flat = list() )
a nested list
an integer vector indicating levels in the list
an internal argument to pass current levels
an internal argument to pass for parent keys
an internal argument to pass the flattened list
lis <- list("A" = list("B" = c("b", "B"), c("a", "A", "aa"))) quanteda:::flatten_list(lis, 1:2) quanteda:::flatten_list(lis, 1)
Run the code above in your browser using DataLab