calculates rr with test.r