MINI MINI MANI MO

Path : /opt/oracle/product/18c/dbhomeXE/R/library/OREeda/doc/man/en/
File Upload :
Current File : //opt/oracle/product/18c/dbhomeXE/R/library/OREeda/doc/man/en/ore.sort.Rd

%
% Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 
%
\name{ore.sort}
\alias{ore.sort}
\title{Oracle R Enterprise Data Sorting}
\description{
  Performs flexible sorting on
  \code{\link[OREbase:ore.frame-class]{ore.frame}} objects.
}
\usage{
  ore.sort(data, by, nls.sort = NULL, reverse = FALSE, stable = FALSE,
           unique.keys = FALSE, unique.data = FALSE,
           cache = getOption(".ore.persist", TRUE))
}
\arguments{
  \item{data}{An \code{\link[OREbase:ore.frame-class]{ore.frame}} object.}
  \item{by}{A comma-separated character string specifying the columns to
    use in sorting from argument \code{data}.}
  \item{nls.sort}{A character string specifying Oracle Database
    \verb{NLS_SORT} options.}
  \item{reverse}{A logical vector indicating the use of ascending or
    descending sorts.}
  \item{stable}{A logical value indicating whether to maintain the
    relative order within sorted groups.} 
  \item{unique.keys}{A logical value indicating whether to maintain a
    single row for each distinct combination of sorting columns.}
  \item{unique.data}{A logical value indicating whether to maintain a
    single row for each distinct combination of all the columns in
    argument \code{data}.}
  \item{cache}{For internal use only.}
}
\details{
  Typical use case for \code{ore.sort} is during data pre-processing to
  obtain top-k rows.
}
\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.rank}}
}
\examples{
   IRIS <- ore.push(iris)

   # Sort all specified columns in descending order
   ore.sort(data = IRIS, by = c("Petal.Length", "Sepal.Length"), reverse = TRUE)

   # Sort one of the columns in ascending and another in descending order
   ore.sort(data = IRIS, by = c("-Petal.Length", "Sepal.Length"))

   # Retain just one row per unique value of Petal.Length
   ore.sort(data = IRIS, by = "Petal.Length", unique.key = TRUE)

   # Remove duplicate rows and rows with the same value for Petal.Length
   ore.sort(data = IRIS, by = "Petal.Length", unique.key = TRUE,
            unique.data = TRUE)
}
\keyword{manip}

OHA YOOOO