Convert your datasets into xts objects and then do a cbind ordering by the column you want. Do a ?cbind.
HTH Raghu On Fri, Jul 30, 2010 at 10:33 AM, Lily_stats [via R] < ml-node+2307770-1033893256-309...@n4.nabble.com<ml-node%2b2307770-1033893256-309...@n4.nabble.com> > wrote: > Hi, > > I am very new to R so these questions may seem simple! > > I have a huge 2 sets of data(matrix 5x20000++) in the following formats , > for example "data.txt" and "data2.txt": > > Date Time X Y > 03/03/1983 20:00 0.1 990 > > I would like to recreate a new matrix which filters through "data.txt" and > "data2.txt" to get something as below : > > Date Time X_data1 X_data2 > Y_data1 Y_data2 > 31/12/2000 12:00 2.2 5 > 0 990 > > So I basically need : > 1) When Date AND Time from data1.txt and data2.txt match, list the > corresponding X and Y values (X_data1,X_data2,Y_data1,Y_data2) > > Thank you in advance, and I hope I have been clear enough in my message > > ------------------------------ > View message @ > http://r.789695.n4.nabble.com/Data-Handling-tp2307770p2307770.html > To start a new topic under R help, email > ml-node+789696-608741344-309...@n4.nabble.com<ml-node%2b789696-608741344-309...@n4.nabble.com> > To unsubscribe from R help, click here< (link removed) >. > > > -- 'Raghu' -- View this message in context: http://r.789695.n4.nabble.com/Data-Handling-tp2307770p2307836.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.