calc_rice_index: Calculating the Rice Index

Description Usage Arguments Examples

View source: R/rice_index.R

Description

This function allows you to easily calculate the Rice Index for a given vote.

Usage

1
calc_rice_index(votecounts)

Arguments

votecounts

A vector containing the number of votes for yes and no in any given order. If a vector of length 1 is given, it is assumed that all votes were casted for the same option.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
Examples of using calc_rice_index():

test_rice <- c(15,2)

test_rice_shorter <- c(15)

test_rice_longer <- c(15,2,5)

calc_rice_index(test_rice)

calc_rice_index(test_rice_shorter)

calc_rice_index(test_rice_longer)

RStelzle/rstfuns documentation built on Oct. 3, 2020, 4:06 p.m.