the given script creates four plots in four boxes in R shiny dashboard page.I want to replicate the same four plots in the same manner in the following html script below the R code, and then embed the html template to make them available in R using Run App command. I am not able to achieve the plots, please help. Thank you so much.
## app.R ##
library(shiny)
library(shinydashboard)
library(devtools)
library(proto)
library(RColorBrewer)
library(gapminder)
library(broom)
library(mnormt)
ui <- dashboardPage(
dashboardHeader(title = "R to Html"),
dashboardSidebar(
width = 0
),
dashboardBody(
box(title = "Select the Data",selectInput("choice","Select the data",
choices = c("data1","data2","data3")),
status = "primary",solidHeader = T, height = "162"),
box(title = "Select the Slider Input", status = "primary",solidHeader = T,
sliderInput("slide","Select the value from slider", min = 1, max = 4,
value = 1)),
box(title = "Iris Plot", status = "primary",height = "435", solidHeader = T,
plotOutput("plot1")),
box( title = "Iris Plot", status = "primary", height = "435",solidHeader =
T, plotOutput("plot2"))
)
)
server <- function(input, output)
{
output$plot1 = renderPlot ({
plot(iris$Sepal.Length)
})
output$plot2 = renderPlot ({
plot(iris$Sepal.Width)
})
}
shinyApp(ui, server)
**# HTML code:**
<html>
<head>
<title>Dashboard Page</title>
<body>
{{box1}}
{{box2}}
{{box3}}
{{box4}}
</body>
</html>