period.apply.string: Period apply with string function

Description Usage Arguments Value

Description

xts's period.apply is optimized for a few function. The current function takes these as an arguement, and then calls the correct function.

Usage

1
period.apply.string(x, INDEX, FUN)

Arguments

x

a univariate data object

INDEX

a numeric vector of endpoints to calculate maximum on

FUN

A string. Currently supported are "sum", "prod", "min", "max", last", and "first".

Value

An xts or zoo object of maximums, indexed by the period endpoints.


fnoorian/mltsp documentation built on May 16, 2019, 1:48 p.m.