2

When editing an R notebook inside RStudio, if I create multiple graphical outputs in one R block, I get an icon for each plot, which I can click on to select which plot to look at:

enter image description here

I like that behavior, it's especially handy to click from one plot to another to compare changes between them.

However, when I render the notebook to HTML (e.g. by hitting the "Preview" button in the editor), the plots simply cascade down the page:

enter image description here

Is there a way I can get the former behavior in an exported document? Some option I can set, or a chunk of Javascript I can include, or something?

Ken Williams
  • 22,756
  • 10
  • 85
  • 147
  • How about creating tabs using `{.tabset}`? It's not what you're after and you would have to break up the loop, but perhaps there's a way to automate it. – Roman Luštrik Nov 27 '17 at 20:02
  • [This](https://stackoverflow.com/questions/43636120/r-how-do-you-embed-plots-into-a-tab-in-rmarkdown-in-a-procedural-fashion) approach works for RMarkdown, but doesn't work appear to for RNotebook. Presumably because of how the document is rendered... – Dan Nov 28 '17 at 18:22

0 Answers0