Hi Peter I have the following data frame with chromosome name, start and end positions: chrN start end 1 chr1 11122333 11122633 2 chr1 11122333 11122633 3 chr3 11122333 11122633 8 chr3 111273334 111273634 7 chr2 12122334 12122634 4 chr1 21122377 21122677 5 chr2 33122355 33122655 6 chr2 33122355 33122655 I would like to count the positions that have the same start and add a new column with the count number; the new data frame should look like this: chrN start end count 1 chr1 11122333 11122633 3 2 chr1 11122333 11122633 3 3 chr3 11122333 11122633 3 8 chr3 111273334 111273634 1 7 chr2 12122334 12122634 1 4 chr1 21122377 21122677 1 5 chr2 33122355 33122655 2 6 chr2 33122355 33122655 2 Can you please show me how to achieve this? Thanks Joseph
____________________________________________________________________________________ Be a better friend, newshound, and [[alternative HTML version deleted]] ______________________________________________ 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.