
Hi All,

                I have a data frame, whose colnames like "A.x, B.x, C.x, A.y, B.y, C.y". There could be many columns like this pattern. I want to compare data in columns A.x with A.y, B.x with B.y and C.x with C.y etc.
Suppose my data frame is d,
names(d) = c("A.x", "B.x", "C.x", "A.y", "B.y", "C.y");

If I want to
D1 = data.frame(d$A.x, d$A.y);
D2 = data.frame(d$B.x, d$B.y); etc. or do other operation for each pair,


What is elegant way to do it rather than use a loop?

Thanks.

HXD


	[[alternative HTML version deleted]]

