> I want to compare the T1[,4] with T2[,2] and find the common data that occurs the columns of the table.
means and in your example there is no overlap.
# However, if these were your data:
set.seed(1)
T1<-data.frame(rnorm(10), rnorm(10), sample(letters[1:10]))
T2<-data.frame(rnorm(10), rnorm(10), sample(letters[5:14]))
# then this may be what you want:
T1[T1[,3] %in% T2[,3],]
HTH,
# If these are your data (note that the data frames have column names):
set.seed(1)
T1<-data.frame(rnorm(10), rnorm(10), sample(letters[1:10]))
names(T1)<-c("T1a", "T1b", "T1c")
T2<-data.frame(rnorm(10), sample(letters[5:14]), rnorm(10))
names(T2)<-c("T2a", "T2b", "T2c")
# then this should do what you want
merge(T1, T2, by.x="T1c", by.y="T2b")
# this checks which rows of T1x and T2b contain the same information and
# merges the data frames by giving all columns for these rows