R code to generate pdf from markdown using pandoc