Learn R Programming

trimmer (version 0.8.1)

convert_idx_to_name: Convert Numbered Index to Named Index of List Element

Description

Convert Numbered Index to Named Index of List Element

Usage

convert_idx_to_name(vec, obj)

Arguments

vec

numeric numeric index of list element.

obj

list

Value

character named index of list element.

Examples

Run this code
# NOT RUN {
d <- list(a = list(b = list(c = 3, d = 5), e = c(2,4)))
num_idx <- c(1,1,2)
convert_idx_to_name(num_idx, d)
# }

Run the code above in your browser using DataLab