Re: [R] Select specific rows of a matrix

2008-11-09 Thread Dimitris Rizopoulos
try this: mat <- matrix(sample(90:2000, 1, TRUE), 1000, 10) ind <- rowSums(mat > 100 & mat < 120) > 0 mat[ind, ] I hope it helps. Best, Dimitris mentor_ wrote: Hi, if I have a large matrix e.g. with the dimensions of 1000 rows and 10 columns. How can I select rows comprising one or mo

Re: [R] Select specific rows of a matrix

2008-11-09 Thread dusa.adrian
mentor_ wrote: > > Hi, > > if I have a large matrix e.g. with the dimensions of 1000 rows and 10 > columns. > How can I select rows comprising one or more values between a specific > range of two values? > So e.g. a row has one or more values between the range of 100 - 120. > No tested, but t

[R] Select specific rows of a matrix

2008-11-09 Thread mentor_
Hi, if I have a large matrix e.g. with the dimensions of 1000 rows and 10 columns. How can I select rows comprising one or more values between a specific range of two values? So e.g. a row has one or more values between the range of 100 - 120. Cheers -- View this message in context: http://www