Learn R Programming

rock (version 0.8.1)

get_dataframe_from_nested_list: Return all values from a nested list in a dataframe

Description

Return all values from a nested list in a dataframe

Usage

get_dataframe_from_nested_list(x, nestingIn = "children")

Value

A dataframe

Arguments

x

The nested list

nestingIn

The name containing the nested lists

Examples

Run this code
nestedList <-
  list(
    id = "x",
    value = "value for x",
    children = list(
      list(
        id = "y",
        value = "value for y"
      ),
      list(
        id = "z",
        value = "value for z"
      )
    )
  );
str(nestedList);
get_dataframe_from_nested_list(nestedList);

Run the code above in your browser using DataLab