Re: [R] Extracting slots from ROCR prediction objects

2008-05-22 Thread Tobias Sing
Hi Stacey, ROCR uses S4 classes. The elements are accessed using "@" instead of "$". You can find an example on slide 12 of the following slide deck: http://rocr.bioinf.mpi-sb.mpg.de/ROCR_Talk_Tobias_Sing.ppt Also have a look at the R code that appears when you type "demo(ROCR)" in R which contai

Re: [R] Extracting slots from ROCR prediction objects

2008-05-22 Thread Jorge Ivan Velez
Hi Stacey, Try this: library(ROCR) data(ROCR.simple) pred <- prediction(ROCR.simple$predictions,ROCR.simple$labels) perf <- performance(pred,"sens","spec") cuts <- unlist(slot(perf,"alpha.values")) cuts HTH, Jorge On Thu, May 22, 2008 at 2:08 PM, Stacey Burrows <[EMAIL PROTECTED]> wrote: > Hi

[R] Extracting slots from ROCR prediction objects

2008-05-22 Thread Stacey Burrows
Hi, I have an object from the prediction function from the ROCR package and I would like to extract one of the slots from the object, for example the cutoffs slot. However the usual techniques ($, [["name"]]) of subsetting don't work. How can I assess the lists in the slots? Here is an example