Re: [R] re stricting points in a data frame

2008-01-31 Thread Petr PIKAL
Maybe what is seeked is rather between <- function (x,y) x>=range(y)[1] & x<=range(y)[2] A[between(A[,1], x1)& between(A[,2], x2),] Regards Petr [EMAIL PROTECTED] [EMAIL PROTECTED] napsal dne 30.01.2008 18:14:55: > Let's A = expand.grid(xk1=xk1,xk2=xk2) > > B = A[A[,1] %in% x1 & A[,2] %in% x

Re: [R] re stricting points in a data frame

2008-01-30 Thread Attiglah, Mama
Let's A = expand.grid(xk1=xk1,xk2=xk2) B = A[A[,1] %in% x1 & A[,2] %in% x2, ] Should in principle produce the desired result. Mama - Mama Attiglah, PhD Advanced Research Center Quantitative Research Analyst State Street Bank +44(0)20 7698 6290 (Direct Line) +44 (0)207 004 2968 (Direct Fax