comparison: Comparing two numeric vectors

View source: R/Utils.R

comparisonR Documentation

Comparing two numeric vectors

Description

This function compares two numeric vectors. The vector whose all elements smaller or equal to all elements of the other one where at least one element is smaller, will be the winner.

Usage

comparison(x, y)

Arguments

x, y

Numeric vectors.

Details

The function returns the index of the winner, meaning 1 or 2, corresponding to parameters 'x' and 'y', respectively. If no vector meets the condition, 0 will be returned.

Value

An integer, among 0, 1, 2.


RSD documentation built on June 21, 2025, 5:09 p.m.