Skip to contents

View object as collapsible nested list in HTML

Usage

listview(x)

Arguments

x

An atomic vector or a list

Value

A list() with a shiny.tag class that can be converted into an HTML string via as.character() and saved to a file with save_html().

Examples

x <- list(
  list(id = "a", val = 2),
  list(
    id = "b",
    val = 1,
    children = list(
      list(id = "b1", val = 2.5),
      list(
        id = "b2",
        val = 8,
        children = list(
          list(id = "b21", val = 4)
        )
      )
    )
  ),
  list(
    id = "c",
    val = 8,
    children = list(
      list(id = "c1"),
      list(id = "c2", val = 1)
    )
  )
)

listview(x)