A short function to convert rank orders into preferences. Ranked Choice Voting is used by many small societies to choose officers.
A more elegant approach may be found in the vote package.
For more information, see the help pages for vote or "for a description of the single transferable vote system see https://imstat.org/elections/single-transferable-voting-system/.
" from the vote help page.