RStatisticCommand optimization