subsetting or creating a data frame on two columns and values