How to name subsets of a dataframe inside a loop