extract_index_nd: Extract multiple indices inside bracket(s) as a list

Description Usage Arguments Value Examples

View source: R/utility_functions.R

Description

Extract multiple indices inside bracket(s) as a list

Usage

1
extract_index_nd(x, dim_names = NULL)

Arguments

x

Character vector.

dim_names

Optional character vector of dimension names. If dim_names is not NULL, if the elements of x don't have the same number of indices, the missing indices will be set to NA.

Value

Dataframe with columns:

Examples

1
extract_index_nd(c("sigma", "sigma[1]", "sigma[1, 1]", "sigma[1][2]"))

HuraultMisc documentation built on Sept. 6, 2021, 9:09 a.m.