powered by
vec2idx computes the index based on the number of prizes that a group obtained and the proportion of prizes in the pool.
vec2idx
vec2idx(x, pool, type)
a vector of prize counts from a single group.
a vector of prize counts or proportions from the pool.
the type of the above-mentioned pool, "n" for counts or "p" for proportions.
pool
vec2idx returns a numeric that is the GPIC index.
# NOT RUN { vec2idx(c(3, 19, 34, 22), c(61, 477, 836, 1007), "n") vec2idx(c(3, 19, 34, 22), c(0.026, 0.200, 0.351, 0.423), "p") # }
Run the code above in your browser using DataLab