R functions for generating ROC AUC and other metrics for subsets of data