I do have two table. I want to extract a single colum from the second table and past it into the first table. The problem is that not all rows of the colum of the second table should be copied but that only those are copied whose first colum matches with the first table
read.table("table1")->c
read.table("table2")->d
d[,1] %in% c[,1] ->f
does only lead to a vector with TRUE and FALSE - but I would need the row number, then having such a vector with the row numbers of the matching elements, I would need to extract exactly these rows from table d fourth column
d[,4]->g
g[vector with numbers,]->g1
is there an easy possibility?