-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.R
81 lines (77 loc) · 1.7 KB
/
app.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
library(shiny)
library(shinymaterial)
library(datasets)
# UI ---------------------------------------------------------------------
ui <- material_page(
title = "",
include_nav_bar = FALSE,
# Parallax ----------------------------------
# Image in folder 'www' at same level as app.R
material_parallax(
image_source = "bg2.jpeg"
),
material_row(
material_column(
width = 6,
material_card(
title = "faithful",
plotOutput("faithfulPlot")
)
),
material_column(
width = 6,
material_card(
title = "iris",
plotOutput("irisPlot")
)
)
),
# Parallax ----------------------------------
# Image in folder 'www' at same level as app.R
material_parallax(
image_source = "bg.jpeg"
),
material_row(
material_column(
width = 6,
material_card(
title = "mtcars",
plotOutput("mtcarsPlot")
)
),
material_column(
width = 6,
material_card(
title = "airmiles",
plotOutput("airmilesPlot")
)
)
),
material_row(
material_column(
width = 6,
tags$a(
target = "_blank",
class = "btn green darken-4",
href = "https://github.com/ericrayanderson/shinymaterial_parallax/blob/master/app.R#L1",
"APP CODE"
)
)
)
)
# SERVER ---------------------------------------------------------------------
server <- function(input, output) {
output$mtcarsPlot <- renderPlot({
plot(mtcars)
})
output$irisPlot <- renderPlot({
plot(iris)
})
output$faithfulPlot <- renderPlot({
plot(faithful)
})
output$airmilesPlot <- renderPlot({
plot(airmiles)
})
}
shinyApp(ui = ui, server = server)