replacing knitr with R magic