Skip to contents

Overview of package timeSeries

timeSeries-package
Utilities and tools package
TimeSeriesData LPP2005REC MSFT USDCHF
Time series data sets

Create ‘timeSeries’ objects

timeSeries()
Create objects from class 'timeSeries'
readSeries()
Read a 'timeSeries' from a text file
dummyDailySeries() dummyMonthlySeries()
Create dummy time series
as.timeSeries() as.ts(<timeSeries>) as.matrix(<timeSeries>) as.data.frame(<timeSeries>) as.list(<timeSeries>)
Convert objects to/from class 'timeSeries'

Explore ‘timeSeries’ objects

plot(<timeSeries>) lines(<timeSeries>) points(<timeSeries>) pretty(<timeSeries>)
Plot 'timeSeries' objects
show(<timeSeries>) print(<timeSeries>)
Print 'timeSeries' objects
str(<timeSeries>)
Display the structure of 'timeSeries' objects
is.timeSeries() is.signalSeries()
Check if an object is from class 'timeSeries'
isUnivariate() isMultivariate()
Checks if a time series is univariate
isDaily(<timeSeries>) isMonthly(<timeSeries>) isQuarterly(<timeSeries>) isRegular(<timeSeries>) frequency(<timeSeries>)
Checks if a time series is regular
na.contiguous(<timeSeries>) is.na(<timeSeries>)
Find longest contiguous stretch of non-NAs or check for NAs
sort(<timeSeries>) is.unsorted(<timeSeries>)
Sort a 'timeSeries' by time stamps

Subset ‘timeSeries’ objects

There are ‘timeSeries’ methods for subsetting operators, like ‘[’ and ‘[<-’, as well as functions and methods which broadly perform some kind of subsetting.

window(<timeSeries>)
Methods for 'window' in package 'timeSeries'
head(<timeSeries>) tail(<timeSeries>) outlier()
Subsetting time series
na.contiguous(<timeSeries>) is.na(<timeSeries>)
Find longest contiguous stretch of non-NAs or check for NAs
na.omit(<timeSeries>)
Handle missing values in 'timeSeries' objects
removeNA() substituteNA() interpNA()
Deprecated functions in 'timeSeries' package
endOfPeriodSeries() endOfPeriodStats() endOfPeriodBenchmarks()
End-of-Period series, stats, and benchmarks

Aggregate and smooth ‘timeSeries’ objects

filter(<timeSeries>)
Linear filtering on a time series
smoothLowess() smoothSpline() smoothSupsmu()
Smooths time series objects
aggregate(<timeSeries>)
Aggregate time series
align(<timeSeries>) alignDailySeries() daily2monthly() daily2weekly()
Align a 'timeSeries' object to equidistant time stamps
apply(<timeSeries>) fapply() applySeries() rollDailySeries()
Apply functions over time windows
rollMonthlyWindows() rollMonthlySeries() countMonthlyRecords()
Special monthly series

Manipulate ‘timeSeries’ objects

series() `series<-`()
Get and set the data component of a 'timeSeries'
finCenter(<timeSeries>) `finCenter<-`(<timeSeries>) getFinCenter() `setFinCenter<-`()
Get and set Financial center of a 'timeSeries'
time(<timeSeries>) `time<-`(<timeSeries>) getTime() `setTime<-`()
Get and set time stamps of a 'timeSeries'
getUnits() `setUnits<-`()
Get and set unit names of a 'timeSeries'
start(<timeSeries>) end(<timeSeries>)
Start and end of a 'timeSeries'
getAttributes() `setAttributes<-`()
Get and set optional attributes of a 'timeSeries'
comment(<timeSeries>) `comment<-`(<timeSeries>)
Get and set comments for 'timeSeries' objects
orderColnames() sortColnames() sampleColnames() statsColnames() pcaColnames() hclustColnames()
Reorder column names of a time series

Transform ‘timeSeries’ objects

scale(<timeSeries>)
Center and scale 'timeSeries' objects
diff(<timeSeries>)
Difference a 'timeSeries' object
colCumsums(<timeSeries>) colCummaxs(<timeSeries>) colCummins(<timeSeries>) colCumprods(<timeSeries>) colCumreturns(<timeSeries>)
Cumulated column statistics
rowCumsums(<ANY>) rowCumsums(<timeSeries>)
Cumulative row statistics
lag(<timeSeries>)
Lag a 'timeSeries' object
sort(<timeSeries>) is.unsorted(<timeSeries>)
Sort a 'timeSeries' by time stamps
rev(<timeSeries>)
Reverse a 'timeSeries'
runlengths()
Runlengths of a time series
durations()
Durations from a 'timeSeries'
rank(<timeSeries>)
Sample ranks of a time series
sample(<timeSeries>)
Resample 'timeSeries' objects
Ops(<timeSeries>,<timeSeries>) Math(<timeSeries>) Math2(<timeSeries>) quantile(<timeSeries>) median(<timeSeries>)
Mathematical operations on 'timeSeries'

Financial computations on ‘timeSeries’ objects

returns() returns0()
Financial returns
cumulated()
Cumulated time series from returns
drawdowns() drawdownsStats()
Calculations of drawdowns
splits()
splits
spreads() midquotes()
Spreads and mid quotes
index2wealth()
Conversion of an index to wealth

Compute statistics on timeSeries objects

sd-methods var-methods cov-methods cor-methods
Base R functions applied to 'timeSeries' objects
colStats() colSds() colVars() colSkewness() colKurtosis() colMaxs() colMins() colProds() colQuantiles()
Column statistics
turns() turnsStats()
Turning points of a time series
orderStatistics()
Order statistics
rollStats() rollMean() rollMin() rollMax() rollMedian()
Rolling statistics

Combine time series

cbind(<timeSeries>) rbind(<timeSeries>) cbind2(<timeSeries>,<ANY>) rbind2(<timeSeries>,<ANY>)
Bind 'timeSeries' objects by column or row
merge()
Merge 'timeSeries' objects

Mathematical operations on ‘timeSeries’

Other

timeSeries-class initialize,timeSeries-method
Class 'timeSeries' in package timeSeries
dim,timeSeries-method dim dimnames,timeSeries-method dimnames colnames colnames,timeSeries-method rownames,timeSeries-method rownames rownames names,timeSeries-method names
Dimension and their names for 'timeSeries' objects
getDataPart,timeSeries-method setDataPart,timeSeries-method
DataPart,timeSeries-method
description()
Creates date and user information
attach(<timeSeries>)
Attach a 'timeSeries' to the search path
.colorwheelPalette()
Exported internal functions