[R] Rmarkdown / knitr naming the output file

Yihui Xie
Mon, 06 Jul 2015 19:24:34 -0000

There is no direct way to get it, but you can get 1) the input
filename via knitr::current_input(), and 2) the output format via
knitr::opts_knit$get('rmarkdown.pandoc.to'). You may be able to figure
out the output filename based on these two pieces of information.

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Web: http://yihui.name


On Mon, Jul 6, 2015 at 7:24 AM, AURORA GONZALEZ VIDAL
<aurora.gonzalez2 at um.es> wrote: