-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfullpageExamples2示例.R
104 lines (100 loc) · 2.63 KB
/
fullpageExamples2示例.R
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
ui <- multiPage(
opts = options,
multiTheme('aqua'),
menu = c(
"multiPage" = "multipage",
"Split" = "split",
"Grid" = "grid",
"Plots" = "plot",
"Images" = "images",
"Buttons" = "buttons",
"Sisters" = "sisters"
),
multiLeft(
align = "right",
multiSection(
menu = "multipage",
h1("multiScroll.js")
),
multiSection(
menu = "split",
center = TRUE,
h1("Split")
),
multiSection(
center = TRUE,
menu = "grid",
multiRow(
multiColumn("First Column"),
multiColumn("Second Column")
)
),
multiSection(
menu = "plot",
center = TRUE,
multiContainer(
h1("Full Section Plot"),
selectInput(
"obs",
"Select",
c(10, 20 ,50 ,100 , 150)
)
)
),
multiSection(
menu = "images",
h1("Image ")
),
multiSection(
menu = "buttons",
center = TRUE,
h1("Add buttons", style = "color: white;")
),
multiSection(
menu = "sisters",
h1("More like this ->")
)
),
multiRight(
align = "left",
multiSection(
h1("-Shiny")
),
multiSection(
plotOutput("plot1")
),
multiSection(
h1("<- Grid")
),
multiSectionPlot("plot2"),
multiSectionImage(
img = "https://alvarotrigo.com/multiScroll/imgs/tiger.jpg",
side = "right",
h1("Background")
),
multiSection(
center = TRUE,
multiButtonDown("Next section", outline = TRUE)
),
multiSection(
center = TRUE,
verbatimTextOutput("sistersDemo")
)
)
)
server <- function(input, output){
output$plot1 <- renderPlot({
par(bg = "#CEFFF2")
plot(mtcars$mpg, mtcars$wt)
})
output$plot2 <- renderPlot({
par(bg = "#90F9EA")
hist(rnorm(input$obs, 10, 5))
})
output$sistersDemo <- renderText({
'# See those
demo("fullPage", package = "fullPage")
demo("multiPage", package = "fullPage")'
+ })
+ }
shinyApp(ui, server)