Vote helpers are functions that take as input an object of class Voters
and additional information regarding drift, vibration and the number of iterations to vote on to
- reshape the position matrix and role vector to the correct size, resembling the number of iterations
- add the specified drift to the voter positions and (calculate and) add the vibration
- for voters with random positions, determine the actual positions, per run
1 2 3 4 5 6 7 8 9 10 | create_voter_array(voters, drift, vibration, iter, ...)
## S4 method for signature 'Voters'
create_voter_array(voters, drift, vibration, iter, ...)
create_role_array(voters, iter, ...)
## S4 method for signature 'Voters'
create_role_array(voters, iter, no_random_veto,
no_random_normal, ...)
|
voters |
A |
drift |
A vector or matrix of drift values. If vector, then the drift is constant per iteration and the vector must be of length |
vibration |
A function with first parameter |
iter |
The number of iterations. |
... |
Additional keyword arguments. |
no_random_veto |
Indicator for whether voters with random position can take on the Veto role. |
no_random_normal |
Indicator for whether random voters can take on the Normal role. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.