percentLabel: List of percent values, e.g. for axis displays.

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

Description

List of percent values, e.g. for axis displays.

Usage

1
percentLabel(perc.dist = 1, min.perc = -100, max.perc = 100, ...)

Arguments

perc.dist

interval steps of percent list

min.perc

minimum percent value

max.perc

maximum percent value

...

arguments passed to further functions

Details

data.frame of number and corresponding representation as percentage values. E.g. for use as axix label in graphics.

Value

data-frame with percentage as number and character string

Note

under continuous developement

Author(s)

Roland Rapold

References

none

See Also

see other functions in this R-package

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
     # list from 0 to 1 in 5 - steps
     percentLabel(perc.dist=5, min.perc=0)
     #
     # example for usage in plot()
     p.lab <- percentLabel(perc.dist=20, min.perc=-100, max.perc=200)
     x.sam <- rnorm(40, 0.4, 0.4)
     y.sam <- rnorm(40, 0.4, 0.4)
     par(mfrow=c(1, 2))
     plot(x=x.sam, y=y.sam, yaxt="n", xlim=c(-0.5, 1.5), ylim=c(-0.5, 1.5))
     axis(2, at=p.lab$position ,labels=p.lab$text)
     plot(x=x.sam, y=y.sam, yaxt="n", xlim=c(-0.5, 1.5), ylim=c(-0.5, 1.5))
     axis(2, at=p.lab$position ,labels=p.lab$text, las=1, cex.axis=0.8)

rrMisc documentation built on June 25, 2021, 3 a.m.