pretty_breaks: Pretty breaks. Uses default R break algorithm as implemented...

Description Usage Arguments Examples

View source: R/breaks.r

Description

Pretty breaks. Uses default R break algorithm as implemented in pretty.

Usage

1

Arguments

n

desired number of breaks

...

other arguments passed on to pretty

Examples

1
2
3
4
pretty_breaks()(1:10)
pretty_breaks()(1:100)
pretty_breaks()(as.Date(c("2008-01-01", "2009-01-01")))
pretty_breaks()(as.Date(c("2008-01-01", "2090-01-01")))

Example output

[1]  0  2  4  6  8 10
[1]   0  20  40  60  80 100
    Jan 2008     Apr 2008     Jul 2008     Oct 2008     Jan 2009 
"2008-01-01" "2008-04-01" "2008-07-01" "2008-10-01" "2009-01-01" 
        2000         2020         2040         2060         2080         2100 
"2000-01-01" "2020-01-01" "2040-01-01" "2060-01-01" "2080-01-01" "2100-01-01" 

scales documentation built on Aug. 24, 2017, 5:22 p.m.