G'day R-helpers,
I want to subsample rows of a large table based on the value in its
first column. Of all rows sharing the same value in the first column I
want to RANDOMLY extract only one.
Thanks in advance,
Achim
example input
1 15 34
1 4 66
1 24 65
2 23 47
2 9 36
3 58 9
3 38 64
3 12 64
3 4 15
4 1 88
4 23 90
desired output
1 4 66
2 23 47
3 12 64
4 1 88
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.