Re: [R] sub-sample my data in R from two different tables

2015-10-19 Thread jim holtman
I all you are doing is matching a single column and then extracting rows that match, then the '%in%' operator should work: indx <- reg6idGlobal$alloc_key %in% req6id_subsample_key$alloc_key my_subset <- reg6idGlobal[indx, ] Jim Holtman Data Munger Guru What is the problem that you are trying t

Re: [R] sub-sample my data in R from two different tables

2015-10-19 Thread Michael Dewey
Dear John I suspect ?merge will help here. You would need to tidy up afterwards (or before) if you do not want the other columns in your dataframe of keys to be included in the result. On 19/10/2015 11:19, John Wasige wrote: ​Hi, I need help on how to sub-sample my data in R. I have two tabl

[R] sub-sample my data in R from two different tables

2015-10-19 Thread John Wasige
​Hi, I need help on how to sub-sample my data in R. I have two tables, one table with global dataset and another with a list of codes for sub sample the global dataset. ​ Download link ​ https://www.wetransfer.com/downloads/a53aa3f722b2d2887b60b09239f7c4e620151018152100/ad852e ​ ​All these tabl