search for: tp21218219p21218541

Displaying 1 result from an estimated 1 matches for "tp21218219p21218541".

2008 Dec 30
5
Randomly remove condition-selected rows from a matrix
Hello all, I create the following matrix: m <- matrix(1:20, nrow = 10, ncol = 2) which looks like: [,1] [,2] [1,] 1 11 [2,] 2 12 [3,] 3 13 [4,] 4 14 [5,] 5 15 [6,] 6 16 [7,] 7 17 [8,] 8 18 [9,] 9 19 [10,] 10 20 Then, I want to remove randomly 2 rows among the ones where m[,1]<8 and m[,2]>12 I suppose the