names which are used within loops. I will explain this with a simple example:
Immagine I have a huge series of variables, each one taken two times, say
x1 x2 y1 y2 z1 z2.....
Now, immagine that I want to compute a variable from the difference of
each couple, say dx=x1-x2, dy=y1-y2, dz=z1-z2...
In Stata, for example, this wold be straightforward:
foreach i in x y z {
gen d`i'= `i'1-`i'2
}
With R I tried to use paste( ) but I found that it applies to objects,
not to variable names.
best regards,
Umberto
______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
