50% off: Unlimited data and AI learning.
State of Data and AI Literacy Report 2025

SafeVote (version 1.0.1)

winnerMargin: Find a winner and their margin of victory

Description

Find a winner and their margin of victory

Usage

winnerMargin(votes)

Value

length-2 vector: the index of a winning candidate, and their margin of victory (0 if a tie, NA if no losers)

Arguments

votes

cleaned ballots