Vector of Prettied Values

DESCRIPTION:
Returns a vector of ordered and equally spaced ("pretty") values that span the range of the input.

USAGE:
pretty(x, nint = 5)

REQUIRED ARGUMENTS:
x:
vector of data; prettied values will cover the range of x. Missing values (NAs) are allowed.

OPTIONAL ARGUMENTS:
nint:
approximate number of intervals desired.

VALUE:
vector of approximately nint values that are ordered and equally spaced numerically over the range of the input x. The individual values will differ by 1, 2 or 5 times a power of 10.

SEE ALSO:
options , (to set the number of printed digits for the session) print , range .

EXAMPLES:
pretty(mydata, 10)

pretty(0:1) # returns c(0, .2, .4, .6, .8, 1) pretty(0:1, 2) # returns c(0, .5, 1) pretty(0:1, 1) # returns c(0, 1) pretty(c(.1, .98), 3) # returns c(0, .2, .4, .6, .8, 1) pretty(c(.1, 1.05), 3) # returns c(0, .5, 1, 1.5)