I got a big data table X
(504x9) and a smaller data frame bzShare
(323X4) both with the columns top.sector
and sizeClass
. Now i want to join a value from bzShare
into X
so that the dimensions of X
are (504x10). An inner join selects only rows with matching keys in both x and y if I am right but I always get zero rows :-(
> dim(X)
[1] 504 9
> names(X)
[1] "sizeClass" "top.sector" "year" "period" "somevar"
[6] "sumTest" "sumTestTotal" "AN" "share"
> names(bzShare)
[1] "top.sector" "sizeClass" "bzShare"
> join(X,bzShare,type="inner",by=c("top.sector","sizeClass"))
NULL data table
Why didn't get this a (504x10) data frame?