Learn R Programming

xts (version 0.0-6)

endpoints: Locate Endpoints by Time

Description

Extract index values of a given xts object corresponding to the last observations given a period specified by on

Usage

endpoints(x, on="months", k=1)

Arguments

x
an xts object
on
the periods endpoints to find as a character string
k
the number of aggregation points???

Value

  • A numeric vector of endpoints.

Details

endpoints returns a numeric vector corresponding to the last observation in each period specified by on, with a zero added to the beginning of the vector, and the index of the last observation in x at the end.

Valid values for the argument on include: secs (seconds), seconds, mins (minutes), minutes, hours, days, weeks, months, quarters, and years.