Skip to content
Prev 4482 / 29559 Next

merge 2 txt file

Hi Ale,

When you say merge, do you mean you want to append one onto the other, or you 
really want to merge elements that have common x and y values?

If it's the first case, then I'd probably read both in with read.table() and 
then rbind them:
dat1 <- read.table("file1.txt")
dat2 <- read.table("file2.txt")
dat3 <- rbind(dat1,dat2)

If it's the second, I can't help much. Did you try it? Did that work? If you 
can't tell (if, say, the text files are really big) then make two small test 
files and try that.

Ashton
On Tuesday 04 November 2008 06:52:20 pm Alessandro wrote: