-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.R
49 lines (42 loc) · 1.18 KB
/
test.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
attendee <- 50
faculty <- 5
id <- (1:(attendee+faculty))
type <- c(
rep('attn',attendee),
rep('fac',faculty)
)
t2 <- c(
rep('intl', round(0.6 * attendee)),
rep('home',round(0.4 * attendee)),
rep('intl',round(0.6 * faculty)),
rep('home',round(0.4 * faculty))
)
df <- data.frame(id,type,t2)
d <- data.frame(
id = (1:(attn() +fac() )),
type = c(rep("attn", attn()),rep("fac", fac())),
travel = c(
rep(),
rep()
)
)
redf <- reactive({
d1 <- data.frame(
id = (1:attn()),
type = rep("attn", attn()),
travel = c(
rep("intl",round(perc_attn_intl * attn())),
rep("home",round((100-perc_attn_intl()) * attn()))
)
),
d2 <- data.frame(
id = (1:fac()),
type = rep("fac", fac()),
travel = c(
rep("intl",round(perc_fac_intl * fac())),
rep("home",round((100-perc_fac_intl()) * fac()))
)
)
data <- rbind(d1,d2)
data
})