title: Matching by market cap two large data frames
body: <p>I have a tricky problem in managing the dataset for my thesis (which is about the implied volatility surface of REITs options). I am supposed to find the names of the companies (with options listed on them) ,that are not REITs, whose market caps is similar to the one of a list of REITs I already have. I have a very large dataset with daily obs (from 2005 to 2014) for the market caps of 71 REITs and the same dataset for all non-REITs names listed in US (already cleaned for extreme values of market cap). I've been told that I should perform a many-to-many match by year, get the differences in market caps (REITs - non REITs) and eliminate everything that's outside a +/- 10% tolerance band. I'm really a beginner both in R and Matlab and I have no idea on how I should do this match. Does anyone have any idea?
  Thanks</p>