Determine row containing y. Returns -1 if y above first row, and nrows if y below last row; otherwise, returns row in table containing y.