setMissingNames: Set the Missing Names in an Object

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/nlist.R

Description

This function is an enhanced version of setNames in the sense that the elements that already have names are not renamed.

Usage

1
setMissingNames(object, nm)

Arguments

object

an object for which a names attribute will be meaningful

nm

a character vector of names to assign to the object

Value

An object of the same sort as object with the new names assigned to the unnamed elements.

Author(s)

Hadley Wickham, Kirill M<c3><bc>ller

References

http://stackoverflow.com/a/5043280/946850

See Also

setNames

Examples

1
setMissingNames(c(a=1, b=2, 3), letters[2:4])

kimisc documentation built on May 2, 2019, 6:09 p.m.