powered by
Creates a list of xts objects split along time periods.
# S3 method for xts split(x, f = "months", drop=FALSE, k = 1, ...)
an xts object
a 'character' vector describing the period to split by
ignored by split.xts
number of periods to aggregate into each split. See Details.
further args to non-xts method
A list of xts objects.
A quick way to break up a large xts object by standard time periods; e.g. 'months', 'quarters', etc.
endpoints is used to find the start and end of each period (or k-periods). See that function for valid arguments.
endpoints
If f is not a character vector, the NextMethod is called, which would in turn dispatch to the split.zoo method.
f
endpoints, split.zoo, aggregate.zoo
split.zoo
aggregate.zoo
# NOT RUN { data(sample_matrix) x <- as.xts(sample_matrix) split(x) split(x, f="weeks") split(x, f="weeks", k=4) # }
Run the code above in your browser using DataLab