as_spar.spork {spork}R Documentation

Parse Spork

Description

Parses spork. Converts length-one character to vector of tokens. Explicit tokens include *._^ and any of these escaped with backslash, e.g. '\*'. Backslash-n is an explicit token ('\n'). Backslash-backtick is an explicit token ('\`'). One or more consecutive whitespace characters are a single token, as are one or more consecutive octothorpes (#). Any string of characters delimited by one or more of the above is implicitly a token as well. As of version 0.2.6, supported names of Greek letters are tokens (see greek) possibly bounded by backticks (to be interpreted literally).

Usage

## S3 method for class 'spork'
as_spar(x, ...)

Arguments

x

length-one character using spork syntax

...

ignored arguments

Value

spar (character vector)

See Also

Other spar: as_plotmath.spar(), as_spar.default(), as_spar()

Other spork: [.spork(), [[.spork(), as.list.spork(), as.png.spork(), as_html.spork(), as_latex.spork(), as_plotmath.spork(), as_previews.spork(), as_spar.default(), as_spork.character(), as_spork.factor(), as_spork.spork(), as_spork(), ggplot.spork(), greek()

Examples

as_spar(as_spork('one joule (Omega) ~ 1 kg*m^2./s^2'))
as_spar(as_spork('one joule (`Omega`) ~ 1 kg*m^2./s^2'))
as_spar(as_spork('one joule (\\`Omega\\`) ~ 1 kg*m^2./s^2'))

[Package spork version 0.3.3 Index]