Learn R Programming

SNSchart (version 1.4.0)

srank: Sequential Rank

Description

Get the sequential rank of observations (X) relative to previous observations (Y).

Usage

srank(X, Y = NULL)

Arguments

X

vector. New observations to obtain the N<U+00A1>normal scores.

Y

vector. If Y is not defined (no previous observation available, NULL), NS is relative to X. Default NULL.

Value

vector. Sequentil Ranks for the X observations. If ties occurs, average of the ranks are used.

Examples

Run this code
# NOT RUN {
X <- c(30, 35, 45)
srank(X)
# }

Run the code above in your browser using DataLab