Friday 28 December 2018

shiny new

library(shiny)
ui <- fluidPage(
   titlePanel("TABLE"),
    sidebarLayout(
      sidebarPanel(
        sliderInput("num", "integer", 1, 20, 1,
                    step = 1, animate =
                      animationOptions(interval=400, loop=TRUE))),
      mainPanel(
        tableOutput("prod")
      )) )
 
server <- function(input, output) {
    output$prod <- renderPrint({ x<-input$num
    for(i in 1:10){
      a=x*i
      cat(x,"x",i,"=",a,"<br>")
       }})}

shinyApp(ui = ui, server = server)

table shiny

library(shiny)
fluidPage(
  titlePanel("Manish"),
  sidebarLayout(
    sidebarPanel(
      sliderInput("num", "integer", 1, 20, 1,
         step = 1, animate =
 animationOptions(interval=400, loop=TRUE))),
    mainPanel(
      tableOutput("prod")
    ) ))
______________________________________________
function(input, output) {
  output$prod = renderPrint({ x=input$num
  for(i in 1:10){
    a=x*i
    cat(x,"x",i,"=",a,"<br>") } }) }