Learn R Programming

mosaicCore (version 0.9.0)

compare: Campare two numeric vectors

Description

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

Usage

compare(x, y, verbose = FALSE)

Value

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

Arguments

x, y

numeric verctors to be compared item by item

verbose

a logical indicating whether verbose labeling is desired

Examples

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

Run the code above in your browser using DataLab