  I'm a newbie, so please forgive me:

I have a data frame that includes two long columns of x and y coordinate
values thusly:
...   ...   ...   x       y  ...   ...
...   ...   ...   115   127 ...  ...
...   ...   ...   120   129 ...   ...
...   ...   ...   0       0   ...   ...
...   ...   ...   135   162 ....   ...
ect...

  i need to ask R tell me how many x-y pairs contain coords that are
non-zero and fall within values that i'm callilng xleft, xright, ybottom and
ytop and fall between certain indicies of the data frame.
i am calling the indexes by referring to numbers i have storied in other
variables.  i am really looking for an efficient way to do this since when i
try to pull the x and y columns out and assign them to their own variables,
the process of asking for the number of non-zeros which have x values such
that xleft <= x <= xright AND ybottom <= y <=ytop, the process becomes very
convoluted.  how can i ask for more than one conditional at once?
  thanks for any help,
  jason

	[[alternative HTML version deleted]]

