It works.
Thank you so much.
Abou
==========================
AbouEl-Makarim Aboueissa, Ph.D.
Assistant Professor of Statistics
Department of Mathematics & Statistics
University of Southern Maine
96 Falmouth Street
P.O. Box 9300
Portland, ME 04104-9300
Tel: (207) 228-8389
Fax: (207) 780-5607
Email: aaboueissa at usm.maine.edu
aboueiss at yahoo.com
Office: 301C Payson Smith
T.K. <taekyunk at gmail.com> 3/3/2008 3:25 PM >>>
I guess you are looking for the number of rows satisfying the following
condition.
Assuming that you have a cutoff k = 1, 2, 5, 10, 15
1) x[i,1] < k regardless of the value of x[i,2], OR
2) x[i,1] == k and x[i,2] == 1
Here is my take on this problem. It is not elegant but it seems to do the
job.
## Use the function
sapply(c(1, 2, 5, 10, 15), find.n)
[1] 2 11 33 43 46
======================================
T.K. (Tae-kyun) Kim
Ph.D. student
Department of Marketing
Marshall School of Business
University of Southern California
======================================