@@ -291,13 +291,13 @@ server <- function(input, output, session){
291
291
stringsAsFactors = FALSE
292
292
)
293
293
294
-
294
+
295
295
colnames(lookup_dframe ) <- c(" row" , " stage" , " column" )
296
296
lookup_dframe $ value <- unlist(lapply(lookup_names ,
297
297
function (a ){input [[a ]]}
298
298
))
299
299
lookup_dframe <- lookup_dframe [order(lookup_dframe $ row , lookup_dframe $ column ),] # unsorted the df looks like this:
300
-
300
+
301
301
# checked nperday percent
302
302
# row2 14.6 10 854
303
303
# row3 192 25.0 10
@@ -307,9 +307,9 @@ server <- function(input, output, session){
307
307
# row7 11.7 0 76.0
308
308
# row8 100.0 0 6.9
309
309
# row9 59.2 24 0
310
-
310
+
311
311
# sorted the daf looks like this:
312
-
312
+
313
313
# checked nperday percent
314
314
# row2 10 854 14.6
315
315
# row3 10 192 25.0
@@ -319,33 +319,33 @@ server <- function(input, output, session){
319
319
# row7 0 11.7 76.0
320
320
# row8 0 6.9 100.0
321
321
# row9 0 24 59.2
322
-
323
-
324
322
325
-
326
- # convert to data.frame
323
+
324
+
325
+
326
+ # convert to data.frame
327
327
count_dframe <- as.data.frame(
328
328
do.call(rbind , split(lookup_dframe [, " value" ], lookup_dframe $ row )),
329
329
stringsAsFactors = FALSE
330
330
)
331
331
332
-
332
+
333
333
colnames(count_dframe ) <- c(" checked" , " nperday" , " percent" )
334
334
initial_dframe <- data.frame (
335
335
checked = c(0 ),
336
336
nperday = c(1 ),
337
337
percent = safe_numeric(input $ unique_percent )
338
338
)
339
-
339
+
340
340
count_dframe <- as.data.frame(
341
341
rbind(initial_dframe , count_dframe ),
342
342
stringsAsFactors = FALSE
343
343
)
344
344
count_dframe $ checked <- 1 + (as.numeric(count_dframe $ checked ) * 0.01 )
345
345
count_dframe $ nperday <- as.numeric(count_dframe $ nperday )
346
346
count_dframe $ percent <- as.numeric(count_dframe $ percent ) * 0.01
347
-
348
-
347
+
348
+
349
349
350
350
# calculate number of articles, and time taken to process them
351
351
count_dframe $ cumulative_percent <- cumprod(count_dframe $ percent )
@@ -469,8 +469,8 @@ server <- function(input, output, session){
469
469
labels = rev(as.character(time_dframe $ y ))
470
470
)
471
471
}
472
-
473
-
472
+
473
+
474
474
475
475
# save a 'clean' version for user
476
476
time_dframe_clean <- time_dframe [, c(" stage" , " group_factor" , " value" )]
@@ -655,7 +655,7 @@ server <- function(input, output, session){
655
655
observeEvent(input $ help_review_type , {
656
656
shiny :: showModal(
657
657
shiny :: modalDialog(
658
- includeHTML(" 0_review_type_help_text.txt" ),
658
+ includeHTML(" www/ 0_review_type_help_text.txt" ),
659
659
title = " Review Type" ,
660
660
footer = shiny :: modalButton(
661
661
label = " OK" ,
@@ -669,7 +669,7 @@ server <- function(input, output, session){
669
669
observeEvent(input $ help_planning , {
670
670
shiny :: showModal(
671
671
shiny :: modalDialog(
672
- includeHTML(" 1_planning_help_text.txt" ),
672
+ includeHTML(" www/ 1_planning_help_text.txt" ),
673
673
title = " Planning" ,
674
674
footer = shiny :: modalButton(
675
675
label = " OK" ,
@@ -683,7 +683,7 @@ server <- function(input, output, session){
683
683
observeEvent(input $ help_searching , {
684
684
shiny :: showModal(
685
685
shiny :: modalDialog(
686
- includeHTML(" 2_searching_help_text.txt" ),
686
+ includeHTML(" www/ 2_searching_help_text.txt" ),
687
687
title = " Searching" ,
688
688
footer = shiny :: modalButton(
689
689
label = " OK" ,
@@ -697,7 +697,7 @@ server <- function(input, output, session){
697
697
observeEvent(input $ help_screening , {
698
698
shiny :: showModal(
699
699
shiny :: modalDialog(
700
- includeHTML(" 3_screening_help_text.txt" ),
700
+ includeHTML(" www/ 3_screening_help_text.txt" ),
701
701
title = " Screening" ,
702
702
footer = shiny :: modalButton(
703
703
label = " OK" ,
@@ -710,9 +710,9 @@ server <- function(input, output, session){
710
710
711
711
observeEvent(input $ help_deas , {
712
712
if (any(input $ tabs == " syst_review" )){
713
- deas_help <- " 4_DEAS_SR_help_text.txt"
713
+ deas_help <- " www/ 4_DEAS_SR_help_text.txt"
714
714
}else {
715
- deas_help <- " 4_DEAS_SM_help_text.txt"
715
+ deas_help <- " www/ 4_DEAS_SM_help_text.txt"
716
716
}
717
717
shiny :: showModal(
718
718
shiny :: modalDialog(
@@ -730,7 +730,7 @@ server <- function(input, output, session){
730
730
observeEvent(input $ help_reporting , {
731
731
shiny :: showModal(
732
732
shiny :: modalDialog(
733
- includeHTML(" 5_reporting_help_text.txt" ),
733
+ includeHTML(" www/ 5_reporting_help_text.txt" ),
734
734
title = " Reporting" ,
735
735
footer = shiny :: modalButton(
736
736
label = " OK" ,
@@ -744,7 +744,7 @@ server <- function(input, output, session){
744
744
observeEvent(input $ about , {
745
745
shiny :: showModal(
746
746
shiny :: modalDialog(
747
- includeHTML(" 6_about_PredicTER.txt" ),
747
+ includeHTML(" www/ 6_about_PredicTER.txt" ),
748
748
title = " PredicTER" ,
749
749
footer = shiny :: modalButton(
750
750
label = " OK" ,
@@ -755,4 +755,4 @@ server <- function(input, output, session){
755
755
)
756
756
})
757
757
758
- }
758
+ }
0 commit comments