justUnits: Extract Substring of Wiki Math

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

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

  • wikiparse

  • wiki2plotmath

  • wiki2latex

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)	


Search within the metrumrg package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.