added the R script for analyzing trace