This turns out to be quite easy...
Given:
> head(data)
inst a1 a2 a3 a4 a5 a6 a7 a8 escore
11 1 1 0 1 1 0 0 0 4
21 0 1 0 0 0 0 0 0 1
31 1 0 0 1 0 1 1 1 2
41 0 1 0 0 0 1 0 0 1
You can use grep on the names of the columns in d
This turns out to be quite easy...
Given:
> head(data)
inst a1 a2 a3 a4 a5 a6 a7 a8 escore
11 1 1 0 1 1 0 0 0 4
21 0 1 0 0 0 0 0 0 1
31 1 0 0 1 0 1 1 1 2
41 0 1 0 0 0 1 0 0 1
You can use grep on the names of the columns in d
So, to complete Bill Dunlap's thought and combine it with your desired goal,
I believe this gets you what you wanted...
start.time <- as.POSIXct("2009-04-10 12:00:00")
event.times <- start.time + c(1,2,3,61,62,122,135,200)
event.values <- rnorm(length(event.times))
et <- data.frame(event.times,ev
Responding to question 1... it seems the demo assumes you already have a
plot window open.
library(ROCR)
plot(1,1)
demo(ROCR)
seems to work.
For question 2, my environment produces the expected results... plot doesn't
generate an error:
* R 2.8.1 GUI 1.27 Tiger build 32-bit (5301)
*
4 matches
Mail list logo