Re: [R] Matching Up Values

2008-07-20 Thread Steve Murray
Hmm, I'm having a fair few difficulties using 'merge' now. I managed to get it to work successfully before, but in this case I'm trying to shorten (as oppose to lengthen as before) a file in relation to a 'master' file. These are the commands I've been using, followed by the dimensions of the

Re: [R] Matching Up Values

2008-07-18 Thread Steve Murray
I think the approach is ok. I'm having difficulties though...! I've managed to get 'merge' working (using the 'all' function as suggested), but for some strange reason, the output file produces 12 extra rows! So now the shorter file isn't the same length as the 'master' file, it's now longer!

[R] Matching Up Values

2008-07-17 Thread Steve Murray
Dear all, I have two files, both of similar formats. In column 1 are Latitude values (real numbers, e.g. -179.25), column 2 has Longitude values (also real numbers) and in one of the files, column 3 has Population Density values (integers); there is no column 3 in the other file. However,

Re: [R] Matching Up Values

2008-07-17 Thread Rolf Turner
On 18/07/2008, at 8:42 AM, Steve Murray wrote: snip So what I'm looking to do is, 'pad out' the shorter file, by adding in the rows with those that are 'missing' from the longer file (ie. if a particular coordinate isn't present in the shorter file but is in the 'longer/master'