R implementation of GREAT Tool