Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
economics:r:rmarkdown [2019/02/27 10:52]
Olivier Simard-Casanova [Change the language of the PDF output]
— (current)
Line 1: Line 1:
-<panel type="​default">​ 
-{{page>​snippets:​in-construction&​noheader&​nofooter}} 
-<​lead>​ 
-====== R Markdown ====== 
-Convenient tool to write reports containing R code 
-</​lead>​ 
  
-</​panel>​ 
- 
-## .bb text above figures in PDFs 
- 
-https://​stackoverflow.com/​questions/​52285531/​rmarkdown-plots-in-beamer-slides-produce-bb-text-above-figure#​comment91519503_52285531 
- 
-## Call files and data sources 
- 
-- The compiler assumes called files are in the same directory 
- 
-## Change the language of the PDF output 
- 
-When you output a RMarkdown file in PDF, you obtain a table of contents. If you want to change the title of this table into a different langage, use this in the YAML header ([source](https://​stackoverflow.com/​a/​46218063)):​ 
- 
-<​code:​yaml>​ 
-lang: fr-FR 
-title: "Titre du document"​ 
-</​code>​ 
- 
-You can find the right language code [here](https://​www.andiamo.co.uk/​resources/​iso-language-codes/​). 
- 
-## Combine different files together 
- 
-When writing long reports, it is usually easier to split the main file in several smaller files, as you may do with $ \LaTeX $. 
- 
-https://​stackoverflow.com/​questions/​25824795/​how-to-combine-two-rmarkdown-rmd-files-into-a-single-output 
- 
-## Inline code 
- 
-R Markdown can evaluate inline code too, in two different ways. 
- 
-<alert type="​warning"​ icon="​fa fa-exclamation-circle">​In both cases, the code *is evaluated*((i.e. the code runs and displays the output/​result.)).</​alert>​ 
- 
-First, once evaluated the code can be outputted ​ as text: 
- 
-<​code:​r>​ 
-`r nrow(df)` 
-</​code>​ 
- 
-Second, the code can also outputted as "​code":​ 
- 
-<​code:​r>​ 
-```r nrow(df)``` 
-</​code>​ 
- 
-## Print today'​s date 
- 
-In the preamble, it's possible to declare the date of the document. But in a fast-pacing environment,​ one may want to have a similar functionality as `\today` in $ \LaTeX$ (that prints the today'​s date). 
- 
-To emulate such a feature, use this: 
- 
-<​code:​r>​ 
-date: "`r format(Sys.time(),​ '%d %B, %Y'​)`"​ 
-</​code>​ 
- 
-The specific formatting of the date can be adjusted in the second part of `format()` (see https://​www.statmethods.net/​input/​dates.html). 
  • Last modified: 6 months ago
  • by Olivier Simard-Casanova