Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

print

Print a ROC curve object


Description

This function prints a ROC curve, AUC or CI object and return it invisibly.

Usage

## S3 method for class 'roc'
print(x, digits=max(3, getOption("digits") - 3), call=TRUE, ...)
## S3 method for class 'multiclass.roc'
print(x, digits=max(3, getOption("digits") -
  3), call=TRUE, ...) 
## S3 method for class 'mv.multiclass.roc'
print(x, digits=max(3, getOption("digits") -
  3), call=TRUE, ...) 
## S3 method for class 'smooth.roc'
print(x, digits=max(3, getOption("digits") - 3),
call=TRUE, ...)
## S3 method for class 'auc'
print(x, digits=max(3, getOption("digits") - 3), ...)
## S3 method for class 'multiclass.auc'
print(x, digits=max(3, getOption("digits") - 3), ...)
## S3 method for class 'ci.auc'
print(x, digits=max(3, getOption("digits") - 3), ...)
## S3 method for class 'ci.thresholds'
print(x, digits=max(3, getOption("digits") - 3), ...)
## S3 method for class 'ci.se'
print(x, digits=max(3, getOption("digits") - 3), ...)
## S3 method for class 'ci.sp'
print(x, digits=max(3, getOption("digits") - 3), ...)
## S3 method for class 'ci.coords'
print(x, digits=max(3, getOption("digits") - 3), ...)

Arguments

x

a roc, auc or ci object, from the roc, auc or ci functions respectively.

call

if the call is printed.

digits

the number of significant figures to print. See signif for more details.

...

further arguments passed to or from other methods. In particular, print.roc calls print.auc and the print.ci variants internally, and a digits argument is propagated. Not used in print.auc and print.ci variants.

Value

These functions return the object they were passed invisibly.

See Also

Examples

data(aSAH)

# Print a roc object:
rocobj <- roc(aSAH$outcome, aSAH$s100b)
print(rocobj)

# Print a smoothed roc object
print(smooth(rocobj))

# implicit printing
 roc(aSAH$outcome, aSAH$s100b)

# Print an auc and a ci object, from the ROC object or calling
# the dedicated function:
print(rocobj$auc)
print(ci(rocobj))

pROC

Display and Analyze ROC Curves

v1.17.0.1
GPL (>= 3)
Authors
Xavier Robin [cre, aut] (<https://orcid.org/0000-0002-6813-3200>), Natacha Turck [aut], Alexandre Hainard [aut], Natalia Tiberti [aut], Frédérique Lisacek [aut], Jean-Charles Sanchez [aut], Markus Müller [aut], Stefan Siegert [ctb] (Fast DeLong code), Matthias Doering [ctb] (Hand & Till Multiclass)
Initial release
2021-01-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.