Learn R Programming

FastUtils (version 0.2.1)

val: Get Value from Enumerated Element by Index

Description

This function extracts the value from an enumerated element by the given index.

Usage

val(elem, index)

Value

The value at the specified index in the enumerated element.

Arguments

elem

An enumerated element.

index

The index of the value to extract.

See Also

enumerateit()

Examples

Run this code
# Extract value from an enumerated element by index
elem <- list(1, "a", "b")
val(elem, 2)

Run the code above in your browser using DataLab