chooseRulek {xegaDerivationTrees}R Documentation

Selects k-th production rule index from a vector of production rules.

Description

chooseRulek() selects the k-th production rule index from the vector of production rule indices in the g$PT$LHS$ for a non-terminal symbol.

Usage

chooseRulek(riv, k)

Arguments

riv

Vector of production rules indices for a non-terminal symbol.

k

Integer.

Value

The index of the production rule.

Examples

chooseRulek(c(7, 8, 9), 9)
chooseRulek(as.vector(1), 9)

[Package xegaDerivationTrees version 1.0.0.0 Index]