Learn R Programming

tablesgg (version 0.9-1)

spec_from_text: textspec Values Based on String Prefixes

Description

Return a vector of textspec values based on special prefixes in strings of x. This is an internal utility function, not intended to be called by package users.

Usage

spec_from_text(x)

Value

Character vector with the same length as x, containing textspec values. Values are determined by looking for special prefixes in the text strings.

Arguments

x

Character vector.

Details

Currently supported textspec values and the associated prefixes are: "plain" (no recognized prefix); "plotmath" (prefix MATH_); and "markdown" (prefix MKDN_).

The returned value will be "plain" for elements of x that are NA.

See Also

prefix_text to add or remove special prefixes to text strings based on textspec.