Skip to contents

Find a winner and their margin of victory

Usage

winnerMargin(votes)

Arguments

votes

cleaned ballots

Value

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