add COMPLETED R function 'modselect.r2'