Learn R Programming

LW1949 (version 1.0.0)

prettylog: Pretty Breakpoints on Log Scale

Description

Compute a sequence of "round" values which cover the range of x on the log scale.

Usage

prettylog(x, lead = c(1, 5), extra = 5)

Arguments

x
A numeric vector.
lead
An integer vector giving the desired lead digits of pretty values on the log scale, default c(1, 5).
extra
An integer scalar giving the desired number of additional non-log scale values to include, default 5.

Value

A numeric vector of pretty values covering the range of x on the log scale.

Examples

Run this code
vals <- rlnorm(100, 6)
summary(vals)
prettylog(vals, 1, 0)
prettylog(vals, 1)
prettylog(vals, c(1, 2, 5))

Run the code above in your browser using DataLab