I have a dataset in which I have different columns. I want to subset the data into two different datasets based on certain conditions. For example:
 x       y        z                      m
001   20.19.0    86    16.30.45, 17.55.65, 18.23.21, 19.30.92
001   19.30.92   42    16.30.45, 17.55.65, 18.23.21, 19.30.92
001   22.42.42   52    16.30.45, 17.55.65, 18.23.21, 19.30.92
002   19.30.92   33    16.30.45, 17.55.65, 18.23.21, 19.30.92
002   21.30.22   65    16.30.45, 17.55.65, 18.23.21, 19.30.92
002   18.23.21   56    16.30.45, 17.55.65, 18.23.21, 19.30.92
002   25.63.54   85    16.30.45, 17.55.65, 18.23.21, 19.30.92
I want to subset base on the values in m, if the value in m is same as the value in y, I want to make another dataset for that. And the remaining to be another dataset. Any help would be appreciated. Thanks 
 
    