reg_index: Compute regularity index

View source: R/higher_order_regularity.R

reg_indexR Documentation

Compute regularity index

Description

Compute regularity index

Usage

reg_index(x, options)

Arguments

x

vector of distinct options of numbers or characters

options

number of available options in sequence

Details

This function takes a vector x as a sequence and the number of possible options and computes the regularity of the given sequence. The score ranges from 0 and 1. A score of 0 (which is barely ever obtained) indicates no regularity, whereas a score of 1 indicates maximum regularity (always the same option in the sequence). The regularity index is obtained by identifying the the maximum regularity occurring in the sequence.

Value

regularity index of x

References

Skliar, Osvaldo, Ricardo E. Monge, Guillermo Oviedo, and Víctor Medina. 2009. “Indices of regularity and indices of randomness for m-ary strings.” \Sexpr[results=rd]{tools:::Rd_expr_doi("doi:10.15517/rmta.v16i1.1418")}.

Examples

reg_index(ginsburg1994, 10)
reg_index(evans1978[, 1], 10)
reg_index(evans1978[, 2], 10)


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