Skip to content

using assign with lists

2 messages · Mark Kimpel, jim holtman

#
Here is something to try:
+     for (j in 1:2){
+         result[[paste(i, j, sep="|")]] <- rep(i,j)
+     }
+ }
$`1|1`
[1] 1

$`1|2`
[1] 1 1

$`2|1`
[1] 2

$`2|2`
[1] 2 2
On Tue, Oct 7, 2008 at 11:01 AM, Mark Kimpel <mwkimpel at gmail.com> wrote: