MINI MINI MANI MO

Path : /opt/oracle/product/18c/dbhomeXE/R/library/OREdplyr/doc/man/en/
File Upload :
Current File : //opt/oracle/product/18c/dbhomeXE/R/library/OREdplyr/doc/man/en/select.Rd

%
% Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
%
\name{select}
\alias{rename}
\alias{rename_}
\alias{select}
\alias{select_}
\alias{arrange}
\alias{arrange_}
\alias{filter}
\alias{filter_}
\alias{mutate}
\alias{mutate_}
\alias{transmute}
\alias{transmute_}
\title{Select, Rename, Arrange, Filter, Mutate, or Transmute an 
\code{\link[OREbase:ore.frame-class]{ore.frame}} Object}
\usage{
select(.data, ...)
select_(.data, ..., .dots)

rename(.data, ...)
rename_(.data, ..., .dots)

arrange(.data, ...)
arrange_(.data, ..., .dots)

filter(.data, ...)
filter_(.data, ..., .dots)

mutate(.data, ...)
mutate_(.data, ..., .dots)

transmute(.data, ...)
transmute_(.data, ..., .dots)
}
\arguments{
\item{.data}{An \code{\link[OREbase:ore.frame-class]{ore.frame}} object.}  

\item{...}{Comma separated list of unquoted expressions. See
\code{\link[dplyr]{select}}, \code{\link[dplyr]{rename}},
\code{\link[dplyr]{arrange}}, \code{\link[dplyr]{filter}},
\code{\link[dplyr]{mutate}}, \code{\link[dplyr]{transmute}} for details.}

\item{.dots}{Used by \code{select_}, \code{rename_}, \code{arrange_}, 
\code{filter_}, \code{mutate}, and \code{transmute_} for standard evaluation.
See \code{\link[dplyr]{select_}}, 
\code{\link[dplyr]{rename_}}, \code{\link[dplyr]{arrange_}},
\code{\link[dplyr]{filter_}}, \code{\link[dplyr]{mutate_}}, 
\code{\link[dplyr]{transmute_}} for details.}
}
\value{
An \code{\link[OREbase:ore.frame-class]{ore.frame}} object.
}
\description{
\code{select} Selects only the specified columns.
\code{rename} Renames the specified columns and keeps all columns.
\code{arrange} Orders rows by the specified columns.
\code{filter} Filters rows by matching the specified condition.
\code{mutate} Adds new columns.
\code{transmute} Adds new columns and drops the existing columns.
}
\section{Special functions}{
\code{\link[OREdplyr]{select}} does not support the special functions in \code{\link[dplyr]{select}}. 
}
\examples{
IRIS <- ore.push(iris) # so it prints a little nicer

# select specified columns
names(select(IRIS, Petal.Length))
names(select(IRIS, petal_length = Petal.Length))

# drop specified column
names(select(IRIS, -Petal.Length))

names(select_(IRIS, ~Petal.Length))
names(select_(IRIS, petal_length = quote(Petal.Length)))
names(select_(IRIS, .dots = list("-Petal.Length")))

# rename() keeps all variables
names(rename(IRIS, petal_length = Petal.Length))

# Programming with select
head(select_(IRIS, ~Petal.Length))
head(select_(IRIS, "Petal.Length"))
head(select_(IRIS, quote(-Petal.Length), quote(-Petal.Width)))
head(select_(IRIS, .dots = list(quote(-Petal.Length), quote(-Petal.Width))))

# arrange ore.frame
MTCARS <- ore.push(mtcars)
arrange(MTCARS, cyl, disp)
arrange(MTCARS, desc(disp))

# filter ore.frame
head(filter(MTCARS, cyl == 8))
head(filter(MTCARS, cyl < 6))

# Multiple criteria
head(filter(MTCARS, cyl < 6 & vs == 1))
head(filter(MTCARS, cyl < 6 | vs == 1))

# Multiple arguments are equivalent to and
head(filter(MTCARS, cyl < 6, vs == 1))

head(mutate(MTCARS, displ_l = disp / 61.0237))
head(transmute(MTCARS, displ_l = disp / 61.0237))

head(mutate(MTCARS, cyl = NULL))
head(mutate(MTCARS, cyl = NULL, hp = NULL, displ_l = disp / 61.0237))
}
\seealso{
  \code{\link{slice}}, \code{\link{slice_}},
  \code{\link{summarise}}, \code{\link{summarise_}}
}


OHA YOOOO