Skip to contents

Find a loser and their margin of victory

Usage

loserMargin(votes)

Arguments

votes

cleaned ballots

Value

length-2 vector: the index of a losing candidate, and their margin of loss (0 if a tie, NA if no winners)