Displaying 1 result from an estimated 1 matches for "newvariable_1".
Did you mean:
newvariable_2
2011 Jun 13
2
use variable value to create new variable name
Hi,
Is it possible (and how) to use a variable value to create a name of a new R
variable? I want to do something like this:
for (i in 1:3) {
newvarialbe_#i# = somedata
}
where #i# is a value stored by i. In the first loop, there will be
newvariable_1, in second newvariable_2 and so on.
Thanks in advance,
Maciek
[[alternative HTML version deleted]]