add stat R script