Re: [R] counts in quantiles in and from a matrix

2011-10-06 Thread Ben qant
Excellent! Thank you! ben On Wed, Oct 5, 2011 at 9:18 PM, Dennis Murphy wrote: > Hi: > > Here's one way: > > m <- matrix(rpois(100, 8), nrow = 5) > f <- function(x) { >q <- quantile(x, c(0.1, 0.9), na.rm = TRUE) >c(sum(x < q[1]), sum(x > q[2])) >} > > t(apply(m, 1, f)) > > HTH, > De

Re: [R] counts in quantiles in and from a matrix

2011-10-05 Thread Dennis Murphy
Hi: Here's one way: m <- matrix(rpois(100, 8), nrow = 5) f <- function(x) { q <- quantile(x, c(0.1, 0.9), na.rm = TRUE) c(sum(x < q[1]), sum(x > q[2])) } t(apply(m, 1, f)) HTH, Dennis On Wed, Oct 5, 2011 at 8:11 PM, Ben qant wrote: > Hello, > > I'm trying to get the count of value