calcComparison: Compares two numeric vectors by passing comparison in a...

Description Usage Arguments Value Examples

View source: R/calcComparison.R

Description

Compares two numeric vectors by passing comparison in a string

Usage

1
calcComparison(v_n_1, v_n_2, s_comp)

Arguments

v_n_1

a numeric vector. Length must be the same as the length of v_n_2 or length 1.

v_n_2

a numeric vector. Length must be the same as the length of v_n_1 or length 1.

s_comp

type of comparison must be one of the following "==","!=", "<=", ">=", "<" ,">".

Value

a logical vector of the comparison of v_n_1 and v_n_2.

Examples

1
2
3
4
5
v_n_1 <- rep(0,3)
v_n_2 <- c(0, -1.1, 1.1)
calcComparison( v_n_1, v_n_2, "==")
calcComparison( v_n_1, v_n_2, ">")
calcComparison( v_n_1, v_n_2, ">=")

AlejandroKantor/akmisc documentation built on May 5, 2019, 3:51 a.m.