df2idx {GPIC}R Documentation

Compute GPIC for Multiple Groups

Description

df2idx computes the index based on the number of prizes that several groups obtained and the proportion of prizes in the pool.

Usage

df2idx(df, pool = NULL, type = NULL)

Arguments

df

a data frame with name of groups as the first column and number of prizes as remaining columns.

pool

a vector of prize counts or proportions from the pool.

type

the type of the above-mentioned pool, "n" for counts or "p" for proportions.

Value

df2idx returns a dataframe with name of groups as the first column and GPIC index as the second column.

Examples

df2idx(vnomath)
df2idx(vnomath, c(61, 477, 836, 1007), "n")
df2idx(vnomath, c(0.026, 0.200, 0.351, 0.423), "p")

[Package GPIC version 0.1.0 Index]