dct_object_to_html: Create an HTML fragment showing a DCT object

View source: R/dct_object_to_html.R

dct_object_to_htmlR Documentation

Create an HTML fragment showing a DCT object

Description

Create an HTML fragment showing a DCT object

Usage

dct_object_to_html(
  dctObject,
  headingLevel = 3,
  hyperlink_UCIDs = TRUE,
  collapseButtons = TRUE,
  urlPrefix = "#",
  sortDecreasing = FALSE
)

Arguments

dctObject

The DCT object

headingLevel

The level of the heading in the Markdown output that is produces.

hyperlink_UCIDs

Whether to create hyperlinks to UCIDs.

collapseButtons

Whether to include buttons to show/hide the definition and instructions.

urlPrefix

The prefix to insert before the URL in the produced hyperlink. The default, "#", results in a link to an anchor (an HTML a element) on the current page.

sortDecreasing

Whether to sort the constructs in decreasing order (TRUE), in increasing order (FALSE), or not at all (NULL).

Value

A character vector.

Examples

exampleDCT <-
  psyverse::dct_object(
    prefix = "exampleConstruct",
    label = "An example construct",
    definition = "The definition goes here",
    measure_dev = "Here you can explain how to measure the construct"
  );
### Only run this in an interactive R session,
### as it shows the HTML in the viewer.
if (interactive()) {
  dct_object_to_html(exampleDCT);
}

psyverse documentation built on March 7, 2023, 8:31 p.m.