Skip to content
Prev 311288 / 398506 Next

generated list element names

How can I create lists with element names created on the fly?

--8<---------------cut here---------------start------------->8---
$foo
[1] 10
$foo
[1] 10
Error: unexpected '=' in "list (paste("f","oo",sep="") ="
--8<---------------cut here---------------end--------------->8---

I understand that tags in list() are not evaluated, but is there a more
elegant way than

--8<---------------cut here---------------start------------->8---
$foo
[1] 10
--8<---------------cut here---------------end--------------->8---

thanks!