ROC curves are used to measure the performance of a binary classifier. The area under the curve roughly tells us the probability of correctly classifying an instance.

There are many packages in CRAN for calculating ROC curves, for instance, ROCR or pRoc.  Here goes a version for the minimalist:

roc <- function(y_test, y_preds){
y_test <- y_test[order(y_preds, decreasing = T)]
tpr=cumsum(y_test)/sum(y_test)) )

Here, y_test are the labels on the test or holdout set, and y_preds the predictions from your model. How can you use it? Quick example in base R:

plot(roc(y_test,y_preds), xlim=c(0,1), ylim=c(0,1))

If you are minimalist but prefer ggplot2, then you can do the following: (Note that we first stored the data frame from the roc curve in roc_df).

roc_df <- roc(y_test,y_preds)
ggplot(roc_df, aes(x=fpr,y=tpr))+geom_point(color="red")

Here is an example of the output (you need to use your data!):