adding my R code and corresponding png result plots