File: calendar-endpoints.Rd

package info (click to toggle)
r-cran-timedate 3012.100-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 2,592 kB
  • ctags: 4
  • sloc: makefile: 13
file content (64 lines) | stat: -rw-r--r-- 1,260 bytes parent folder | download | duplicates (3)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
\name{.endpoints}


\alias{.endpoints}


\title{Endpoints Indexes}


\description{
Returns endpoint indexes from a 'timeDate' object
}


\usage{
.endpoints(x, on = c("months", "years", "quarters", "weeks", "days",
    "hours", "minutes", "seconds"), k=1)
}


\arguments{
    \item{x}{
        a \code{timeDate} object.
        }
    \item{on}{
        the periods endpoints to find as a character string.
        Select from: \code{"months"}, \code{"years"},
        \code{"quarters"}, \code{"weeks"}, \code{"days"},
        \code{"hours"}, \code{"minutes"}, \code{"seconds"}.
        }
    \item{k}{
        along every k-th element.
        }
}


\details{
    \code{endpoints} returns an integer vector corresponding to the last
    observation in each period specified by \code{on}, with a zero added
    to the beginning of the vector, and the index of the last observation
    in  \code{x} at the end.
}


\value{
    returns an intege vector of endpoints beginning with 0 and ending
    with the a value equal to the length of the \code{x} argument.
}


\author{
    Jeff Ryan, modofied by Diethelm Wuertz for \code{timeDate} objects.
}


\examples{
## endpoints -

   # Weekly Endpoints:
   .endpoints(timeCalendar(), on="w")
}


\keyword{programming}