Reputation: 1
Anytime you create a ROC Curve with using pROC::roc() additional Information like the code itself and AUC will be plotted in rmarkdown by default below the plot.
Does anyone know how to print the ROC-Curve without the Call and Data information?
Code
roc(label, score.4ISS,
plot = TRUE,
legacy.axes = TRUE)
Thank you :)
Upvotes: 0
Views: 460
Reputation: 1
The solution to my problem is to assign roc()
to an object. Then it prints ROC without the additional information and without using a additional print()
command.
With Information
roc(label, score.4ISS)
Without Information
my_roc <- roc(label, score.4ISS)
Upvotes: 0
Reputation: 7969
This is because objects are implicitly print
ed in R when they are not assigned to variables. This means that:
roc(label, score.4ISS, ...)
is equivalent to
print(roc(label, score.4ISS, ...))
which prints call and data information. If you assign the ROC curve to an object, it won't be printed, and you can decide what to print yourself, for instance only the AUC (or nothing at all).
my_roc <- roc(label, score.4ISS, plot = TRUE, legacy.axes = TRUE)
print(auc(my_roc))
Upvotes: 0