I need to use a loop (for or while) and combine it with a if function to create a sub-data frame of an existing data frame. I have a data frame, which consists of 10 columns and