You can use the auc() function of the pROC library to calculate the AUC ROC. This function computes the numeric value of the area under the ROC curve (AUC) with the trapezoidal rule.
In the following example, I have generated random probabilities "preds" and labels "y" to compute AUC.
preds <- runif(n=20)
y <- rbinom(length(preds), prob = preds, size = 1)