Learn R Programming

timeSeries (version 280.75)

rank: Sample Ranks of a Time Series

Description

Return the sample ranks of the values of a 'timeSeries' object.

Usage

## S3 method for class 'timeSeries':
rank(x, ...)

Arguments

x
an univariate object of class timeSeries.
...
arguments to be passed to the default rank function .

Value

  • returns the ranks of a timeSeries object

Examples

Run this code
## data -
   x = as.timeSeries(data(msft.dat))[, 1:4]
   x = 100*returns(x)

## rank -
   rank(x[, "Open"])

Run the code above in your browser using DataLab