rng_index: Compute RNG index

View source: R/rng_indices.R

rng_indexR Documentation

Compute RNG index

Description

Compute RNG index

Usage

rng_index(x, options, circ = TRUE)

Arguments

x

vector of distinct options of numbers or characters

options

number of available options in sequence

circ

indicate whether to include wrap around from end to the beginning of the sequence when computing response pairs

Details

This function takes a vector x and computes an index that reflects whether the distribution of response pairs in the sequence is uneven given the number of possible options. The scores of this index range between 0 and 1. A score of 1 indicates complete redundancy of one response pair (e.g., '1-2'), whereas a score of 0 indicates an even distribution of response pairs.

Value

RNG index of x

References

Evans, F.J. Monitoring attention deployment by random number generation: An index to measure subjective randomness. Bull. Psychon. Soc. 12, 35–38 (1978). \Sexpr[results=rd]{tools:::Rd_expr_doi("doi:10.3758/BF03209475")}

Examples

rng_index(ginsburg1994, 10)
rng_index(ginsburg1994, 10, circ = FALSE)
rng_index(evans1978[, 1], 10)
rng_index(evans1978[, 2], 10)


TImA97/randfindR documentation built on July 1, 2024, 7:56 p.m.