justUnits: Extract Substring of Wiki Math

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/wikimath.R

Description

Extract logical portions of text formatted with wikimath conventions.

Usage

1
2
3
4
5
6
justUnits(x, ...)
noUnits(x, ...)
lhs(x, ...)
rhs(x, ...)
nospace(x, ...)
tos(x, ...)

Arguments

x

character; typically wikimath

...

ignoreded, or passed to sub for lhs and rhs

Details

justUnits extracts the contents of the first parenthetical inclusion. noUnits drops the first parenthetical inclusion. nospace removes all spaces. tos extracts the first occurrence of x_num, where x is 'theta', 'omega', or 'sigma' (case insensitive) and num is an unsigned decimal (1, 2.1, etc.).

Value

character

Author(s)

Tim Bergsma

References

http://metrumrg.googlecode.com

See Also

Examples

1
2
3
4
5
6
7
wiki <- "CL/F (L) ~ theta_1 * (WT/70)^theta_2"
justUnits(wiki)
noUnits(wiki)
lhs(wiki)
rhs(wiki)
nospace(noUnits(lhs(wiki)))
tos(wiki)	

metrumrg documentation built on May 31, 2017, 4:20 a.m.