-
Notifications
You must be signed in to change notification settings - Fork 25
/
quarter.Rd
executable file
·37 lines (27 loc) · 788 Bytes
/
quarter.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
% Copyright 2011 Google Inc. All Rights Reserved.
% Author: [email protected] (Steve Scott)
\name{quarter}
\alias{Quarter}
\title{Find the quarter in which a date occurs}
\Rdversion{1.0}
\description{
Returns the quarter and year in which a date occurs.
}
\usage{
Quarter(date)
}
\arguments{
\item{date}{A vector convertible to \code{\link{POSIXlt}}. A
\code{\link{Date}} or \code{character} is fine.}
}
\value{ A numeric vector identifying the quarter that each element of
\code{date} corresponds to, expressed as a number of years since 1900.
Thus Q1-2000 is 100.00, and Q3-2007 is 107.50. }
\author{
Steven L. Scott \email{[email protected]}
}
\examples{
Quarter(c("2008-02-29", "2008-04-29"))
# [1] 108.00 108.25
}
\keyword{chron}