Learn R Programming

timeSeries (version 3010.97)

sort: Sorting a 'timeSeries' by Time Stamps

Description

Sorts a 'timeSeries' according to increasing or decreasing order of the time stamps.

Usage

## S3 method for class 'timeSeries':
sort(x, decreasing = FALSE, \dots)

Arguments

x
an uni- or multivariate timeSeries object.
decreasing
a logical flag. Should we sort in increasing or decreasing order? By default FALSE.
...
optional arguments passed to other methods.

Value

  • returns a timeSeries object.

Examples

Run this code
## Create Dummy timeSeries -    
   tS <- dummySeries()
   
## Sort the Series in Decreasing Order -    
   sort(tS, decreasing = TRUE)
     
## Sort the Series -
   sort(tS)

Run the code above in your browser using DataLab