The R Project SVN R

Rev

Rev 70119 | Rev 80770 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 70119 Rev 71791
Line 1... Line 1...
1
% File src/library/graphics/man/hist.POSIXt.Rd
1
% File src/library/graphics/man/hist.POSIXt.Rd
2
% Part of the R package, https://www.R-project.org
2
% Part of the R package, https://www.R-project.org
3
% Copyright 1995-2015 R Core Team
3
% Copyright 1995-2016 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{hist.POSIXt}
6
\name{hist.POSIXt}
7
\alias{hist.POSIXt}
7
\alias{hist.POSIXt}
8
\alias{hist.Date}
8
\alias{hist.Date}
Line 51... Line 51...
51
  Note that unlike the default method, \code{breaks} is a required argument.
51
  Note that unlike the default method, \code{breaks} is a required argument.
52
 
52
 
53
  Using \code{breaks = "quarters"} will create intervals of 3 calendar
53
  Using \code{breaks = "quarters"} will create intervals of 3 calendar
54
  months, with the intervals beginning on January 1, April 1,
54
  months, with the intervals beginning on January 1, April 1,
55
  July 1 or October 1, based upon \code{min(x)} as appropriate.
55
  July 1 or October 1, based upon \code{min(x)} as appropriate.
56
  
56
 
57
  With the default \code{right = TRUE}, breaks will be set
57
  With the default \code{right = TRUE}, breaks will be set
58
  on the last day of the previous period when \code{breaks} is
58
  on the last day of the previous period when \code{breaks} is
59
  \code{"months"}, \code{"quarters"} or \code{"years"}.  Use 
59
  \code{"months"}, \code{"quarters"} or \code{"years"}.  Use
60
  \code{right = FALSE} to set them to the first day of the
60
  \code{right = FALSE} to set them to the first day of the
61
  interval shown in each bar.
61
  interval shown in each bar.
62
}
62
}
63
\value{
63
\value{
64
  An object of class \code{"histogram"}: see \code{\link{hist}}.
64
  An object of class \code{"histogram"}: see \code{\link{hist}}.
Line 68... Line 68...
68
}
68
}
69
\examples{
69
\examples{
70
hist(.leap.seconds, "years", freq = TRUE)
70
hist(.leap.seconds, "years", freq = TRUE)
71
hist(.leap.seconds,
71
hist(.leap.seconds,
72
     seq(ISOdate(1970, 1, 1), ISOdate(2020, 1, 1), "5 years"))
72
     seq(ISOdate(1970, 1, 1), ISOdate(2020, 1, 1), "5 years"))
-
 
73
rug(.leap.seconds, lwd=2)
73
 
74
 
74
## 100 random dates in a 10-week period
75
## 100 random dates in a 10-week period
75
random.dates <- as.Date("2001/1/1") + 70*stats::runif(100)
76
random.dates <- as.Date("2001/1/1") + 70*stats::runif(100)
76
hist(random.dates, "weeks", format = "\%d \%b")
77
hist(random.dates, "weeks", format = "\%d \%b")
77
}
78
}