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")