modify
Browse files
ui.R
CHANGED
@@ -1,33 +1,58 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
#
|
6 |
-
#
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
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 |
+
)
|