nameMe: Name a vector on-the-fly

View source: R/nameMe.R

nameMeR Documentation

Name a vector on-the-fly

Description

This function gets a vector and a name(s), and returns the vector with the names assigned.

Usage

nameMe(x, names)

Arguments

x

A vector (of any type)

names

A vector of names, with the same length as x

Details

This function is useful when one uses c() to concatenate complex arguments, but does not want to assign these to temporary objects in order to name them.

Value

Just x with the names assigned.

Examples

c(one=10, nameMe(c(3.14, 5), c("two", "three")))


thlytras/Rivets documentation built on April 16, 2024, 5:43 a.m.