compare: Campare two numeric vectors

Description Usage Arguments Value Examples

View source: R/compare.R

Description

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

Usage

1
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

1
2
3
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 Jan. 16, 2021, 5:32 p.m.