% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/deprec-ranks.R
\name{ranks}
\alias{ranks}
\title{(Deprecated) Rank-transformation of single-case data files}
\usage{
ranks(data, var, grand = TRUE, ...)
}
\arguments{
\item{data}{A single-case data frame. See \code{\link[=scdf]{scdf()}} to learn about this
format.}

\item{var}{A string or string vector with the names of the variables to be
ranked.}

\item{grand}{If TRUE, ranks will be calculated across all cases. If FALSE
ranks are calculated within each case.}

\item{...}{Additional parameters passed to the \code{\link{rank}} function.}
}
\value{
An \code{scdf} object where the values of the variable(s) are
replaced with ranks.
}
\description{
\emph{This function is superseded by the more versatile
\code{\link{transform.scdf}} function.}
}
\examples{
# The ranks function is deprecated. Please use transform:
res1 <- ranks(Huber2014, var = "compliance")
res2 <- transform(Huber2014, across_cases(compliance = rank(compliance, na.last="keep")))
identical(res1, res2)

res1 <- ranks(Huber2014, var = "compliance", grand = FALSE)
res2 <- transform(Huber2014, compliance = rank(compliance, na.last="keep"))
identical(res1, res2)
}
\seealso{
Other data manipulation functions: 
\code{\link{add_l2}()},
\code{\link{as.data.frame.scdf}()},
\code{\link{as_scdf}()},
\code{\link{batch_apply}()},
\code{\link{fill_missing}()},
\code{\link{moving_median}()},
\code{\link{print.sc_outlier}()},
\code{\link{rescale}()},
\code{\link{scdf}()},
\code{\link{select_cases}()},
\code{\link{set_vars}()},
\code{\link{shift}()},
\code{\link{smooth_cases}()},
\code{\link{standardize}()},
\code{\link{truncate_phase}()}
}
\author{
Juergen Wilbert
}
\concept{data manipulation functions}
\keyword{internal}
