简体   繁体   中英

Saving Rmarkdown shiny as html

I would like to ask how to save rmarkdown as html when including shiny features. I know hot to save basic markdown but when including shiny it is not prettz straight forward

For example is it possible to save code bellow as interactive html?

---
title: "Line graph"
output: html_notebook
runtime: shiny
---
library(shiny)
library(ggplot2)
selectInput("data","Proměnné modelu",names(mtcars))
renderPlot({
    x <- input$data
    ggplot(mtcars, aes_string(x)) +
      geom_histogram(bins = 15, color = "black", fill = "dodgerblue", aes(y=..density..)) + 
      geom_density(inherit.aes = T, fill="#FF6666", alpha = 0.2)
})
model <- lm(hp ~ mpg + gear + cyl + disp, data = mtcars)
stargazer::stargazer(model, type = "text")

I don't think it is possible to export shiny inside a markdown without having R open to read it.

I advise you to look at there .

I hope it helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM