percentLabel {rrMisc}R Documentation

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

Description

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

Usage

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

     # 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)

[Package rrMisc version 0.33 Index]