randomvote: Random vote generator

Description Usage Arguments Value Examples

View source: R/rangevoting.R

Description

Generates a matrix of random votes from a uniform distribution and writes a csv file

Usage

1
randomvote(N, candidates, parties)

Arguments

N

"Number of voters"

candidates

"Names of candidates"

parties

"Names of parties associated to candidates"

Value

The data frame containing randomly generated votes

Examples

1
2
3
4
N = 100
candidates = c('A','B','C')
parties = c('right','center','left')
randomvote(N,candidates,parties)

unimi-dse/1a62ddfc documentation built on Feb. 19, 2020, 10:43 p.m.