capture_names: Get the names of environments, lists and vectors.

Description Usage Arguments Value

View source: R/capture_names.R

Description

A helper function created to simplify the code in other functions, primarily where an argument either can be given as an environment or as a list/vector – and where it's required to use the names in some way or another.

Usage

1

Arguments

obj

The environment, list or vector under investigation.

Value

A vector containing the names from obj. Note that this can have length zero, i.e. being character(0) – which happens when used upon an empty environment or on named, but empty, lists and vectors. NULL will be returned when used upon a list or vector without a names attributes.


LAJordanger/leanRcoding documentation built on Feb. 27, 2020, 4:42 p.m.