handleArgsText: Handle function arguments as text

handleArgsTextR Documentation

Handle function arguments as text

Description

Handles a list or list of lists, converting to human-readable text format

Usage

handleArgsText(
  argTextA,
  name = "",
  col1 = "mediumpurple2",
  col2 = "mediumaquamarine",
  colT = "dodgerblue3",
  colF = "red1",
  colNULL = "grey60",
  lightMode = NULL,
  Crange = getOption("jam.Crange"),
  Lrange = getOption("jam.Lrange"),
  adjustRgb = getOption("jam.adjustRgb"),
  indent = "",
  useCollapseList = ",\n      ",
  useCollapseBase = ", ",
  level = 1,
  debug = 0,
  useColor = TRUE,
  verbose = FALSE,
  ...
)

Arguments

argTextA

object passed by jargs() when iteratively parsing function argument values.

name

character name of the argument.

col1, col2, colT, colF, colNULL

character colors used as defaults for first and second arguments, TRUE, FALSE, NULL, respectively.

lightMode

logical or NULL, indicating whether the text background color is light, thus imposing a maximum brightness for colors displayed. It use lightMode if defined by the function caller, otherwise it will use getOption("jam.lightMode") if defined, lastly it will attempt to detect whether running inside Rstudio by checking the environment variable "RSTUDIO", and if so it will assume lightMode==TRUE.

Crange

numeric range of chroma values, ranging between 0 and 100. When NULL, default values will be assigned to Crange by setCLranges().

Lrange

numeric range of luminance values, ranging between 0 and 100. When NULL, default values will be assigned to Lrange by setCLranges().

adjustRgb

numeric value adjustment used during the conversion of RGB colors to ANSI colors, which is inherently lossy. If not defined, it uses the default returned by setCLranges() which itself uses getOption("jam.adjustRgb") with default=0. In order to boost color contrast, an alternate value of -0.1 is suggested.

indent

character string used as a prefix in output to help apply text indent.

useCollapseList

character string inserted between multiple values to split list entries across multiple lines.

useCollapseBase

character string used to separate multiple values in a vector which is not split across multiple lines.

level

integer indicating the level of depth in iterative parsing.

debug

integer value, greater than 0 will cause debug-type verbose output, useful because parameters are hard!

useColor

logical whether to display results in color, if the crayon package is available, and terminal console is capable.

verbose

logical whether to print verbose output.

Details

This function is a rare non-exported function intended to be called by jargs(), but separated in order to help isolate the logical steps required.

See Also

Other jam practical functions: breakDensity(), checkLightMode(), check_pkg_installed(), colNum2excelName(), color_dither(), diff_functions(), exp2signed(), fileInfo(), fixYellow(), getAxisLabel(), heads(), isFALSEV(), isTRUEV(), jamba, jargs(), kable_coloring(), lldf(), log2signed(), make_html_styles(), make_styles(), match_unique(), mergeAllXY(), middle(), minorLogTicks(), newestFile(), printDebug(), renameColumn(), rmInfinite(), rmNAs(), rmNA(), rmNULL(), sclass(), sdim(), setPrompt()

Examples

args(jargs)
jargs(jargs)

# retrieve parameters involving notes from imageByColors
jargs(imageByColors, "note")


jmw86069/jamba documentation built on Oct. 9, 2024, 10:52 a.m.