[R] Rmarkdown / knitr naming the output file

Rainer Hurling rhurlin at gwdg.de
Sun Jul 12 16:39:37 CEST 2015


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.pdf", for example, "doc1.pdf". Is there
> any way to do this?

Here is another way of changing the output filename. I am using it from
R's commandline:

rmarkdown::render(
  input="filename_orig.R",
  output_format="pdf_document",
  output_file="filename_different.pdf"
)

Greetings,
Rainer Hurling


> 
> Thank you very much
> 
> 
> ------
> Aurora González Vidal
> 
> Sección Apoyo Estadístico.
> Servicio de Apoyo a la Investigación (SAI).
> Vicerrectorado de Investigación.
> Universidad de Murcia
> Edif. SACE . Campus de Espinardo.
> 30100 Murcia
> 
> @. aurora.gonzalez2 at um.es
> T. 868 88 7315
> F. 868 88 7302
> www.um.es/sai
> www.um.es/ae



More information about the R-help mailing list