The R Project SVN R

Rev

Rev 85990 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 85990 Rev 87785
Line 43... Line 43...
43
\dontdiff{% time-dependent
43
\dontdiff{% time-dependent
44
pretty(Sys.Date())
44
pretty(Sys.Date())
45
pretty(Sys.time(), n = 10)
45
pretty(Sys.time(), n = 10)
46
}
46
}
47
pretty(as.Date("2000-03-01")) # R 1.0.0 came in a leap year
47
pretty(as.Date("2000-03-01")) # R 1.0.0 came in a leap year
48
 
-
 
49
## time ranges in diverse scales:% also in ../../../../tests/reg-tests-1c.R
48
\donttest{% locale-dependent, tested in ../../../../tests/reg-tests-1c.R
-
 
49
## time ranges in diverse scales:
50
steps <- stats::setNames(,
50
steps <- stats::setNames(,
51
    c("10 secs", "1 min", "5 mins", "30 mins", "6 hours", "12 hours",
51
    c("10 secs", "1 min", "5 mins", "30 mins", "6 hours", "12 hours",
52
      "1 DSTday", "2 weeks", "1 month", "6 months", "1 year",
52
      "1 DSTday", "2 weeks", "1 month", "6 months", "1 year",
53
      "10 years", "50 years", "1000 years"))
53
      "10 years", "50 years", "1000 years"))
54
x <- as.POSIXct("2002-02-02 02:02")
54
x <- as.POSIXct("2002-02-02 02:02")
Line 56... Line 56...
56
       function(s) {
56
       function(s) {
57
           at <- pretty(seq(x, by = s, length.out = 2), n = 5)
57
           at <- pretty(seq(x, by = s, length.out = 2), n = 5)
58
           attr(at, "labels")
58
           attr(at, "labels")
59
       })
59
       })
60
}
60
}
-
 
61
}
61
\keyword{dplot}
62
\keyword{dplot}