Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Save Markdown as interactive HTML

Is it possible to convert this interactive markdown report into an html and save it to as specific folder (the goal is to to keep this report alive outside R)? If yes, how?

---
runtime: shiny
output: html_document
---    

```{r echo=FALSE}
N<-c('A','B','C'); V<-c(60,50,80); mydf<-data.frame(N,V)
selectInput("sel","Select:",choices = as.character(mydf$N))
renderText({
     paste("The result is:",mydf[mydf$N==input$sel,2])
})
```

Thanks&kind regards

like image 277
r.user.05apr Avatar asked Sep 17 '26 12:09

r.user.05apr


1 Answers

From the settings in Rstudio (next to run document), choose Preview in Viewer Panel. This will use your browser instead of the built-in browser of Rstudio.

Then you will see that the html file is saved on your hard disk:

processing file: testing_interactive.Rmd

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS "C:/Users/TB/AppData/Local/Temp/RtmpKYheKO/testing_interactive.utf8.md" --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc83c74213d5c.html --smart --email-obfuscation none --standalone --section-divs --template "C:\Rlibs\rmarkdown\rmd\h\default.html" --no-highlight --variable highlightjs=1 --variable "theme:bootstrap" --mathjax --variable "mathjax-url:https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" --id-prefix section- 
output file: C:/Users/TB/AppData/Local/Temp/RtmpKYheKO/testing_interactive.knit.md


Output created: C:/Users/TB/AppData/Local/Temp/RtmpKYheKO/file83c15d05b9c.html
like image 195
LyzandeR Avatar answered Sep 19 '26 10:09

LyzandeR



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!