inst/shiny/code_optimizer/ui.R

library("shiny")

shinyUI(fluidPage(
  theme = shinythemes::shinytheme("journal"),
  fluidPage(
    titlePanel("rco - The R Code Optimizer"),
    wellPanel(
      fluidRow(
        selectInput("opt_list",
          label = "Otimizers", multiple = TRUE,
          choices = names(.optimizers),
          selected = names(.optimizers)
        )
      ),
      fluidRow(
        textAreaInput("input_code",
          label = "",
          placeholder = "Input Code",
          height = "100%",
          rows = 12
        )
      ),
      fluidRow(
        column(5, NULL),
        column(
          4,
          actionButton("load_ex_code_btn", label = "Load Example"),
          actionButton("opt_btn", label = "Optimize")
        )
      ),
      fluidRow(diffr::diffrOutput("opt_code"))
    )
  )
))

Try the rco package in your browser

Any scripts or data that you put into this service are public.

rco documentation built on April 17, 2021, 5:06 p.m.