[R] Choosing and preserving a random duplicate

2010-03-30 Thread jeff.m.ewers
Dear R-Helpers, I have a dataframe (g10df) formatted like this: GENE PVAL 1 KCTD12 4.06904e-22 2 UNC93A 9.91852e-22 3 CDKN3 1.24695e-21 4 CLEC2B 4.71759e-21 5 DAB2 1.12062e-20 The rows are ranked in ascending order by PVAL, and I need to end up with t

[R] Deleting duplicate rows in a matrix at random

2010-03-24 Thread jeff.m.ewers
Hello, I am relatively new to R, and I've run into a problem formatting my data for input into the package RankAggreg. I have a matrix of gene titles and P-values (weights) in two columns: KCTD12 4.06904E-22 UNC93A 9.91852E-22 CDKN3 1.24695E-21 CLEC2B 4.71759E-21 DAB21.12062E-20 HSPB1