compare: Campare two numeric vectors

View source: R/compare.R

compareR Documentation

Campare two numeric vectors

Description

This wrapper around sign() provides a more intuitive labeling.

Usage

compare(x, y, verbose = FALSE)

Arguments

x, y

numeric verctors to be compared item by item

verbose

a logical indicating whether verbose labeling is desired

Value

a factor with three levels (<, =, and > if verbose is FALSE)

Examples

tally( ~ compare(mcs, pcs), data = mosaicData::HELPrct)
tally( ~ compare(mcs, pcs, verbose = TRUE), data = mosaicData::HELPrct)
tally( ~ compare(sexrisk, drugrisk), data = mosaicData::HELPrct)

mosaicCore documentation built on Nov. 5, 2023, 9:06 a.m.