search for: sub_mat

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

2012 Jun 07
1
select subrows based on a specific column in a matrix
...mns contains another identifiers but the values are not uniques so that I want to generate another matrix with rows with unique values in the last column. If I did tmp<-unique(my_mat$col10) this will give me 8560 unique entries so the ideal matrix will be 8560X10 columns now then. I tried sub_mat<-my_mat[tmp,] but it generated weird results with many "NA" values and the order was not changed. The original matrix was ranked from top so I don't want to lose the order too. For the similar problem, I have used "match" function and do some manipulate to identify the...