R: add scan_stat function, normalized scan statistics