Extract index values of a given zoo object, where the
returned index is equal to the last date of each
recurring period.
Usage
breakpoints(x, by = c(weekdays, weeks, months, quarters, years),
...)
Arguments
x
zoo object with index of class Date
by
period to be indexed from
...
currently unused
Value
A numeric vector which can be used to extract
rows from the given data object.
Details
Given a zoo object with the appropriate
index type, breakpoints will return
a numeric vector corresponding to the final
rows in each period specified.
For example, by=years would return the
index values matching the last observation
in each calendar year. Similarly, by=weeks
would match the last observations in any given week.
The final index returned
corresponds to the last observation in the
data object, as this may be useful for calculating
values to date.