[R] how to operate a S4 objecti

Hongbin Zhang hongbinzhang711 at yahoo.com
Wed Feb 3 18:25:50 CET 2010

I have a R object which has a value (see below, e.g., the "0.8341875") I like to extract to put into a simple form, e.g., an array.

how could I do that?

below is the code:

> library(ROCR)
> data(ROCR.simple)
> pred <- prediction( ROCR.simple$predictions, ROCR.simple$labels)
> auc <- performance(pred,"auc")
> auc

An object of class performance

[1] "None"

Slot "y.name":
[1] "Area under the ROC curve"

Slot "alpha.name":
[1] "none"

Slot "x.values":

Slot "y.values":
[1] 0.8341875

Slot "alpha.values":

More information about the R-help mailing list