Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix column name bug in h_col_indices #845

Merged
merged 2 commits into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
(also the standard values, that where never used) of column indices and names.
* Fixed single applicable record bug in `count_abnormal_by_grade`.
* Fixed bug in `add_rowcounts` that caused all row count row values to be counted as zero.
* Fixed bug in `h_col_indices` causing an error when pruning with an overall column added.

### Miscellaneous
* Renamed `test_pkc01.R` and `summarize_variables_in_cols.R` into `test_pkct01.R`
Expand Down
4 changes: 2 additions & 2 deletions R/utils_rtables.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ add_rowcounts <- function(lyt) {
#' @export
h_col_indices <- function(table_tree, col_names) {
checkmate::assert_class(table_tree, "VTableNodeInfo")
checkmate::assert_subset(col_names, names(table_tree), empty.ok = FALSE)
match(col_names, names(table_tree))
checkmate::assert_subset(col_names, names(attr(col_info(table_tree), "cextra_args")), empty.ok = FALSE)
match(col_names, names(attr(col_info(table_tree), "cextra_args")))
}

#' Labels or Names of List Elements
Expand Down