nest_tabset: Nest Tabset

View source: R/func_nest_tabset.R

nest_tabsetR Documentation

Nest Tabset

Description

Create nested tabsets in RMarkdown. Supply a nested list of objects,
unique ids for these and a function to display them. Returns the html to
be contained in a r chunk with results = "asis"

Usage

nest_tabset(
  listTree,
  idTree,
  depth,
  parse_function,
  tabset_type = "tabset tabset-pills"
)

Arguments

listTree

A list or list of lists which defines the structure of the tabset.
Names of list levels will be used to name tabs. Double underscore ,"__", will be replaced with a space

idTree

A list or list of list, of character strings. Used for div ids. Must be unique throught the whole markdown document.

depth

What depth should the tabset start at. I.e how many "#" would the top level begin with

parse_function

A function to handle whatever lies at the end of the lists. e.g. use print for ggplots.

tabset_type

either "tabset" or "tabset tabset-pills" Note the lack of curly braces and full stops.

Author(s)

W. S. Drysdale


willdrysdale/wsdmiscr documentation built on Aug. 26, 2023, 12:31 a.m.