Learn R Programming

xegaDerivationTrees (version 1.0.0.6)

chooseRulek: 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)

Value

The index of the production rule.

Arguments

riv

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

k

Integer.

Examples

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

Run the code above in your browser using DataLab