example R knitr script for visualization