View Full Version : R problem


naivesincerity
01-10-2007, 11:08 AM
OK, so I've looked and looked at the help on R, but I can't find a method for solving this. I have some electoral data, including the Polling District and the Polling Number of each person in the ward(area). This comes in table form, with many headers and then the 'answers' to these headers for each person underneath. Problem is: I then have another data file for the 2006 election and who voted which lists the combinations of polling district and polling number for each person who voted. I now want to match these combinations to the ones in the other data file, so I can add a 'no vote' or 'voted' option to the existing data I have for each person.

I hope my explanation makes sense, and if anyone has any suggestions I'd be eternally grateful.

mishery
01-17-2007, 11:40 AM
Not sure I understood your description of the data but do you need to use cbind or rbind?

abel
10-18-2007, 10:22 PM
you'd better give a data example

ram
05-10-2008, 06:06 AM
Are you trying to do the equivalent of a JOIN in SQL to combine data from two separate tables that have different sets of columns where only a few of the columns are common to the two sets of data?

If so then you need to make use of the merge function to create a single combined table.