Skip to content

Commit

Permalink
Change default for date and time trans to pretty_breaks()
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Jun 25, 2012
1 parent a803889 commit 61141f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/trans-date.r
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' t$inv(t$trans(years))
#' t$format(t$breaks(range(years)))
date_trans <- function() {
trans_new("date", "from_date", "to_date")
trans_new("date", "from_date", "to_date", breaks = pretty_breaks())
}

to_date <- function(x) structure(x, class = "Date")
Expand All @@ -24,7 +24,7 @@ from_date <- function(x) structure(as.numeric(x), names = names(x))
#' t$inv(t$trans(hours))
#' t$format(t$breaks(range(hours)))
time_trans <- function() {
trans_new("time", "from_time", "to_time")
trans_new("time", "from_time", "to_time", breaks = pretty_breaks())
}

to_time <- function(x) structure(x, class = c("POSIXt", "POSIXct"))
Expand Down

0 comments on commit 61141f9

Please sign in to comment.