[R] how to set the variable name in a loop

Philippe Hupé Philippe.Hupe at curie.fr
Mon Aug 4 15:54:05 CEST 2003


Hello,

I would like to have variables whose name are var1, var2, ... in a loop :

for (i in 1:10)
{
    var(i) <- i # where var(i) is var1, ....
}

Thanks in advance

Philippe




More information about the R-help mailing list