[R] Combined variable names
Tobias Muhlhofer
t.muhlhofer at lse.ac.uk
Tue Nov 30 23:42:10 CET 2004
I am trying to define a large number of variables through a loop construct.
I have my loop variable i being cycled through 1:100 and I would like
the variables produced by this to be called
vi (i.e. v1 v2 v3 etc)
so, for example I'm going:
for(i in 1:100) {
<blank> <- a[i:N] # or whatever else you want to put on the right side
}
where N is previously defined.
What goes in for <blank>?
Thanks,
Toby
More information about the R-help
mailing list