@@ -77,15 +77,12 @@ if (tool == "ROB2") {
77
77
domain , judgement ,
78
78
- Weights ))
79
79
80
- rob.tidy $ judgement <- as.factor(rob.tidy $ judgement )
81
-
82
80
rob.tidy $ domain <- as.factor(rob.tidy $ domain )
83
81
84
82
rob.tidy $ domain <- factor (rob.tidy $ domain ,
85
83
levels(rob.tidy $ domain )[c(6 , 5 , 4 , 3 , 2 , 1 )])
86
84
87
- rob.tidy $ judgement <- factor (rob.tidy $ judgement ,
88
- levels(rob.tidy $ judgement )[c(2 , 3 , 1 )])
85
+ rob.tidy $ judgement <- factor (rob.tidy $ judgement ,levels = c(" h" , " s" ," l" ))
89
86
90
87
# Create plot
91
88
plot <- ggplot2 :: ggplot(data = rob.tidy ) +
@@ -198,15 +195,13 @@ if (tool == "ROB2") {
198
195
domain , judgement ,
199
196
- Weights ))
200
197
201
- rob.tidy $ judgement <- as.factor(rob.tidy $ judgement )
202
-
203
198
rob.tidy $ domain <- as.factor(rob.tidy $ domain )
204
199
205
200
rob.tidy $ domain <- factor (rob.tidy $ domain ,
206
201
levels(rob.tidy $ domain )[c(8 , 7 , 6 , 3 , 2 , 5 , 4 , 1 )])
207
202
208
- rob.tidy $ judgement <- factor ( rob.tidy $ judgement ,
209
- levels (rob.tidy $ judgement )[c( 1 , 4 , 3 , 2 )] )
203
+
204
+ rob.tidy $ judgement <- factor (rob.tidy $ judgement , levels = c( " c " , " s " , " m " , " l " ) )
210
205
211
206
plot <- ggplot2 :: ggplot(data = rob.tidy ) +
212
207
ggplot2 :: geom_bar(
@@ -324,15 +319,12 @@ if (tool == "ROB2") {
324
319
domain , judgement ,
325
320
- Weights ))
326
321
327
- rob.tidy $ judgement <- as.factor(rob.tidy $ judgement )
328
-
329
322
rob.tidy $ domain <- as.factor(rob.tidy $ domain )
330
323
331
324
rob.tidy $ domain <- factor (rob.tidy $ domain ,
332
325
levels(rob.tidy $ domain )[c(8 , 7 , 6 , 3 , 2 , 5 , 4 , 1 )])
333
326
334
- rob.tidy $ judgement <- factor (rob.tidy $ judgement ,
335
- levels(rob.tidy $ judgement )[c(1 ,4 ,3 ,2 )])
327
+ rob.tidy $ judgement <- factor (rob.tidy $ judgement ,levels = c(" c" ," s" , " m" ," l" ))
336
328
337
329
plot <- ggplot2 :: ggplot(data = rob.tidy ) +
338
330
ggplot2 :: geom_bar(
@@ -440,12 +432,9 @@ if (tool == "QUADAS-2") {
440
432
domain , judgement ,
441
433
- Weights ))
442
434
443
- rob.tidy $ judgement <- as.factor(rob.tidy $ judgement )
444
-
445
435
rob.tidy $ domain <- as.factor(rob.tidy $ domain )
446
436
447
- rob.tidy $ judgement <- factor (rob.tidy $ judgement ,
448
- levels(rob.tidy $ judgement )[c(2 , 3 , 1 )])
437
+ rob.tidy $ judgement <- factor (rob.tidy $ judgement ,levels = c(" h" , " s" ," l" ))
449
438
450
439
if (overall == TRUE ) {
451
440
rob.tidy $ domain <- factor (rob.tidy $ domain ,
@@ -529,6 +518,7 @@ if (tool == "QUADAS-2") {
529
518
data [[i ]] <- trimws(data [[i ]])
530
519
data [[i ]] <- substr(data [[i ]], 0 , 1 )
531
520
data [[i ]] <- gsub(" u" ," s" ,data [[i ]])
521
+ data [[i ]] <- gsub(" m" ," s" ,data [[i ]])
532
522
}
533
523
534
524
# Define weights if FALSE and check if there is a weight column if TRUE
@@ -561,10 +551,7 @@ if (tool == "QUADAS-2") {
561
551
domain , judgement ,
562
552
- Weights ))
563
553
564
- rob.tidy $ judgement <- as.factor(rob.tidy $ judgement )
565
-
566
- rob.tidy $ judgement <- factor (rob.tidy $ judgement ,
567
- levels(rob.tidy $ judgement )[c(2 , 3 , 1 )])
554
+ rob.tidy $ judgement <- factor (rob.tidy $ judgement ,levels = c(" h" , " s" ," l" ))
568
555
569
556
for (i in 1 : (ncol(data.tmp )- 1 )) {
570
557
levels(rob.tidy $ domain )[i ] <- colnames(data.tmp )[i ]
0 commit comments