|
47 | 47 | "All Patients") |
48 | 48 | pruned_and_sorted_result <- pruned_result %>% sort_at_path(path = c("AEBODSYS"), |
49 | 49 | scorefun = cont_n_onecol(idx_split_col)) %>% sort_at_path(path = c("AEBODSYS", |
50 | | - "*", "AEDECOD"), scorefun = score_occurrences_cols(col_indices = seq(1, |
51 | | - ncol(table)))) |
52 | | - table <- pruned_and_sorted_result |
| 50 | + "*", "AEDECOD"), scorefun = score_occurrences_cols(col_indices = idx_split_col)) |
53 | 51 | } |
54 | 52 | |
55 | 53 |
|
|
107 | 105 | "All Patients") |
108 | 106 | pruned_and_sorted_result <- pruned_result %>% sort_at_path(path = c("AEBODSYS"), |
109 | 107 | scorefun = cont_n_onecol(idx_split_col)) %>% sort_at_path(path = c("AEBODSYS", |
110 | | - "*", "AEDECOD"), scorefun = score_occurrences_cols(col_indices = seq(1, |
111 | | - ncol(table)))) |
112 | | - table <- pruned_and_sorted_result |
| 108 | + "*", "AEDECOD"), scorefun = score_occurrences_cols(col_indices = idx_split_col)) |
113 | 109 | } |
114 | 110 | |
115 | 111 |
|
|
147 | 143 | |
148 | 144 | $sort |
149 | 145 | { |
150 | | - idx_split_col <- which(sapply(col_paths(table), tail, 1) == |
151 | | - "All Patients") |
152 | 146 | pruned_and_sorted_result <- pruned_result %>% sort_at_path(path = c("CMDECOD"), |
153 | 147 | scorefun = score_occurrences) |
154 | | - pruned_and_sorted_result |
155 | 148 | } |
156 | 149 | |
157 | 150 |
|
|
203 | 196 | $sort |
204 | 197 | { |
205 | 198 | pruned_and_sorted_result <- pruned_result |
206 | | - pruned_and_sorted_result |
207 | 199 | } |
208 | 200 | |
209 | 201 |
|
|
260 | 252 | "All Patients") |
261 | 253 | pruned_and_sorted_result <- pruned_result %>% sort_at_path(path = c("AEBODSYS"), |
262 | 254 | scorefun = cont_n_onecol(idx_split_col)) %>% sort_at_path(path = c("AEBODSYS", |
263 | | - "*", "AEDECOD"), scorefun = score_occurrences_cols(col_indices = seq(1, |
264 | | - ncol(table)))) |
| 255 | + "*", "AEDECOD"), scorefun = score_occurrences_cols(col_indices = idx_split_col)) |
265 | 256 | criteria_fun <- function(tr) { |
266 | 257 | inherits(tr, "ContentRow") |
267 | 258 | } |
268 | 259 | pruned_and_sorted_result <- rtables::trim_rows(pruned_and_sorted_result, |
269 | 260 | criteria = criteria_fun) |
270 | | - table <- pruned_and_sorted_result |
271 | 261 | } |
272 | 262 | |
273 | 263 |
|
|
329 | 319 | "All Patients") |
330 | 320 | pruned_and_sorted_result <- pruned_result %>% sort_at_path(path = c("AEBODSYS"), |
331 | 321 | scorefun = cont_n_onecol(idx_split_col)) %>% sort_at_path(path = c("AEBODSYS", |
332 | | - "*", "AEDECOD"), scorefun = score_occurrences_cols(col_indices = seq(1, |
333 | | - ncol(table)))) |
| 322 | + "*", "AEDECOD"), scorefun = score_occurrences_cols(col_indices = idx_split_col)) |
334 | 323 | criteria_fun <- function(tr) { |
335 | 324 | inherits(tr, "ContentRow") |
336 | 325 | } |
337 | 326 | pruned_and_sorted_result <- rtables::trim_rows(pruned_and_sorted_result, |
338 | 327 | criteria = criteria_fun) |
339 | | - table <- pruned_and_sorted_result |
340 | 328 | } |
341 | 329 | |
342 | 330 |
|
0 commit comments