VbetterGreater: Vector Better Greater Than

Description Usage Arguments Value Examples

View source: R/betterGreater.R

Description

Compare two vectors for element by element to see if the first is greater than the second

Usage

1

Arguments

x

A numeric vector

y

A numeric vector of the same length as x or of length 1 (if y has length 1, it will be repeated to the length of x)

Value

A logical vector where each position indicates whether the values in those positions of the first input vector is greater than that of the second. NAs are considered equal to each other, and less than -Inf.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
ex1 = 6:10
ex2 = (1:5)*2
ex3 = c(1, 10, NA, 6, 10)
ex4 = c(2, NA, NA, 6, 5)
VbetterGreater(ex1, ex2)
VbetterGreater(ex1, ex3)
VbetterGreater(ex1, ex4)
VbetterGreater(ex2, ex3)
VbetterGreater(ex2, ex4)
VbetterGreater(ex3, ex4)
VbetterGreater(ex3, NA)
VbetterGreater(ex3, 10)

debarros/dbTools documentation built on Sept. 18, 2020, 10:51 a.m.