# Construct artificial probability scores and true class labels
score.ex <- runif(1000, 0, 1)
class.ex <- unlist(lapply(score.ex, function(x){rbinom(1,1,x)}))
# Make prediction object (ROCR package)
pred.ex <- prediction(score.ex, class.ex)
# Get convex ROC info
empRocInfo(pred.ex)
Run the code above in your browser using DataLab