[R] Compare columns

From: Suhaila Zainudin <suhaila.zainudin_at_gmail.com>
Date: Tue, 13 May 2008 15:08:03 +0800

Dear R-users,

I have the following 2 files;


V1 V2

A      1
A      2
A      3
A      4
B      1
B      4
C      1
C      3
D      4


V1                V2
process1       1
process2       2
process3       3
process4       4

I want to get this output


V1    V2     V3
A      1       process1
A      2       process2
A      3       process3
A      4       process4
B      1       process1
B      4       process4
C      1       process1
C      3       process3
D      4       process4

I want to compare A$V2 with B$V2, if it is the same, then append B$V1 to A.

Any tips are highly appreciated. TQVM!

Suhaila Zainudin
PhD Candidate
Universiti Teknologi Malaysia

	[[alternative HTML version deleted]]

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 13 May 2008 - 07:17:17 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 13 May 2008 - 14:30:38 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive