Skip to content
Prev 311299 / 398506 Next

generated list element names

On Nov 19, 2012, at 10:46 AM, William Dunlap wrote:

            
I'm guessing that Sam wanted to see:

myList <- list()
myList[[ paste0("fo", "o") ]] <- 10

 > myList
$foo
[1] 10

Or:

structure(list(10), names=paste0("fo", "o") )
$foo
[1] 10

(At least that's my guess from the context of the question.)
David Winsemius, MD
Alameda, CA, USA