t2d R scripts