Skip to content

Issue while making summary - non corresponding categories are coming in categorical analysis #1286

Answered by edelarua
Vatsal9195 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Vatsal9195,

Please try applying the prune_table() function on your table after it is constructed instead of trim_rows(). You can see a reproducible example using the function with dummy data below. If this is not the result you'd like, you can find a list of other pruning functions here which can be used as input to the prune_func argument of prune_table() to customize the pruning behaviour.

library(tern)

adae <- random.cdisc.data::cadae

adae <- adae %>%
  dplyr::select(USUBJID, TRT01A, AESOC, AETERM) %>%
  dplyr::mutate(AETERM = factor(AETERM))

tbl <- basic_table(title = "Demo table", main_footer = "Notes") %>%
  split_cols_by("TRT01A") %>%
  add_colcounts() %>%
  split_rows_by("A…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Vatsal9195
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants