Hi Jim,

Try either of the following (untested):

sum( x[1, ] < 12 & x[2, ] > 12)
sum(apply(x, 2, function(x)  x[1] < 12 & x[2] > 12))

where "x" is your 2x1000 matrix.

HTH,
Jorge.-


On Tue, Mar 19, 2013 at 12:03 AM, Jim Silverton <> wrote:

> Hi,
> I have a 2 x 10000 matrix of confidence intervals. The first column is the
> lower and the next column is the upper. I want to cont how many times a
> number say 12 lies in the interval. Can anyone assist?
>
> --
> Thanks,
> Jim.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]

