R package rehh. Functions for the detection of footprints of selection on dense SNP data using Extended Homozygosity Haplotype (EHH) based tests. The package includes computation of EHH, iHS (within population) and Rsb or XP-EHH (across pairs of populations) statistics. Various plotting functions are also included to facilitate visualization and interpretation of the results.