tieRobustRankLessOrEqual: Find top (or bottom) n values with possible ties

Description Usage Arguments Value Examples

Description

A helper function – tie-robust-rank cut-off

Usage

1

Arguments

numvec

A numeric vector

nth

A single number (a constant i.e. vector of length 1)

Value

A logical vector of the same length as numvec

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
x <- c(1,1,2,2,2,3,3)
p <- function(d) # Just for clarity
    print(`colnames<-`(d, paste0(colnames(d),' ')),
          right=FALSE,
          row.names=FALSE)
p(data.frame(x,
             rank(x) <= 2,
             tieRobustRankLessOrEqual(x, 2),
             check.names = FALSE))
#  x  rank(x) <= 2  tieRobustRankLessOrEqual(x, 2)
#  1   TRUE          TRUE
#  1   TRUE          TRUE
#  2  FALSE          TRUE
#  2  FALSE          TRUE
#  2  FALSE          TRUE
#  3  FALSE         FALSE
#  3  FALSE         FALSE

alekrutkowski/wiod.diagrammer documentation built on May 20, 2019, 8:47 a.m.