Learn R Programming

psyverse (version 0.1.0)

generate_construct_overview: Generate construct overviews and instruction overviews

Description

These functions use a DCT specification to generate a construct overview or an instruction overview.

Usage

generate_construct_overview(
  dctSpec,
  include = c("definition", "measure_dev", "measure_code", "manipulate_dev",
    "manipulate_code", "aspect_dev", "aspect_code", "rel"),
  hideByDefault = NULL,
  divClass = "btn btn-secondary",
  headingLevel = 3,
  hyperlink_ucids = "Markdown",
  urlPrefix = "#"
)

generate_definitions_overview( dctSpecDf, headingLevel = 3, hyperlink_ucids = "Markdown", urlPrefix = "#" )

generate_instruction_overview( dctSpecDf, type, headingLevel = 3, hyperlink_ucids = "Markdown", urlPrefix = "#" )

Value

A character string with the overview.

Arguments

dctSpec

The DCT specification, as resulting from a call to load_dct_specs() or load_dct_dir().

include

Which elements to include in the construct overview.

hideByDefault

Which elements to hide by default.

divClass

The class of the button to collapse/expand sections.

headingLevel

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

hyperlink_ucids

The type of hyperlinks to generate; must be a valid string. Currently, if the value is"Markdown" or "HTML", hyperlinks in the corresponding formats are produced, and if it is "none" (or, actually any other string value), nothing is produced.

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.

dctSpecDf

The DCT specification dataframer, as produced by a call to load_dct_specs() or load_dct_dir(), and stored within the resulting object.

type

For instruction overviews, the type of instruction to generate can be specified: must be one of "measure_dev", "measure_code", "manipulate_dev", "manipulate_code", "aspect_dev", or "aspect_code".

Examples

Run this code
### Add example

Run the code above in your browser using DataLab