VbetterComp: Vector Better Comparison

Description Usage Arguments Value Examples

View source: R/VbetterComp.R

Description

Compare two vectors for equality element by element

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 input vectors are equal. NAs are considered equal.

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)
VbetterComp(ex1, ex2)
VbetterComp(ex1, ex3)
VbetterComp(ex1, ex4)
VbetterComp(ex2, ex3)
VbetterComp(ex2, ex4)
VbetterComp(ex3, ex4)
VbetterComp(ex3, NA)
VbetterComp(ex3, 10)

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