Skip to content
Prev 200432 / 398503 Next

printing a single row, but dont know which row to print

Hi,

Try this,

set.seed(2) # reproducible
d = matrix(sample(1:20,20), 4, 5)
d

d[ d[ ,2] == 18 , ]

You may need to test with all.equal if your values are subject to
rounding errors.

HTH,

baptiste

2009/11/16 frenchcr <frenchcr at btinternet.com>: