-6

What is the R command to write the caption of the figure using R language so that the caption of the figure can be given below the plot.

B Paloi
  • 17
  • 4
  • Sounds like homework. Check out Sweave or RMarkdown, captions are for documents usually. If you really want the caption on the plot see ?text, ?mtext and ?par. – mdsumner May 24 '14 at 05:23

1 Answers1

2

in Rmarkdown:

```{r my_fig_with_caption, fig.cap=fn('My Figure')}
plot(rnorm(100)
```

see: http://www.rstudio.com/ide/docs/authoring/using_markdown.

ScubaSteve
  • 21
  • 3