Learn R Programming

replyr (version 0.9.1)

replyr_check_ranks: confirm data has good ranked groups

Description

confirm data has good ranked groups

Usage

replyr_check_ranks(x, GroupColumnName, ValueColumnName, RankColumnName, ...,
  decreasing = FALSE,
  tempNameGenerator = makeTempNameGenerator("replyr_check_ranks"))

Arguments

x

data item to work with

GroupColumnName

column to group by

ValueColumnName

column determining order

RankColumnName

column having proposed rank (function of order)

...

force later arguments to bind by name

decreasing

if true make order decreasing instead of increasing.

tempNameGenerator

temp name generator produced by cdata::makeTempNameGenerator, used to record dplyr::compute() effects.

Value

summary of quality of ranking.

Examples

Run this code
# NOT RUN {
d <- data.frame(Sepal_Length=c(5.8,5.7),Sepal_Width=c(4.0,4.4),
                Species='setosa',rank=c(1,2))
replyr_check_ranks(d,'Species','Sepal_Length','rank',  decreasing=TRUE)

# }

Run the code above in your browser using DataLab