monthly: Special Monthly Series
Description
Functions and methods dealing with special monthly
'timeSeries' objects.
ll{
countMonthlyRecords Returns a series with monthly counts of records,
isMonthly Decides if the series consists of monthly records,
rollMonthlyWindows Returns start and end dates for rolling time windows,
rollMonthlySeries Rolls monthly a 'timeSeries' on a given period. }Usage
countMonthlyRecords(x)
isMonthly(x)rollMonthlyWindows(x, period = "12m", by = "1m")
rollMonthlySeries(x, period = "12m", by = "1m", FUN, ...)
Arguments
by
a character string specifying the rolling shift composed by the
length of the shift and its unit, e.g. "3m" represents
quarterly shifts.
FUN
the function to be applied.
[applySeries] -
a function to use for aggregation, by default colAvgs.
period
[rollMonthlySeries] -
a character string specifying the rollling period composed by the
length of the period and its unit, e.g. "12m" represents
one year.
x
an object of class timeSeries.
...
arguments passed to other methods.
Examples
Run this code## data -
# Microsoft Daily Data Set:
x = as.timeSeries(data(msft.dat))
countMonthlyRecords(x)
isMonthly(x)
Run the code above in your browser using DataLab