compare {mosaicCore}R 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)

[Package mosaicCore version 0.9.4.0 Index]