affix {exams.forge}R Documentation

Quote and Prefix and/or Suffix Manipulation

Description

affix adds a prefix and/or a suffix to a (character) vector

math adds a $ as pre- and suffix to a (character) vector

bracket adds a ( as prefix and ) as suffix to a (character) vector

unaffix deletes a pre- and/or suffix to a (character) vector

unquote deletes double quotes at the beginning and the ending of a (character) vector

uncdata deletes a <![CDATA[ as prefix and ]]> as suffix

cdata adds a <![CDATA[ as prefix and ]]> as suffix

Usage

affix(txt, prefix = "", suffix = "")

math(txt)

bracket(txt)

unaffix(txt, prefix = "", suffix = "")

unquote(txt)

uncdata(txt)

cdata(txt)

add_affix(txt, prefix = "", suffix = "")

add_cdata(txt)

add_math(txt)

lmath(txt)

add_bracket(txt)

brkt(txt)

remove_affix(txt, prefix = "", suffix = "")

remove_quotes(txt)

remove_cdata(txt)

Arguments

txt

vector: (character) vector to add a prefix and/or a suffix

prefix

character: prefix to add or delete (default: "")

suffix

character: suffix to add or delete (default: "")

Value

a character vector

Examples

x <- runif(5)
affix(x, "$", "$")
math(x)

[Package exams.forge version 1.0.10 Index]