-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.R
131 lines (119 loc) · 3.36 KB
/
server.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
library("shiny")
server = function(input, output) {
mutepar = function( xdata, ydata, manm = "", ...){
tep.par = par(mai = c(0.5, 0.5, 0.5, 0.5))
(tepmat3 = matrix(c( 0, 1, 0, 2, 3, 4, 0, 5, 0), 3, 3))
layout(tepmat3, widths = c( 2, 4, 2), heights = c(2, 4, 2))
boxplot(ydata)
hist(xdata, main = manm, xlab = "", ylab = "")
plot(xdata, ydata)
boxplot( xdata, horizontal = T)
templ = hist(ydata,plot = FALSE)$count
barplot(templ, horiz=TRUE, col = c(0), space = 0)
par(tep.par)
}
# tem
tmsp = reactiveValues()
# SLSW
output$slswplot = renderPlot({
tmsp$slswp = mutepar( iris$Sepal.Length, iris$Sepal.Width, manm = "X(Sepal.Length) & Y(Sepal.Width)")
tmsp$slswp
})
output$slswdlpng = downloadHandler(
filename = function() {
paste( "slsw", '.png', sep = '')
},
content = function(file) {
png(file)
tmsp$slswp = mutepar( iris$Sepal.Length, iris$Sepal.Width, manm = "X(Sepal.Length) & Y(Sepal.Width)")
tmsp$slswp
dev.off()
},
contentType = 'image/png'
)
# SLPL
output$slplplot = renderPlot({
tmsp$slplp = mutepar( iris$Sepal.Length, iris$Petal.Length, manm = "X(Sepal.Length) & Y(Petal.Length)")
tmsp$slplp
})
output$slpldlpng = downloadHandler(
filename = function() {
paste( "slpl", '.png', sep = '')
},
content = function(file) {
png(file)
tmsp$slplp = mutepar( iris$Sepal.Length, iris$Petal.Length, manm = "X(Sepal.Length) & Y(Petal.Length)")
tmsp$slplp
dev.off()
},
contentType = 'image/png'
)
# SLPW
output$slpwplot = renderPlot({
tmsp$slpwp = mutepar( iris$Sepal.Length, iris$Petal.Width, manm = "X(Sepal.Length) & Y(Petal.Width)")
tmsp$slpwp
})
output$slpwdlpng = downloadHandler(
filename = function() {
paste( "slpw", '.png', sep = '')
},
content = function(file) {
png(file)
tmsp$slpwp = mutepar( iris$Sepal.Length, iris$Petal.Width, manm = "X(Sepal.Length) & Y(Petal.Width)")
tmsp$slpwp
dev.off()
},
contentType = 'image/png'
)
# SWPL
output$swplplot = renderPlot({
tmsp$swplp = mutepar( iris$Sepal.Width, iris$Petal.Length, manm = "X(Sepal.Width) & Y(Petal.Length)")
tmsp$swplp
})
output$swpldlpng = downloadHandler(
filename = function() {
paste( "swpl", '.png', sep = '')
},
content = function(file) {
png(file)
tmsp$swplp = mutepar( iris$Sepal.Width, iris$Petal.Length, manm = "X(Sepal.Width) & Y(Petal.Length)")
tmsp$swplp
dev.off()
},
contentType = 'image/png'
)
# SWPW
output$swpwplot = renderPlot({
tmsp$swpwp = mutepar( iris$Sepal.Width, iris$Petal.Width, manm = "X(Sepal.Width) & Y(Petal.Width)")
tmsp$swpwp
})
output$swpwdlpng = downloadHandler(
filename = function() {
paste( "swpw", '.png', sep = '')
},
content = function(file) {
png(file)
tmsp$swpwp = mutepar( iris$Sepal.Width, iris$Petal.Width, manm = "X(Sepal.Width) & Y(Petal.Width)")
tmsp$swpwp
dev.off()
},
contentType = 'image/png'
)
# PLPW
output$plpwplot = renderPlot({
tmsp$plpwp = mutepar( iris$Petal.Length, iris$Petal.Width, manm = "X(Petal.Length) & Y(Petal.Width)")
tmsp$plpwp
})
output$plpwdlpng = downloadHandler(
filename = function() {
paste( "plpw", '.png', sep = '')
},
content = function(file) {
png(file)
tmsp$plpwp = mutepar( iris$Petal.Length, iris$Petal.Width, manm = "X(Petal.Length) & Y(Petal.Width)")
tmsp$plpwp
dev.off()
},
contentType = 'image/png'
)
}