[R] Randomly selecting rows with unique values in two columns

hasan halhaddad at ucdavis.edu
Mon Sep 26 23:42:13 CEST 2011


Hello,

I am trying to randomly select rows with unique values in columns 1 and 2. I
want to generate multiple subsets to estimate a statistic for each data set.
Below is a simplified example.

   L1 L2 L3 L4 L5
1   a  b  1  2  3
2   a  c  4  5  6
3   a  d  7  8  9
4   a  e 10 11 12
5   a  f 13 14 15
6   b  c 16 17 18
7   b  d 19 20 21
8   b  e 22 23 24
9   b  f 25 26 27
10  c  d 28 29 30
11  c  e 31 32 33
12  c  f 34 35 36
13  d  e 37 38 39
14  d  f 40 41 42
15  e  f 43 44 45

Could you please give directions to where to start? I have tried eliminating
duplicates and finding unique rows but no successful to make it random.

Thanks

Hasan

--
View this message in context: http://r.789695.n4.nabble.com/Randomly-selecting-rows-with-unique-values-in-two-columns-tp3845504p3845504.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list