Generating Names

Description

Generating Names

Usage

addNames(object, prefix = NULL)

Arguments

object
object on which to add names
prefix
prefix to use for each name

Value

an object of the same class as object

Examples


l <- list(1,2,3,4)
addNames(l)
## $`1`
## [1] 1
## 
## $`2`
## [1] 2
## 
## $`3`
## [1] 3
## 
## $`4`
## [1] 4
addNames( setNames(l, letters[1:length(l)]) )
## $a
## [1] 1
## 
## $b
## [1] 2
## 
## $c
## [1] 3
## 
## $d
## [1] 4