Learn R Programming

jmvcore (version 2.6.3)

stringifyTerm: Converts a term into a string

Description

Converts a term (a vector of components) into a string for display purposes

Usage

stringifyTerm(components, sep = getOption("jmvTermSep", ":"),
  raise = FALSE)

Value

the components joined together into a string for disply

Arguments

components

a character vector of components

sep

a separator to go between the components

raise

whether duplicates should be raised to powers

Examples

Run this code
stringifyTerm(c('a', 'b', 'c'))

# "a:b:c"

stringifyTerm(c('a', 'b', 'c'), sep=' * ')

# "a * b * c"

options('jmvTermSep', ' * ')
stringifyTerm(c('a', 'b', 'c'))

# "a * b * c"

#' stringifyTerm(c('`quoted`', 'b', 'c'))

# "quoted * b * c"

Run the code above in your browser using DataLab