row_rank: Computes the row-wise rank for each row in an XTS object. The...

Description Usage Arguments Value Examples

View source: R/row_rank.R

Description

Computes the row-wise rank for each row in an XTS object. The largest value in the row receives rank 1.

Usage

1

Arguments

x

the XTS object for row-wise ranking; must have more than one column.

Value

an XTS object of ranks with same columns as x

Examples

1
2
3
4
5
6
7
8
## Not run: 
library(quantmod)
getSymbols(c("XLP","XLV"))
roc <- cbind(ROC(Cl(XLP)),ROC(Cl(XLV)))
rv <- row_rank(roc)
head(rv)

## End(Not run)

greatgray/scorecard documentation built on May 17, 2019, 8:34 a.m.