In reply to Greg Lee.

You are corerct. The rownames need to be unique. They are just used to look up the corresponding index.
You should loop over the unique values of the row names and use the LOC function to find the corresponding rows. For very large data, a more efficient (but less intuitive) method is to use the UNIQUEBY function to extract the subsets.