added external R code snipped for knitr