Re: [R] Plotting counts vs. intervals for a shingle

2009-05-08 Thread David Winsemius
Took a bit of inspecting, looking at hidden functions, but this seems to do it: library(lattice) a - c(1:10, 5:10) b - cbind(c(0,2.5,4.5,6.5), c(5.5,7.5,9.5,11)) c - shingle(a, b) summary(c, showValues=FALSE) apply(as.matrix(levels(c)), 1, function(x) length(c[ c= x[[1]][1] c =

Re: [R] Plotting counts vs. intervals for a shingle

2009-05-08 Thread Deepayan Sarkar
On Fri, May 8, 2009 at 1:30 PM, David Winsemius dwinsem...@comcast.net wrote: Took a bit of inspecting, looking at hidden functions, but this seems to do it: library(lattice)  a - c(1:10, 5:10)  b - cbind(c(0,2.5,4.5,6.5), c(5.5,7.5,9.5,11))  c - shingle(a, b)  summary(c,

Re: [R] Plotting counts vs. intervals for a shingle

2009-05-08 Thread David Winsemius
On May 8, 2009, at 4:55 PM, Deepayan Sarkar wrote: On Fri, May 8, 2009 at 1:30 PM, David Winsemius dwinsem...@comcast.net wrote: Took a bit of inspecting, looking at hidden functions, but this seems to do it: library(lattice) a - c(1:10, 5:10) b - cbind(c(0,2.5,4.5,6.5),

[R] Plotting counts vs. intervals for a shingle

2009-05-07 Thread Walcerz, Douglas (APG)
Hello! Suppose I have a set of values: a - c(1:10, 5:10) Suppose I also have a set of intervals: b - cbind(c(0,2.5,4.5,6.5), c(5.5,7.5,9.5,11)) I can create a shingle that counts how many values are in each interval: c - shingle(a, b) I can display the shingle to see the counts: summary(c,