0

I have a simple r markdown document:

---
title: "An interactive application (Knitr + Shiny)"
author: ""
date: "Wednesday, September 27, 2016"
output: html_document
runtime: shiny
---

And I also have a lot of plotly charts there, such as:

library(plotly)
m <- list(
l = 50,
r = 50,
b = 100,
t = 100,
pad = 4
)
plot_ly(x = seq(0, 8), y = seq(0, 8)) %>%
  layout(autosize = F, width = 500, height = 500, margin = m)

I'd like to have each chart in separate tabbed headings - something like html bookmarks. How can I do that in r markdown document. Thanks a lot for any of your advice.

Can I do something like

## title {.tabset .tabset-fade}
content above tabbed region.

### tab 1 

plot_ly(x = seq(0, 8), y = seq(0, 8)) %>%
  layout(autosize = F, width = 500, height = 500, margin = m)

### tab 2

plot_ly(x = seq(0, 8), y = seq(0, 8)) %>%
  layout(autosize = F, width = 500, height = 500, margin = m)

How can I have each of plotly charts in separate tabbed headings?

martinkabe
  • 1,079
  • 2
  • 12
  • 27
  • not completely sure what you mean by bookmark. Do you just mean being able to use `http://example.com/report.html#plot1` or did you mean having it in a separate tab in a document panel? – hrbrmstr Oct 06 '16 at 13:21
  • 1
    You mean this here? Different tabs? http://stackoverflow.com/questions/38062706/rmarkdown-tabbed-and-untabbed-headings/38146093#38146093 – J_F Oct 06 '16 at 13:24
  • Ok, got it, thanks a lot for the link !!!! – martinkabe Oct 06 '16 at 15:04

0 Answers0