Polygon R code in RMD