pajuan commited on
Commit
84968bb
verified
1 Parent(s): 4a5de2f
Files changed (1) hide show
  1. ui.R +58 -33
ui.R CHANGED
@@ -1,33 +1,58 @@
1
- #
2
- # This is the user-interface definition of a Shiny web application. You can
3
- # run the application by clicking 'Run App' above.
4
- #
5
- # Find out more about building applications with Shiny here:
6
- #
7
- # https://shiny.posit.co/
8
- #
9
-
10
- library(shiny)
11
-
12
- # Define UI for application that draws a histogram
13
- fluidPage(
14
-
15
- # Application title
16
- titlePanel("Old Faithful Geyser Data"),
17
-
18
- # Sidebar with a slider input for number of bins
19
- sidebarLayout(
20
- sidebarPanel(
21
- sliderInput("bins",
22
- "Number of bins:",
23
- min = 1,
24
- max = 50,
25
- value = 30)
26
- ),
27
-
28
- # Show a plot of the generated distribution
29
- mainPanel(
30
- plotOutput("distPlot")
31
- )
32
- )
33
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ library(shiny)
2
+ library(shinyAce)
3
+ library(shinyjs)
4
+ library(shinythemes)
5
+ # ui.R
6
+ #Design 1:
7
+ shinyUI(
8
+ tagList(
9
+ tags$head(
10
+ tags$link(rel = "stylesheet", type = "text/css", href = "styles.css"),
11
+ tags$script(src = "script.js")
12
+ ),
13
+ tags$div(
14
+ fluidPage(
15
+ useShinyjs(),
16
+ div(id = "sidebar",
17
+ sidebarPanel(
18
+ h2("Opciones"),
19
+ actionButton("theme_button", "Elige un tema"),
20
+ selectInput('theme_code', 'Tema editor', choices = themes, selected = 'ambiance'),
21
+ downloadButton('save_code', 'Guardar codigo', icon = icon('save')),
22
+ downloadButton('save_knit', 'Guardar knitr', icon = icon('save')),
23
+ tags$a(href = "https://github.com/pablovanegas/runr", target = "_blank", class = "btn btn-default shiny-bound-input", "Ver C贸digo Fuente") )
24
+ ),#
25
+ mainPanel(
26
+ actionButton("toggleSidebar", "Opciones"),
27
+ h1("Simple R"),
28
+ tags$div(
29
+ class = "row",
30
+ tags$div(
31
+ class = "col-md-12", # Cuadrado 1
32
+ h2("Tu codigo: "),
33
+ verbatimTextOutput("log"),
34
+ aceEditor("rmd", mode = "markdown", value = init,
35
+ hotkeys = list(
36
+ open_chunk = 'Ctrl-Alt-I',
37
+ save_code = "Ctrl-S",
38
+ help_key = "F1"
39
+ ),
40
+ autoComplete = "live"),
41
+ actionButton("eval", "Run", icon = icon('play')),
42
+ actionButton('clear', 'Clear', icon = icon('eraser')),
43
+ actionButton("open_chunk", "Insert Chunk", icon = icon('plus'))
44
+ )
45
+ ),
46
+ tags$div(
47
+ class = "row",
48
+ tags$div(
49
+ class = "col-md-12", # Cuadrado 2
50
+ h1("Resultado: "),
51
+ htmlOutput("knitDoc")
52
+ )
53
+ )
54
+ )
55
+ )
56
+ )
57
+ )
58
+ )