insightsengineering / insightsengineering/teal.gallery
[Question]: tm_a_mmrm gives duplicate subjects issue in analysis dataset
- Dominant language
- R
- Stars
- 40
- Forks
- 13
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 2
Description
### What is your question?
Dear NEST Team,
I'm using the teal modules wrapped by Davinci modules (in-house Shiny use case modules). All other teal modules are working fine with expected outcome in application, however tm_a_mmrm is throwing duplicate subject at each visit error in longitudinal analysis dataset though there are no duplicates. the sample program on github for this module runs fine in Shiny Live however copying the same code and running natively throws same error as well. Below is the session info running the sample code from my native system. Please suggest if a specific package version is causing the issue.
```
R version 4.5.0 (2025-04-11)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 24.04.3 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so; LAPACK version 3.12.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: Europe/Dublin
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] tern.mmrm_0.3.2 forcats_1.0.0 sparkline_2.0 lubridate_1.9.4
[5] dv.bookman_0.0.2 dv.papo_2.1.1 dv.teal_2.1.1 dplyr_1.1.4
[9] dv.tables_0.2.0 dv.filter_3.0.3 dv.manager_2.2.0 dv.loader_2.1.1
[13] teal.modules.general_0.4.1 ggmosaic_0.3.3 ggplot2_3.5.2 teal.modules.clinical_0.10.0
[17] tern_0.9.8 rtables_0.6.12 magrittr_2.0.3 formatters_0.5.11
[21] teal.transform_0.6.0 teal_0.16.0 teal.slice_0.6.0 teal.data_0.7.0
[25] teal.code_0.6.1 shiny_1.10.0 broom_1.0.8
loaded via a namespace (and not attached):
[1] RColorBrewer_1.1-3 rstudioapi_0.17.1 jsonlite_2.0.0 nestcolor_0.1.3
[5] TH.data_1.1-3 estimability_1.5.1 farver_2.1.2 rmarkdown_2.29
[9] ragg_1.4.0 geepack_1.3.12 fs_1.6.6 vctrs_0.6.5
[13] memoise_2.0.1 askpass_1.2.1 base64enc_0.1-3 htmltools_0.5.8.1
[17] curl_6.2.2 pins_1.4.1 sass_0.4.10 parallelly_1.44.0
[21] bslib_0.9.0 htmlwidgets_1.6.4 fontawesome_0.5.3 sandwich_3.1-1
[25] emmeans_1.11.1 plotly_4.10.4 zoo_1.8-14 cachem_1.1.0
[29] mime_0.13 lifecycle_1.0.4 teal.widgets_0.4.3 pkgconfig_2.0.3
[33] Matrix_1.7-3 R6_2.6.1 fastmap_1.2.0 rbibutils_2.3
[37] digest_0.6.37 shinycssloaders_1.1.0 textshaping_1.0.1 crosstalk_1.2.1
[41] labeling_0.4.3 timechange_0.3.0 httr_1.4.7 compiler_4.5.0
[45] withr_3.0.2 backports_1.5.0 PKI_0.1-14 logger_0.4.0
[49] MASS_7.3-65 openssl_2.3.2 rappdirs_0.3.3 dv.explorer.parameter_0.1.8
[53] tools_4.5.0 httpuv_1.6.16 shinyvalidate_0.1.3 glue_1.8.0
[57] nlme_3.1-168 promises_1.3.2 mmrm_0.3.14 grid_4.5.0
[61] rsconnect_1.4.2 checkmate_2.3.2 generics_0.1.4 gtable_0.3.6
[65] shinyFeedback_0.4.0 tidyr_1.3.1 data.table_1.17.2 stringr_1.5.1
[69] ggrepel_0.9.6 pillar_1.10.2 shinymeta_0.2.1 later_1.4.2
[73] splines_4.5.0 tern.gee_0.1.5 lattice_0.22-7 survival_3.8-3
[77] tidyselect_1.2.1 knitr_1.50 teal.logger_0.3.2 xfun_0.52
[81] DT_0.33 stringi_1.8.7 lazyeval_0.2.2 yaml_2.3.10
[85] shinyWidgets_0.9.0 evaluate_1.0.3 codetools_0.2-20 tibble_3.2.1
[89] cli_3.6.5 systemfonts_1.2.3 xtable_1.8-4 Rdpack_2.6.4
[93] jquerylib_0.1.4 Rcpp_1.0.14 teal.reporter_0.4.0 sourcetools_0.1.7-1
[97] coda_0.19-4.1 parallel_4.5.0 viridisLite_0.4.2 mvtnorm_1.3-3
[101] scales_1.4.0 purrr_1.0.4 crayon_1.5.3 rlang_1.1.6
[105] cowplot_1.1.3 multcomp_1.4-28 shinyjs_2.1.0
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct.
### Contribution Guidelines
- [x] I agree to follow this project's Contribution Guidelines.
### Security Policy
- [x] I agree to follow this project's Security Policy.
Contributor guide
Assessment
This issue has not been assessed yet.