## A simple example with data in package ROCR
library(ROCR)
data(ROCR.simple)
pred <- prediction(ROCR.simple$predictions,ROCR.simple$labels)
perf <- performance(pred,"prec","rec")
## The plot obtained with the standard ROCR functions
## Not run:
# plot(perf)
# ## End(Not run)
## Now our Precision/Recall curve avoiding the saw-tooth effect
## Not run:
# PRcurve(ROCR.simple$predictions,ROCR.simple$labels)
# ## End(Not run)
Run the code above in your browser using DataLab