flatten: flatten nested lists

View source: R/helper.R

flattenR Documentation

flatten nested lists

Description

[Stable]

Flatten a nested list, regardless of its level of nesting.

Usage

flatten(x)

Arguments

x

A list

Value

An unnested list

See Also

Other development tools: GET(), chart_layout(), convert_date(), default_dates(), fetch(), is.date()

Examples

# script start;

# 1) create a nested list
nested_list <- list(
  a = 1,
  b = list(
    c = 2,
    d = 3
  )
)

# 2) flatten the
# nested list
cryptoQuotes:::flatten(
  nested_list
)

# script end;

cryptoQuotes documentation built on April 4, 2025, 2:33 a.m.