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
rice_index(temp_freq)

Arguments

temp_freq

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
rice_index()

test_rice <- c(15,2)
test_rice_shorter <- c(15)
test_rice_longer <- c(15,2,5)

rice_index(test_rice)
rice_index(test_rice_shorter)
rice_index(test_rice_longer)

RStelzle/PolSciFunctionsR.RSt documentation built on Dec. 16, 2019, 12:31 a.m.