multiple.dollar {useful}R Documentation

multiple.dollar

Description

Order of Magnitude Formatter

Usage

multiple.dollar(x, ...)

Arguments

x

Vector of numbers to be formatted.

...

Further arguments to be passed on to multiple

Details

Simply a wrapper for multiple that prespecifies the extra dollar.

Value

Character vector of dollar formatted numbers.

Author(s)

Jared P. Lander

Examples


require(scales)
vect <- c(1000, 1500, 23450, 21784, 875003780)
multiple.dollar(vect)
multiple.dollar(vect, multiple="k")
multiple.dollar(vect, multiple="h")

require(ggplot2)
data(diamonds)
ggplot(diamonds, aes(x=x, y=y, color=price*100)) + geom_point() + 
scale_color_gradient2(labels=multiple.dollar)


[Package useful version 1.2.6.1 Index]