[R] How to use the paste function to create an already used variable

"Biedermann, Jürgen" juergen.biedermann at charite.de
Wed Mar 24 12:43:18 CET 2010


Hi there,

I have the following problem

Four data frames exist:

data1
data2
data3
data4

Now I want to write a loop and temporarily store the data1, data2, 
data3, data4 in a variable called data.
I tried the following...

for (i in 1:4) {
Data <- paste("data",i,sep="")
...
..
}


but it doesn't function. I think the problem is the definition of the 
mode of the pasted variable.

Could anyone help me?
Thanks

Greetings
Jürgen



More information about the R-help mailing list