MINI MINI MANI MO
%
% Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
%
\name{ore.rank}
\alias{ore.rank}
\title{Oracle R Enterprise Data Ranking}
\description{
Enables the investigation of the distribution of values along numeric
columns in an \code{\link[OREbase:ore.frame-class]{ore.frame}} object.
Highlights include:
Allows ranking within groups,
Partitions observations into groups based on rank tiles,
Provides options for treatment of ties,
Calculates cumulative percentages and percentiles,
Calculates normal scores from ranks.
}
\usage{
ore.rank(data, var, desc = FALSE, groups = NULL, group.by = NULL,
ties = c("mean", "high", "low", "dense",
"condense"),
score = c("none", "fraction", "nplus1", "blom", "tukey",
"vw", "percent", "savage",
"waerden", "fn1", "n1"),
fraction = FALSE, percent = FALSE, nplus1 = FALSE,
savage = FALSE, blom = FALSE, tukey = FALSE, vw = FALSE)
}
\arguments{
\item{data}{An \code{\link[OREbase:ore.frame-class]{ore.frame}} object.}
\item{var}{A comma-separated character string specifying the names of
numeric columns within argument \code{data}.}
\item{desc}{A logical value indicating whether to rank in ascending or
descending order.}
\item{groups}{An optional numeric value specifying the number of
partitions in the data. For percentiles, specify
\code{groups = 100}. For deciles, specify \code{groups = 10}. For
quartiles, specify \code{groups = 4}.}
\item{group.by}{An optional character vector specifying the group by
column names within argument \code{data}.}
\item{ties}{A character string specifying how to handle ties; One of
\code{"low"} (smallest rank within the tied group),
\code{"high"} (largest rank within the tied group),
\code{"mean"} (average rank within the tied group), and
\code{"dense"}/\code{"condense"} (arbitrary unique rank within the tied group).}
\item{score}{A character string specifying a score; One of
\code{"none"}, \code{"fraction"}, \code{"nplus1"}, \code{"blom"},
\code{"tukey"}, \code{"vw"}, \code{"percent"}, or \code{"savage"},
\code{"waerden"}, \code{"fn1"}, or \code{"n1"}.}
\item{fraction}{A logical value indicating whether to compute the
ratio of \samp{rank/#non-missing values} for each column in argument
\code{var}.}
\item{percent}{A logical value indicating whether to compute the ratio
\samp{(rank * 100)/#non-missing values} for each column in argument
\code{var}.}
\item{nplus1}{A logical value indicating whether to compute the ratio
\samp{rank/(#non-missing values + 1)} for each column in argument
\code{var}.}
\item{savage}{Equivalent to \code{score = "savage"}.}
\item{blom}{Equivalent to \code{score = "blom"}.}
\item{tukey}{Equivalent to \code{score = "tukey"}.}
\item{vw}{Equivalent to \code{score = "vw"}.}
}
\value{
Returns an \code{\link[OREbase:ore.frame-class]{ore.frame}} object.
}
\references{
\href{http://www.oracle.com/technetwork/database/database-technologies/r/r-enterprise/documentation/index.html}{Oracle R Enterprise}
}
\author{
Oracle \email{oracle-r-enterprise@oracle.com}
}
\seealso{
\code{\link{ore.sort}}
}
\examples{
IRIS <- ore.push(iris)
# Rank 2 columns with column aliases and sort them in descending rank order
ore.rank(data = IRIS,
var = "Petal.Length=Col1Rank, Sepal.Length=Col2Rank",
desc = TRUE)
# Handling of ties
ore.rank(data = IRIS,
var = "Petal.Length=PetalLengthRanks, Sepal.Length=SepalRanks",
ties = "low")
# Rank within each Species group
ore.rank(data = IRIS,
var = "Petal.Length=PetalLengthRanks, Sepal.Length=SepalRanks",
group.by = "Species")
# Partition rows into 10 groups to get deciles
ore.rank(data = IRIS,
var = "Petal.Length=PetalLengthRanks, Sepal.Length=SepalRanks",
groups = 10)
# Estimate the cumulative distribution function
ore.rank(data = IRIS,
var = "Petal.Length=PetalLengthRanks, Sepal.Length=SepalRanks",
nplus1 = TRUE)
# Calculate scores
ore.rank(data = IRIS,
var = "Petal.Length=PetalLengthRanks, Sepal.Length=SepalRanks",
score = "savage", groups = 100, group.by = "Species")
}
\keyword{univar}
OHA YOOOO