added analyze.R script