math_format: Add arbitrary expression to a label. The symbol that will be...

Description Usage Arguments Value See Also Examples

View source: R/formatter.r

Description

Add arbitrary expression to a label. The symbol that will be replace by the label value is .x.

Usage

1
math_format(expr = 10^.x, format = force)

Arguments

expr

expression to use

format

another format function to apply prior to mathematical transformation - this makes it easier to use floating point numbers in mathematical expressions.

Value

a function with single parameter x, a numeric vector, that returns a list of expressions

See Also

plotmath()

Examples

1
2
3
4

Example output

[[1]]
10^`1`

[[2]]
10^`2`

[[3]]
10^`3`

[[4]]
10^`4`

[[5]]
10^`5`

[[6]]
10^`6`

[[7]]
10^`7`

[[8]]
10^`8`

[[9]]
10^`9`

[[10]]
10^`10`

[[1]]
alpha + frac(1, `1`)

[[2]]
alpha + frac(1, `2`)

[[3]]
alpha + frac(1, `3`)

[[4]]
alpha + frac(1, `4`)

[[5]]
alpha + frac(1, `5`)

[[6]]
alpha + frac(1, `6`)

[[7]]
alpha + frac(1, `7`)

[[8]]
alpha + frac(1, `8`)

[[9]]
alpha + frac(1, `9`)

[[10]]
alpha + frac(1, `10`)

[[1]]
10^`0.6670847`

[[2]]
10^`0.2126634`

[[3]]
10^`0.6223882`

[[4]]
10^`0.6062835`

[[5]]
10^`0.2480842`

[[6]]
10^`0.4423287`

[[7]]
10^`0.9824239`

[[8]]
10^`0.6693992`

[[9]]
10^`0.7431763`

[[10]]
10^`0.2465784`

[[1]]
10^`29.1%`

[[2]]
10^`82.7%`

[[3]]
10^`84.8%`

[[4]]
10^`68.2%`

[[5]]
10^`30.0%`

[[6]]
10^`56.1%`

[[7]]
10^`57.9%`

[[8]]
10^`75.2%`

[[9]]
10^`72.4%`

[[10]]
10^`71.3%`

scales documentation built on Aug. 10, 2018, 1:17 a.m.