ls2categvec: ls2categvec

View source: R/CodeAndRoll2.R

ls2categvecR Documentation

ls2categvec

Description

Converts a list to a vector repeating list-element names, while vector names are the list elements.

Usage

ls2categvec(your_list)

Arguments

your_list

A list.

Value

A vector with the same elements as your_list, but with the names of the list elements repeated as many times as the number of elements in each list element.

Examples

ls2categvec(list(a = 1, b = 2, c = 3))

vertesy/CodeAndRoll2 documentation built on Nov. 20, 2024, 5:23 a.m.