-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserver.R
More file actions
41 lines (21 loc) · 836 Bytes
/
Copy pathserver.R
File metadata and controls
41 lines (21 loc) · 836 Bytes
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
library(shiny)
shinyServer(
function(input, output) {
output$text1 <- renderTable({
count = 0
onehundredcoins <- sample(0:1, size = input$num, replace = TRUE)
onehundrednames <- rName("Male")
for(i in onehundredcoins){
count = count + 1
if(i == 0){
onehundrednames[count] <- rName("Male")
}
if(i==1){
onehundrednames[count] <- rName("Female")
}
}
Names <- onehundrednames
as.data.frame(Names)
})
}
)