Am 06.07.2015 um 14:24 schrieb AURORA GONZALEZ VIDAL:
> Hello.
> I have a question for Rmarkdown users.
>
> Is there any way to give a name to the output document inside the Rmd?
>
> For example, my rmd's name is "bb.Rmd" but when I knitr to pdf I want it to
> name the pdf differently than "bb.pd
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
Web
Dear Aurora,
You acn try specifying a YAML block in the Rmd file and then render() it
with the rmarkdown package.
---
title: "Your title"
output:
pdf_document:
pandoc_args: [
"--output=doc1.pdf"
]
---
Note that I haven't tested it.
Best regards,
ir. Thierry Onkelinx
Instituut v
Hello.
I have a question for Rmarkdown users.
Is there any way to give a name to the output document inside the Rmd?
For example, my rmd's name is "bb.Rmd" but when I knitr to pdf I want it to
name the pdf differently than "bb.pdf", for example, "doc1.pdf". Is there
any way to do this?
Thank you
4 matches
Mail list logo