Re: subset

Erin Hodgess (hodgess@uhdux2.dt.uh.edu)
Tue, 13 Jan 1998 14:28:25 -0600


Dear Kirthi:

Suppose you have the following matrix, xa:
> xa
[,1] [,2]
[1,] 0.00000000 0.89134251
[2,] 0.44874706 0.83580271
[3,] 0.04646188 0.86644785
[4,] 0.00000000 0.05383474
[5,] 0.00000000 0.51340682

> ya <- xa[xa[,1] == 0,]
> ya

[,1] [,2]
[1,] 0 0.89134251
[2,] 0 0.05383474
[3,] 0 0.51340682

Hope this helps!

Sincerely,
Erin Hodgess
Assistant Professor
Dept. of Computer and Mathematical Sciences
University of Houston -- Downtown
e-mail: hodgess@uhdux2.dt.uh.edu