By default, the knit/Sweave command will generate a tex file with the same name as the .Rnw file. I want to give it and the subsequent pdf file a different name is it possible?
In the header of an .Rmd
file, you can specify a file name:
---
title: "My title"
output:
pdf_document:
pandoc_args: [
"--output=Custom_name.pdf"
]
---
For .Rnw
files you can directly call the function knitr::knit2pdf
:
knit2pdf(input.Rnw, output="Custom_name.pdf")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With