Re: [R] Combine two tables by row with different columns

2012-05-09 Thread Rui Barradas
Hello, Try this T1 <- read.table(text=" X Y Z XX A 1 5 9 13 B 2 6 10 14 C 3 7 11 15 D 4 8 12 16 ", header=TRUE) T2 <- read.table(text=" X Y XX a 1 4 7 b 2 5 8 c 3 6 9 ", header=TRUE) cT <- read.table(text=" X Y XX A 1 5 13 B 2 6 14 C 3 7 15 D 4 8 16 A1 1 4 7 B1 2 5 8 C1 3 6

Re: [R] Combine two tables by row with different columns

2012-05-09 Thread R. Michael Weylandt
T2 >   X Y XX > A1 1 4  7 > B1 2 5  8 > C1 3 6  9 >> T1T2<-cbind(T1,T2) > Error in cbind(T1, T2) : >  number of rows of matrices must match (see arg 2) > > I want to have the following table (probably you noticed that column Z in > Table 1 is not in Table 2)

Re: [R] Combine two tables by row with different columns

2012-05-09 Thread Kristi Glover
ample, I have very big files (~1700 columns, and ~2500 rows) Kristi > CC: r-help@r-project.org > From: dwinsem...@comcast.net > To: kristi.glo...@hotmail.com > Subject: Re: [R] Combine two tables by row with different columns > Date: Wed, 9 May 2012 21:47:48 -0400 > >

Re: [R] Combine two tables by row with different columns

2012-05-09 Thread David Winsemius
On May 9, 2012, at 9:21 PM, Kristi Glover wrote: Hi R user, I could not combine two tables. Would any one help me on how I can combine with following example tables? You do realize that tables in R are not dataframes. They are a type of matrix. T1 X Y Z XX A 1 5 9 13 B 2 6 10 14

[R] Combine two tables by row with different columns

2012-05-09 Thread Kristi Glover
Hi R user, I could not combine two tables. Would any one help me on how I can combine with following example tables? > T1 X Y Z XX A 1 5 9 13 B 2 6 10 14 C 3 7 11 15 D 4 8 12 16 > T2 X Y XX a 1 4 7 b 2 5 8 c 3 6 9 I want to get the following table cT X Y XX A 1 5 13 B 2 6 14