From ce55a7603589fa9971a3096f2186d185765cd645 Mon Sep 17 00:00:00 2001 From: Melkiades Date: Fri, 4 Aug 2023 15:38:20 +0000 Subject: [PATCH] deploy: af5a7f4f961b2ee1d59022d9e97f494224d8cffa --- appendix/session.html | 2 +- graphs/other/bwg01.html | 2 +- .../other/bwg01_files/figure-html/teal-1.png | Bin 120574 -> 120574 bytes graphs/other/cig01.html | 2 +- .../other/cig01_files/figure-html/teal-1.png | Bin 146268 -> 146295 bytes graphs/other/fstg01.html | 2 +- .../other/fstg01_files/figure-html/teal-1.png | Bin 123873 -> 124280 bytes graphs/other/fstg02.html | 2 +- .../other/fstg02_files/figure-html/teal-1.png | Bin 117911 -> 117437 bytes graphs/other/ippg01.html | 2 +- .../other/ippg01_files/figure-html/teal-1.png | Bin 216054 -> 216012 bytes graphs/other/kmg01.html | 2 +- .../other/kmg01_files/figure-html/teal-1.png | Bin 135111 -> 134768 bytes graphs/other/mmrmg01.html | 2 +- .../mmrmg01_files/figure-html/teal-1.png | Bin 180988 -> 180880 bytes graphs/other/mng01.html | 2 +- .../other/mng01_files/figure-html/teal-1.png | Bin 184483 -> 184575 bytes .../pkpg04_files/figure-html/plot1-1.png | Bin 173512 -> 173352 bytes search.json | 144 +- sitemap.xml | 284 +- tables/adverse-events/aet01.html | 1496 ++++---- tables/adverse-events/aet01_aesi.html | 2410 ++++++------ .../aet01_aesi_files/figure-html/teal-1.png | Bin 165773 -> 166037 bytes .../aet01_files/figure-html/teal-1.png | Bin 202100 -> 202012 bytes tables/adverse-events/aet02.html | 3272 ++++++++-------- .../aet02_files/figure-html/teal-1.png | Bin 326034 -> 326157 bytes tables/adverse-events/aet02_smq.html | 2 +- .../aet02_smq_files/figure-html/teal-1.png | Bin 191712 -> 191854 bytes tables/adverse-events/aet03.html | 568 ++- .../aet03_files/figure-html/teal-1.png | Bin 396624 -> 396623 bytes tables/adverse-events/aet04.html | 3365 +++++++++-------- .../aet04_files/figure-html/teal-1.png | Bin 390378 -> 390360 bytes tables/adverse-events/aet04_pi.html | 2 +- .../aet04_pi_files/figure-html/teal-1.png | Bin 160495 -> 161049 bytes tables/adverse-events/aet05.html | 446 ++- tables/adverse-events/aet05_all.html | 2 +- .../aet05_all_files/figure-html/teal-1.png | Bin 147917 -> 147725 bytes .../aet05_files/figure-html/teal-1.png | Bin 149793 -> 149915 bytes tables/adverse-events/aet06.html | 2 +- .../aet06_files/figure-html/teal-1.png | Bin 346634 -> 346615 bytes tables/adverse-events/aet06_smq.html | 2 +- .../aet06_smq_files/figure-html/teal-1.png | Bin 205120 -> 205131 bytes tables/adverse-events/aet07.html | 2 +- .../aet07_files/figure-html/teal-1.png | Bin 122585 -> 122609 bytes tables/adverse-events/aet09.html | 2 +- .../aet09_files/figure-html/teal-1.png | Bin 263217 -> 262743 bytes tables/adverse-events/aet09_smq.html | 2 +- .../aet09_smq_files/figure-html/teal-1.png | Bin 182869 -> 182786 bytes tables/adverse-events/aet10.html | 2 +- .../aet10_files/figure-html/teal-1.png | Bin 188894 -> 188998 bytes tables/efficacy/aovt01.html | 2 +- .../aovt01_files/figure-html/teal-1.png | Bin 143074 -> 143391 bytes tables/efficacy/cfbt01.html | 2 +- .../cfbt01_files/figure-html/teal-1.png | Bin 309298 -> 309366 bytes tables/efficacy/coxt01.html | 2 +- .../coxt01_files/figure-html/teal-1.png | Bin 138090 -> 138228 bytes tables/efficacy/coxt02.html | 2 +- .../coxt02_files/figure-html/teal-1.png | Bin 141308 -> 141267 bytes tables/efficacy/dort01.html | 2 +- .../dort01_files/figure-html/teal-1.png | Bin 145042 -> 144548 bytes tables/efficacy/lgrt02.html | 2 +- .../lgrt02_files/figure-html/teal-1.png | Bin 125996 -> 125679 bytes tables/efficacy/mmrmt01.html | 2 +- .../mmrmt01_files/figure-html/teal-1.png | Bin 180669 -> 180728 bytes tables/efficacy/onct05.html | 2 +- .../onct05_files/figure-html/teal-1.png | Bin 122795 -> 122833 bytes tables/efficacy/rspt01.html | 2 +- .../rspt01_files/figure-html/teal-1.png | Bin 138044 -> 137870 bytes tables/efficacy/ttet01.html | 12 +- .../ttet01_files/figure-html/teal-1.png | Bin 144113 -> 144357 bytes tables/lab-results/lbt01.html | 2 +- .../lbt01_files/figure-html/teal-1.png | Bin 292299 -> 292277 bytes tables/lab-results/lbt02.html | 2 +- .../lbt02_files/figure-html/teal-1.png | Bin 254467 -> 254559 bytes tables/lab-results/lbt03.html | 2 +- .../lbt03_files/figure-html/teal-1.png | Bin 238119 -> 238165 bytes tables/lab-results/lbt04.html | 2 +- .../lbt04_files/figure-html/teal-1.png | Bin 167568 -> 167655 bytes tables/lab-results/lbt07.html | 2 +- .../lbt07_files/figure-html/teal-1.png | Bin 230655 -> 230419 bytes tables/lab-results/lbt11.html | 2 +- tables/lab-results/lbt11_bl.html | 2 +- .../lbt11_bl_files/figure-html/teal-1.png | Bin 150272 -> 150039 bytes .../lbt11_files/figure-html/teal-1.png | Bin 150270 -> 150036 bytes tables/lab-results/lbt13.html | 2 +- .../lbt13_files/figure-html/teal-1.png | Bin 456044 -> 456096 bytes tables/lab-results/lbt14.html | 2 +- .../lbt14_files/figure-html/teal-1.png | Bin 149053 -> 148750 bytes tables/lab-results/lbt15.html | 2 +- .../lbt15_files/figure-html/teal-1.png | Bin 159417 -> 159363 bytes tables/other/aovt02.html | 2 +- .../other/aovt02_files/figure-html/teal-1.png | Bin 143608 -> 143419 bytes tables/other/cmht01.html | 2 +- .../other/cmht01_files/figure-html/teal-1.png | Bin 138028 -> 138023 bytes tables/other/rbmit01.html | 10 +- tables/other/rmpt01.html | 2 +- .../other/rmpt01_files/figure-html/teal-1.png | Bin 150059 -> 149963 bytes tables/other/rmpt03.html | 2 +- .../other/rmpt03_files/figure-html/teal-1.png | Bin 152812 -> 152755 bytes tables/other/rmpt04.html | 2 +- .../other/rmpt04_files/figure-html/teal-1.png | Bin 148288 -> 148486 bytes tables/other/rmpt05.html | 2 +- .../other/rmpt05_files/figure-html/teal-1.png | Bin 161689 -> 161583 bytes tables/other/rmpt06.html | 807 ++-- tables/pharmacokinetic/adat01.html | 37 +- tables/pharmacokinetic/adat02.html | 13 +- tables/pharmacokinetic/adat04a.html | 37 +- tables/pharmacokinetic/adat04b.html | 29 +- tables/safety/cmt01.html | 2 +- .../safety/cmt01_files/figure-html/teal-1.png | Bin 250687 -> 250758 bytes tables/safety/cmt01a.html | 2 +- .../cmt01a_files/figure-html/teal-1.png | Bin 335257 -> 335464 bytes tables/safety/cmt01b.html | 2 +- .../cmt01b_files/figure-html/teal-1.png | Bin 414361 -> 414468 bytes tables/safety/cmt02_pt.html | 2 +- .../cmt02_pt_files/figure-html/teal-1.png | Bin 385366 -> 385668 bytes tables/safety/dmt01.html | 2 +- .../safety/dmt01_files/figure-html/teal-1.png | Bin 143893 -> 143774 bytes tables/safety/dst01.html | 2 +- .../safety/dst01_files/figure-html/teal-1.png | Bin 184890 -> 184615 bytes tables/safety/egt01.html | 2 +- .../safety/egt01_files/figure-html/teal-1.png | Bin 304058 -> 304255 bytes tables/safety/egt02.html | 2 +- .../safety/egt02_files/figure-html/teal-1.png | Bin 173157 -> 173082 bytes tables/safety/egt03.html | 2 +- .../safety/egt03_files/figure-html/teal-1.png | Bin 164211 -> 163817 bytes tables/safety/egt05_qtcat.html | 2 +- .../egt05_qtcat_files/figure-html/teal-1.png | Bin 334509 -> 334378 bytes tables/safety/enrollment01.html | 2 +- .../enrollment01_files/figure-html/teal-1.png | Bin 137600 -> 137502 bytes tables/safety/ext01.html | 2 +- .../safety/ext01_files/figure-html/teal-1.png | Bin 206844 -> 206449 bytes tables/safety/mht01.html | 2 +- .../safety/mht01_files/figure-html/teal-1.png | Bin 266676 -> 266756 bytes tables/safety/pdt01.html | 2 +- .../safety/pdt01_files/figure-html/teal-1.png | Bin 349088 -> 348941 bytes tables/safety/vst01.html | 2 +- .../safety/vst01_files/figure-html/teal-1.png | Bin 389677 -> 389529 bytes tables/safety/vst02.html | 2 +- .../safety/vst02_files/figure-html/teal-1.png | Bin 219076 -> 219166 bytes 140 files changed, 6485 insertions(+), 6563 deletions(-) diff --git a/appendix/session.html b/appendix/session.html index 12068c13de..bfb1c00ff9 100644 --- a/appendix/session.html +++ b/appendix/session.html @@ -1223,7 +1223,7 @@
Code
renv::snapshot("..", lockfile = "../assets/www/renv.lock", prompt = FALSE, force = TRUE)

-NOTE: Dependency discovery took 13 seconds during snapshot.
+NOTE: Dependency discovery took 15 seconds during snapshot.
 Consider using .renvignore to ignore files, or switching to explicit snapshots.
 See `?renv::dependencies` for more information.
 
diff --git a/graphs/other/bwg01.html b/graphs/other/bwg01.html
index ee585120e0..67c558faed 100644
--- a/graphs/other/bwg01.html
+++ b/graphs/other/bwg01.html
@@ -1640,7 +1640,7 @@
   )
 )
-
[INFO] 2023-08-04 14:36:21.1140 pid:4033 token:[] teal.modules.general Initializing tm_g_bivariate
+
[INFO] 2023-08-04 14:51:59.7668 pid:4038 token:[] teal.modules.general Initializing tm_g_bivariate
Code
shinyApp(app$ui, app$server)
diff --git a/graphs/other/bwg01_files/figure-html/teal-1.png b/graphs/other/bwg01_files/figure-html/teal-1.png index 7dca1c1711fa966d97027ba3da46612d99f4e037..d17a642da20af79918d97349bd6843ef43a4b50e 100644 GIT binary patch delta 9618 zcmY*f2Ut_twubSJ+|g0)Topz^7>1_O1e9J>MxBVjC?X;P7K#V~>7C<@g;5kV^cqo$ z(jr~Djb5cgAfdMafdmMlBya7^-22}1^Ye>2IVXFsz1F|}|6k$c2yk))?iKQvWMfk| zf?HXfHDZBGT->iJkAD$*@sRMRl;PhDGvAjyem-EsELBZG>Th#Oi$B1wVv2gvPtSxJ6mM){M zlT6c_FYL_kG}cZlE7Nl7$!@sEzb(HG6AKt$?lfup^9RW%G!9dr>*3vR7t__%RpHo{ zQ$o?Aa#l-J-N)+*f#W2&PoJ|CUO=zfNH-zsz0JyM;ujEo4v);ym|Te%71`M2gFh$Q z+Cp|+DZG85c;HUfrAwEb-HF#JRIz}$Jm>QH;{8XjpCF``mTKy6Vk3f`eSNV~ zn)C{0{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-04 14:35:48.6119 pid:3915 token:[] teal.modules.clinical Initializing tm_g_ci
+
[INFO] 2023-08-04 14:51:25.7112 pid:3920 token:[] teal.modules.clinical Initializing tm_g_ci
Code
shinyApp(app$ui, app$server)
diff --git a/graphs/other/cig01_files/figure-html/teal-1.png b/graphs/other/cig01_files/figure-html/teal-1.png index e86c2369fa7a9904a0beb65233f275178e4a8cd8..fce3367456e8f8427855ba8ba96bd6ec3900081b 100644 GIT binary patch delta 11761 zcma*Nby$?!7dDI-7$_c#P(Ty|kPr!J1qBBLq@_W+8zdhS3=8B z&H;vofpss2OY)TDS>uK}R~&KUe2~gH!{5VnKiY{jRV6E)rDIO@ z2eymXRtxtuQjq_VJ9=aH0rJmRZsMY;DX;AMzyAlhNpYC`rH^}d@y!W6p!20Jr<>y4 z`Q@C@)i{c-LHo;e)B)<86ykfo8QeSKXOvO1^XIQ)Utds;H#Xi|^AZgwtyr>27X3CwT8=IH-83!h|QU=OT3pX~Ib zOo6-(*Li_*9)CrTkNpGZEBiiRRrjq6QYE&d$z*hY#mjBMA8^bn-^WZj`N0rdwKDx6qcY-o9}0Vp>s= zHa|cA0C4huIj;#k(&p=m6W_ZHLJD^C3*QbaY$U8^Gsg5C2_P44~Nh1Gj?Df~LJ8J6cX&*n{gVPw(*=WD4Uulp{cOsvDD+#U{M{+ruFH;b75iOT+=!Rcu*#yQ>YBzmX()> z6AIzw<%J7n&u-_yz@^`FcFu)64T*~KQC}6kEFz-a+S)og1&2E_HkKYAF9lzbq8!)E zF~wlL#G_Af>7@MlaSH&aWTns3WAHic;!-x!OO3r?Q5nF99@@#%ry+v4EexhBISYE? zPTLhLA&}c1%bjNYKAR8a!v$s{R?NHeZSWhjMIm8fX$uREC2%UEV!YH+$mS3;d-rb3 zvjfMS%MS~hZ*P$%CnvFdN6%`gsbLt#_3D59y654s{&r<*wGY zHg-5JO-)Txp5C6GjDUb6Bg4aYum=wwFBs_Ot8u> zQFm}~_}po2x<48gqrYbQ%eKI(=Zixap9Pk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HON%y;~7U_80(%mZ(EvLmAdX>Z2>+#{s`EjFyR=;Dz54> z`b}tQ1)6_4Mn;){+Gzg~YNOYWr`#~22#uP%X$c7mkh@?%!c5sG{Vu=x260=;WCw_% z5<9U-htl7QE}Jf~=p+Hq9|rSqyJzqJ{3@T4;vG0uQogM{TX`ta+;7-};#urw2l zoS#C3ST)u|>n}q5ZVYPBm{sm%gKWT+7!M5%p%ZNS=*Xz-=Cb)b^%H21wnFZPf$a%l zuVdSlEh<+snV#_~CMFxEG_9cRGv^`w4C1#WuM+4P~V) zAO2_h5uA#sc_SFXfnY%=FaGpi(RnL9Q(ubyfcy3y5Acf(XDE36bNG+aR0==X&NM2= hp;Q0!_yvz_%EfG2?_)6`{TWHXUQxZAed*?d{|AnE%HjY3 diff --git a/graphs/other/fstg01.html b/graphs/other/fstg01.html index 6ffe91bd0c..cee393aff7 100644 --- a/graphs/other/fstg01.html +++ b/graphs/other/fstg01.html @@ -1444,7 +1444,7 @@ ) )
-
[INFO] 2023-08-04 14:41:01.5000 pid:5242 token:[] teal.modules.clinical Initializing tm_g_forest_rsp
+
[INFO] 2023-08-04 14:57:02.4890 pid:5247 token:[] teal.modules.clinical Initializing tm_g_forest_rsp
Code
shinyApp(app$ui, app$server)
diff --git a/graphs/other/fstg01_files/figure-html/teal-1.png b/graphs/other/fstg01_files/figure-html/teal-1.png index 422e290f091307fd48f467bafce638305a35a705..d4227936b645fcaac189639a8cf99dbee84ee133 100644 GIT binary patch delta 2756 zcmaJ@XH-+!77o1y5O64hI6xTmp}-7XkRtK`!Js0c2?#@xA`WB-E#}fus)Dp61Q8iP zild=QH;W=wDHDp+fG`4v9s&{GnYG@E>-~BA-#Pc5b9VW@Z}0hTzWrXl=o*f(NvP@Y zQN6AvMMDw0Tu|^0OdaCeg%zhKjQH0os`-=Y z3Y;-8ktpes;|6rb@@yaZc)Xo@EVuB^TU}CU?fq5Mv9B20+C8NMbaPLz*J8~3tgjdJ zu6#EWj+%#Ti+{*@R}5nREg-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uhfi_@8P3locZ|_AL8wriY zInc#djQ@kw#ic94ghhWKCbu?KSlmjdE5Tq-2L}g-nH9GuW1$_O|3_~8$aky?efrla zb7yC$mX;R8u{IKW#;g7B7cUOJ3T~&<$H=|TRpV82Bu?ejlyB|Ug2m2H1Rb&AftZjX zkiyqfglPc>&)V2?oA<@V`2<2zTG}Br8vQaW>jX%M74B@?I-$9_IUd>pDiXZmX#)dL zIpXl@pP%p{ZEbB}CldX73B&y#{0Hnw-ut_|yN~Jy#e?cezGGm0;er78L1=l$ENYs!)$)K<=Vd|ab+S84%68k z(MSOJ-!cAwrnoBvw%hZUg!#R9Lt9%J6AS3>X(^+|5!9n8GD?hW2)K~vt<4E$*JA$( D2t%(v diff --git a/graphs/other/fstg02.html b/graphs/other/fstg02.html index d4272d5c4a..76eda0bd8c 100644 --- a/graphs/other/fstg02.html +++ b/graphs/other/fstg02.html @@ -1506,7 +1506,7 @@ ) )
-
[INFO] 2023-08-04 14:38:31.4997 pid:4691 token:[] teal.modules.clinical Initializing tm_g_forest_tte
+
[INFO] 2023-08-04 14:54:21.1487 pid:4696 token:[] teal.modules.clinical Initializing tm_g_forest_tte
Code
shinyApp(app$ui, app$server)
diff --git a/graphs/other/fstg02_files/figure-html/teal-1.png b/graphs/other/fstg02_files/figure-html/teal-1.png index 03746d41bc7ad22021fa8a45d066a4164a3d2b66..624687974b58bb8238af53e59ca1df67bd8fc889 100644 GIT binary patch delta 10020 zcmcI~cU+U_-Z$1(+EV4T4vr#FDu~LeAYf!Usu)=+3Pna#mTV>LKyF$qR*_*Cku60) zKtN_>#)WK9_Kvc`j?9oi$osp}KIe0u=bZQL^Xcb3{F9Jz-S_poe&ahrjTNqp77i-f zu#k#{78D$53kvM2z3}o4o08ze z;>|L(_162HS1W{~ei7Ow1b;!4za8C(o}B&W6YLs#B6Q}s&}Q^_6#x0d4d}_fFE$)P zk3zE2L7ULyLzz$CqQ`%`%3ogu`=@*P>#O|rMX*2Hkkog#j!WMwVK4`W*(-3g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xYGFS?Bi1o zt|)BU9u42XXF4V83{f7G-~_0vO>2vzp!?ePdW`u$z7kgnEIsqq+5uJH!o}NmxXCLZ z=paFF>Z_kBW(zF#fjf0BG6F=kB{aGyqU9_b7Z+x2*>)%eNGv30Ad3aVCPmJI0pu6C zjr!BUweo-nf1*lX{VXOk$_wJ&SEUJi-COG$a9YW8@h-`8$BrU>86=z~WKTYG@qSQyC2t;XVg`s==L zOx5Xu=6PxYuS@+_gt7+4+quetxH6f&M-PH=doj*UurzL8dF^V{4*75Q5}Ln~cAsp1 zB!Edr1|1NoTu49$v(IKPuWplZKZ_D!Agk;1O~H{ha1{$-NAL%}s_;CuY551|mGZ`FfgS1Si!U6er^MV4X~d@_b6 z=aFhTUQ|~(28tutVqExQMlzqETciF|b8kQTJO;+Gh)+Y72eg^;z**2XwP08s)zh1R zhGqdLz#U}ppfMNiq_UrTQ_GY!nHvE}*$11|9o8%PL?zidOchp#-U^nv?OqI-e5e9p zW&|a}$Y~{aqGNkWG=FrN;Eet%Rrk>RcR^)nz&i4O`^f1JUp@Wpf(Um}I?bX~wpSMY OD&EZMYwC$hKmH$qO8b!j diff --git a/graphs/other/ippg01.html b/graphs/other/ippg01.html index a374a39188..dc11dee424 100644 --- a/graphs/other/ippg01.html +++ b/graphs/other/ippg01.html @@ -1363,7 +1363,7 @@ ) )
-
[INFO] 2023-08-04 14:39:53.0868 pid:4973 token:[] teal.modules.clinical Initializing tm_g_ipp
+
[INFO] 2023-08-04 14:55:49.9678 pid:4978 token:[] teal.modules.clinical Initializing tm_g_ipp
Code
shinyApp(app$ui, app$server)
diff --git a/graphs/other/ippg01_files/figure-html/teal-1.png b/graphs/other/ippg01_files/figure-html/teal-1.png index 5338fa221ecd863293660a611a77bf2229bdaca9..fdaab95d8967b2e4e15e830ca483a34e8e0ed5bb 100644 GIT binary patch delta 10109 zcmZvC2UJs8)O8d`LRTOOrNqM?^{}3ZWC8ol%;CRHb(aAYG6$iqawU zKqwgmq=p_^2z)0q^R0jV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cm2szA-%yZ8Cg5Iafy2 z2PG9wA{;<5T`3$D092b2$mOXDax9RiU9BnVq&wAnfX%wrSL|p2sR#y01pJsMrmm*8 z)L~#Y`I(Vh7eW->YYT)NiDu38#Z5R1gI-cz-6s{aVk9y;nd6jVA+je27EpdS8)!I1g&2 ze}7f?mbp7x?+XXVu?0b69mKSVm>9OHUo|Xd*&vonri=VpE`pgQB+Y5W5c+2I>q0mo zY4c9%KJW%dY94<2^lAO~@2`1GeAY(MV>jqY2Aj6j3`l`&@;=_y%Px2BBqr-zUW7vt z3Fy&)r+H?0S_G>`RPM_>WEP;EU z>dc9Sa?1y@8vwBkIOGIXWUsxBtG8=U6;dU`70Q!g)%0$CEY=YaQOPDS7y-6e(DdMV zO6_%40$#c$S5q3a%0 zcOy870LUFAJYKIXg^Z0g+DwtADuCCUV!^$bux6L8^YCm~$B zdP#O9;2NRDfGlYPYLTlP>gq~%3SjaM^nBS#VWVU?N|ooVPdfe`D!zbu5Y#;hx0!Bi zoqLHfo2+Lcs`5eG0EfoV14ykI5AYq=GxY!(!l|wbPg*OeqqoMRfuN}b8!SatZC-^& z4ALojJZ!3;`9DMS)STDTvHTw-RL;qVLkWMbpED{^x1||0Pi}HMoE|>ATRM@7-oRbe LyppSU`^o ) )
-
[INFO] 2023-08-04 14:36:52.1543 pid:4161 token:[] teal.modules.clinical Initializing tm_g_km
+
[INFO] 2023-08-04 14:52:35.1202 pid:4166 token:[] teal.modules.clinical Initializing tm_g_km
Code
shinyApp(app$ui, app$server)
diff --git a/graphs/other/kmg01_files/figure-html/teal-1.png b/graphs/other/kmg01_files/figure-html/teal-1.png index cd3ca9133fb143b66ab66c939c707748b2ac8a31..1003c1582aee4777e4ba01d4ca462fb99adf61ee 100644 GIT binary patch delta 10948 zcmZvCcT`hZ*EftaGFF~>R2T(e91&CmMi4MkqB4pR0Y?Nx45&2eN;S00jH8Sq#UMnw zsDN~&1gSw0=>+K=MUv1wVXH`G=N!@44sfy?2?$jd4gxba%@xPfObB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Xy2uRx?Hxi+ zX^;&!+={`ssPznk%Sup_VoyYEbp#d;=?Z@p57KBB(0yAB+@hCP-WU5#w#`5QipXHS zkRu0KHuwuf@mAOY5ZANL>>UNgOl43+VO}oo!`M4@?VzGSWk8%!o^pGGR56_T@G?{| zCpg=$=G7nTR2yK}B-mLk2v6-Ve{L$E zp0|?{Z?U;4Ud4UWgek-|a+o7nC26QAqtD1p1ydvQ@OTR^R11|ZaQ$LETvHan+Jc!r zhsgpXcO@98RnH#<=M%`1x^rvt`t9oSl=w|!U@94>pJ@Ocpx6WJEgq&!>^6$u9EwBE z9Iki!_&z8Vl5RrmW8k33fhI zwDyq?4;TxRqJ5IvJsYro82~_w8pdrxZZ7aO)V>#J;4JhlMGnSesAUC%#)i@!^#=e$ z)Nb9l2DL&FDJbJ|!h&K5w?Cl@|mv#!J!!9X)5 z#*hKRKRzBqwc!MMN?;a9)KCVRMPMRf|COWYk|Cn{TefV`W;X0<2M11`0%= ) )
-
[INFO] 2023-08-04 14:37:50.7510 pid:4565 token:[] teal.modules.clinical Initializing tm_a_mmrm
+
[INFO] 2023-08-04 14:53:37.7847 pid:4570 token:[] teal.modules.clinical Initializing tm_a_mmrm
Code
shinyApp(app$ui, app$server)
diff --git a/graphs/other/mmrmg01_files/figure-html/teal-1.png b/graphs/other/mmrmg01_files/figure-html/teal-1.png index c35b9ac85e9a9f237f716e0c33c9ac6f1779dddd..8dbd9bbe51edbde01e80cd3995f5789d622f1545 100644 GIT binary patch delta 14161 zcma)j2UJsO*EL`pLBSaj1u3I~DAiFqQWO;f(jj!BpmYLClTa?AfJ)QQ6a-LPxqv?=AH9pF80D{{LFvx7MFEYXp;fbD!rqXP>?IIj;LMJo9Dnengv3m-z^p zNgX3k_s3P=Fn_1ID1ZH{kN1PW>GwbL5fI8B%yl5gYYS)|nSS~@UnsKmm#5XF&ZSzr zEQ-!m4GnABfUu;i{3HRN+zHx_6SVK9-A~tkyNC=_cR%8OCeOHk*~>W6+= zWxrh9`g-gfH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5M$i;cB)a$(_tL%R}d`p?oGIHj7LoBNe1 z0mfTKM@HWEJAI#B&Lj{DlMaL^Bcoh@7UmHo)n}X%LY^6HD03cU0x?jEv#ffbFC86y zI_jUXfDlW}=MXj9J4U}IkF2e&!Gv#MQWE#xnzsYfui@`6?B1lNK7?rw=i#qhzuaY^ z(e33?NU#>C)wn4ZLgy1PuTu5(l@Gl2+Gp9BAh=9eo*h20YkOv9W^zu>Q%Dh)iEfEp z(+Xud?pnAa{E-2E66O&c=KZ-PY!AZUGJOY86{N!P`-=Vu5aH&wwuiS4b)@-&s7nX6 z9R%NtuxD5jPV?iu0c_PE)O?un43CQg>6i)R|L<*CIuI}f4~e(XVor;Q3_*4NFmMl| z82-57q^xXwnai;Ac!w|{gVbpGs9T{Aaw`p?=v`rM~MU-aJ}_wHtF`tOI&^Bz?CZ%%%Grb#FK n--DMg{m&CO@Adzmxx{*9^}9@aN ) )
-
[INFO] 2023-08-04 14:40:30.3625 pid:5112 token:[] teal.modules.clinical Initializing tm_g_lineplot
+
[INFO] 2023-08-04 14:56:29.5742 pid:5116 token:[] teal.modules.clinical Initializing tm_g_lineplot
Code
shinyApp(app$ui, app$server)
diff --git a/graphs/other/mng01_files/figure-html/teal-1.png b/graphs/other/mng01_files/figure-html/teal-1.png index 4a36f748c566282469d5bc54b7913f0b9cf938e6..a51c52ccb645ae0618b262505fdf8a86a5112cf7 100644 GIT binary patch delta 14151 zcmZv@2|SeR`#(Ok9wnz!N`zA>AxlL?wo=w2`%aNPlzkhIQWQrbOpz@+%}inJOQlj| zUnaZkV;Jk0EW`hLIzFH8@Av!u=QXdIG0!~D{oMC;U)OuNCM|W>M(VDhhb)Dxna`1H zw)xS|w*JMcrphY(_n&cZ*}~X{9{jzPB`V`;VN4jQzbB5WFJ5frltUHK(h`xI`?N1QU40bv1svAA!CnSxqYeK2*Il46Oep08!7R(L7 zw7spZt^YiDz?znw{q>}n*jTuDmB|OgTeni9;^I1AXjE%gU2Q={-Lj>xerc-9+RV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HyL2sV$#y_bbr0Xl$5MC+Y48( zHhuf{jo>(i@Tw}p)qehbbAkE9i4$q&xWhZP4Gj%3v#=E6@ycnpKTn%(k5c2cwz28? z`t=mE(x*?K?%cVv+>OMb%b*&ufb4G<*Fb#s{If2q?XENPXZbGw^GhC8VhX5G|NKhe z*sj)JYo{8KVR~HQ*4AqmON{W=XB(dXe-Hk-`!i3QZf=hH92%&q%9_^;6z@LyKj$G? A=Kufz diff --git a/graphs/pharmacokinetic/pkpg04_files/figure-html/plot1-1.png b/graphs/pharmacokinetic/pkpg04_files/figure-html/plot1-1.png index c00dd5beb88b1f6b63687a3035463eca2713c031..5b542a6eb696ba8d7f235a860d5e5cb89ee17d11 100644 GIT binary patch delta 156030 zcmbTeWmr{T`z|^uL6DLZq@`1k?vM^a8k7d5yI~?omxy#DNH>CjbcX^8(k0Rz(s9Q6 zz3;oP^MCg~`@>oL3?sr2jHtiyMj_#J6un9mUp|9_6xDatcQwQO{B()k*%h0*@! zi}<|!Jv}{*jg5cV{C|)ObaZrlP|UA;{$HP=?y|hOX>DU;Fl=g{BPH`cN1lb+1?Iz* zJdL87ni}|jd+%uLOLup7OG``XVN(=zNIqXfPEO9QfSUGyjNH{l8Zv<|!I=Lwy|_f) zQ6hnst3xFizD4hys4#LcGjrLqc=l|B3ckW8BeOO(UR+&0x!9^mOG~rif*Jnn1JvnW z6j!*sVsi|Q@h+08T(AILF(!b`9?RrS4nkDIr91#hdIG_*j?vr6tWDEqVzhq)7 zK5(^SEWIo`w2;R*p^$LB=j?3kfIDoze;7!aMU1B&KjKO*aI!OFWor6+dpkWXjhvL! z^Jw)OjdX}|3OAaBlarHzLU>AwUIIaMR21~*&mR#1D?L5E&&x7-CfAo81NSL2$m}}4 zphEBDsWGhK<@uxcngJiL!5i=gQK2B@%@#Sb2 zhZ2d$shZu$dBmjkg_e1v95*lnrMWKSi#=jbx93AyC&Zsm00kep`Ht?|VT3K$Yj=ApVl(rqTr8nzx1L9G8cTekIXRQS_p80ChY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wCy0Q%xyiOA$?cKQ}q z!AC~b+{Ke&$ACF_g5%r|WWJ@j`Gd=f!d)1#=%KgNC+_=f}pdmWVJmICOx_`d+Ya4;ZO0>%HBe z(IIR7vBF$5isaNd;4v;7UrpBPE}IYKAW;;uqs;44xnMjA)*)$qd2Vb??8c3>XKlxd zR@81uPq(9CIU!GbgtpzgX2JJ(BMOnDo~)@Aye@f#DiSwxU$u>X{{aftrvU%} diff --git a/search.json b/search.json index 52d749a652..47486df6b0 100644 --- a/search.json +++ b/search.json @@ -11,21 +11,21 @@ "href": "tables/other/aovt02.html", "title": "AOVT02", "section": "", - "text": "This example will focus on data from a single visit “WEEK 1 DAY 8” and a single endpoint “FKSI-FWB”. Only evaluable populations will be analyzed.\n\n\nData Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadqs <- df_explicit_na(adqs)\n\nadqs_single <- adqs %>%\n filter(\n AVISIT == \"WEEK 1 DAY 8\",\n PARAMCD == \"FKSI-FWB\"\n ) %>%\n mutate(CHG = ifelse(BMEASIFL == \"Y\", CHG, NA))\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARMCD\", ref_group = \"ARM A\") %>%\n append_varlabels(adqs_single, \"PARAM\") %>%\n summarize_ancova(\n vars = \"CHG\",\n variables = list(arm = \"ARMCD\", covariates = NULL),\n conf_level = 0.95,\n var_labels = \"Unadjusted comparison\",\n .labels = c(lsmean = \"Mean\", lsmean_diff = \"Difference in Means\"),\n table_names = \"unadjusted\"\n ) %>%\n summarize_ancova(\n vars = \"CHG\",\n variables = list(arm = \"ARMCD\", covariates = c(\"BASE\", \"STRATA1\")),\n conf_level = 0.95,\n var_labels = \"Adjusted comparison (covariates BASE and STRATA1)\",\n table_names = \"adjusted\"\n )\n\nresult <- build_table(\n lyt = lyt,\n df = adqs_single,\n alt_counts_df = adsl\n)\n\nresult\n\nParameter ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————\nUnadjusted comparison \n n 68 73 62 \n Mean 3.68 5.07 3.09 \n Difference in Means 1.38 -0.59 \n 95% CI (-2.76, 5.53) (-4.91, 3.73)\n p-value 0.5113 0.7873 \nAdjusted comparison (covariates BASE and STRATA1) \n n 68 73 62 \n Adjusted Mean 4.06 3.57 3.34 \n Difference in Adjusted Means -0.49 -0.72 \n 95% CI (-3.28, 2.29) (-3.57, 2.12)\n p-value 0.7277 0.6165 \n\n\n\n\n\nCodelibrary(teal)\nlibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(tern)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadqs <- df_explicit_na(adqs)\n\narm_ref_comp <- list(\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n ),\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n cdisc_dataset(\"ADQS\", adqs),\n code =\n 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))\n ADQS <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adqs\"))',\n check = TRUE\n ),\n modules = modules(\n tm_t_ancova(\n label = \"ANCOVA table\",\n dataname = \"ADQS\",\n avisit = choices_selected(\n choices = value_choices(adqs, \"AVISIT\"),\n selected = \"WEEK 1 DAY 8\"\n ),\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ACTARMCD\")),\n selected = \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n aval_var = choices_selected(\n choices = variable_choices(adqs, c(\"CHG\", \"AVAL\")),\n selected = \"CHG\"\n ),\n cov_var = choices_selected(\n choices = variable_choices(adqs, c(\"BASE\", \"STRATA1\", \"SEX\")),\n selected = \"STRATA1\"\n ),\n paramcd = choices_selected(\n choices = value_choices(adqs, \"PARAMCD\", \"PARAM\"),\n selected = \"FKSI-FWB\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:18:06.8433 pid:13002 token:[] teal.modules.clinical Initializing tm_t_ancova\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 survival_3.5-5 \n[13] processx_3.8.2 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/other/aovt02.lock'.\n\n\nDownload" + "text": "This example will focus on data from a single visit “WEEK 1 DAY 8” and a single endpoint “FKSI-FWB”. Only evaluable populations will be analyzed.\n\n\nData Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadqs <- df_explicit_na(adqs)\n\nadqs_single <- adqs %>%\n filter(\n AVISIT == \"WEEK 1 DAY 8\",\n PARAMCD == \"FKSI-FWB\"\n ) %>%\n mutate(CHG = ifelse(BMEASIFL == \"Y\", CHG, NA))\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARMCD\", ref_group = \"ARM A\") %>%\n append_varlabels(adqs_single, \"PARAM\") %>%\n summarize_ancova(\n vars = \"CHG\",\n variables = list(arm = \"ARMCD\", covariates = NULL),\n conf_level = 0.95,\n var_labels = \"Unadjusted comparison\",\n .labels = c(lsmean = \"Mean\", lsmean_diff = \"Difference in Means\"),\n table_names = \"unadjusted\"\n ) %>%\n summarize_ancova(\n vars = \"CHG\",\n variables = list(arm = \"ARMCD\", covariates = c(\"BASE\", \"STRATA1\")),\n conf_level = 0.95,\n var_labels = \"Adjusted comparison (covariates BASE and STRATA1)\",\n table_names = \"adjusted\"\n )\n\nresult <- build_table(\n lyt = lyt,\n df = adqs_single,\n alt_counts_df = adsl\n)\n\nresult\n\nParameter ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————\nUnadjusted comparison \n n 68 73 62 \n Mean 3.68 5.07 3.09 \n Difference in Means 1.38 -0.59 \n 95% CI (-2.76, 5.53) (-4.91, 3.73)\n p-value 0.5113 0.7873 \nAdjusted comparison (covariates BASE and STRATA1) \n n 68 73 62 \n Adjusted Mean 4.06 3.57 3.34 \n Difference in Adjusted Means -0.49 -0.72 \n 95% CI (-3.28, 2.29) (-3.57, 2.12)\n p-value 0.7277 0.6165 \n\n\n\n\n\nCodelibrary(teal)\nlibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(tern)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadqs <- df_explicit_na(adqs)\n\narm_ref_comp <- list(\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n ),\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n cdisc_dataset(\"ADQS\", adqs),\n code =\n 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))\n ADQS <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adqs\"))',\n check = TRUE\n ),\n modules = modules(\n tm_t_ancova(\n label = \"ANCOVA table\",\n dataname = \"ADQS\",\n avisit = choices_selected(\n choices = value_choices(adqs, \"AVISIT\"),\n selected = \"WEEK 1 DAY 8\"\n ),\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ACTARMCD\")),\n selected = \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n aval_var = choices_selected(\n choices = variable_choices(adqs, c(\"CHG\", \"AVAL\")),\n selected = \"CHG\"\n ),\n cov_var = choices_selected(\n choices = variable_choices(adqs, c(\"BASE\", \"STRATA1\", \"SEX\")),\n selected = \"STRATA1\"\n ),\n paramcd = choices_selected(\n choices = value_choices(adqs, \"PARAMCD\", \"PARAM\"),\n selected = \"FKSI-FWB\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:37:08.7296 pid:13006 token:[] teal.modules.clinical Initializing tm_t_ancova\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 survival_3.5-5 \n[13] processx_3.8.2 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/other/aovt02.lock'.\n\n\nDownload" }, { "objectID": "tables/other/rmpt05.html", "href": "tables/other/rmpt05.html", "title": "RMPT05", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadex <- df_explicit_na(adex)\n\n# Simulate ADEX records with PARAMCD == \"TDURD\" as they are not in the sample dataset.\nset.seed(1)\nadex2 <- adex %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE)\n ) %>%\n bind_rows(adex)\n\n# Now pre-processing steps are carried out.\nanl <- adex2 %>%\n filter(\n PARAMCD == \"TDURD\",\n PARCAT2 == \"Drug A\",\n SAFFL == \"Y\"\n ) %>%\n mutate()\n\nadsl_f <- adsl %>% filter(adsl$SAFFL == \"Y\")\n\n\n\n\n\nCodelyt <- basic_table(\n title = \"Extent of Exposure by Race: Safety-Evaluable Patients\",\n main_footer = \"* Person time is the sum of exposure across all patients in unit: days.\",\n show_colcounts = TRUE\n) %>%\n summarize_patients_exposure_in_cols(\n var = \"AVAL\", col_split = TRUE,\n .labels = c(n_patients = \"Patients\", sum_exposure = \"Person time*\")\n ) %>%\n analyze_patients_exposure_in_cols(\n var = \"RACE\",\n col_split = FALSE\n ) %>%\n append_topleft(c(\"\", obj_label(adex$RACE)))\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_f)\nresult\n\nExtent of Exposure by Race: Safety-Evaluable Patients\n\n————————————————————————————————————————————————————————————————————————\n Patients Person time*\nRace (N=400) (N=400) \n————————————————————————————————————————————————————————————————————————\nTotal patients numbers/person time 217 (54.2%) 20641 \n ASIAN 113 (28.2%) 10239 \n BLACK OR AFRICAN AMERICAN 48 (12.0%) 4481 \n WHITE 40 (10.0%) 4237 \n AMERICAN INDIAN OR ALASKA NATIVE 14 (3.5%) 1566 \n MULTIPLE 1 (0.2%) 58 \n NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 1 (0.2%) 60 \n OTHER 0 (0.0%) 0 \n UNKNOWN 0 (0.0%) 0 \n————————————————————————————————————————————————————————————————————————\n\n* Person time is the sum of exposure across all patients in unit: days.\n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\nlabels <- var_labels(adex)\n\nset.seed(1, kind = \"Mersenne-Twister\")\nadex <- adex %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE),\n AVALU = \"Days\"\n ) %>%\n bind_rows(adex)\n\nvar_labels(adex) <- labels\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADEX\", adex,\n code = 'ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n labels <- var_labels(ADEX)\n set.seed(1, kind = \"Mersenne-Twister\")\n ADEX <- ADEX %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE),\n AVALU = \"Days\") %>%\n bind_rows(ADEX)\n var_labels(ADEX) <- labels'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_exposure(\n label = \"Duration of Exposure Table\",\n dataname = \"ADEX\",\n paramcd = choices_selected(\n choices = value_choices(adex, \"PARAMCD\", \"PARAM\"),\n selected = \"TDURD\"\n ),\n col_by_var = choices_selected(\n choices = variable_choices(adex, subset = c(\"SEX\", \"ARM\")),\n selected = NULL\n ),\n row_by_var = choices_selected(\n choices = variable_choices(adex, subset = c(\"RACE\", \"STRATA1\", \"SEX\")),\n selected = \"RACE\"\n ),\n parcat = choices_selected(\n choices = value_choices(adex, \"PARCAT2\"),\n selected = \"Drug A\"\n ),\n add_total = FALSE\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\")\n )\n)\n\n[INFO] 2023-08-04 15:17:14.6964 pid:12791 token:[] teal.modules.clinical Initializing tm_t_exposure\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/other/rmpt05.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadex <- df_explicit_na(adex)\n\n# Simulate ADEX records with PARAMCD == \"TDURD\" as they are not in the sample dataset.\nset.seed(1)\nadex2 <- adex %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE)\n ) %>%\n bind_rows(adex)\n\n# Now pre-processing steps are carried out.\nanl <- adex2 %>%\n filter(\n PARAMCD == \"TDURD\",\n PARCAT2 == \"Drug A\",\n SAFFL == \"Y\"\n ) %>%\n mutate()\n\nadsl_f <- adsl %>% filter(adsl$SAFFL == \"Y\")\n\n\n\n\n\nCodelyt <- basic_table(\n title = \"Extent of Exposure by Race: Safety-Evaluable Patients\",\n main_footer = \"* Person time is the sum of exposure across all patients in unit: days.\",\n show_colcounts = TRUE\n) %>%\n summarize_patients_exposure_in_cols(\n var = \"AVAL\", col_split = TRUE,\n .labels = c(n_patients = \"Patients\", sum_exposure = \"Person time*\")\n ) %>%\n analyze_patients_exposure_in_cols(\n var = \"RACE\",\n col_split = FALSE\n ) %>%\n append_topleft(c(\"\", obj_label(adex$RACE)))\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_f)\nresult\n\nExtent of Exposure by Race: Safety-Evaluable Patients\n\n————————————————————————————————————————————————————————————————————————\n Patients Person time*\nRace (N=400) (N=400) \n————————————————————————————————————————————————————————————————————————\nTotal patients numbers/person time 217 (54.2%) 20641 \n ASIAN 113 (28.2%) 10239 \n BLACK OR AFRICAN AMERICAN 48 (12.0%) 4481 \n WHITE 40 (10.0%) 4237 \n AMERICAN INDIAN OR ALASKA NATIVE 14 (3.5%) 1566 \n MULTIPLE 1 (0.2%) 58 \n NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 1 (0.2%) 60 \n OTHER 0 (0.0%) 0 \n UNKNOWN 0 (0.0%) 0 \n————————————————————————————————————————————————————————————————————————\n\n* Person time is the sum of exposure across all patients in unit: days.\n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\nlabels <- var_labels(adex)\n\nset.seed(1, kind = \"Mersenne-Twister\")\nadex <- adex %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE),\n AVALU = \"Days\"\n ) %>%\n bind_rows(adex)\n\nvar_labels(adex) <- labels\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADEX\", adex,\n code = 'ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n labels <- var_labels(ADEX)\n set.seed(1, kind = \"Mersenne-Twister\")\n ADEX <- ADEX %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE),\n AVALU = \"Days\") %>%\n bind_rows(ADEX)\n var_labels(ADEX) <- labels'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_exposure(\n label = \"Duration of Exposure Table\",\n dataname = \"ADEX\",\n paramcd = choices_selected(\n choices = value_choices(adex, \"PARAMCD\", \"PARAM\"),\n selected = \"TDURD\"\n ),\n col_by_var = choices_selected(\n choices = variable_choices(adex, subset = c(\"SEX\", \"ARM\")),\n selected = NULL\n ),\n row_by_var = choices_selected(\n choices = variable_choices(adex, subset = c(\"RACE\", \"STRATA1\", \"SEX\")),\n selected = \"RACE\"\n ),\n parcat = choices_selected(\n choices = value_choices(adex, \"PARCAT2\"),\n selected = \"Drug A\"\n ),\n add_total = FALSE\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\")\n )\n)\n\n[INFO] 2023-08-04 15:36:12.6179 pid:12795 token:[] teal.modules.clinical Initializing tm_t_exposure\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/other/rmpt05.lock'.\n\n\nDownload" }, { "objectID": "tables/other/rmpt06.html", "href": "tables/other/rmpt06.html", "title": "RMPT06", "section": "", - "text": "Data Setup\nStandard Table\nTable Selecting Sections to Display\nTable with Differences\nTable Modifying Alpha Level and Type of Confidence Interval\nTable by SMQ\nTeal\nSession Info\n\n\n\nThe adae and adsl datasets need to undergo data processing before table production. Some new variables are added to these datasets to create the desired tables.\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(\n adae,\n omit_columns = c(\"SMQ01NAM\", \"SMQ01SC\", \"SMQ02NAM\", \"SMQ02SC\", \"CQ01NAM\", \"STUDYID\", \"USUBJID\")\n)\n\ndf_max <- aggregate(as.numeric(AETOXGR) ~ USUBJID, data = adae, FUN = max, drop = FALSE)\ncolnames(df_max) <- c(\"USUBJID\", \"WTOXGR\")\n\nadae <- adae %>%\n left_join(df_max, by = c(\"USUBJID\")) %>%\n mutate(\n WTOXGR = factor(WTOXGR, levels = c(\"1\", \"2\", \"3\", \"4\", \"5\")),\n fl_ser = AESER == \"Y\"\n ) %>%\n mutate(\n WTOXGR = forcats::fct_recode(WTOXGR,\n \"Grade 1\" = \"1\",\n \"Grade 2\" = \"2\",\n \"Grade 3\" = \"3\",\n \"Grade 4\" = \"4\",\n \"Grade 5\" = \"5\"\n ),\n AEOUT = forcats::fct_recode(AEOUT,\n \"Fatal outcome\" = \"FATAL\",\n \"Unresolved\" = \"NOT RECOVERED/NOT RESOLVED\",\n \"Recovered/Resolved\" = \"RECOVERED/RESOLVED\",\n \"Resolved with sequelae\" = \"RECOVERED/RESOLVED WITH SEQUELAE\",\n \"Recovering/Resolving\" = \"RECOVERING/RESOLVING\",\n \"Unknown outcome\" = \"UNKNOWN\"\n )\n ) %>%\n var_relabel(\n WTOXGR = \"Worst overall grade\",\n fl_ser = \"Number of patients with at least one serious AE\"\n )\n\n# Add AE flag to adsl.\nadsl1 <- adsl %>%\n mutate(AEFL = ifelse(USUBJID %in% adae$USUBJID, TRUE, FALSE)) %>%\n var_relabel(AEFL = \"At least one AE\")\n\n\n\n\nPlease note that by default the percentage analysis uses Wald’s confidence interval with continuity correction and the default confidence interval for percentage is 95%. To use a different method for confidence interval calculation, the method name needs to be provided to method argument.\n\nCodelyt_adsl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n estimate_proportion(\n vars = \"AEFL\",\n method = \"clopper-pearson\",\n .labels = c(\n n_prop = \"Number of patients with at least one adverse event\",\n prop_ci = \"95% CI for % of patients with at least one AE (Clopper-Pearson)\"\n ),\n table_names = \"est_prop\"\n )\n\nresult_adsl <- build_table(lyt_adsl, df = adsl1, alt_counts_df = adsl1)\n\n# Layout for variables from adae dataset.\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total number of AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_occurrences(\n \"WTOXGR\",\n var_labels = \"Number of patients with at least one AE by worst grade\",\n show_labels = \"visible\",\n .indent_mods = 1L\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adae[, \"fl_ser\"])\n ) %>%\n count_occurrences(\n \"AEOUT\",\n denom = \"n\",\n var_labels = \"Number of patients with at least one AE by outcome\",\n show_labels = \"visible\",\n .indent_mods = 1L\n )\n\nresult_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adsl) <- col_info(result_adae)\nresult <- rbind(\n result_adsl,\n result_adae[1:nrow(result_adae), ]\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————\nNumber of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) \n95% CI for % of patients with at least one AE (Clopper-Pearson) (84.9, 95.3) (85.8, 95.8) (84.7, 95.2) \nTotal number of AEs 609 622 703 \nNumber of patients with at least one AE by worst grade \n Grade 1 7 (5.2%) 9 (6.7%) 4 (3.0%) \n Grade 2 6 (4.5%) 10 (7.5%) 7 (5.3%) \n Grade 3 18 (13.4%) 14 (10.4%) 16 (12.1%) \n Grade 4 15 (11.2%) 20 (14.9%) 18 (13.6%) \n Grade 5 76 (56.7%) 70 (52.2%) 75 (56.8%) \nNumber of patients with at least one serious AE 104 (85.2%) 101 (82.1%) 99 (82.5%) \nNumber of patients with at least one AE by outcome \n Fatal outcome 76 (62.3%) 70 (56.9%) 75 (62.5%) \n Unresolved 66 (54.1%) 64 (52.0%) 70 (58.3%) \n Recovered/Resolved 73 (59.8%) 83 (67.5%) 88 (73.3%) \n Resolved with sequelae 44 (36.1%) 40 (32.5%) 43 (35.8%) \n Recovering/Resolving 81 (66.4%) 84 (68.3%) 88 (73.3%) \n Unknown outcome 38 (31.1%) 49 (39.8%) 44 (36.7%) \n\n\n\n\n\nCodelyt_adsl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n estimate_proportion(\n vars = \"AEFL\",\n method = \"clopper-pearson\",\n .labels = c(\n n_prop = \"Number of patients with at least one adverse event\",\n prop_ci = \"95% CI for % of patients with at least one AE (Clopper-Pearson)\"\n ),\n table_names = \"est_prop\"\n )\n\nresult_adsl <- build_table(lyt_adsl, df = adsl1, alt_counts_df = adsl1)\n\n# Layout for variables from adae dataset.\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total number of AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_occurrences(\n \"WTOXGR\",\n var_labels = \"Number of patients with at least one AE by worst grade\",\n show_labels = \"visible\",\n .indent_mods = 1L\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adae[, \"fl_ser\"]),\n denom = \"N_col\"\n )\n\nresult_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adsl) <- col_info(result_adae)\nresult <- rbind(\n result_adsl,\n result_adae[1:nrow(result_adae), ]\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————\nNumber of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) \n95% CI for % of patients with at least one AE (Clopper-Pearson) (84.9, 95.3) (85.8, 95.8) (84.7, 95.2) \nTotal number of AEs 609 622 703 \nNumber of patients with at least one AE by worst grade \n Grade 1 7 (5.2%) 9 (6.7%) 4 (3.0%) \n Grade 2 6 (4.5%) 10 (7.5%) 7 (5.3%) \n Grade 3 18 (13.4%) 14 (10.4%) 16 (12.1%) \n Grade 4 15 (11.2%) 20 (14.9%) 18 (13.6%) \n Grade 5 76 (56.7%) 70 (52.2%) 75 (56.8%) \nNumber of patients with at least one serious AE 104 (77.6%) 101 (75.4%) 99 (75.0%) \n\n\n\n\nPlease note that by default the percentage difference analysis also uses Wald’s confidence interval with continuity correction and the default confidence interval is 95%.\n\nCodelyt_adsl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\", ref_group = \"A: Drug X\") %>%\n estimate_proportion(\n vars = \"AEFL\",\n method = \"clopper-pearson\",\n .labels = c(\n n_prop = \"Number of patients with at least one adverse event\",\n prop_ci = \"95% CI for % of patients with at least one AE\"\n ),\n table_names = \"est_prop\"\n ) %>%\n estimate_proportion_diff(\n vars = \"AEFL\",\n .labels = c(\n diff = \"Difference in % of patients with at least one AE\",\n diff_ci = \"95% CI of difference (Wald, with correction)\"\n ),\n table_names = \"est_prop_diff\"\n )\n\nresult_adsl <- build_table(lyt_adsl, df = adsl1, alt_counts_df = adsl1)\n\n# Layout for variables from adae dataset.\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total number of AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_occurrences(\n \"WTOXGR\",\n var_labels = \"Number of patients with at least one AE by worst grade\",\n show_labels = \"visible\",\n .indent_mods = 1L\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adae[, \"fl_ser\"]),\n denom = \"N_col\"\n ) %>%\n count_occurrences(\n \"AEOUT\",\n denom = \"n\",\n var_labels = \"Number of patients with at least one AE by outcome\",\n show_labels = \"visible\",\n .indent_mods = 1L\n )\n\nresult_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adsl) <- col_info(result_adae)\nresult <- rbind(\n result_adsl,\n result_adae[1:nrow(result_adae), ]\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————————\nNumber of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) \n95% CI for % of patients with at least one AE (84.9, 95.3) (85.8, 95.8) (84.7, 95.2) \nDifference in % of patients with at least one AE 0.7 -0.1 \n 95% CI of difference (Wald, with correction) (-6.7, 8.2) (-7.8, 7.5) \nTotal number of AEs 609 622 703 \nNumber of patients with at least one AE by worst grade \n Grade 1 7 (5.2%) 9 (6.7%) 4 (3.0%) \n Grade 2 6 (4.5%) 10 (7.5%) 7 (5.3%) \n Grade 3 18 (13.4%) 14 (10.4%) 16 (12.1%) \n Grade 4 15 (11.2%) 20 (14.9%) 18 (13.6%) \n Grade 5 76 (56.7%) 70 (52.2%) 75 (56.8%) \nNumber of patients with at least one serious AE 104 (77.6%) 101 (75.4%) 99 (75.0%) \nNumber of patients with at least one AE by outcome \n Fatal outcome 76 (62.3%) 70 (56.9%) 75 (62.5%) \n Unresolved 66 (54.1%) 64 (52.0%) 70 (58.3%) \n Recovered/Resolved 73 (59.8%) 83 (67.5%) 88 (73.3%) \n Resolved with sequelae 44 (36.1%) 40 (32.5%) 43 (35.8%) \n Recovering/Resolving 81 (66.4%) 84 (68.3%) 88 (73.3%) \n Unknown outcome 38 (31.1%) 49 (39.8%) 44 (36.7%) \n\n\n\n\nThe confidence level can be changed through the conf_level argument.\n\nCodelyt_adsl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\", ref_group = \"A: Drug X\") %>%\n estimate_proportion(\n vars = \"AEFL\",\n conf_level = 0.90,\n method = \"clopper-pearson\",\n .labels = c(\n n_prop = \"Number of patients with at least one adverse event\",\n prop_ci = \"90% CI for % of patients with at least one AE (Clopper-Pearson)\"\n ),\n table_names = \"est_prop\"\n ) %>%\n estimate_proportion_diff(\n vars = \"AEFL\",\n conf_level = 0.90,\n method = \"newcombe\",\n .labels = c(\n diff = \"Difference in % of patients with at least one AE\",\n diff_ci = \"90% CI of difference (Newcombe)\"\n ),\n table_names = \"est_prop_diff\"\n )\n\nresult_adsl <- build_table(lyt_adsl, df = adsl1, alt_counts_df = adsl1)\n\n# Layout for variables from adae dataset.\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total number of AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_occurrences(\n \"WTOXGR\",\n var_labels = \"Number of patients with at least one AE by worst grade\",\n show_labels = \"visible\",\n .indent_mods = 1L\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adae[, \"fl_ser\"]),\n denom = \"N_col\"\n ) %>%\n count_occurrences(\n \"AEOUT\",\n denom = \"n\",\n var_labels = \"Number of patients with at least one AE by outcome\",\n show_labels = \"visible\",\n .indent_mods = 1L\n )\n\nresult_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adsl) <- col_info(result_adae)\nresult <- rbind(\n result_adsl,\n result_adae[1:nrow(result_adae), ]\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————\nNumber of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) \n90% CI for % of patients with at least one AE (Clopper-Pearson) (85.9, 94.8) (86.8, 95.3) (85.7, 94.7) \nDifference in % of patients with at least one AE 0.7 -0.1 \n 90% CI of difference (Newcombe) (-5.1, 6.6) (-6.1, 5.8) \nTotal number of AEs 609 622 703 \nNumber of patients with at least one AE by worst grade \n Grade 1 7 (5.2%) 9 (6.7%) 4 (3.0%) \n Grade 2 6 (4.5%) 10 (7.5%) 7 (5.3%) \n Grade 3 18 (13.4%) 14 (10.4%) 16 (12.1%) \n Grade 4 15 (11.2%) 20 (14.9%) 18 (13.6%) \n Grade 5 76 (56.7%) 70 (52.2%) 75 (56.8%) \nNumber of patients with at least one serious AE 104 (77.6%) 101 (75.4%) 99 (75.0%) \nNumber of patients with at least one AE by outcome \n Fatal outcome 76 (62.3%) 70 (56.9%) 75 (62.5%) \n Unresolved 66 (54.1%) 64 (52.0%) 70 (58.3%) \n Recovered/Resolved 73 (59.8%) 83 (67.5%) 88 (73.3%) \n Resolved with sequelae 44 (36.1%) 40 (32.5%) 43 (35.8%) \n Recovering/Resolving 81 (66.4%) 84 (68.3%) 88 (73.3%) \n Unknown outcome 38 (31.1%) 49 (39.8%) 44 (36.7%) \n\n\n\n\n\nCode# In progress\n\n\n\n\n\nCode# In progress\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] scda_0.1.6.9010 dplyr_1.1.2 tern_0.8.5.9006 \n[4] rtables_0.6.2.9001 magrittr_2.0.3 formatters_0.5.1.9001\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-0 gtable_0.3.3 jsonlite_1.8.7 compiler_4.3.1 \n [5] brio_1.1.3 tidyselect_1.2.0 tidyr_1.3.0 splines_4.3.1 \n [9] scales_1.2.1 yaml_2.3.7 fastmap_1.1.1 lattice_0.21-8 \n[13] ggplot2_3.4.2 R6_2.5.1 generics_0.1.3 knitr_1.43 \n[17] forcats_1.0.0 rbibutils_2.2.13 htmlwidgets_1.6.2 backports_1.4.1 \n[21] checkmate_2.2.0 tibble_3.2.1 munsell_0.5.0 pillar_1.9.0 \n[25] rlang_1.1.1 utf8_1.2.3 testthat_3.1.10 broom_1.0.5 \n[29] xfun_0.39 cli_3.6.1 Rdpack_2.4 digest_0.6.33 \n[33] grid_4.3.1 rstudioapi_0.15.0 lifecycle_1.0.3 vctrs_0.6.3 \n[37] evaluate_0.21 glue_1.6.2 codetools_0.2-19 survival_3.5-5 \n[41] fansi_1.0.4 colorspace_2.1-0 purrr_1.0.1 rmarkdown_2.23 \n[45] tools_4.3.1 pkgconfig_2.0.3 htmltools_0.5.5 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- colorspace [* -> 2.1-0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- fs [* -> 1.6.3]\n- generics [* -> 0.1.3]\n- ggplot2 [* -> 3.4.2]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- highr [* -> 0.10]\n- htmltools [* -> 0.5.5]\n- isoband [* -> 0.2.7]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- lattice [* -> 0.21-8]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- praise [* -> 1.0.0]\n- processx [* -> 3.8.2]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quantreg [* -> 5.96]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- survival [* -> 3.5-5]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- yaml [* -> 2.3.7]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- tern [* -> 0.8.5.9006]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/other/rmpt06.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable Selecting Sections to Display\nTable with Differences\nTable Modifying Alpha Level and Type of Confidence Interval\nTable by SMQ\nTeal\nSession Info\n\n\n\nThe adae and adsl datasets need to undergo data processing before table production. Some new variables are added to these datasets to create the desired tables.\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(\n adae,\n omit_columns = c(\"SMQ01NAM\", \"SMQ01SC\", \"SMQ02NAM\", \"SMQ02SC\", \"CQ01NAM\", \"STUDYID\", \"USUBJID\")\n)\n\ndf_max <- aggregate(as.numeric(AETOXGR) ~ USUBJID, data = adae, FUN = max, drop = FALSE)\ncolnames(df_max) <- c(\"USUBJID\", \"WTOXGR\")\n\nadae <- adae %>%\n left_join(df_max, by = c(\"USUBJID\")) %>%\n mutate(\n WTOXGR = factor(WTOXGR, levels = c(\"1\", \"2\", \"3\", \"4\", \"5\")),\n fl_ser = AESER == \"Y\"\n ) %>%\n mutate(\n WTOXGR = forcats::fct_recode(\n WTOXGR,\n \"Grade 1\" = \"1\",\n \"Grade 2\" = \"2\",\n \"Grade 3\" = \"3\",\n \"Grade 4\" = \"4\",\n \"Grade 5\" = \"5\"\n ),\n AEOUT = forcats::fct_recode(\n AEOUT,\n \"Fatal outcome\" = \"FATAL\",\n \"Unresolved\" = \"NOT RECOVERED/NOT RESOLVED\",\n \"Recovered/Resolved\" = \"RECOVERED/RESOLVED\",\n \"Resolved with sequelae\" = \"RECOVERED/RESOLVED WITH SEQUELAE\",\n \"Recovering/Resolving\" = \"RECOVERING/RESOLVING\",\n \"Unknown outcome\" = \"UNKNOWN\"\n )\n ) %>%\n var_relabel(\n WTOXGR = \"Worst overall grade\",\n fl_ser = \"Number of patients with at least one serious AE\"\n )\n\n# Add AE flag to adsl.\nadsl1 <- adsl %>%\n mutate(AEFL = ifelse(USUBJID %in% adae$USUBJID, TRUE, FALSE)) %>%\n var_relabel(AEFL = \"At least one AE\")\n\n\n\n\nPlease note that by default the percentage analysis uses Wald’s confidence interval with continuity correction and the default confidence interval for percentage is 95%. To use a different method for confidence interval calculation, the method name needs to be provided to method argument.\n\nCodelyt_adsl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n estimate_proportion(\n vars = \"AEFL\",\n method = \"clopper-pearson\",\n .labels = c(\n n_prop = \"Number of patients with at least one adverse event\",\n prop_ci = \"95% CI for % of patients with at least one AE (Clopper-Pearson)\"\n ),\n table_names = \"est_prop\"\n )\n\nresult_adsl <- build_table(lyt_adsl, df = adsl1, alt_counts_df = adsl1)\n\n# Layout for variables from adae dataset.\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total number of AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_occurrences(\n \"WTOXGR\",\n var_labels = \"Number of patients with at least one AE by worst grade\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"fl_ser\"\n ) %>%\n count_occurrences(\n \"AEOUT\",\n denom = \"n\",\n var_labels = \"Number of patients with at least one AE by outcome\",\n show_labels = \"visible\"\n )\n\nresult_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adsl) <- col_info(result_adae)\nresult <- rbind(\n result_adsl,\n result_adae[seq_len(nrow(result_adae)), ]\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————\nNumber of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) \n95% CI for % of patients with at least one AE (Clopper-Pearson) (84.9, 95.3) (85.8, 95.8) (84.7, 95.2) \nTotal number of AEs 609 622 703 \nNumber of patients with at least one AE by worst grade \n Grade 1 7 (5.2%) 9 (6.7%) 4 (3.0%) \n Grade 2 6 (4.5%) 10 (7.5%) 7 (5.3%) \n Grade 3 18 (13.4%) 14 (10.4%) 16 (12.1%) \n Grade 4 15 (11.2%) 20 (14.9%) 18 (13.6%) \n Grade 5 76 (56.7%) 70 (52.2%) 75 (56.8%) \nNumber of patients with at least one serious AE 104 (85.2%) 101 (82.1%) 99 (82.5%) \nNumber of patients with at least one AE by outcome \n Fatal outcome 76 (62.3%) 70 (56.9%) 75 (62.5%) \n Unresolved 66 (54.1%) 64 (52.0%) 70 (58.3%) \n Recovered/Resolved 73 (59.8%) 83 (67.5%) 88 (73.3%) \n Resolved with sequelae 44 (36.1%) 40 (32.5%) 43 (35.8%) \n Recovering/Resolving 81 (66.4%) 84 (68.3%) 88 (73.3%) \n Unknown outcome 38 (31.1%) 49 (39.8%) 44 (36.7%) \n\n\n\n\n\nCodelyt_adsl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n estimate_proportion(\n vars = \"AEFL\",\n method = \"clopper-pearson\",\n .labels = c(\n n_prop = \"Number of patients with at least one adverse event\",\n prop_ci = \"95% CI for % of patients with at least one AE (Clopper-Pearson)\"\n ),\n table_names = \"est_prop\"\n )\n\nresult_adsl <- build_table(lyt_adsl, df = adsl1, alt_counts_df = adsl1)\n\n# Layout for variables from adae dataset.\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total number of AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_occurrences(\n \"WTOXGR\",\n var_labels = \"Number of patients with at least one AE by worst grade\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"fl_ser\",\n denom = \"N_col\"\n )\n\nresult_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adsl) <- col_info(result_adae)\nresult <- rbind(\n result_adsl,\n result_adae[seq_len(nrow(result_adae)), ]\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————\nNumber of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) \n95% CI for % of patients with at least one AE (Clopper-Pearson) (84.9, 95.3) (85.8, 95.8) (84.7, 95.2) \nTotal number of AEs 609 622 703 \nNumber of patients with at least one AE by worst grade \n Grade 1 7 (5.2%) 9 (6.7%) 4 (3.0%) \n Grade 2 6 (4.5%) 10 (7.5%) 7 (5.3%) \n Grade 3 18 (13.4%) 14 (10.4%) 16 (12.1%) \n Grade 4 15 (11.2%) 20 (14.9%) 18 (13.6%) \n Grade 5 76 (56.7%) 70 (52.2%) 75 (56.8%) \nNumber of patients with at least one serious AE 104 (77.6%) 101 (75.4%) 99 (75.0%) \n\n\n\n\nPlease note that by default the percentage difference analysis also uses Wald’s confidence interval with continuity correction and the default confidence interval is 95%.\n\nCodelyt_adsl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\", ref_group = \"A: Drug X\") %>%\n estimate_proportion(\n vars = \"AEFL\",\n method = \"clopper-pearson\",\n .labels = c(\n n_prop = \"Number of patients with at least one adverse event\",\n prop_ci = \"95% CI for % of patients with at least one AE\"\n ),\n table_names = \"est_prop\"\n ) %>%\n estimate_proportion_diff(\n vars = \"AEFL\",\n .labels = c(\n diff = \"Difference in % of patients with at least one AE\",\n diff_ci = \"95% CI of difference (Wald, with correction)\"\n ),\n table_names = \"est_prop_diff\"\n )\n\nresult_adsl <- build_table(lyt_adsl, df = adsl1, alt_counts_df = adsl1)\n\n# Layout for variables from adae dataset.\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total number of AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_occurrences(\n \"WTOXGR\",\n var_labels = \"Number of patients with at least one AE by worst grade\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"fl_ser\",\n denom = \"N_col\"\n ) %>%\n count_occurrences(\n \"AEOUT\",\n denom = \"n\",\n var_labels = \"Number of patients with at least one AE by outcome\",\n show_labels = \"visible\"\n )\n\nresult_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adsl) <- col_info(result_adae)\nresult <- rbind(\n result_adsl,\n result_adae[seq_len(nrow(result_adae)), ]\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————————\nNumber of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) \n95% CI for % of patients with at least one AE (84.9, 95.3) (85.8, 95.8) (84.7, 95.2) \nDifference in % of patients with at least one AE 0.7 -0.1 \n 95% CI of difference (Wald, with correction) (-6.7, 8.2) (-7.8, 7.5) \nTotal number of AEs 609 622 703 \nNumber of patients with at least one AE by worst grade \n Grade 1 7 (5.2%) 9 (6.7%) 4 (3.0%) \n Grade 2 6 (4.5%) 10 (7.5%) 7 (5.3%) \n Grade 3 18 (13.4%) 14 (10.4%) 16 (12.1%) \n Grade 4 15 (11.2%) 20 (14.9%) 18 (13.6%) \n Grade 5 76 (56.7%) 70 (52.2%) 75 (56.8%) \nNumber of patients with at least one serious AE 104 (77.6%) 101 (75.4%) 99 (75.0%) \nNumber of patients with at least one AE by outcome \n Fatal outcome 76 (62.3%) 70 (56.9%) 75 (62.5%) \n Unresolved 66 (54.1%) 64 (52.0%) 70 (58.3%) \n Recovered/Resolved 73 (59.8%) 83 (67.5%) 88 (73.3%) \n Resolved with sequelae 44 (36.1%) 40 (32.5%) 43 (35.8%) \n Recovering/Resolving 81 (66.4%) 84 (68.3%) 88 (73.3%) \n Unknown outcome 38 (31.1%) 49 (39.8%) 44 (36.7%) \n\n\n\n\nThe confidence level can be changed through the conf_level argument.\n\nCodelyt_adsl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\", ref_group = \"A: Drug X\") %>%\n estimate_proportion(\n vars = \"AEFL\",\n conf_level = 0.90,\n method = \"clopper-pearson\",\n .labels = c(\n n_prop = \"Number of patients with at least one adverse event\",\n prop_ci = \"90% CI for % of patients with at least one AE (Clopper-Pearson)\"\n ),\n table_names = \"est_prop\"\n ) %>%\n estimate_proportion_diff(\n vars = \"AEFL\",\n conf_level = 0.90,\n method = \"newcombe\",\n .labels = c(\n diff = \"Difference in % of patients with at least one AE\",\n diff_ci = \"90% CI of difference (Newcombe)\"\n ),\n table_names = \"est_prop_diff\"\n )\n\nresult_adsl <- build_table(lyt_adsl, df = adsl1, alt_counts_df = adsl1)\n\n# Layout for variables from adae dataset.\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total number of AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_occurrences(\n \"WTOXGR\",\n var_labels = \"Number of patients with at least one AE by worst grade\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"fl_ser\",\n denom = \"N_col\"\n ) %>%\n count_occurrences(\n \"AEOUT\",\n denom = \"n\",\n var_labels = \"Number of patients with at least one AE by outcome\",\n show_labels = \"visible\"\n )\n\nresult_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adsl) <- col_info(result_adae)\nresult <- rbind(\n result_adsl,\n result_adae[seq_len(nrow(result_adae)), ]\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————\nNumber of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) \n90% CI for % of patients with at least one AE (Clopper-Pearson) (85.9, 94.8) (86.8, 95.3) (85.7, 94.7) \nDifference in % of patients with at least one AE 0.7 -0.1 \n 90% CI of difference (Newcombe) (-5.1, 6.6) (-6.1, 5.8) \nTotal number of AEs 609 622 703 \nNumber of patients with at least one AE by worst grade \n Grade 1 7 (5.2%) 9 (6.7%) 4 (3.0%) \n Grade 2 6 (4.5%) 10 (7.5%) 7 (5.3%) \n Grade 3 18 (13.4%) 14 (10.4%) 16 (12.1%) \n Grade 4 15 (11.2%) 20 (14.9%) 18 (13.6%) \n Grade 5 76 (56.7%) 70 (52.2%) 75 (56.8%) \nNumber of patients with at least one serious AE 104 (77.6%) 101 (75.4%) 99 (75.0%) \nNumber of patients with at least one AE by outcome \n Fatal outcome 76 (62.3%) 70 (56.9%) 75 (62.5%) \n Unresolved 66 (54.1%) 64 (52.0%) 70 (58.3%) \n Recovered/Resolved 73 (59.8%) 83 (67.5%) 88 (73.3%) \n Resolved with sequelae 44 (36.1%) 40 (32.5%) 43 (35.8%) \n Recovering/Resolving 81 (66.4%) 84 (68.3%) 88 (73.3%) \n Unknown outcome 38 (31.1%) 49 (39.8%) 44 (36.7%) \n\n\n\n\n\nCode# In progress\n\n\n\n\n\nCode# In progress\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] scda_0.1.6.9010 dplyr_1.1.2 tern_0.8.5.9006 \n[4] rtables_0.6.2.9001 magrittr_2.0.3 formatters_0.5.1.9001\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-0 gtable_0.3.3 jsonlite_1.8.7 compiler_4.3.1 \n [5] brio_1.1.3 tidyselect_1.2.0 tidyr_1.3.0 splines_4.3.1 \n [9] scales_1.2.1 yaml_2.3.7 fastmap_1.1.1 lattice_0.21-8 \n[13] ggplot2_3.4.2 R6_2.5.1 generics_0.1.3 knitr_1.43 \n[17] forcats_1.0.0 rbibutils_2.2.13 htmlwidgets_1.6.2 backports_1.4.1 \n[21] checkmate_2.2.0 tibble_3.2.1 munsell_0.5.0 pillar_1.9.0 \n[25] rlang_1.1.1 utf8_1.2.3 testthat_3.1.10 broom_1.0.5 \n[29] xfun_0.39 cli_3.6.1 Rdpack_2.4 digest_0.6.33 \n[33] grid_4.3.1 rstudioapi_0.15.0 lifecycle_1.0.3 vctrs_0.6.3 \n[37] evaluate_0.21 glue_1.6.2 codetools_0.2-19 survival_3.5-5 \n[41] fansi_1.0.4 colorspace_2.1-0 purrr_1.0.1 rmarkdown_2.23 \n[45] tools_4.3.1 pkgconfig_2.0.3 htmltools_0.5.5 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- colorspace [* -> 2.1-0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- fs [* -> 1.6.3]\n- generics [* -> 0.1.3]\n- ggplot2 [* -> 3.4.2]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- highr [* -> 0.10]\n- htmltools [* -> 0.5.5]\n- isoband [* -> 0.2.7]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- lattice [* -> 0.21-8]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- praise [* -> 1.0.0]\n- processx [* -> 3.8.2]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quantreg [* -> 5.96]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- survival [* -> 3.5-5]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- yaml [* -> 2.3.7]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- tern [* -> 0.8.5.9006]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/other/rmpt06.lock'.\n\n\nDownload" }, { "objectID": "tables/other/aovt03.html", @@ -39,70 +39,70 @@ "href": "tables/other/cmht01.html", "title": "CMHT01", "section": "", - "text": "Data Setup\nTable of Single Parameter\nTable of Multiple Parameters\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadqs <- df_explicit_na(adqs)\n\n\n\n\n\nCodeanl_01 <- adqs %>%\n filter(PARAMCD == \"FKSI-FWB\" & AVISIT == \"WEEK 1 DAY 8\") %>%\n mutate(is_rsp = PCHG > 15) %>%\n mutate(ARM = relevel(ARM, ref = \"A: Drug X\")) %>%\n var_relabel(ARM = \"Description of Planned Arm\") %>%\n mutate(strata = interaction(STRATA1, STRATA2, drop = TRUE))\n\nlyt_01 <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n estimate_proportion(vars = \"is_rsp\", table_names = \"est_prop\") %>%\n estimate_proportion_diff(\n var_labels = \"Unstratified Analysis\",\n vars = \"is_rsp\",\n show_labels = \"visible\",\n table_names = \"est_prop_diff\"\n ) %>%\n test_proportion_diff(vars = \"is_rsp\", table_names = \"test_prop\") %>%\n estimate_odds_ratio(vars = \"is_rsp\", table_names = \"est_or\") %>%\n estimate_proportion_diff(\n var_labels = \"Stratified Analysis\",\n vars = \"is_rsp\",\n show_labels = \"visible\",\n method = \"cmh\",\n variables = list(strata = \"strata\"),\n table_names = \"est_prop_diff_strat\"\n ) %>%\n test_proportion_diff(\n vars = \"is_rsp\",\n method = \"cmh\",\n variables = list(strata = \"strata\"),\n table_names = \"test_prop_strat\"\n ) %>%\n estimate_odds_ratio(\n vars = \"is_rsp\",\n variables = list(strata = \"strata\", arm = \"ARM\"),\n table_names = \"est_or_strat\"\n )\n\nresult <- build_table(\n lyt = lyt_01,\n df = anl_01,\n alt_counts_df = adsl\n)\nresult\n\n A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————\nResponders 49 (36.6%) 51 (38.1%) 47 (35.6%) \n95% CI (Wald, with correction) (28.0, 45.1) (29.5, 46.7) (27.1, 44.2) \nUnstratified Analysis \n Difference in Response rate (%) 1.5 -1.0 \n 95% CI (Wald, with correction) (-10.8, 13.8) (-13.3, 11.3) \n p-value (Chi-Squared Test) 0.8006 0.8704 \nOdds Ratio (95% CI) 1.07 (0.65 - 1.75) 0.96 (0.58 - 1.58)\nStratified Analysis \n Difference in Response rate (%) 2.8 -1.5 \n 95% CI (CMH, without correction) (-8.2, 13.8) (-13.0, 9.9) \n p-value (Cochran-Mantel-Haenszel Test) 0.6397 0.7952 \nOdds Ratio (95% CI) 1.12 (0.68 - 1.83) 0.99 (0.60 - 1.64)\n\n\n\n\n\nCodeanl_02 <- adqs %>%\n filter(AVISIT == \"WEEK 1 DAY 8\") %>%\n mutate(is_rsp = PCHG > 15) %>%\n mutate(PARAM = droplevels(PARAM)) %>%\n mutate(ARM = relevel(ARM, ref = \"A: Drug X\")) %>%\n var_relabel(ARM = \"Description of Planned Arm\") %>%\n mutate(strata = interaction(STRATA1, STRATA2, drop = TRUE))\n\nvar_labels(anl_02)[\"PARAM\"] <- \"Parameter\"\n\nsplit_fun <- drop_split_levels\n\nlyt_02 <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n split_rows_by(\n var = \"PARAM\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(anl_02$PARAM)\n ) %>%\n estimate_proportion(vars = \"is_rsp\", table_names = \"est_prop\") %>%\n estimate_proportion_diff(\n var_labels = \"Unstratified Analysis\",\n vars = \"is_rsp\",\n show_labels = \"visible\",\n table_names = \"est_prop_diff\"\n ) %>%\n test_proportion_diff(vars = \"is_rsp\", table_names = \"test_prop\") %>%\n estimate_odds_ratio(vars = \"is_rsp\", table_names = \"est_or\") %>%\n estimate_proportion_diff(\n var_labels = \"Stratified Analysis\",\n vars = \"is_rsp\",\n show_labels = \"visible\",\n method = \"cmh\",\n variables = list(strata = \"strata\"),\n table_names = \"est_prop_diff_strat\"\n ) %>%\n test_proportion_diff(\n vars = \"is_rsp\",\n method = \"cmh\",\n variables = list(strata = \"strata\"),\n table_names = \"test_prop_strat\"\n ) %>%\n estimate_odds_ratio(\n vars = \"is_rsp\",\n variables = list(strata = \"strata\", arm = \"ARM\"),\n table_names = \"est_or_strat\"\n )\n\nresult <- build_table(\n lyt = lyt_02,\n df = anl_02,\n alt_counts_df = adsl\n)\nresult\n\nParameter A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nBFI All Questions \n Responders 57 (42.5%) 65 (48.5%) 50 (37.9%) \n 95% CI (Wald, with correction) (33.8, 51.3) (39.7, 57.3) (29.2, 46.5) \n Unstratified Analysis \n Difference in Response rate (%) 6.0 -4.7 \n 95% CI (Wald, with correction) (-6.7, 18.6) (-17.2, 7.9) \n p-value (Chi-Squared Test) 0.3264 0.4385 \n Odds Ratio (95% CI) 1.27 (0.79 - 2.06) 0.82 (0.50 - 1.35)\n Stratified Analysis \n Difference in Response rate (%) 6.7 -5.1 \n 95% CI (CMH, without correction) (-5.0, 18.4) (-16.8, 6.6) \n p-value (Cochran-Mantel-Haenszel Test) 0.2781 0.4056 \n Odds Ratio (95% CI) 1.30 (0.80 - 2.11) 0.80 (0.49 - 1.32)\nFatigue Interference \n Responders 66 (49.3%) 50 (37.3%) 48 (36.4%) \n 95% CI (Wald, with correction) (40.4, 58.1) (28.8, 45.9) (27.8, 44.9) \n Unstratified Analysis \n Difference in Response rate (%) -11.9 -12.9 \n 95% CI (Wald, with correction) (-24.5, 0.6) (-25.4, -0.3) \n p-value (Chi-Squared Test) 0.0485 0.0337 \n Odds Ratio (95% CI) 0.61 (0.38 - 1.00) 0.59 (0.36 - 0.96)\n Stratified Analysis \n Difference in Response rate (%) -12.0 -13.3 \n 95% CI (CMH, without correction) (-23.7, -0.2) (-24.9, -1.6) \n p-value (Cochran-Mantel-Haenszel Test) 0.0518 0.0303 \n Odds Ratio (95% CI) 0.61 (0.37 - 0.99) 0.58 (0.36 - 0.96)\nFKSI-19 All Questions \n Responders 60 (44.8%) 57 (42.5%) 68 (51.5%) \n 95% CI (Wald, with correction) (36.0, 53.6) (33.8, 51.3) (42.6, 60.4) \n Unstratified Analysis \n Difference in Response rate (%) -2.2 6.7 \n 95% CI (Wald, with correction) (-14.9, 10.4) (-6.0, 19.5) \n p-value (Chi-Squared Test) 0.7118 0.2714 \n Odds Ratio (95% CI) 0.91 (0.56 - 1.48) 1.31 (0.81 - 2.12)\n Stratified Analysis \n Difference in Response rate (%) -2.8 5.6 \n 95% CI (CMH, without correction) (-14.3, 8.8) (-6.2, 17.4) \n p-value (Cochran-Mantel-Haenszel Test) 0.6442 0.3683 \n Odds Ratio (95% CI) 0.90 (0.56 - 1.47) 1.26 (0.77 - 2.04)\nFunction/Well-Being (GF1,GF3,GF7) \n Responders 49 (36.6%) 51 (38.1%) 47 (35.6%) \n 95% CI (Wald, with correction) (28.0, 45.1) (29.5, 46.7) (27.1, 44.2) \n Unstratified Analysis \n Difference in Response rate (%) 1.5 -1.0 \n 95% CI (Wald, with correction) (-10.8, 13.8) (-13.3, 11.3) \n p-value (Chi-Squared Test) 0.8006 0.8704 \n Odds Ratio (95% CI) 1.07 (0.65 - 1.75) 0.96 (0.58 - 1.58)\n Stratified Analysis \n Difference in Response rate (%) 2.8 -1.5 \n 95% CI (CMH, without correction) (-8.2, 13.8) (-13.0, 9.9) \n p-value (Cochran-Mantel-Haenszel Test) 0.6397 0.7952 \n Odds Ratio (95% CI) 1.12 (0.68 - 1.83) 0.99 (0.60 - 1.64)\nTreatment Side Effects (GP2,C5,GP5) \n Responders 62 (46.3%) 49 (36.6%) 51 (38.6%) \n 95% CI (Wald, with correction) (37.5, 55.1) (28.0, 45.1) (30.0, 47.3) \n Unstratified Analysis \n Difference in Response rate (%) -9.7 -7.6 \n 95% CI (Wald, with correction) (-22.2, 2.8) (-20.2, 5.0) \n p-value (Chi-Squared Test) 0.1069 0.2080 \n Odds Ratio (95% CI) 0.67 (0.41 - 1.09) 0.73 (0.45 - 1.19)\n Stratified Analysis \n Difference in Response rate (%) -9.6 -7.1 \n 95% CI (CMH, without correction) (-21.0, 1.8) (-18.8, 4.6) \n p-value (Cochran-Mantel-Haenszel Test) 0.1168 0.2426 \n Odds Ratio (95% CI) 0.67 (0.41 - 1.10) 0.73 (0.45 - 1.19)\n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\narm_ref_comp <- list(\n ARMCD = list(ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\")),\n ARM = list(ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\"))\n)\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL),\n cdisc_dataset(\"ADRS\", ADRS),\n code =\n 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")'\n ),\n modules = modules(\n tm_t_binary_outcome(\n label = \"Responders\",\n dataname = \"ADRS\",\n paramcd = choices_selected(\n choices = value_choices(ADRS, \"PARAMCD\", \"PARAM\"),\n selected = \"BESRSPI\"\n ),\n arm_var = choices_selected(\n choices = variable_choices(ADRS, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")),\n selected = \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n strata_var = choices_selected(\n choices = variable_choices(ADRS, c(\"SEX\", \"BMRKR2\")),\n select = NULL\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:15:37.8856 pid:12372 token:[] teal.modules.clinical Initializing tm_t_binary_outcome\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/other/cmht01.lock'.\n\n\nDownload" + "text": "Data Setup\nTable of Single Parameter\nTable of Multiple Parameters\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadqs <- df_explicit_na(adqs)\n\n\n\n\n\nCodeanl_01 <- adqs %>%\n filter(PARAMCD == \"FKSI-FWB\" & AVISIT == \"WEEK 1 DAY 8\") %>%\n mutate(is_rsp = PCHG > 15) %>%\n mutate(ARM = relevel(ARM, ref = \"A: Drug X\")) %>%\n var_relabel(ARM = \"Description of Planned Arm\") %>%\n mutate(strata = interaction(STRATA1, STRATA2, drop = TRUE))\n\nlyt_01 <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n estimate_proportion(vars = \"is_rsp\", table_names = \"est_prop\") %>%\n estimate_proportion_diff(\n var_labels = \"Unstratified Analysis\",\n vars = \"is_rsp\",\n show_labels = \"visible\",\n table_names = \"est_prop_diff\"\n ) %>%\n test_proportion_diff(vars = \"is_rsp\", table_names = \"test_prop\") %>%\n estimate_odds_ratio(vars = \"is_rsp\", table_names = \"est_or\") %>%\n estimate_proportion_diff(\n var_labels = \"Stratified Analysis\",\n vars = \"is_rsp\",\n show_labels = \"visible\",\n method = \"cmh\",\n variables = list(strata = \"strata\"),\n table_names = \"est_prop_diff_strat\"\n ) %>%\n test_proportion_diff(\n vars = \"is_rsp\",\n method = \"cmh\",\n variables = list(strata = \"strata\"),\n table_names = \"test_prop_strat\"\n ) %>%\n estimate_odds_ratio(\n vars = \"is_rsp\",\n variables = list(strata = \"strata\", arm = \"ARM\"),\n table_names = \"est_or_strat\"\n )\n\nresult <- build_table(\n lyt = lyt_01,\n df = anl_01,\n alt_counts_df = adsl\n)\nresult\n\n A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————\nResponders 49 (36.6%) 51 (38.1%) 47 (35.6%) \n95% CI (Wald, with correction) (28.0, 45.1) (29.5, 46.7) (27.1, 44.2) \nUnstratified Analysis \n Difference in Response rate (%) 1.5 -1.0 \n 95% CI (Wald, with correction) (-10.8, 13.8) (-13.3, 11.3) \n p-value (Chi-Squared Test) 0.8006 0.8704 \nOdds Ratio (95% CI) 1.07 (0.65 - 1.75) 0.96 (0.58 - 1.58)\nStratified Analysis \n Difference in Response rate (%) 2.8 -1.5 \n 95% CI (CMH, without correction) (-8.2, 13.8) (-13.0, 9.9) \n p-value (Cochran-Mantel-Haenszel Test) 0.6397 0.7952 \nOdds Ratio (95% CI) 1.12 (0.68 - 1.83) 0.99 (0.60 - 1.64)\n\n\n\n\n\nCodeanl_02 <- adqs %>%\n filter(AVISIT == \"WEEK 1 DAY 8\") %>%\n mutate(is_rsp = PCHG > 15) %>%\n mutate(PARAM = droplevels(PARAM)) %>%\n mutate(ARM = relevel(ARM, ref = \"A: Drug X\")) %>%\n var_relabel(ARM = \"Description of Planned Arm\") %>%\n mutate(strata = interaction(STRATA1, STRATA2, drop = TRUE))\n\nvar_labels(anl_02)[\"PARAM\"] <- \"Parameter\"\n\nsplit_fun <- drop_split_levels\n\nlyt_02 <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n split_rows_by(\n var = \"PARAM\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(anl_02$PARAM)\n ) %>%\n estimate_proportion(vars = \"is_rsp\", table_names = \"est_prop\") %>%\n estimate_proportion_diff(\n var_labels = \"Unstratified Analysis\",\n vars = \"is_rsp\",\n show_labels = \"visible\",\n table_names = \"est_prop_diff\"\n ) %>%\n test_proportion_diff(vars = \"is_rsp\", table_names = \"test_prop\") %>%\n estimate_odds_ratio(vars = \"is_rsp\", table_names = \"est_or\") %>%\n estimate_proportion_diff(\n var_labels = \"Stratified Analysis\",\n vars = \"is_rsp\",\n show_labels = \"visible\",\n method = \"cmh\",\n variables = list(strata = \"strata\"),\n table_names = \"est_prop_diff_strat\"\n ) %>%\n test_proportion_diff(\n vars = \"is_rsp\",\n method = \"cmh\",\n variables = list(strata = \"strata\"),\n table_names = \"test_prop_strat\"\n ) %>%\n estimate_odds_ratio(\n vars = \"is_rsp\",\n variables = list(strata = \"strata\", arm = \"ARM\"),\n table_names = \"est_or_strat\"\n )\n\nresult <- build_table(\n lyt = lyt_02,\n df = anl_02,\n alt_counts_df = adsl\n)\nresult\n\nParameter A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nBFI All Questions \n Responders 57 (42.5%) 65 (48.5%) 50 (37.9%) \n 95% CI (Wald, with correction) (33.8, 51.3) (39.7, 57.3) (29.2, 46.5) \n Unstratified Analysis \n Difference in Response rate (%) 6.0 -4.7 \n 95% CI (Wald, with correction) (-6.7, 18.6) (-17.2, 7.9) \n p-value (Chi-Squared Test) 0.3264 0.4385 \n Odds Ratio (95% CI) 1.27 (0.79 - 2.06) 0.82 (0.50 - 1.35)\n Stratified Analysis \n Difference in Response rate (%) 6.7 -5.1 \n 95% CI (CMH, without correction) (-5.0, 18.4) (-16.8, 6.6) \n p-value (Cochran-Mantel-Haenszel Test) 0.2781 0.4056 \n Odds Ratio (95% CI) 1.30 (0.80 - 2.11) 0.80 (0.49 - 1.32)\nFatigue Interference \n Responders 66 (49.3%) 50 (37.3%) 48 (36.4%) \n 95% CI (Wald, with correction) (40.4, 58.1) (28.8, 45.9) (27.8, 44.9) \n Unstratified Analysis \n Difference in Response rate (%) -11.9 -12.9 \n 95% CI (Wald, with correction) (-24.5, 0.6) (-25.4, -0.3) \n p-value (Chi-Squared Test) 0.0485 0.0337 \n Odds Ratio (95% CI) 0.61 (0.38 - 1.00) 0.59 (0.36 - 0.96)\n Stratified Analysis \n Difference in Response rate (%) -12.0 -13.3 \n 95% CI (CMH, without correction) (-23.7, -0.2) (-24.9, -1.6) \n p-value (Cochran-Mantel-Haenszel Test) 0.0518 0.0303 \n Odds Ratio (95% CI) 0.61 (0.37 - 0.99) 0.58 (0.36 - 0.96)\nFKSI-19 All Questions \n Responders 60 (44.8%) 57 (42.5%) 68 (51.5%) \n 95% CI (Wald, with correction) (36.0, 53.6) (33.8, 51.3) (42.6, 60.4) \n Unstratified Analysis \n Difference in Response rate (%) -2.2 6.7 \n 95% CI (Wald, with correction) (-14.9, 10.4) (-6.0, 19.5) \n p-value (Chi-Squared Test) 0.7118 0.2714 \n Odds Ratio (95% CI) 0.91 (0.56 - 1.48) 1.31 (0.81 - 2.12)\n Stratified Analysis \n Difference in Response rate (%) -2.8 5.6 \n 95% CI (CMH, without correction) (-14.3, 8.8) (-6.2, 17.4) \n p-value (Cochran-Mantel-Haenszel Test) 0.6442 0.3683 \n Odds Ratio (95% CI) 0.90 (0.56 - 1.47) 1.26 (0.77 - 2.04)\nFunction/Well-Being (GF1,GF3,GF7) \n Responders 49 (36.6%) 51 (38.1%) 47 (35.6%) \n 95% CI (Wald, with correction) (28.0, 45.1) (29.5, 46.7) (27.1, 44.2) \n Unstratified Analysis \n Difference in Response rate (%) 1.5 -1.0 \n 95% CI (Wald, with correction) (-10.8, 13.8) (-13.3, 11.3) \n p-value (Chi-Squared Test) 0.8006 0.8704 \n Odds Ratio (95% CI) 1.07 (0.65 - 1.75) 0.96 (0.58 - 1.58)\n Stratified Analysis \n Difference in Response rate (%) 2.8 -1.5 \n 95% CI (CMH, without correction) (-8.2, 13.8) (-13.0, 9.9) \n p-value (Cochran-Mantel-Haenszel Test) 0.6397 0.7952 \n Odds Ratio (95% CI) 1.12 (0.68 - 1.83) 0.99 (0.60 - 1.64)\nTreatment Side Effects (GP2,C5,GP5) \n Responders 62 (46.3%) 49 (36.6%) 51 (38.6%) \n 95% CI (Wald, with correction) (37.5, 55.1) (28.0, 45.1) (30.0, 47.3) \n Unstratified Analysis \n Difference in Response rate (%) -9.7 -7.6 \n 95% CI (Wald, with correction) (-22.2, 2.8) (-20.2, 5.0) \n p-value (Chi-Squared Test) 0.1069 0.2080 \n Odds Ratio (95% CI) 0.67 (0.41 - 1.09) 0.73 (0.45 - 1.19)\n Stratified Analysis \n Difference in Response rate (%) -9.6 -7.1 \n 95% CI (CMH, without correction) (-21.0, 1.8) (-18.8, 4.6) \n p-value (Cochran-Mantel-Haenszel Test) 0.1168 0.2426 \n Odds Ratio (95% CI) 0.67 (0.41 - 1.10) 0.73 (0.45 - 1.19)\n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\narm_ref_comp <- list(\n ARMCD = list(ref = \"ARM B\", comp = c(\"ARM A\", \"ARM C\")),\n ARM = list(ref = \"B: Placebo\", comp = c(\"A: Drug X\", \"C: Combination\"))\n)\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL),\n cdisc_dataset(\"ADRS\", ADRS),\n code =\n 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")'\n ),\n modules = modules(\n tm_t_binary_outcome(\n label = \"Responders\",\n dataname = \"ADRS\",\n paramcd = choices_selected(\n choices = value_choices(ADRS, \"PARAMCD\", \"PARAM\"),\n selected = \"BESRSPI\"\n ),\n arm_var = choices_selected(\n choices = variable_choices(ADRS, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")),\n selected = \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n strata_var = choices_selected(\n choices = variable_choices(ADRS, c(\"SEX\", \"BMRKR2\")),\n select = NULL\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:34:25.0897 pid:12376 token:[] teal.modules.clinical Initializing tm_t_binary_outcome\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/other/cmht01.lock'.\n\n\nDownload" }, { "objectID": "tables/adverse-events/aet09.html", "href": "tables/adverse-events/aet09.html", "title": "AET09", "section": "", - "text": "Data Setup\nStandard Table\nTable Including High-Level Terms\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\nadae_labels <- var_labels(adae)\n\nadae_f <- adae %>%\n filter(AEREL == \"Y\")\n\nvar_labels(adae_f) <- adae_labels\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n add_overall_col(label = \"All Patients\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event related to study drug\",\n nonunique = \"Overall total number of events related to study drug\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae_f$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event related to study drug\",\n nonunique = \"Total number of events related to study drug\"\n )\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = -1L\n ) %>%\n append_varlabels(adae_f, \"AEDECOD\", indent = 1L)\n\ntbl1 <- build_table(\n lyt = lyt,\n df = adae_f,\n alt_counts_df = adsl\n) %>%\n prune_table()\n\nresult <- tbl1 %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination All Patients\n Dictionary-Derived Term (N=134) (N=134) (N=132) (N=400) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event related to study drug 105 (78.4%) 108 (80.6%) 109 (82.6%) 322 (80.5%) \nOverall total number of events related to study drug 282 299 336 917 \ncl D.2 \n Total number of patients with at least one adverse event related to study drug 47 (35.1%) 58 (43.3%) 57 (43.2%) 162 (40.5%) \n Total number of events related to study drug 62 72 74 208 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) 162 (40.5%) \ncl D.1 \n Total number of patients with at least one adverse event related to study drug 50 (37.3%) 42 (31.3%) 51 (38.6%) 143 (35.8%) \n Total number of events related to study drug 61 51 71 183 \n dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) 143 (35.8%) \ncl B.1 \n Total number of patients with at least one adverse event related to study drug 47 (35.1%) 49 (36.6%) 43 (32.6%) 139 (34.8%) \n Total number of events related to study drug 56 60 62 178 \n dcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) 139 (34.8%) \ncl C.2 \n Total number of patients with at least one adverse event related to study drug 35 (26.1%) 48 (35.8%) 55 (41.7%) 138 (34.5%) \n Total number of events related to study drug 48 53 65 166 \n dcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) 138 (34.5%) \ncl C.1 \n Total number of patients with at least one adverse event related to study drug 43 (32.1%) 46 (34.3%) 43 (32.6%) 132 (33.0%) \n Total number of events related to study drug 55 63 64 182 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) 132 (33.0%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event related to study drug\",\n nonunique = \"Overall total number of events related to study drug\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n indent_mod = 1L,\n label_pos = \"topleft\",\n split_label = obj_label(adae_f$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event related to study drug\",\n nonunique = \"Total number of events related to study drug\"\n )\n ) %>%\n split_rows_by(\n \"AEHLT\",\n child_labels = \"visible\",\n nested = TRUE,\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae_f$AEHLT)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event related to study drug\",\n nonunique = \"Total number of events related to study drug\"\n )\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = c(count_fraction = -1L)\n ) %>%\n append_varlabels(adae_f, c(\"AEDECOD\"), indent = 2L)\n\ntbl2 <- build_table(\n lyt = lyt,\n df = adae_f,\n alt_counts_df = adsl\n) %>%\n prune_table()\n\nresult <- tbl2 %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEHLT\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEHLT\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nBody System or Organ Class \n High Level Term A: Drug X B: Placebo C: Combination\n Dictionary-Derived Term (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event related to study drug 105 (78.4%) 108 (80.6%) 109 (82.6%) \nOverall total number of events related to study drug 282 299 336 \n cl D.2 \n Total number of patients with at least one adverse event related to study drug 47 (35.1%) 58 (43.3%) 57 (43.2%) \n Total number of events related to study drug 62 72 74 \n hlt D.2.1.5 \n Total number of patients with at least one adverse event related to study drug 47 (35.1%) 58 (43.3%) 57 (43.2%) \n Total number of events related to study drug 62 72 74 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) \n cl D.1 \n Total number of patients with at least one adverse event related to study drug 50 (37.3%) 42 (31.3%) 51 (38.6%) \n Total number of events related to study drug 61 51 71 \n hlt D.1.1.1 \n Total number of patients with at least one adverse event related to study drug 50 (37.3%) 42 (31.3%) 51 (38.6%) \n Total number of events related to study drug 61 51 71 \n dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) \n cl B.1 \n Total number of patients with at least one adverse event related to study drug 47 (35.1%) 49 (36.6%) 43 (32.6%) \n Total number of events related to study drug 56 60 62 \n hlt B.1.1.1 \n Total number of patients with at least one adverse event related to study drug 47 (35.1%) 49 (36.6%) 43 (32.6%) \n Total number of events related to study drug 56 60 62 \n dcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) \n cl C.2 \n Total number of patients with at least one adverse event related to study drug 35 (26.1%) 48 (35.8%) 55 (41.7%) \n Total number of events related to study drug 48 53 65 \n hlt C.2.1.2 \n Total number of patients with at least one adverse event related to study drug 35 (26.1%) 48 (35.8%) 55 (41.7%) \n Total number of events related to study drug 48 53 65 \n dcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) \n cl C.1 \n Total number of patients with at least one adverse event related to study drug 43 (32.1%) 46 (34.3%) 43 (32.6%) \n Total number of events related to study drug 55 63 64 \n hlt C.1.1.1 \n Total number of patients with at least one adverse event related to study drug 43 (32.1%) 46 (34.3%) 43 (32.6%) \n Total number of events related to study drug 55 63 64 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(teal)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\n \"ADSL\",\n adsl,\n code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'\n ),\n cdisc_dataset(\n \"ADAE\",\n adae,\n code = 'ADAE <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adae\"))'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_events(\n label = \"Adverse Events Related to Study Drug\",\n dataname = \"ADAE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\")),\n selected = c(\"AEDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(adae, c(\"AEBODSYS\", \"AEHLT\")),\n selected = c(\"AEBODSYS\")\n ),\n add_total = FALSE,\n event_type = \"adverse event related to study drug\", # define event type here\n )\n ),\n filter = list(ADAE = list(AEREL = \"Y\")) # related AEs only\n)\n\n[INFO] 2023-08-04 15:14:34.6029 pid:12160 token:[] teal.modules.clinical Initializing tm_t_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet09.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable Including High-Level Terms\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\nadae_labels <- var_labels(adae)\n\nadae_f <- adae %>%\n filter(AEREL == \"Y\")\n\nvar_labels(adae_f) <- adae_labels\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n add_overall_col(label = \"All Patients\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event related to study drug\",\n nonunique = \"Overall total number of events related to study drug\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae_f$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event related to study drug\",\n nonunique = \"Total number of events related to study drug\"\n )\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = -1L\n ) %>%\n append_varlabels(adae_f, \"AEDECOD\", indent = 1L)\n\ntbl1 <- build_table(\n lyt = lyt,\n df = adae_f,\n alt_counts_df = adsl\n) %>%\n prune_table()\n\nresult <- tbl1 %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination All Patients\n Dictionary-Derived Term (N=134) (N=134) (N=132) (N=400) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event related to study drug 105 (78.4%) 108 (80.6%) 109 (82.6%) 322 (80.5%) \nOverall total number of events related to study drug 282 299 336 917 \ncl D.2 \n Total number of patients with at least one adverse event related to study drug 47 (35.1%) 58 (43.3%) 57 (43.2%) 162 (40.5%) \n Total number of events related to study drug 62 72 74 208 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) 162 (40.5%) \ncl D.1 \n Total number of patients with at least one adverse event related to study drug 50 (37.3%) 42 (31.3%) 51 (38.6%) 143 (35.8%) \n Total number of events related to study drug 61 51 71 183 \n dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) 143 (35.8%) \ncl B.1 \n Total number of patients with at least one adverse event related to study drug 47 (35.1%) 49 (36.6%) 43 (32.6%) 139 (34.8%) \n Total number of events related to study drug 56 60 62 178 \n dcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) 139 (34.8%) \ncl C.2 \n Total number of patients with at least one adverse event related to study drug 35 (26.1%) 48 (35.8%) 55 (41.7%) 138 (34.5%) \n Total number of events related to study drug 48 53 65 166 \n dcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) 138 (34.5%) \ncl C.1 \n Total number of patients with at least one adverse event related to study drug 43 (32.1%) 46 (34.3%) 43 (32.6%) 132 (33.0%) \n Total number of events related to study drug 55 63 64 182 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) 132 (33.0%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event related to study drug\",\n nonunique = \"Overall total number of events related to study drug\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n indent_mod = 1L,\n label_pos = \"topleft\",\n split_label = obj_label(adae_f$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event related to study drug\",\n nonunique = \"Total number of events related to study drug\"\n )\n ) %>%\n split_rows_by(\n \"AEHLT\",\n child_labels = \"visible\",\n nested = TRUE,\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae_f$AEHLT)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event related to study drug\",\n nonunique = \"Total number of events related to study drug\"\n )\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = c(count_fraction = -1L)\n ) %>%\n append_varlabels(adae_f, c(\"AEDECOD\"), indent = 2L)\n\ntbl2 <- build_table(\n lyt = lyt,\n df = adae_f,\n alt_counts_df = adsl\n) %>%\n prune_table()\n\nresult <- tbl2 %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEHLT\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEHLT\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nBody System or Organ Class \n High Level Term A: Drug X B: Placebo C: Combination\n Dictionary-Derived Term (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event related to study drug 105 (78.4%) 108 (80.6%) 109 (82.6%) \nOverall total number of events related to study drug 282 299 336 \n cl D.2 \n Total number of patients with at least one adverse event related to study drug 47 (35.1%) 58 (43.3%) 57 (43.2%) \n Total number of events related to study drug 62 72 74 \n hlt D.2.1.5 \n Total number of patients with at least one adverse event related to study drug 47 (35.1%) 58 (43.3%) 57 (43.2%) \n Total number of events related to study drug 62 72 74 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) \n cl D.1 \n Total number of patients with at least one adverse event related to study drug 50 (37.3%) 42 (31.3%) 51 (38.6%) \n Total number of events related to study drug 61 51 71 \n hlt D.1.1.1 \n Total number of patients with at least one adverse event related to study drug 50 (37.3%) 42 (31.3%) 51 (38.6%) \n Total number of events related to study drug 61 51 71 \n dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) \n cl B.1 \n Total number of patients with at least one adverse event related to study drug 47 (35.1%) 49 (36.6%) 43 (32.6%) \n Total number of events related to study drug 56 60 62 \n hlt B.1.1.1 \n Total number of patients with at least one adverse event related to study drug 47 (35.1%) 49 (36.6%) 43 (32.6%) \n Total number of events related to study drug 56 60 62 \n dcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) \n cl C.2 \n Total number of patients with at least one adverse event related to study drug 35 (26.1%) 48 (35.8%) 55 (41.7%) \n Total number of events related to study drug 48 53 65 \n hlt C.2.1.2 \n Total number of patients with at least one adverse event related to study drug 35 (26.1%) 48 (35.8%) 55 (41.7%) \n Total number of events related to study drug 48 53 65 \n dcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) \n cl C.1 \n Total number of patients with at least one adverse event related to study drug 43 (32.1%) 46 (34.3%) 43 (32.6%) \n Total number of events related to study drug 55 63 64 \n hlt C.1.1.1 \n Total number of patients with at least one adverse event related to study drug 43 (32.1%) 46 (34.3%) 43 (32.6%) \n Total number of events related to study drug 55 63 64 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(teal)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\n \"ADSL\",\n adsl,\n code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'\n ),\n cdisc_dataset(\n \"ADAE\",\n adae,\n code = 'ADAE <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adae\"))'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_events(\n label = \"Adverse Events Related to Study Drug\",\n dataname = \"ADAE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\")),\n selected = c(\"AEDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(adae, c(\"AEBODSYS\", \"AEHLT\")),\n selected = c(\"AEBODSYS\")\n ),\n add_total = FALSE,\n event_type = \"adverse event related to study drug\", # define event type here\n )\n ),\n filter = list(ADAE = list(AEREL = \"Y\")) # related AEs only\n)\n\n[INFO] 2023-08-04 15:33:16.3779 pid:12164 token:[] teal.modules.clinical Initializing tm_t_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet09.lock'.\n\n\nDownload" }, { "objectID": "tables/adverse-events/aet06.html", "href": "tables/adverse-events/aet06.html", "title": "AET06", "section": "", - "text": "Data Setup\nAdverse Events by Sex\nAdverse Events by Other Baseline Characteristics (e.g. Biomarker Group)\nAdverse Events by Baseline Characteristic from ADSUB (e.g. BMI Category)\nAdverse Events by Regrouped Baseline Characteristics (e.g. Race)\nAdverse Events by Baseline Characteristics (e.g. Sex) Including High-Level Terms\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\nadsub <- synthetic_cdisc_dataset(\"latest\", \"adsub\")\n\nadsub_bmi <- adsub %>%\n filter(PARAMCD == \"BBMISI\") %>%\n select(STUDYID, USUBJID, AVALCAT1) %>%\n mutate(\n AVALCAT1 = factor(AVALCAT1, levels = c(\"<18.5\", \"18.5 - 24.9\", \"25 - 29.9\", \">30\"))\n )\n\nadsl <- adsl %>%\n mutate(\n RACE1 = case_when(\n RACE == \"WHITE\" ~ \"WHITE\",\n TRUE ~ \"NON-WHITE\"\n ),\n RACE1 = factor(\n RACE1,\n levels = c(\"WHITE\", \"NON-WHITE\")\n )\n ) %>%\n left_join(\n y = adsub_bmi,\n by = c(\"STUDYID\", \"USUBJID\")\n )\n\nadae_labels <- var_labels(adae)\n\nadae <- adae %>%\n mutate(\n RACE1 = case_when(\n RACE == \"WHITE\" ~ \"WHITE\",\n TRUE ~ \"NON-WHITE\"\n ),\n RACE1 = factor(\n RACE1,\n levels = c(\"WHITE\", \"NON-WHITE\")\n )\n ) %>%\n left_join(\n y = adsub_bmi,\n by = c(\"STUDYID\", \"USUBJID\")\n )\n\nvar_labels(adae) <- c(adae_labels, \"RACE1\" = \"RACE WHITE/NON-WHITE\", \"AVALCAT1\" = \"Baseline BMI Category\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\nadsub_bmi <- df_explicit_na(adsub_bmi)\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_cols_by(\"SEX\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n # Sorted by decreasing frequency across all groups by System Organ Class and Preferred Term.\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination \n Dictionary-Derived Term F M F M F M \n (N=79) (N=55) (N=82) (N=52) (N=70) (N=62) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 72 (91.1%) 50 (90.9%) 77 (93.9%) 46 (88.5%) 65 (92.9%) 55 (88.7%)\nOverall total number of events 377 232 419 203 378 325 \ncl A.1 \n Total number of patients with at least one adverse event 53 (67.1%) 25 (45.5%) 51 (62.2%) 24 (46.2%) 43 (61.4%) 46 (74.2%)\n Total number of events 85 47 93 37 86 74 \n dcd A.1.1.1.1 34 (43.0%) 16 (29.1%) 31 (37.8%) 14 (26.9%) 33 (47.1%) 30 (48.4%)\n dcd A.1.1.1.2 32 (40.5%) 16 (29.1%) 33 (40.2%) 15 (28.8%) 24 (34.3%) 26 (41.9%)\ncl B.2 \n Total number of patients with at least one adverse event 46 (58.2%) 33 (60.0%) 45 (54.9%) 29 (55.8%) 44 (62.9%) 41 (66.1%)\n Total number of events 81 48 86 52 64 79 \n dcd B.2.2.3.1 30 (38.0%) 18 (32.7%) 32 (39.0%) 22 (42.3%) 26 (37.1%) 25 (40.3%)\n dcd B.2.1.2.1 29 (36.7%) 20 (36.4%) 30 (36.6%) 14 (26.9%) 22 (31.4%) 30 (48.4%)\ncl D.1 \n Total number of patients with at least one adverse event 45 (57.0%) 34 (61.8%) 40 (48.8%) 27 (51.9%) 41 (58.6%) 39 (62.9%)\n Total number of events 72 55 64 42 73 62 \n dcd D.1.1.1.1 25 (31.6%) 25 (45.5%) 29 (35.4%) 13 (25.0%) 27 (38.6%) 24 (38.7%)\n dcd D.1.1.4.2 30 (38.0%) 18 (32.7%) 22 (26.8%) 20 (38.5%) 27 (38.6%) 23 (37.1%)\ncl D.2 \n Total number of patients with at least one adverse event 26 (32.9%) 21 (38.2%) 40 (48.8%) 18 (34.6%) 34 (48.6%) 23 (37.1%)\n Total number of events 35 27 49 23 43 31 \n dcd D.2.1.5.3 26 (32.9%) 21 (38.2%) 40 (48.8%) 18 (34.6%) 34 (48.6%) 23 (37.1%)\ncl B.1 \n Total number of patients with at least one adverse event 28 (35.4%) 19 (34.5%) 33 (40.2%) 16 (30.8%) 24 (34.3%) 19 (30.6%)\n Total number of events 33 23 36 24 35 27 \n dcd B.1.1.1.1 28 (35.4%) 19 (34.5%) 33 (40.2%) 16 (30.8%) 24 (34.3%) 19 (30.6%)\ncl C.2 \n Total number of patients with at least one adverse event 23 (29.1%) 12 (21.8%) 36 (43.9%) 12 (23.1%) 30 (42.9%) 25 (40.3%)\n Total number of events 32 16 39 14 33 32 \n dcd C.2.1.2.1 23 (29.1%) 12 (21.8%) 36 (43.9%) 12 (23.1%) 30 (42.9%) 25 (40.3%)\ncl C.1 \n Total number of patients with at least one adverse event 30 (38.0%) 13 (23.6%) 36 (43.9%) 10 (19.2%) 27 (38.6%) 16 (25.8%)\n Total number of events 39 16 52 11 44 20 \n dcd C.1.1.1.3 30 (38.0%) 13 (23.6%) 36 (43.9%) 10 (19.2%) 27 (38.6%) 16 (25.8%)\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_cols_by(\"BMRKR2\") %>%\n analyze_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n # Sorted by decreasing frequency across all groups by System Organ Class and Preferred Term.\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination \n Dictionary-Derived Term LOW MEDIUM HIGH LOW MEDIUM HIGH LOW MEDIUM HIGH \n (N=50) (N=37) (N=47) (N=45) (N=56) (N=33) (N=40) (N=42) (N=50) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 46 (92.0%) 34 (91.9%) 42 (89.4%) 40 (88.9%) 53 (94.6%) 30 (90.9%) 36 (90.0%) 39 (92.9%) 45 (90.0%)\nOverall total number of events 248 166 195 196 261 165 220 258 225 \ncl A.1 \n Total number of patients with at least one adverse event 31 (62.0%) 19 (51.4%) 28 (59.6%) 25 (55.6%) 31 (55.4%) 19 (57.6%) 28 (70.0%) 30 (71.4%) 31 (62.0%)\n Total number of events 53 34 45 46 54 30 61 51 48 \n dcd A.1.1.1.1 22 (44.0%) 10 (27.0%) 18 (38.3%) 14 (31.1%) 20 (35.7%) 11 (33.3%) 21 (52.5%) 24 (57.1%) 18 (36.0%)\n dcd A.1.1.1.2 17 (34.0%) 13 (35.1%) 18 (38.3%) 18 (40.0%) 18 (32.1%) 12 (36.4%) 18 (45.0%) 14 (33.3%) 18 (36.0%)\ncl B.2 \n Total number of patients with at least one adverse event 34 (68.0%) 21 (56.8%) 24 (51.1%) 23 (51.1%) 33 (58.9%) 18 (54.5%) 24 (60.0%) 27 (64.3%) 34 (68.0%)\n Total number of events 53 37 39 40 61 37 40 47 56 \n dcd B.2.2.3.1 21 (42.0%) 13 (35.1%) 14 (29.8%) 18 (40.0%) 22 (39.3%) 14 (42.4%) 16 (40.0%) 15 (35.7%) 20 (40.0%)\n dcd B.2.1.2.1 21 (42.0%) 11 (29.7%) 17 (36.2%) 11 (24.4%) 21 (37.5%) 12 (36.4%) 13 (32.5%) 17 (40.5%) 22 (44.0%)\ncl D.1 \n Total number of patients with at least one adverse event 34 (68.0%) 21 (56.8%) 24 (51.1%) 18 (40.0%) 33 (58.9%) 16 (48.5%) 25 (62.5%) 31 (73.8%) 24 (48.0%)\n Total number of events 51 35 41 27 49 30 45 53 37 \n dcd D.1.1.1.1 19 (38.0%) 16 (43.2%) 15 (31.9%) 13 (28.9%) 19 (33.9%) 10 (30.3%) 14 (35.0%) 22 (52.4%) 15 (30.0%)\n dcd D.1.1.4.2 21 (42.0%) 9 (24.3%) 18 (38.3%) 9 (20.0%) 20 (35.7%) 13 (39.4%) 17 (42.5%) 18 (42.9%) 15 (30.0%)\ncl D.2 \n Total number of patients with at least one adverse event 20 (40.0%) 12 (32.4%) 15 (31.9%) 19 (42.2%) 22 (39.3%) 17 (51.5%) 13 (32.5%) 23 (54.8%) 21 (42.0%)\n Total number of events 27 13 22 23 26 23 17 33 24 \n dcd D.2.1.5.3 20 (40.0%) 12 (32.4%) 15 (31.9%) 19 (42.2%) 22 (39.3%) 17 (51.5%) 13 (32.5%) 23 (54.8%) 21 (42.0%)\ncl B.1 \n Total number of patients with at least one adverse event 14 (28.0%) 14 (37.8%) 19 (40.4%) 15 (33.3%) 24 (42.9%) 10 (30.3%) 14 (35.0%) 15 (35.7%) 14 (28.0%)\n Total number of events 16 19 21 18 25 17 19 25 18 \n dcd B.1.1.1.1 14 (28.0%) 14 (37.8%) 19 (40.4%) 15 (33.3%) 24 (42.9%) 10 (30.3%) 14 (35.0%) 15 (35.7%) 14 (28.0%)\ncl C.2 \n Total number of patients with at least one adverse event 18 (36.0%) 8 (21.6%) 9 (19.1%) 15 (33.3%) 22 (39.3%) 11 (33.3%) 18 (45.0%) 17 (40.5%) 20 (40.0%)\n Total number of events 27 9 12 18 23 12 20 20 25 \n dcd C.2.1.2.1 18 (36.0%) 8 (21.6%) 9 (19.1%) 15 (33.3%) 22 (39.3%) 11 (33.3%) 18 (45.0%) 17 (40.5%) 20 (40.0%)\ncl C.1 \n Total number of patients with at least one adverse event 17 (34.0%) 14 (37.8%) 12 (25.5%) 17 (37.8%) 17 (30.4%) 12 (36.4%) 12 (30.0%) 17 (40.5%) 14 (28.0%)\n Total number of events 21 19 15 24 23 16 18 29 17 \n dcd C.1.1.1.3 17 (34.0%) 14 (37.8%) 12 (25.5%) 17 (37.8%) 17 (30.4%) 12 (36.4%) 12 (30.0%) 17 (40.5%) 14 (28.0%)\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_cols_by(\"AVALCAT1\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n # Sorted by decreasing frequency across all groups by System Organ Class and Preferred Term.\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination \n Dictionary-Derived Term <18.5 18.5 - 24.9 25 - 29.9 >30 <18.5 18.5 - 24.9 25 - 29.9 >30 <18.5 18.5 - 24.9 25 - 29.9 >30 \n (N=44) (N=17) (N=11) (N=62) (N=37) (N=18) (N=10) (N=69) (N=28) (N=20) (N=18) (N=66) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 41 (93.2%) 14 (82.4%) 11 (100%) 56 (90.3%) 35 (94.6%) 16 (88.9%) 9 (90.0%) 63 (91.3%) 25 (89.3%) 19 (95.0%) 15 (83.3%) 61 (92.4%)\nOverall total number of events 186 80 66 277 174 89 47 312 137 129 100 337 \ncl A.1 \n Total number of patients with at least one adverse event 23 (52.3%) 12 (70.6%) 7 (63.6%) 36 (58.1%) 19 (51.4%) 10 (55.6%) 6 (60.0%) 40 (58.0%) 16 (57.1%) 13 (65.0%) 14 (77.8%) 46 (69.7%)\n Total number of events 38 22 13 59 35 22 6 67 30 23 30 77 \n dcd A.1.1.1.1 14 (31.8%) 7 (41.2%) 3 (27.3%) 26 (41.9%) 12 (32.4%) 6 (33.3%) 4 (40.0%) 23 (33.3%) 12 (42.9%) 7 (35.0%) 13 (72.2%) 31 (47.0%)\n dcd A.1.1.1.2 15 (34.1%) 8 (47.1%) 5 (45.5%) 20 (32.3%) 12 (32.4%) 8 (44.4%) 2 (20.0%) 26 (37.7%) 9 (32.1%) 7 (35.0%) 7 (38.9%) 27 (40.9%)\ncl B.2 \n Total number of patients with at least one adverse event 23 (52.3%) 10 (58.8%) 8 (72.7%) 38 (61.3%) 21 (56.8%) 8 (44.4%) 7 (70.0%) 38 (55.1%) 16 (57.1%) 16 (80.0%) 12 (66.7%) 41 (62.1%)\n Total number of events 37 19 12 61 41 18 12 67 28 28 18 69 \n dcd B.2.2.3.1 13 (29.5%) 7 (41.2%) 6 (54.5%) 22 (35.5%) 14 (37.8%) 7 (38.9%) 6 (60.0%) 27 (39.1%) 7 (25.0%) 13 (65.0%) 5 (27.8%) 26 (39.4%)\n dcd B.2.1.2.1 14 (31.8%) 8 (47.1%) 4 (36.4%) 23 (37.1%) 14 (37.8%) 6 (33.3%) 4 (40.0%) 20 (29.0%) 13 (46.4%) 8 (40.0%) 8 (44.4%) 23 (34.8%)\ncl D.1 \n Total number of patients with at least one adverse event 24 (54.5%) 9 (52.9%) 8 (72.7%) 38 (61.3%) 18 (48.6%) 5 (27.8%) 7 (70.0%) 37 (53.6%) 15 (53.6%) 12 (60.0%) 11 (61.1%) 42 (63.6%)\n Total number of events 38 11 17 61 30 11 14 51 30 23 16 66 \n dcd D.1.1.1.1 13 (29.5%) 7 (41.2%) 7 (63.6%) 23 (37.1%) 13 (35.1%) 3 (16.7%) 4 (40.0%) 22 (31.9%) 12 (42.9%) 6 (30.0%) 8 (44.4%) 25 (37.9%)\n dcd D.1.1.4.2 16 (36.4%) 4 (23.5%) 6 (54.5%) 22 (35.5%) 10 (27.0%) 4 (22.2%) 5 (50.0%) 23 (33.3%) 10 (35.7%) 9 (45.0%) 6 (33.3%) 25 (37.9%)\ncl D.2 \n Total number of patients with at least one adverse event 14 (31.8%) 7 (41.2%) 5 (45.5%) 21 (33.9%) 14 (37.8%) 10 (55.6%) 4 (40.0%) 30 (43.5%) 13 (46.4%) 10 (50.0%) 7 (38.9%) 27 (40.9%)\n Total number of events 20 7 10 25 17 14 5 36 18 15 10 31 \n dcd D.2.1.5.3 14 (31.8%) 7 (41.2%) 5 (45.5%) 21 (33.9%) 14 (37.8%) 10 (55.6%) 4 (40.0%) 30 (43.5%) 13 (46.4%) 10 (50.0%) 7 (38.9%) 27 (40.9%)\ncl B.1 \n Total number of patients with at least one adverse event 17 (38.6%) 5 (29.4%) 7 (63.6%) 18 (29.0%) 14 (37.8%) 8 (44.4%) 4 (40.0%) 23 (33.3%) 7 (25.0%) 10 (50.0%) 7 (38.9%) 19 (28.8%)\n Total number of events 22 5 7 22 16 11 4 29 11 12 8 31 \n dcd B.1.1.1.1 17 (38.6%) 5 (29.4%) 7 (63.6%) 18 (29.0%) 14 (37.8%) 8 (44.4%) 4 (40.0%) 23 (33.3%) 7 (25.0%) 10 (50.0%) 7 (38.9%) 19 (28.8%)\ncl C.2 \n Total number of patients with at least one adverse event 14 (31.8%) 4 (23.5%) 2 (18.2%) 15 (24.2%) 15 (40.5%) 5 (27.8%) 4 (40.0%) 24 (34.8%) 10 (35.7%) 13 (65.0%) 8 (44.4%) 24 (36.4%)\n Total number of events 17 9 3 19 15 6 5 27 12 16 9 28 \n dcd C.2.1.2.1 14 (31.8%) 4 (23.5%) 2 (18.2%) 15 (24.2%) 15 (40.5%) 5 (27.8%) 4 (40.0%) 24 (34.8%) 10 (35.7%) 13 (65.0%) 8 (44.4%) 24 (36.4%)\ncl C.1 \n Total number of patients with at least one adverse event 11 (25.0%) 4 (23.5%) 4 (36.4%) 24 (38.7%) 13 (35.1%) 6 (33.3%) 1 (10.0%) 26 (37.7%) 6 (21.4%) 7 (35.0%) 6 (33.3%) 24 (36.4%)\n Total number of events 14 7 4 30 20 7 1 35 8 12 9 35 \n dcd C.1.1.1.3 11 (25.0%) 4 (23.5%) 4 (36.4%) 24 (38.7%) 13 (35.1%) 6 (33.3%) 1 (10.0%) 26 (37.7%) 6 (21.4%) 7 (35.0%) 6 (33.3%) 24 (36.4%)\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_cols_by(\"RACE1\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n prune_table() %>%\n # Sorted by decreasing frequency across all groups by System Organ Class and Preferred Term.\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination \n Dictionary-Derived Term WHITE NON-WHITE WHITE NON-WHITE WHITE NON-WHITE \n (N=27) (N=107) (N=26) (N=108) (N=21) (N=111) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 26 (96.3%) 96 (89.7%) 25 (96.2%) 98 (90.7%) 21 (100%) 99 (89.2%)\nOverall total number of events 109 500 144 478 114 589 \ncl A.1 \n Total number of patients with at least one adverse event 16 (59.3%) 62 (57.9%) 21 (80.8%) 54 (50.0%) 15 (71.4%) 74 (66.7%)\n Total number of events 30 102 37 93 25 135 \n dcd A.1.1.1.1 9 (33.3%) 41 (38.3%) 14 (53.8%) 31 (28.7%) 10 (47.6%) 53 (47.7%)\n dcd A.1.1.1.2 11 (40.7%) 37 (34.6%) 13 (50.0%) 35 (32.4%) 9 (42.9%) 41 (36.9%)\ncl B.2 \n Total number of patients with at least one adverse event 15 (55.6%) 64 (59.8%) 16 (61.5%) 58 (53.7%) 12 (57.1%) 73 (65.8%)\n Total number of events 18 111 28 110 17 126 \n dcd B.2.2.3.1 4 (14.8%) 44 (41.1%) 10 (38.5%) 44 (40.7%) 5 (23.8%) 46 (41.4%)\n dcd B.2.1.2.1 12 (44.4%) 37 (34.6%) 9 (34.6%) 35 (32.4%) 7 (33.3%) 45 (40.5%)\ncl D.1 \n Total number of patients with at least one adverse event 18 (66.7%) 61 (57.0%) 15 (57.7%) 52 (48.1%) 14 (66.7%) 66 (59.5%)\n Total number of events 27 100 23 83 27 108 \n dcd D.1.1.1.1 11 (40.7%) 39 (36.4%) 14 (53.8%) 28 (25.9%) 12 (57.1%) 39 (35.1%)\n dcd D.1.1.4.2 11 (40.7%) 37 (34.6%) 7 (26.9%) 35 (32.4%) 9 (42.9%) 41 (36.9%)\ncl D.2 \n Total number of patients with at least one adverse event 6 (22.2%) 41 (38.3%) 15 (57.7%) 43 (39.8%) 9 (42.9%) 48 (43.2%)\n Total number of events 6 56 18 54 12 62 \n dcd D.2.1.5.3 6 (22.2%) 41 (38.3%) 15 (57.7%) 43 (39.8%) 9 (42.9%) 48 (43.2%)\ncl B.1 \n Total number of patients with at least one adverse event 12 (44.4%) 35 (32.7%) 7 (26.9%) 42 (38.9%) 6 (28.6%) 37 (33.3%)\n Total number of events 15 41 8 52 8 54 \n dcd B.1.1.1.1 12 (44.4%) 35 (32.7%) 7 (26.9%) 42 (38.9%) 6 (28.6%) 37 (33.3%)\ncl C.2 \n Total number of patients with at least one adverse event 5 (18.5%) 30 (28.0%) 11 (42.3%) 37 (34.3%) 11 (52.4%) 44 (39.6%)\n Total number of events 8 40 12 41 12 53 \n dcd C.2.1.2.1 5 (18.5%) 30 (28.0%) 11 (42.3%) 37 (34.3%) 11 (52.4%) 44 (39.6%)\ncl C.1 \n Total number of patients with at least one adverse event 5 (18.5%) 38 (35.5%) 13 (50.0%) 33 (30.6%) 8 (38.1%) 35 (31.5%)\n Total number of events 5 50 18 45 13 51 \n dcd C.1.1.1.3 5 (18.5%) 38 (35.5%) 13 (50.0%) 33 (30.6%) 8 (38.1%) 35 (31.5%)\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_cols_by(\"SEX\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEHLT\",\n child_labels = \"visible\",\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEHLT)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(\"AEDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 2L)\n\nresult <- build_table(\n lyt = lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n # Sorted by decreasing frequency across all groups by System Organ Class, High-Level Term and Preferred Term.\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEHLT\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEHLT\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination \n High Level Term F M F M F M \n Dictionary-Derived Term (N=79) (N=55) (N=82) (N=52) (N=70) (N=62) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 72 (91.1%) 50 (90.9%) 77 (93.9%) 46 (88.5%) 65 (92.9%) 55 (88.7%)\nOverall total number of events 377 232 419 203 378 325 \ncl A.1 \n Total number of patients with at least one adverse event 53 (67.1%) 25 (45.5%) 51 (62.2%) 24 (46.2%) 43 (61.4%) 46 (74.2%)\n Total number of events 85 47 93 37 86 74 \n hlt A.1.1.1 \n Total number of patients with at least one adverse event 53 (67.1%) 25 (45.5%) 51 (62.2%) 24 (46.2%) 43 (61.4%) 46 (74.2%)\n Total number of events 85 47 93 37 86 74 \n dcd A.1.1.1.1 34 (43.0%) 16 (29.1%) 31 (37.8%) 14 (26.9%) 33 (47.1%) 30 (48.4%)\n dcd A.1.1.1.2 32 (40.5%) 16 (29.1%) 33 (40.2%) 15 (28.8%) 24 (34.3%) 26 (41.9%)\ncl B.2 \n Total number of patients with at least one adverse event 46 (58.2%) 33 (60.0%) 45 (54.9%) 29 (55.8%) 44 (62.9%) 41 (66.1%)\n Total number of events 81 48 86 52 64 79 \n hlt B.2.2.3 \n Total number of patients with at least one adverse event 30 (38.0%) 18 (32.7%) 32 (39.0%) 22 (42.3%) 26 (37.1%) 25 (40.3%)\n Total number of events 40 24 43 33 37 40 \n dcd B.2.2.3.1 30 (38.0%) 18 (32.7%) 32 (39.0%) 22 (42.3%) 26 (37.1%) 25 (40.3%)\n hlt B.2.1.2 \n Total number of patients with at least one adverse event 29 (36.7%) 20 (36.4%) 30 (36.6%) 14 (26.9%) 22 (31.4%) 30 (48.4%)\n Total number of events 41 24 43 19 27 39 \n dcd B.2.1.2.1 29 (36.7%) 20 (36.4%) 30 (36.6%) 14 (26.9%) 22 (31.4%) 30 (48.4%)\ncl D.1 \n Total number of patients with at least one adverse event 45 (57.0%) 34 (61.8%) 40 (48.8%) 27 (51.9%) 41 (58.6%) 39 (62.9%)\n Total number of events 72 55 64 42 73 62 \n hlt D.1.1.1 \n Total number of patients with at least one adverse event 25 (31.6%) 25 (45.5%) 29 (35.4%) 13 (25.0%) 27 (38.6%) 24 (38.7%)\n Total number of events 32 29 36 15 39 32 \n dcd D.1.1.1.1 25 (31.6%) 25 (45.5%) 29 (35.4%) 13 (25.0%) 27 (38.6%) 24 (38.7%)\n hlt D.1.1.4 \n Total number of patients with at least one adverse event 30 (38.0%) 18 (32.7%) 22 (26.8%) 20 (38.5%) 27 (38.6%) 23 (37.1%)\n Total number of events 40 26 28 27 34 30 \n dcd D.1.1.4.2 30 (38.0%) 18 (32.7%) 22 (26.8%) 20 (38.5%) 27 (38.6%) 23 (37.1%)\ncl D.2 \n Total number of patients with at least one adverse event 26 (32.9%) 21 (38.2%) 40 (48.8%) 18 (34.6%) 34 (48.6%) 23 (37.1%)\n Total number of events 35 27 49 23 43 31 \n hlt D.2.1.5 \n Total number of patients with at least one adverse event 26 (32.9%) 21 (38.2%) 40 (48.8%) 18 (34.6%) 34 (48.6%) 23 (37.1%)\n Total number of events 35 27 49 23 43 31 \n dcd D.2.1.5.3 26 (32.9%) 21 (38.2%) 40 (48.8%) 18 (34.6%) 34 (48.6%) 23 (37.1%)\ncl B.1 \n Total number of patients with at least one adverse event 28 (35.4%) 19 (34.5%) 33 (40.2%) 16 (30.8%) 24 (34.3%) 19 (30.6%)\n Total number of events 33 23 36 24 35 27 \n hlt B.1.1.1 \n Total number of patients with at least one adverse event 28 (35.4%) 19 (34.5%) 33 (40.2%) 16 (30.8%) 24 (34.3%) 19 (30.6%)\n Total number of events 33 23 36 24 35 27 \n dcd B.1.1.1.1 28 (35.4%) 19 (34.5%) 33 (40.2%) 16 (30.8%) 24 (34.3%) 19 (30.6%)\ncl C.2 \n Total number of patients with at least one adverse event 23 (29.1%) 12 (21.8%) 36 (43.9%) 12 (23.1%) 30 (42.9%) 25 (40.3%)\n Total number of events 32 16 39 14 33 32 \n hlt C.2.1.2 \n Total number of patients with at least one adverse event 23 (29.1%) 12 (21.8%) 36 (43.9%) 12 (23.1%) 30 (42.9%) 25 (40.3%)\n Total number of events 32 16 39 14 33 32 \n dcd C.2.1.2.1 23 (29.1%) 12 (21.8%) 36 (43.9%) 12 (23.1%) 30 (42.9%) 25 (40.3%)\ncl C.1 \n Total number of patients with at least one adverse event 30 (38.0%) 13 (23.6%) 36 (43.9%) 10 (19.2%) 27 (38.6%) 16 (25.8%)\n Total number of events 39 16 52 11 44 20 \n hlt C.1.1.1 \n Total number of patients with at least one adverse event 30 (38.0%) 13 (23.6%) 36 (43.9%) 10 (19.2%) 27 (38.6%) 16 (25.8%)\n Total number of events 39 16 52 11 44 20 \n dcd C.1.1.1.3 30 (38.0%) 13 (23.6%) 36 (43.9%) 10 (19.2%) 27 (38.6%) 16 (25.8%)\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'),\n cdisc_dataset(\"ADAE\", adae, code = 'ADAE <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adae\"))'),\n check = TRUE\n ),\n modules = modules(\n tm_t_events(\n label = \"Adverse Event Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\", \"SEX\"), c(\"ARM\", \"SEX\")),\n llt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\")),\n selected = c(\"AEDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(adae, c(\"AEBODSYS\", \"AESOC\")),\n selected = \"AEBODSYS\"\n ),\n add_total = TRUE,\n event_type = \"adverse event\"\n )\n )\n)\n\n[INFO] 2023-08-04 15:13:29.4819 pid:11948 token:[] teal.modules.clinical Initializing tm_t_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet06.lock'.\n\n\nDownload" + "text": "Data Setup\nAdverse Events by Sex\nAdverse Events by Other Baseline Characteristics (e.g. Biomarker Group)\nAdverse Events by Baseline Characteristic from ADSUB (e.g. BMI Category)\nAdverse Events by Regrouped Baseline Characteristics (e.g. Race)\nAdverse Events by Baseline Characteristics (e.g. Sex) Including High-Level Terms\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\nadsub <- synthetic_cdisc_dataset(\"latest\", \"adsub\")\n\nadsub_bmi <- adsub %>%\n filter(PARAMCD == \"BBMISI\") %>%\n select(STUDYID, USUBJID, AVALCAT1) %>%\n mutate(\n AVALCAT1 = factor(AVALCAT1, levels = c(\"<18.5\", \"18.5 - 24.9\", \"25 - 29.9\", \">30\"))\n )\n\nadsl <- adsl %>%\n mutate(\n RACE1 = case_when(\n RACE == \"WHITE\" ~ \"WHITE\",\n TRUE ~ \"NON-WHITE\"\n ),\n RACE1 = factor(\n RACE1,\n levels = c(\"WHITE\", \"NON-WHITE\")\n )\n ) %>%\n left_join(\n y = adsub_bmi,\n by = c(\"STUDYID\", \"USUBJID\")\n )\n\nadae_labels <- var_labels(adae)\n\nadae <- adae %>%\n mutate(\n RACE1 = case_when(\n RACE == \"WHITE\" ~ \"WHITE\",\n TRUE ~ \"NON-WHITE\"\n ),\n RACE1 = factor(\n RACE1,\n levels = c(\"WHITE\", \"NON-WHITE\")\n )\n ) %>%\n left_join(\n y = adsub_bmi,\n by = c(\"STUDYID\", \"USUBJID\")\n )\n\nvar_labels(adae) <- c(adae_labels, \"RACE1\" = \"RACE WHITE/NON-WHITE\", \"AVALCAT1\" = \"Baseline BMI Category\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\nadsub_bmi <- df_explicit_na(adsub_bmi)\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_cols_by(\"SEX\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n # Sorted by decreasing frequency across all groups by System Organ Class and Preferred Term.\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination \n Dictionary-Derived Term F M F M F M \n (N=79) (N=55) (N=82) (N=52) (N=70) (N=62) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 72 (91.1%) 50 (90.9%) 77 (93.9%) 46 (88.5%) 65 (92.9%) 55 (88.7%)\nOverall total number of events 377 232 419 203 378 325 \ncl A.1 \n Total number of patients with at least one adverse event 53 (67.1%) 25 (45.5%) 51 (62.2%) 24 (46.2%) 43 (61.4%) 46 (74.2%)\n Total number of events 85 47 93 37 86 74 \n dcd A.1.1.1.1 34 (43.0%) 16 (29.1%) 31 (37.8%) 14 (26.9%) 33 (47.1%) 30 (48.4%)\n dcd A.1.1.1.2 32 (40.5%) 16 (29.1%) 33 (40.2%) 15 (28.8%) 24 (34.3%) 26 (41.9%)\ncl B.2 \n Total number of patients with at least one adverse event 46 (58.2%) 33 (60.0%) 45 (54.9%) 29 (55.8%) 44 (62.9%) 41 (66.1%)\n Total number of events 81 48 86 52 64 79 \n dcd B.2.2.3.1 30 (38.0%) 18 (32.7%) 32 (39.0%) 22 (42.3%) 26 (37.1%) 25 (40.3%)\n dcd B.2.1.2.1 29 (36.7%) 20 (36.4%) 30 (36.6%) 14 (26.9%) 22 (31.4%) 30 (48.4%)\ncl D.1 \n Total number of patients with at least one adverse event 45 (57.0%) 34 (61.8%) 40 (48.8%) 27 (51.9%) 41 (58.6%) 39 (62.9%)\n Total number of events 72 55 64 42 73 62 \n dcd D.1.1.1.1 25 (31.6%) 25 (45.5%) 29 (35.4%) 13 (25.0%) 27 (38.6%) 24 (38.7%)\n dcd D.1.1.4.2 30 (38.0%) 18 (32.7%) 22 (26.8%) 20 (38.5%) 27 (38.6%) 23 (37.1%)\ncl D.2 \n Total number of patients with at least one adverse event 26 (32.9%) 21 (38.2%) 40 (48.8%) 18 (34.6%) 34 (48.6%) 23 (37.1%)\n Total number of events 35 27 49 23 43 31 \n dcd D.2.1.5.3 26 (32.9%) 21 (38.2%) 40 (48.8%) 18 (34.6%) 34 (48.6%) 23 (37.1%)\ncl B.1 \n Total number of patients with at least one adverse event 28 (35.4%) 19 (34.5%) 33 (40.2%) 16 (30.8%) 24 (34.3%) 19 (30.6%)\n Total number of events 33 23 36 24 35 27 \n dcd B.1.1.1.1 28 (35.4%) 19 (34.5%) 33 (40.2%) 16 (30.8%) 24 (34.3%) 19 (30.6%)\ncl C.2 \n Total number of patients with at least one adverse event 23 (29.1%) 12 (21.8%) 36 (43.9%) 12 (23.1%) 30 (42.9%) 25 (40.3%)\n Total number of events 32 16 39 14 33 32 \n dcd C.2.1.2.1 23 (29.1%) 12 (21.8%) 36 (43.9%) 12 (23.1%) 30 (42.9%) 25 (40.3%)\ncl C.1 \n Total number of patients with at least one adverse event 30 (38.0%) 13 (23.6%) 36 (43.9%) 10 (19.2%) 27 (38.6%) 16 (25.8%)\n Total number of events 39 16 52 11 44 20 \n dcd C.1.1.1.3 30 (38.0%) 13 (23.6%) 36 (43.9%) 10 (19.2%) 27 (38.6%) 16 (25.8%)\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_cols_by(\"BMRKR2\") %>%\n analyze_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n # Sorted by decreasing frequency across all groups by System Organ Class and Preferred Term.\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination \n Dictionary-Derived Term LOW MEDIUM HIGH LOW MEDIUM HIGH LOW MEDIUM HIGH \n (N=50) (N=37) (N=47) (N=45) (N=56) (N=33) (N=40) (N=42) (N=50) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 46 (92.0%) 34 (91.9%) 42 (89.4%) 40 (88.9%) 53 (94.6%) 30 (90.9%) 36 (90.0%) 39 (92.9%) 45 (90.0%)\nOverall total number of events 248 166 195 196 261 165 220 258 225 \ncl A.1 \n Total number of patients with at least one adverse event 31 (62.0%) 19 (51.4%) 28 (59.6%) 25 (55.6%) 31 (55.4%) 19 (57.6%) 28 (70.0%) 30 (71.4%) 31 (62.0%)\n Total number of events 53 34 45 46 54 30 61 51 48 \n dcd A.1.1.1.1 22 (44.0%) 10 (27.0%) 18 (38.3%) 14 (31.1%) 20 (35.7%) 11 (33.3%) 21 (52.5%) 24 (57.1%) 18 (36.0%)\n dcd A.1.1.1.2 17 (34.0%) 13 (35.1%) 18 (38.3%) 18 (40.0%) 18 (32.1%) 12 (36.4%) 18 (45.0%) 14 (33.3%) 18 (36.0%)\ncl B.2 \n Total number of patients with at least one adverse event 34 (68.0%) 21 (56.8%) 24 (51.1%) 23 (51.1%) 33 (58.9%) 18 (54.5%) 24 (60.0%) 27 (64.3%) 34 (68.0%)\n Total number of events 53 37 39 40 61 37 40 47 56 \n dcd B.2.2.3.1 21 (42.0%) 13 (35.1%) 14 (29.8%) 18 (40.0%) 22 (39.3%) 14 (42.4%) 16 (40.0%) 15 (35.7%) 20 (40.0%)\n dcd B.2.1.2.1 21 (42.0%) 11 (29.7%) 17 (36.2%) 11 (24.4%) 21 (37.5%) 12 (36.4%) 13 (32.5%) 17 (40.5%) 22 (44.0%)\ncl D.1 \n Total number of patients with at least one adverse event 34 (68.0%) 21 (56.8%) 24 (51.1%) 18 (40.0%) 33 (58.9%) 16 (48.5%) 25 (62.5%) 31 (73.8%) 24 (48.0%)\n Total number of events 51 35 41 27 49 30 45 53 37 \n dcd D.1.1.1.1 19 (38.0%) 16 (43.2%) 15 (31.9%) 13 (28.9%) 19 (33.9%) 10 (30.3%) 14 (35.0%) 22 (52.4%) 15 (30.0%)\n dcd D.1.1.4.2 21 (42.0%) 9 (24.3%) 18 (38.3%) 9 (20.0%) 20 (35.7%) 13 (39.4%) 17 (42.5%) 18 (42.9%) 15 (30.0%)\ncl D.2 \n Total number of patients with at least one adverse event 20 (40.0%) 12 (32.4%) 15 (31.9%) 19 (42.2%) 22 (39.3%) 17 (51.5%) 13 (32.5%) 23 (54.8%) 21 (42.0%)\n Total number of events 27 13 22 23 26 23 17 33 24 \n dcd D.2.1.5.3 20 (40.0%) 12 (32.4%) 15 (31.9%) 19 (42.2%) 22 (39.3%) 17 (51.5%) 13 (32.5%) 23 (54.8%) 21 (42.0%)\ncl B.1 \n Total number of patients with at least one adverse event 14 (28.0%) 14 (37.8%) 19 (40.4%) 15 (33.3%) 24 (42.9%) 10 (30.3%) 14 (35.0%) 15 (35.7%) 14 (28.0%)\n Total number of events 16 19 21 18 25 17 19 25 18 \n dcd B.1.1.1.1 14 (28.0%) 14 (37.8%) 19 (40.4%) 15 (33.3%) 24 (42.9%) 10 (30.3%) 14 (35.0%) 15 (35.7%) 14 (28.0%)\ncl C.2 \n Total number of patients with at least one adverse event 18 (36.0%) 8 (21.6%) 9 (19.1%) 15 (33.3%) 22 (39.3%) 11 (33.3%) 18 (45.0%) 17 (40.5%) 20 (40.0%)\n Total number of events 27 9 12 18 23 12 20 20 25 \n dcd C.2.1.2.1 18 (36.0%) 8 (21.6%) 9 (19.1%) 15 (33.3%) 22 (39.3%) 11 (33.3%) 18 (45.0%) 17 (40.5%) 20 (40.0%)\ncl C.1 \n Total number of patients with at least one adverse event 17 (34.0%) 14 (37.8%) 12 (25.5%) 17 (37.8%) 17 (30.4%) 12 (36.4%) 12 (30.0%) 17 (40.5%) 14 (28.0%)\n Total number of events 21 19 15 24 23 16 18 29 17 \n dcd C.1.1.1.3 17 (34.0%) 14 (37.8%) 12 (25.5%) 17 (37.8%) 17 (30.4%) 12 (36.4%) 12 (30.0%) 17 (40.5%) 14 (28.0%)\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_cols_by(\"AVALCAT1\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n # Sorted by decreasing frequency across all groups by System Organ Class and Preferred Term.\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination \n Dictionary-Derived Term <18.5 18.5 - 24.9 25 - 29.9 >30 <18.5 18.5 - 24.9 25 - 29.9 >30 <18.5 18.5 - 24.9 25 - 29.9 >30 \n (N=44) (N=17) (N=11) (N=62) (N=37) (N=18) (N=10) (N=69) (N=28) (N=20) (N=18) (N=66) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 41 (93.2%) 14 (82.4%) 11 (100%) 56 (90.3%) 35 (94.6%) 16 (88.9%) 9 (90.0%) 63 (91.3%) 25 (89.3%) 19 (95.0%) 15 (83.3%) 61 (92.4%)\nOverall total number of events 186 80 66 277 174 89 47 312 137 129 100 337 \ncl A.1 \n Total number of patients with at least one adverse event 23 (52.3%) 12 (70.6%) 7 (63.6%) 36 (58.1%) 19 (51.4%) 10 (55.6%) 6 (60.0%) 40 (58.0%) 16 (57.1%) 13 (65.0%) 14 (77.8%) 46 (69.7%)\n Total number of events 38 22 13 59 35 22 6 67 30 23 30 77 \n dcd A.1.1.1.1 14 (31.8%) 7 (41.2%) 3 (27.3%) 26 (41.9%) 12 (32.4%) 6 (33.3%) 4 (40.0%) 23 (33.3%) 12 (42.9%) 7 (35.0%) 13 (72.2%) 31 (47.0%)\n dcd A.1.1.1.2 15 (34.1%) 8 (47.1%) 5 (45.5%) 20 (32.3%) 12 (32.4%) 8 (44.4%) 2 (20.0%) 26 (37.7%) 9 (32.1%) 7 (35.0%) 7 (38.9%) 27 (40.9%)\ncl B.2 \n Total number of patients with at least one adverse event 23 (52.3%) 10 (58.8%) 8 (72.7%) 38 (61.3%) 21 (56.8%) 8 (44.4%) 7 (70.0%) 38 (55.1%) 16 (57.1%) 16 (80.0%) 12 (66.7%) 41 (62.1%)\n Total number of events 37 19 12 61 41 18 12 67 28 28 18 69 \n dcd B.2.2.3.1 13 (29.5%) 7 (41.2%) 6 (54.5%) 22 (35.5%) 14 (37.8%) 7 (38.9%) 6 (60.0%) 27 (39.1%) 7 (25.0%) 13 (65.0%) 5 (27.8%) 26 (39.4%)\n dcd B.2.1.2.1 14 (31.8%) 8 (47.1%) 4 (36.4%) 23 (37.1%) 14 (37.8%) 6 (33.3%) 4 (40.0%) 20 (29.0%) 13 (46.4%) 8 (40.0%) 8 (44.4%) 23 (34.8%)\ncl D.1 \n Total number of patients with at least one adverse event 24 (54.5%) 9 (52.9%) 8 (72.7%) 38 (61.3%) 18 (48.6%) 5 (27.8%) 7 (70.0%) 37 (53.6%) 15 (53.6%) 12 (60.0%) 11 (61.1%) 42 (63.6%)\n Total number of events 38 11 17 61 30 11 14 51 30 23 16 66 \n dcd D.1.1.1.1 13 (29.5%) 7 (41.2%) 7 (63.6%) 23 (37.1%) 13 (35.1%) 3 (16.7%) 4 (40.0%) 22 (31.9%) 12 (42.9%) 6 (30.0%) 8 (44.4%) 25 (37.9%)\n dcd D.1.1.4.2 16 (36.4%) 4 (23.5%) 6 (54.5%) 22 (35.5%) 10 (27.0%) 4 (22.2%) 5 (50.0%) 23 (33.3%) 10 (35.7%) 9 (45.0%) 6 (33.3%) 25 (37.9%)\ncl D.2 \n Total number of patients with at least one adverse event 14 (31.8%) 7 (41.2%) 5 (45.5%) 21 (33.9%) 14 (37.8%) 10 (55.6%) 4 (40.0%) 30 (43.5%) 13 (46.4%) 10 (50.0%) 7 (38.9%) 27 (40.9%)\n Total number of events 20 7 10 25 17 14 5 36 18 15 10 31 \n dcd D.2.1.5.3 14 (31.8%) 7 (41.2%) 5 (45.5%) 21 (33.9%) 14 (37.8%) 10 (55.6%) 4 (40.0%) 30 (43.5%) 13 (46.4%) 10 (50.0%) 7 (38.9%) 27 (40.9%)\ncl B.1 \n Total number of patients with at least one adverse event 17 (38.6%) 5 (29.4%) 7 (63.6%) 18 (29.0%) 14 (37.8%) 8 (44.4%) 4 (40.0%) 23 (33.3%) 7 (25.0%) 10 (50.0%) 7 (38.9%) 19 (28.8%)\n Total number of events 22 5 7 22 16 11 4 29 11 12 8 31 \n dcd B.1.1.1.1 17 (38.6%) 5 (29.4%) 7 (63.6%) 18 (29.0%) 14 (37.8%) 8 (44.4%) 4 (40.0%) 23 (33.3%) 7 (25.0%) 10 (50.0%) 7 (38.9%) 19 (28.8%)\ncl C.2 \n Total number of patients with at least one adverse event 14 (31.8%) 4 (23.5%) 2 (18.2%) 15 (24.2%) 15 (40.5%) 5 (27.8%) 4 (40.0%) 24 (34.8%) 10 (35.7%) 13 (65.0%) 8 (44.4%) 24 (36.4%)\n Total number of events 17 9 3 19 15 6 5 27 12 16 9 28 \n dcd C.2.1.2.1 14 (31.8%) 4 (23.5%) 2 (18.2%) 15 (24.2%) 15 (40.5%) 5 (27.8%) 4 (40.0%) 24 (34.8%) 10 (35.7%) 13 (65.0%) 8 (44.4%) 24 (36.4%)\ncl C.1 \n Total number of patients with at least one adverse event 11 (25.0%) 4 (23.5%) 4 (36.4%) 24 (38.7%) 13 (35.1%) 6 (33.3%) 1 (10.0%) 26 (37.7%) 6 (21.4%) 7 (35.0%) 6 (33.3%) 24 (36.4%)\n Total number of events 14 7 4 30 20 7 1 35 8 12 9 35 \n dcd C.1.1.1.3 11 (25.0%) 4 (23.5%) 4 (36.4%) 24 (38.7%) 13 (35.1%) 6 (33.3%) 1 (10.0%) 26 (37.7%) 6 (21.4%) 7 (35.0%) 6 (33.3%) 24 (36.4%)\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_cols_by(\"RACE1\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n prune_table() %>%\n # Sorted by decreasing frequency across all groups by System Organ Class and Preferred Term.\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination \n Dictionary-Derived Term WHITE NON-WHITE WHITE NON-WHITE WHITE NON-WHITE \n (N=27) (N=107) (N=26) (N=108) (N=21) (N=111) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 26 (96.3%) 96 (89.7%) 25 (96.2%) 98 (90.7%) 21 (100%) 99 (89.2%)\nOverall total number of events 109 500 144 478 114 589 \ncl A.1 \n Total number of patients with at least one adverse event 16 (59.3%) 62 (57.9%) 21 (80.8%) 54 (50.0%) 15 (71.4%) 74 (66.7%)\n Total number of events 30 102 37 93 25 135 \n dcd A.1.1.1.1 9 (33.3%) 41 (38.3%) 14 (53.8%) 31 (28.7%) 10 (47.6%) 53 (47.7%)\n dcd A.1.1.1.2 11 (40.7%) 37 (34.6%) 13 (50.0%) 35 (32.4%) 9 (42.9%) 41 (36.9%)\ncl B.2 \n Total number of patients with at least one adverse event 15 (55.6%) 64 (59.8%) 16 (61.5%) 58 (53.7%) 12 (57.1%) 73 (65.8%)\n Total number of events 18 111 28 110 17 126 \n dcd B.2.2.3.1 4 (14.8%) 44 (41.1%) 10 (38.5%) 44 (40.7%) 5 (23.8%) 46 (41.4%)\n dcd B.2.1.2.1 12 (44.4%) 37 (34.6%) 9 (34.6%) 35 (32.4%) 7 (33.3%) 45 (40.5%)\ncl D.1 \n Total number of patients with at least one adverse event 18 (66.7%) 61 (57.0%) 15 (57.7%) 52 (48.1%) 14 (66.7%) 66 (59.5%)\n Total number of events 27 100 23 83 27 108 \n dcd D.1.1.1.1 11 (40.7%) 39 (36.4%) 14 (53.8%) 28 (25.9%) 12 (57.1%) 39 (35.1%)\n dcd D.1.1.4.2 11 (40.7%) 37 (34.6%) 7 (26.9%) 35 (32.4%) 9 (42.9%) 41 (36.9%)\ncl D.2 \n Total number of patients with at least one adverse event 6 (22.2%) 41 (38.3%) 15 (57.7%) 43 (39.8%) 9 (42.9%) 48 (43.2%)\n Total number of events 6 56 18 54 12 62 \n dcd D.2.1.5.3 6 (22.2%) 41 (38.3%) 15 (57.7%) 43 (39.8%) 9 (42.9%) 48 (43.2%)\ncl B.1 \n Total number of patients with at least one adverse event 12 (44.4%) 35 (32.7%) 7 (26.9%) 42 (38.9%) 6 (28.6%) 37 (33.3%)\n Total number of events 15 41 8 52 8 54 \n dcd B.1.1.1.1 12 (44.4%) 35 (32.7%) 7 (26.9%) 42 (38.9%) 6 (28.6%) 37 (33.3%)\ncl C.2 \n Total number of patients with at least one adverse event 5 (18.5%) 30 (28.0%) 11 (42.3%) 37 (34.3%) 11 (52.4%) 44 (39.6%)\n Total number of events 8 40 12 41 12 53 \n dcd C.2.1.2.1 5 (18.5%) 30 (28.0%) 11 (42.3%) 37 (34.3%) 11 (52.4%) 44 (39.6%)\ncl C.1 \n Total number of patients with at least one adverse event 5 (18.5%) 38 (35.5%) 13 (50.0%) 33 (30.6%) 8 (38.1%) 35 (31.5%)\n Total number of events 5 50 18 45 13 51 \n dcd C.1.1.1.3 5 (18.5%) 38 (35.5%) 13 (50.0%) 33 (30.6%) 8 (38.1%) 35 (31.5%)\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_cols_by(\"SEX\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEHLT\",\n child_labels = \"visible\",\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEHLT)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(\"AEDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 2L)\n\nresult <- build_table(\n lyt = lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n # Sorted by decreasing frequency across all groups by System Organ Class, High-Level Term and Preferred Term.\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEHLT\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEHLT\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination \n High Level Term F M F M F M \n Dictionary-Derived Term (N=79) (N=55) (N=82) (N=52) (N=70) (N=62) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 72 (91.1%) 50 (90.9%) 77 (93.9%) 46 (88.5%) 65 (92.9%) 55 (88.7%)\nOverall total number of events 377 232 419 203 378 325 \ncl A.1 \n Total number of patients with at least one adverse event 53 (67.1%) 25 (45.5%) 51 (62.2%) 24 (46.2%) 43 (61.4%) 46 (74.2%)\n Total number of events 85 47 93 37 86 74 \n hlt A.1.1.1 \n Total number of patients with at least one adverse event 53 (67.1%) 25 (45.5%) 51 (62.2%) 24 (46.2%) 43 (61.4%) 46 (74.2%)\n Total number of events 85 47 93 37 86 74 \n dcd A.1.1.1.1 34 (43.0%) 16 (29.1%) 31 (37.8%) 14 (26.9%) 33 (47.1%) 30 (48.4%)\n dcd A.1.1.1.2 32 (40.5%) 16 (29.1%) 33 (40.2%) 15 (28.8%) 24 (34.3%) 26 (41.9%)\ncl B.2 \n Total number of patients with at least one adverse event 46 (58.2%) 33 (60.0%) 45 (54.9%) 29 (55.8%) 44 (62.9%) 41 (66.1%)\n Total number of events 81 48 86 52 64 79 \n hlt B.2.2.3 \n Total number of patients with at least one adverse event 30 (38.0%) 18 (32.7%) 32 (39.0%) 22 (42.3%) 26 (37.1%) 25 (40.3%)\n Total number of events 40 24 43 33 37 40 \n dcd B.2.2.3.1 30 (38.0%) 18 (32.7%) 32 (39.0%) 22 (42.3%) 26 (37.1%) 25 (40.3%)\n hlt B.2.1.2 \n Total number of patients with at least one adverse event 29 (36.7%) 20 (36.4%) 30 (36.6%) 14 (26.9%) 22 (31.4%) 30 (48.4%)\n Total number of events 41 24 43 19 27 39 \n dcd B.2.1.2.1 29 (36.7%) 20 (36.4%) 30 (36.6%) 14 (26.9%) 22 (31.4%) 30 (48.4%)\ncl D.1 \n Total number of patients with at least one adverse event 45 (57.0%) 34 (61.8%) 40 (48.8%) 27 (51.9%) 41 (58.6%) 39 (62.9%)\n Total number of events 72 55 64 42 73 62 \n hlt D.1.1.1 \n Total number of patients with at least one adverse event 25 (31.6%) 25 (45.5%) 29 (35.4%) 13 (25.0%) 27 (38.6%) 24 (38.7%)\n Total number of events 32 29 36 15 39 32 \n dcd D.1.1.1.1 25 (31.6%) 25 (45.5%) 29 (35.4%) 13 (25.0%) 27 (38.6%) 24 (38.7%)\n hlt D.1.1.4 \n Total number of patients with at least one adverse event 30 (38.0%) 18 (32.7%) 22 (26.8%) 20 (38.5%) 27 (38.6%) 23 (37.1%)\n Total number of events 40 26 28 27 34 30 \n dcd D.1.1.4.2 30 (38.0%) 18 (32.7%) 22 (26.8%) 20 (38.5%) 27 (38.6%) 23 (37.1%)\ncl D.2 \n Total number of patients with at least one adverse event 26 (32.9%) 21 (38.2%) 40 (48.8%) 18 (34.6%) 34 (48.6%) 23 (37.1%)\n Total number of events 35 27 49 23 43 31 \n hlt D.2.1.5 \n Total number of patients with at least one adverse event 26 (32.9%) 21 (38.2%) 40 (48.8%) 18 (34.6%) 34 (48.6%) 23 (37.1%)\n Total number of events 35 27 49 23 43 31 \n dcd D.2.1.5.3 26 (32.9%) 21 (38.2%) 40 (48.8%) 18 (34.6%) 34 (48.6%) 23 (37.1%)\ncl B.1 \n Total number of patients with at least one adverse event 28 (35.4%) 19 (34.5%) 33 (40.2%) 16 (30.8%) 24 (34.3%) 19 (30.6%)\n Total number of events 33 23 36 24 35 27 \n hlt B.1.1.1 \n Total number of patients with at least one adverse event 28 (35.4%) 19 (34.5%) 33 (40.2%) 16 (30.8%) 24 (34.3%) 19 (30.6%)\n Total number of events 33 23 36 24 35 27 \n dcd B.1.1.1.1 28 (35.4%) 19 (34.5%) 33 (40.2%) 16 (30.8%) 24 (34.3%) 19 (30.6%)\ncl C.2 \n Total number of patients with at least one adverse event 23 (29.1%) 12 (21.8%) 36 (43.9%) 12 (23.1%) 30 (42.9%) 25 (40.3%)\n Total number of events 32 16 39 14 33 32 \n hlt C.2.1.2 \n Total number of patients with at least one adverse event 23 (29.1%) 12 (21.8%) 36 (43.9%) 12 (23.1%) 30 (42.9%) 25 (40.3%)\n Total number of events 32 16 39 14 33 32 \n dcd C.2.1.2.1 23 (29.1%) 12 (21.8%) 36 (43.9%) 12 (23.1%) 30 (42.9%) 25 (40.3%)\ncl C.1 \n Total number of patients with at least one adverse event 30 (38.0%) 13 (23.6%) 36 (43.9%) 10 (19.2%) 27 (38.6%) 16 (25.8%)\n Total number of events 39 16 52 11 44 20 \n hlt C.1.1.1 \n Total number of patients with at least one adverse event 30 (38.0%) 13 (23.6%) 36 (43.9%) 10 (19.2%) 27 (38.6%) 16 (25.8%)\n Total number of events 39 16 52 11 44 20 \n dcd C.1.1.1.3 30 (38.0%) 13 (23.6%) 36 (43.9%) 10 (19.2%) 27 (38.6%) 16 (25.8%)\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'),\n cdisc_dataset(\"ADAE\", adae, code = 'ADAE <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adae\"))'),\n check = TRUE\n ),\n modules = modules(\n tm_t_events(\n label = \"Adverse Event Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\", \"SEX\"), c(\"ARM\", \"SEX\")),\n llt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\")),\n selected = c(\"AEDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(adae, c(\"AEBODSYS\", \"AESOC\")),\n selected = \"AEBODSYS\"\n ),\n add_total = TRUE,\n event_type = \"adverse event\"\n )\n )\n)\n\n[INFO] 2023-08-04 15:32:05.5650 pid:11952 token:[] teal.modules.clinical Initializing tm_t_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet06.lock'.\n\n\nDownload" }, { "objectID": "tables/adverse-events/aet07.html", "href": "tables/adverse-events/aet07.html", "title": "AET07", "section": "", - "text": "Data Setup\nStandard Table\nTable with Fill-In of Treatment Groups without Deaths\nTeal\nSession Info\n\n\n\nFor illustrative purposes, we will pre-process AESDTH in ADAE so there are no deaths in arm A and concatenate AEBODSYS and AEDECOD as per GDSR output standards for AET07.\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\nadae_f <- adae %>%\n mutate(\n AESDTH = as.character(AESDTH), # characterizing AESDTH for next step\n AESDTH = case_when(\n ARM == \"A: Drug X\" ~ NA_character_, # For demonstration purpose only,\n TRUE ~ AESDTH\n ), # make \"A: Drug X\" as the arm without AE leading to death\n AESDTH = as.factor(AESDTH),\n SOC_PT = factor(paste(AEBODSYS, \"/\", AEDECOD))\n ) %>%\n filter(AESDTH == \"Y\") %>%\n mutate(ARM = droplevels(ARM))\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\", split_fun = drop_split_levels) %>%\n analyze_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = c(unique = \"Total number of deaths\"),\n show_labels = \"hidden\"\n ) %>%\n count_occurrences(\n vars = \"SOC_PT\"\n ) %>%\n append_topleft(\"MedDRA SOC and Preferred Term\")\n\nresult <- build_table(\n lyt = lyt,\n df = adae_f,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = \"SOC_PT\",\n scorefun = score_occurrences,\n decreasing = TRUE\n )\n\nresult\n\nMedDRA SOC and Preferred Term B: Placebo C: Combination\n (N=134) (N=132) \n———————————————————————————————————————————————————————————\nTotal number of deaths 70 (52.2%) 75 (56.8%) \ncl D.1 / dcd D.1.1.1.1 42 (31.3%) 51 (38.6%) \ncl B.1 / dcd B.1.1.1.1 49 (36.6%) 43 (32.6%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = c(unique = \"Total number of deaths\"),\n show_labels = \"hidden\"\n ) %>%\n count_occurrences(\n vars = \"SOC_PT\"\n ) %>%\n append_topleft(\"MedDRA SOC and Preferred Term\")\n\nresult <- build_table(\n lyt = lyt,\n df = adae_f,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = \"SOC_PT\",\n scorefun = score_occurrences,\n decreasing = TRUE\n )\n\nresult\n\nMedDRA SOC and Preferred Term A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————\nTotal number of deaths 0 70 (52.2%) 75 (56.8%) \ncl D.1 / dcd D.1.1.1.1 0 42 (31.3%) 51 (38.6%) \ncl B.1 / dcd B.1.1.1.1 0 49 (36.6%) 43 (32.6%) \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\nadsl <- adsl %>%\n mutate(\n DTHFL = case_when(\n !is.na(DTHDT) ~ \"Y\",\n TRUE ~ \"\"\n )\n ) %>%\n var_relabel(\n DTHFL = \"Subject Death Flag\"\n )\n\nadae <- adae %>%\n mutate(\n AESDTH = as.character(AESDTH), # characterizing AESDTH for next step\n AESDTH = case_when(\n ARM == \"A: Drug X\" ~ NA_character_, # For demonstration purpose only,\n TRUE ~ AESDTH\n ), # make \"A: Drug X\" as the arm without AE leading to death\n AESDTH = as.factor(AESDTH),\n SOC_PT = factor(paste(AEBODSYS, \"/\", AEDECOD))\n ) %>%\n filter(AESDTH == \"Y\") %>%\n mutate(ARM = droplevels(ARM)) %>%\n var_relabel(SOC_PT = \"MedDRA SOC and Preferred Term\")\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = '\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n df_explicit_na() %>%\n mutate(\n DTHFL = case_when(\n !is.na(DTHDT) ~ \"Y\",\n TRUE ~ \"\"\n )\n ) %>%\n var_relabel(\n DTHFL = \"Subject Death Flag\"\n )\n '),\n cdisc_dataset(\"ADAE\", adae, code = '\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\") %>%\n df_explicit_na() %>%\n mutate(\n AESDTH = as.character(AESDTH),\n AESDTH = case_when(\n ARM == \"A: Drug X\" ~ NA_character_,\n TRUE ~ AESDTH),\n AESDTH = as.factor(AESDTH),\n SOC_PT = factor(paste(AEBODSYS, \"/\", AEDECOD))\n ) %>%\n filter(AESDTH == \"Y\") %>%\n mutate(ARM = droplevels(ARM)) %>%\n var_relabel(SOC_PT = \"MedDRA SOC and Preferred Term\")\n '),\n check = TRUE\n ),\n modules = modules(\n tm_t_events(\n label = \"Adverse Event Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\", \"SOC_PT\")),\n selected = c(\"SOC_PT\")\n ),\n hlt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\", \"SOC_PT\")),\n selected = NULL\n ),\n add_total = FALSE,\n event_type = \"adverse event\"\n )\n )\n)\n\n[INFO] 2023-08-04 15:12:20.5721 pid:11735 token:[] teal.modules.clinical Initializing tm_t_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet07.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable with Fill-In of Treatment Groups without Deaths\nTeal\nSession Info\n\n\n\nFor illustrative purposes, we will pre-process AESDTH in ADAE so there are no deaths in arm A and concatenate AEBODSYS and AEDECOD as per GDSR output standards for AET07.\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\nadae_f <- adae %>%\n mutate(\n AESDTH = as.character(AESDTH), # characterizing AESDTH for next step\n AESDTH = case_when(\n ARM == \"A: Drug X\" ~ NA_character_, # For demonstration purpose only,\n TRUE ~ AESDTH\n ), # make \"A: Drug X\" as the arm without AE leading to death\n AESDTH = as.factor(AESDTH),\n SOC_PT = factor(paste(AEBODSYS, \"/\", AEDECOD))\n ) %>%\n filter(AESDTH == \"Y\") %>%\n mutate(ARM = droplevels(ARM))\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\", split_fun = drop_split_levels) %>%\n analyze_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = c(unique = \"Total number of deaths\"),\n show_labels = \"hidden\"\n ) %>%\n count_occurrences(\n vars = \"SOC_PT\"\n ) %>%\n append_topleft(\"MedDRA SOC and Preferred Term\")\n\nresult <- build_table(\n lyt = lyt,\n df = adae_f,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = \"SOC_PT\",\n scorefun = score_occurrences,\n decreasing = TRUE\n )\n\nresult\n\nMedDRA SOC and Preferred Term B: Placebo C: Combination\n (N=134) (N=132) \n———————————————————————————————————————————————————————————\nTotal number of deaths 70 (52.2%) 75 (56.8%) \ncl D.1 / dcd D.1.1.1.1 42 (31.3%) 51 (38.6%) \ncl B.1 / dcd B.1.1.1.1 49 (36.6%) 43 (32.6%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = c(unique = \"Total number of deaths\"),\n show_labels = \"hidden\"\n ) %>%\n count_occurrences(\n vars = \"SOC_PT\"\n ) %>%\n append_topleft(\"MedDRA SOC and Preferred Term\")\n\nresult <- build_table(\n lyt = lyt,\n df = adae_f,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = \"SOC_PT\",\n scorefun = score_occurrences,\n decreasing = TRUE\n )\n\nresult\n\nMedDRA SOC and Preferred Term A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————\nTotal number of deaths 0 70 (52.2%) 75 (56.8%) \ncl D.1 / dcd D.1.1.1.1 0 42 (31.3%) 51 (38.6%) \ncl B.1 / dcd B.1.1.1.1 0 49 (36.6%) 43 (32.6%) \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\nadsl <- adsl %>%\n mutate(\n DTHFL = case_when(\n !is.na(DTHDT) ~ \"Y\",\n TRUE ~ \"\"\n )\n ) %>%\n var_relabel(\n DTHFL = \"Subject Death Flag\"\n )\n\nadae <- adae %>%\n mutate(\n AESDTH = as.character(AESDTH), # characterizing AESDTH for next step\n AESDTH = case_when(\n ARM == \"A: Drug X\" ~ NA_character_, # For demonstration purpose only,\n TRUE ~ AESDTH\n ), # make \"A: Drug X\" as the arm without AE leading to death\n AESDTH = as.factor(AESDTH),\n SOC_PT = factor(paste(AEBODSYS, \"/\", AEDECOD))\n ) %>%\n filter(AESDTH == \"Y\") %>%\n mutate(ARM = droplevels(ARM)) %>%\n var_relabel(SOC_PT = \"MedDRA SOC and Preferred Term\")\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = '\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n df_explicit_na() %>%\n mutate(\n DTHFL = case_when(\n !is.na(DTHDT) ~ \"Y\",\n TRUE ~ \"\"\n )\n ) %>%\n var_relabel(\n DTHFL = \"Subject Death Flag\"\n )\n '),\n cdisc_dataset(\"ADAE\", adae, code = '\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\") %>%\n df_explicit_na() %>%\n mutate(\n AESDTH = as.character(AESDTH),\n AESDTH = case_when(\n ARM == \"A: Drug X\" ~ NA_character_,\n TRUE ~ AESDTH),\n AESDTH = as.factor(AESDTH),\n SOC_PT = factor(paste(AEBODSYS, \"/\", AEDECOD))\n ) %>%\n filter(AESDTH == \"Y\") %>%\n mutate(ARM = droplevels(ARM)) %>%\n var_relabel(SOC_PT = \"MedDRA SOC and Preferred Term\")\n '),\n check = TRUE\n ),\n modules = modules(\n tm_t_events(\n label = \"Adverse Event Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\", \"SOC_PT\")),\n selected = c(\"SOC_PT\")\n ),\n hlt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\", \"SOC_PT\")),\n selected = NULL\n ),\n add_total = FALSE,\n event_type = \"adverse event\"\n )\n )\n)\n\n[INFO] 2023-08-04 15:30:45.6727 pid:11739 token:[] teal.modules.clinical Initializing tm_t_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet07.lock'.\n\n\nDownload" }, { "objectID": "tables/adverse-events/aet03.html", "href": "tables/adverse-events/aet03.html", "title": "AET03", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\n\nFor illustrative purposes, we will create a new factor variable in ADAE, ASEV, with all intensity levels including \"LIFE THREATENING\".\n\nCodeadae <- adae %>%\n mutate(\n ASEV = as.character(AESEV)\n )\n\nadae$ASEV[1:15] <- \"LIFE THREATENING\"\n\nadae <- adae %>%\n mutate(\n ASEV = factor(\n ASEV,\n levels = c(\"MILD\", \"MODERATE\", \"SEVERE\", \"LIFE THREATENING\")\n )\n )\n\n\n\n\n\nCodegrade_groups <- list(\n \"- Any Intensity -\" = c(\"MILD\", \"MODERATE\", \"SEVERE\", \"LIFE THREATENING\")\n)\n\nsplit_fun <- trim_levels_in_group\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_occurrences_by_grade(\n var = \"ASEV\",\n grade_groups = grade_groups\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun(\"ASEV\"),\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_occurrences_by_grade(\n var = \"ASEV\",\n grade_groups = grade_groups\n ) %>%\n split_rows_by(\n \"AEDECOD\",\n child_labels = \"visible\",\n nested = TRUE,\n indent_mod = -1L,\n split_fun = split_fun(\"ASEV\"),\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEDECOD)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = c(\"- Any Intensity -\")\n ) %>%\n count_occurrences_by_grade(\n var = \"ASEV\",\n .indent_mods = -1L\n ) %>%\n append_varlabels(adae, \"AESEV\", indent = 2L)\n\nresult <- lyt %>%\n build_table(\n adae,\n alt_counts_df = adsl\n ) %>%\n sort_at_path(\n path = \"AEBODSYS\",\n scorefun = cont_n_allcols,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = cont_n_allcols,\n decreasing = TRUE\n )\n\nresult\n\nBody System or Organ Class \n Dictionary-Derived Term A: Drug X B: Placebo C: Combination\n Severity/Intensity (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————\n- Any Intensity - 122 (91.0%) 123 (91.8%) 120 (90.9%) \nMILD 7 (5.2%) 9 (6.7%) 4 (3.0%) \nMODERATE 23 (17.2%) 24 (17.9%) 23 (17.4%) \nSEVERE 91 (67.9%) 89 (66.4%) 91 (68.9%) \nLIFE THREATENING 1 (0.7%) 1 (0.7%) 2 (1.5%) \ncl A.1 \n - Any Intensity - 78 (58.2%) 75 (56.0%) 89 (67.4%) \n MILD 30 (22.4%) 27 (20.1%) 39 (29.5%) \n MODERATE 47 (35.1%) 48 (35.8%) 49 (37.1%) \n LIFE THREATENING 1 (0.7%) 0 1 (0.8%) \n dcd A.1.1.1.1 \n - Any Intensity - 50 (37.3%) 45 (33.6%) 63 (47.7%) \n MILD 50 (37.3%) 45 (33.6%) 62 (47.0%) \n LIFE THREATENING 0 0 1 (0.8%) \n dcd A.1.1.1.2 \n - Any Intensity - 48 (35.8%) 48 (35.8%) 50 (37.9%) \n MODERATE 47 (35.1%) 48 (35.8%) 49 (37.1%) \n LIFE THREATENING 1 (0.7%) 0 1 (0.8%) \ncl B.2 \n - Any Intensity - 79 (59.0%) 74 (55.2%) 85 (64.4%) \n MILD 30 (22.4%) 30 (22.4%) 33 (25.0%) \n MODERATE 48 (35.8%) 44 (32.8%) 51 (38.6%) \n LIFE THREATENING 1 (0.7%) 0 1 (0.8%) \n dcd B.2.2.3.1 \n - Any Intensity - 48 (35.8%) 54 (40.3%) 51 (38.6%) \n MILD 48 (35.8%) 54 (40.3%) 51 (38.6%) \n dcd B.2.1.2.1 \n - Any Intensity - 49 (36.6%) 44 (32.8%) 52 (39.4%) \n MODERATE 48 (35.8%) 44 (32.8%) 51 (38.6%) \n LIFE THREATENING 1 (0.7%) 0 1 (0.8%) \ncl D.1 \n - Any Intensity - 79 (59.0%) 67 (50.0%) 80 (60.6%) \n MODERATE 28 (20.9%) 25 (18.7%) 29 (22.0%) \n SEVERE 50 (37.3%) 42 (31.3%) 49 (37.1%) \n LIFE THREATENING 1 (0.7%) 0 2 (1.5%) \n dcd D.1.1.1.1 \n - Any Intensity - 50 (37.3%) 42 (31.3%) 51 (38.6%) \n SEVERE 50 (37.3%) 42 (31.3%) 50 (37.9%) \n LIFE THREATENING 0 0 1 (0.8%) \n dcd D.1.1.4.2 \n - Any Intensity - 48 (35.8%) 42 (31.3%) 50 (37.9%) \n MODERATE 47 (35.1%) 42 (31.3%) 49 (37.1%) \n LIFE THREATENING 1 (0.7%) 0 1 (0.8%) \ncl D.2 \n - Any Intensity - 47 (35.1%) 58 (43.3%) 57 (43.2%) \n MILD 47 (35.1%) 58 (43.3%) 56 (42.4%) \n LIFE THREATENING 0 0 1 (0.8%) \n dcd D.2.1.5.3 \n - Any Intensity - 47 (35.1%) 58 (43.3%) 57 (43.2%) \n MILD 47 (35.1%) 58 (43.3%) 56 (42.4%) \n LIFE THREATENING 0 0 1 (0.8%) \ncl B.1 \n - Any Intensity - 47 (35.1%) 49 (36.6%) 43 (32.6%) \n SEVERE 47 (35.1%) 48 (35.8%) 43 (32.6%) \n LIFE THREATENING 0 1 (0.7%) 0 \n dcd B.1.1.1.1 \n - Any Intensity - 47 (35.1%) 49 (36.6%) 43 (32.6%) \n SEVERE 47 (35.1%) 48 (35.8%) 43 (32.6%) \n LIFE THREATENING 0 1 (0.7%) 0 \ncl C.2 \n - Any Intensity - 35 (26.1%) 48 (35.8%) 55 (41.7%) \n MODERATE 35 (26.1%) 48 (35.8%) 54 (40.9%) \n LIFE THREATENING 0 0 1 (0.8%) \n dcd C.2.1.2.1 \n - Any Intensity - 35 (26.1%) 48 (35.8%) 55 (41.7%) \n MODERATE 35 (26.1%) 48 (35.8%) 54 (40.9%) \n LIFE THREATENING 0 0 1 (0.8%) \ncl C.1 \n - Any Intensity - 43 (32.1%) 46 (34.3%) 43 (32.6%) \n SEVERE 43 (32.1%) 46 (34.3%) 43 (32.6%) \n dcd C.1.1.1.3 \n - Any Intensity - 43 (32.1%) 46 (34.3%) 43 (32.6%) \n SEVERE 43 (32.1%) 46 (34.3%) 43 (32.6%) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n cdisc_dataset(\"ADAE\", adae),\n code =\n 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")',\n check = TRUE\n ),\n modules = modules(\n tm_t_events_by_grade(\n label = \"Adverse Events by Grade Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\")),\n selected = c(\"AEDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(adae, c(\"AEBODSYS\", \"AESOC\")),\n selected = \"AEBODSYS\"\n ),\n grade = choices_selected(\n choices = variable_choices(adae, c(\"AETOXGR\", \"AESEV\")),\n selected = \"AESEV\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:11:19.2727 pid:11523 token:[] teal.modules.clinical Initializing tm_t_events_by_grade\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 dplyr_1.1.2 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet03.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae) %>%\n var_relabel(\n AEBODSYS = \"MedDRA System Organ Class\",\n AEDECOD = \"MedDRA Preferred Term\"\n ) %>%\n filter(ANL01FL == \"Y\")\n\n\nFor illustrative purposes, we will create a new factor variable in ADAE, ASEV, with all intensity levels including \"LIFE THREATENING\".\n\nCodeadae <- adae %>% mutate(ASEV = as.character(AESEV))\nadae$ASEV[1:15] <- \"LIFE THREATENING\"\nadae <- adae %>% mutate(ASEV = factor(ASEV, levels = c(\"MILD\", \"MODERATE\", \"SEVERE\", \"LIFE THREATENING\")))\n\n\n\n\n\nCodegrade_groups <- list(\"- Any Intensity -\" = c(\"MILD\", \"MODERATE\", \"SEVERE\", \"LIFE THREATENING\"))\n\nsplit_fun <- trim_levels_in_group\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_occurrences_by_grade(\n var = \"ASEV\",\n grade_groups = grade_groups\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun(\"ASEV\"),\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_occurrences_by_grade(\n var = \"ASEV\",\n grade_groups = grade_groups\n ) %>%\n split_rows_by(\n \"AEDECOD\",\n child_labels = \"visible\",\n nested = TRUE,\n indent_mod = -1L,\n split_fun = split_fun(\"ASEV\"),\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEDECOD)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = c(\"- Any Intensity -\")\n ) %>%\n count_occurrences_by_grade(\n var = \"ASEV\",\n .indent_mods = -1L\n ) %>%\n append_varlabels(adae, \"AESEV\", indent = 2L)\n\nresult <- lyt %>%\n build_table(\n adae,\n alt_counts_df = adsl\n ) %>%\n sort_at_path(\n path = \"AEBODSYS\",\n scorefun = cont_n_allcols,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = cont_n_allcols,\n decreasing = TRUE\n )\n\nresult\n\nMedDRA System Organ Class \n MedDRA Preferred Term A: Drug X B: Placebo C: Combination\n Severity/Intensity (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————\n- Any Intensity - 100 (74.6%) 98 (73.1%) 103 (78.0%) \nMILD 5 (3.7%) 7 (5.2%) 4 (3.0%) \nMODERATE 17 (12.7%) 21 (15.7%) 20 (15.2%) \nSEVERE 77 (57.5%) 69 (51.5%) 77 (58.3%) \nLIFE THREATENING 1 (0.7%) 1 (0.7%) 2 (1.5%) \ncl A.1 \n - Any Intensity - 68 (50.7%) 58 (43.3%) 76 (57.6%) \n MILD 27 (20.1%) 19 (14.2%) 34 (25.8%) \n MODERATE 40 (29.9%) 39 (29.1%) 41 (31.1%) \n LIFE THREATENING 1 (0.7%) 0 1 (0.8%) \n dcd A.1.1.1.1 \n - Any Intensity - 45 (33.6%) 31 (23.1%) 52 (39.4%) \n MILD 45 (33.6%) 31 (23.1%) 51 (38.6%) \n LIFE THREATENING 0 0 1 (0.8%) \n dcd A.1.1.1.2 \n - Any Intensity - 41 (30.6%) 39 (29.1%) 42 (31.8%) \n MODERATE 40 (29.9%) 39 (29.1%) 41 (31.1%) \n LIFE THREATENING 1 (0.7%) 0 1 (0.8%) \ncl B.2 \n - Any Intensity - 62 (46.3%) 56 (41.8%) 74 (56.1%) \n MILD 23 (17.2%) 22 (16.4%) 28 (21.2%) \n MODERATE 38 (28.4%) 34 (25.4%) 45 (34.1%) \n LIFE THREATENING 1 (0.7%) 0 1 (0.8%) \n dcd B.2.2.3.1 \n - Any Intensity - 38 (28.4%) 40 (29.9%) 45 (34.1%) \n MILD 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 \n - Any Intensity - 39 (29.1%) 34 (25.4%) 46 (34.8%) \n MODERATE 38 (28.4%) 34 (25.4%) 45 (34.1%) \n LIFE THREATENING 1 (0.7%) 0 1 (0.8%) \ncl D.1 \n - Any Intensity - 64 (47.8%) 54 (40.3%) 68 (51.5%) \n MODERATE 21 (15.7%) 22 (16.4%) 22 (16.7%) \n SEVERE 42 (31.3%) 32 (23.9%) 44 (33.3%) \n LIFE THREATENING 1 (0.7%) 0 2 (1.5%) \n dcd D.1.1.1.1 \n - Any Intensity - 42 (31.3%) 32 (23.9%) 46 (34.8%) \n SEVERE 42 (31.3%) 32 (23.9%) 45 (34.1%) \n LIFE THREATENING 0 0 1 (0.8%) \n dcd D.1.1.4.2 \n - Any Intensity - 38 (28.4%) 34 (25.4%) 40 (30.3%) \n MODERATE 37 (27.6%) 34 (25.4%) 39 (29.5%) \n LIFE THREATENING 1 (0.7%) 0 1 (0.8%) \ncl D.2 \n - Any Intensity - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n MILD 37 (27.6%) 46 (34.3%) 49 (37.1%) \n LIFE THREATENING 0 0 1 (0.8%) \n dcd D.2.1.5.3 \n - Any Intensity - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n MILD 37 (27.6%) 46 (34.3%) 49 (37.1%) \n LIFE THREATENING 0 0 1 (0.8%) \ncl C.2 \n - Any Intensity - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n MODERATE 28 (20.9%) 36 (26.9%) 47 (35.6%) \n LIFE THREATENING 0 0 1 (0.8%) \n dcd C.2.1.2.1 \n - Any Intensity - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n MODERATE 28 (20.9%) 36 (26.9%) 47 (35.6%) \n LIFE THREATENING 0 0 1 (0.8%) \ncl B.1 \n - Any Intensity - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n SEVERE 38 (28.4%) 36 (26.9%) 36 (27.3%) \n LIFE THREATENING 0 1 (0.7%) 0 \n dcd B.1.1.1.1 \n - Any Intensity - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n SEVERE 38 (28.4%) 36 (26.9%) 36 (27.3%) \n LIFE THREATENING 0 1 (0.7%) 0 \ncl C.1 \n - Any Intensity - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n SEVERE 36 (26.9%) 34 (25.4%) 36 (27.3%) \n dcd C.1.1.1.3 \n - Any Intensity - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n SEVERE 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n cdisc_dataset(\"ADAE\", adae),\n code =\n 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")',\n check = TRUE\n ),\n modules = modules(\n tm_t_events_by_grade(\n label = \"Adverse Events by Grade Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\")),\n selected = c(\"AEDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(adae, c(\"AEBODSYS\", \"AESOC\")),\n selected = \"AEBODSYS\"\n ),\n grade = choices_selected(\n choices = variable_choices(adae, c(\"AETOXGR\", \"AESEV\")),\n selected = \"AESEV\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:29:40.3287 pid:11526 token:[] teal.modules.clinical Initializing tm_t_events_by_grade\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 dplyr_1.1.2 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet03.lock'.\n\n\nDownload" }, { "objectID": "tables/adverse-events/aet02.html", "href": "tables/adverse-events/aet02.html", "title": "AET02", "section": "", - "text": "Data Setup\nStandard Table\nTable with Event Totals\nTable with High-Level Term\nTable with Preferred Terms Only\nTable with Fill-In of Treatment Groups\nTable of AEs with an Incidence Rate \\(\\geq\\) 5% in Any Treatment Group (subsetting preferred terms based on frequency)\nTable of AEs with an Incidence Rate \\(\\geq\\) 5% in Any Treatment Group (subsetting preferred terms based on frequency with high-level terms)\nTable of AEs with an Incidence Rate \\(\\geq\\) 10% in Any Treatment Group (subsetting preferred terms based on frequency)\nTable of AEs with an Incidence Rate \\(\\geq\\) 3 Patients in Any Treatment Group (subsetting preferred terms based on number of patients)\nTable of AEs with a Difference in Incidence Rate \\(\\geq\\) 5% Between Any Treatment (subsetting preferred terms based on difference in percentage between treatment groups)\nTable of AEs with an Incidence Rate \\(\\geq\\) 5% in B: Placebo (subsetting preferred terms based on frequency for a particular treatment group)\nTable of AEs with a Difference in Incidence Rate \\(\\geq\\) 5% Between Arm A and Arm B or Arm C (displaying preferred terms with a difference of at least x% between selected treatment groups)\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\n# Define the split function\nsplit_fun <- drop_split_levels\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n add_overall_col(label = \"All Patients\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = -1L\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt,\n df = adae,\n alt_counts_df = adsl\n)\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination All Patients\n Dictionary-Derived Term (N=134) (N=134) (N=132) (N=400) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) 365 (91.2%) \nOverall total number of events 609 622 703 1934 \ncl A.1 \n Total number of patients with at least one adverse event 78 (58.2%) 75 (56.0%) 89 (67.4%) 242 (60.5%) \n Total number of events 132 130 160 422 \n dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) 158 (39.5%) \n dcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 50 (37.9%) 146 (36.5%) \ncl B.1 \n Total number of patients with at least one adverse event 47 (35.1%) 49 (36.6%) 43 (32.6%) 139 (34.8%) \n Total number of events 56 60 62 178 \n dcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) 139 (34.8%) \ncl B.2 \n Total number of patients with at least one adverse event 79 (59.0%) 74 (55.2%) 85 (64.4%) 238 (59.5%) \n Total number of events 129 138 143 410 \n dcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 52 (39.4%) 145 (36.2%) \n dcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%) 153 (38.2%) \ncl C.1 \n Total number of patients with at least one adverse event 43 (32.1%) 46 (34.3%) 43 (32.6%) 132 (33.0%) \n Total number of events 55 63 64 182 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) 132 (33.0%) \ncl C.2 \n Total number of patients with at least one adverse event 35 (26.1%) 48 (35.8%) 55 (41.7%) 138 (34.5%) \n Total number of events 48 53 65 166 \n dcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) 138 (34.5%) \ncl D.1 \n Total number of patients with at least one adverse event 79 (59.0%) 67 (50.0%) 80 (60.6%) 226 (56.5%) \n Total number of events 127 106 135 368 \n dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) 143 (35.8%) \n dcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 50 (37.9%) 140 (35.0%) \ncl D.2 \n Total number of patients with at least one adverse event 47 (35.1%) 58 (43.3%) 57 (43.2%) 162 (40.5%) \n Total number of events 62 72 74 208 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) 162 (40.5%) \n\n\nThe variable result corresponds to the adverse events table. However, it includes many empty rows accounting for events which were not reported. The table can be post-processed to prune empty rows and to sort rows, for example by occurrence.\n\nCoderesult <- result %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination All Patients\n Dictionary-Derived Term (N=134) (N=134) (N=132) (N=400) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) 365 (91.2%) \nOverall total number of events 609 622 703 1934 \ncl A.1 \n Total number of patients with at least one adverse event 78 (58.2%) 75 (56.0%) 89 (67.4%) 242 (60.5%) \n Total number of events 132 130 160 422 \n dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) 158 (39.5%) \n dcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 50 (37.9%) 146 (36.5%) \ncl B.2 \n Total number of patients with at least one adverse event 79 (59.0%) 74 (55.2%) 85 (64.4%) 238 (59.5%) \n Total number of events 129 138 143 410 \n dcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%) 153 (38.2%) \n dcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 52 (39.4%) 145 (36.2%) \ncl D.1 \n Total number of patients with at least one adverse event 79 (59.0%) 67 (50.0%) 80 (60.6%) 226 (56.5%) \n Total number of events 127 106 135 368 \n dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) 143 (35.8%) \n dcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 50 (37.9%) 140 (35.0%) \ncl D.2 \n Total number of patients with at least one adverse event 47 (35.1%) 58 (43.3%) 57 (43.2%) 162 (40.5%) \n Total number of events 62 72 74 208 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) 162 (40.5%) \ncl B.1 \n Total number of patients with at least one adverse event 47 (35.1%) 49 (36.6%) 43 (32.6%) 139 (34.8%) \n Total number of events 56 60 62 178 \n dcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) 139 (34.8%) \ncl C.2 \n Total number of patients with at least one adverse event 35 (26.1%) 48 (35.8%) 55 (41.7%) 138 (34.5%) \n Total number of events 48 53 65 166 \n dcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) 138 (34.5%) \ncl C.1 \n Total number of patients with at least one adverse event 43 (32.1%) 46 (34.3%) 43 (32.6%) 132 (33.0%) \n Total number of events 55 63 64 182 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) 132 (33.0%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n add_overall_col(label = \"All Patients\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L) %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total number of events\"),\n .indent_mods = c(count = -1L)\n )\n\nresult <- build_table(\n lyt,\n df = adae,\n # col_count = c(table(adsl$ARM), sum(table(adsl$ARM)))\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n )\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination All Patients\n Dictionary-Derived Term (N=134) (N=134) (N=132) (N=400) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) 365 (91.2%) \nOverall total number of events 609 622 703 1934 \ncl A.1 \n Total number of patients with at least one adverse event 78 (58.2%) 75 (56.0%) 89 (67.4%) 242 (60.5%) \n dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) 158 (39.5%) \n dcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 50 (37.9%) 146 (36.5%) \n Total number of events 132 130 160 422 \ncl B.2 \n Total number of patients with at least one adverse event 79 (59.0%) 74 (55.2%) 85 (64.4%) 238 (59.5%) \n dcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%) 153 (38.2%) \n dcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 52 (39.4%) 145 (36.2%) \n Total number of events 129 138 143 410 \ncl D.1 \n Total number of patients with at least one adverse event 79 (59.0%) 67 (50.0%) 80 (60.6%) 226 (56.5%) \n dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) 143 (35.8%) \n dcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 50 (37.9%) 140 (35.0%) \n Total number of events 127 106 135 368 \ncl D.2 \n Total number of patients with at least one adverse event 47 (35.1%) 58 (43.3%) 57 (43.2%) 162 (40.5%) \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) 162 (40.5%) \n Total number of events 62 72 74 208 \ncl B.1 \n Total number of patients with at least one adverse event 47 (35.1%) 49 (36.6%) 43 (32.6%) 139 (34.8%) \n dcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) 139 (34.8%) \n Total number of events 56 60 62 178 \ncl C.2 \n Total number of patients with at least one adverse event 35 (26.1%) 48 (35.8%) 55 (41.7%) 138 (34.5%) \n dcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) 138 (34.5%) \n Total number of events 48 53 65 166 \ncl C.1 \n Total number of patients with at least one adverse event 43 (32.1%) 46 (34.3%) 43 (32.6%) 132 (33.0%) \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) 132 (33.0%) \n Total number of events 55 63 64 182 \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEHLT\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n indent_mod = -1L,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEHLT)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", .indent_mods = c(count_fraction = -1L)) %>%\n append_varlabels(adae, c(\"AEDECOD\"), indent = 2L)\n\nresult <- build_table(\n lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEHLT\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEHLT\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nBody System or Organ Class \n High Level Term A: Drug X B: Placebo C: Combination\n Dictionary-Derived Term (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) \nOverall total number of events 609 622 703 \ncl A.1 \n Total number of patients with at least one adverse event 78 (58.2%) 75 (56.0%) 89 (67.4%) \n Total number of events 132 130 160 \n hlt A.1.1.1 \n Total number of patients with at least one adverse event 78 (58.2%) 75 (56.0%) 89 (67.4%) \n Total number of events 132 130 160 \n dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) \n dcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 50 (37.9%) \ncl B.2 \n Total number of patients with at least one adverse event 79 (59.0%) 74 (55.2%) 85 (64.4%) \n Total number of events 129 138 143 \n hlt B.2.2.3 \n Total number of patients with at least one adverse event 48 (35.8%) 54 (40.3%) 51 (38.6%) \n Total number of events 64 76 77 \n dcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%) \n hlt B.2.1.2 \n Total number of patients with at least one adverse event 49 (36.6%) 44 (32.8%) 52 (39.4%) \n Total number of events 65 62 66 \n dcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 52 (39.4%) \ncl D.1 \n Total number of patients with at least one adverse event 79 (59.0%) 67 (50.0%) 80 (60.6%) \n Total number of events 127 106 135 \n hlt D.1.1.1 \n Total number of patients with at least one adverse event 50 (37.3%) 42 (31.3%) 51 (38.6%) \n Total number of events 61 51 71 \n dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) \n hlt D.1.1.4 \n Total number of patients with at least one adverse event 48 (35.8%) 42 (31.3%) 50 (37.9%) \n Total number of events 66 55 64 \n dcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 50 (37.9%) \ncl D.2 \n Total number of patients with at least one adverse event 47 (35.1%) 58 (43.3%) 57 (43.2%) \n Total number of events 62 72 74 \n hlt D.2.1.5 \n Total number of patients with at least one adverse event 47 (35.1%) 58 (43.3%) 57 (43.2%) \n Total number of events 62 72 74 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) \ncl B.1 \n Total number of patients with at least one adverse event 47 (35.1%) 49 (36.6%) 43 (32.6%) \n Total number of events 56 60 62 \n hlt B.1.1.1 \n Total number of patients with at least one adverse event 47 (35.1%) 49 (36.6%) 43 (32.6%) \n Total number of events 56 60 62 \n dcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) \ncl C.2 \n Total number of patients with at least one adverse event 35 (26.1%) 48 (35.8%) 55 (41.7%) \n Total number of events 48 53 65 \n hlt C.2.1.2 \n Total number of patients with at least one adverse event 35 (26.1%) 48 (35.8%) 55 (41.7%) \n Total number of events 48 53 65 \n dcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) \ncl C.1 \n Total number of patients with at least one adverse event 43 (32.1%) 46 (34.3%) 43 (32.6%) \n Total number of events 55 63 64 \n hlt C.1.1.1 \n Total number of patients with at least one adverse event 43 (32.1%) 46 (34.3%) 43 (32.6%) \n Total number of events 55 63 64 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n ),\n show_labels = \"hidden\"\n ) %>%\n count_occurrences(vars = \"AEDECOD\") %>%\n append_varlabels(adae, \"AEDECOD\")\n\nresult <- build_table(\n lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n sort_at_path(\n path = c(\"AEDECOD\"), scorefun = score_occurrences\n )\n\nresult\n\nDictionary-Derived Term A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) \nTotal number of events 609 622 703 \ndcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) \ndcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) \ndcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%) \ndcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 50 (37.9%) \ndcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 52 (39.4%) \ndcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) \ndcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 50 (37.9%) \ndcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) \ndcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) \ndcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) \n\n\n\n\n\nCodeadae_5 <- adae %>% dplyr::filter(ARM != \"C: Combination\")\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", .indent_mods = c(count_fraction = -1L)) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt,\n df = adae_5,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination\n Dictionary-Derived Term (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 0 \nOverall total number of events 609 622 0 \ncl A.1 \n Total number of patients with at least one adverse event 78 (58.2%) 75 (56.0%) 0 \n Total number of events 132 130 0 \n dcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 0 \n dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 0 \ncl B.2 \n Total number of patients with at least one adverse event 79 (59.0%) 74 (55.2%) 0 \n Total number of events 129 138 0 \n dcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 0 \n dcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 0 \ncl D.1 \n Total number of patients with at least one adverse event 79 (59.0%) 67 (50.0%) 0 \n Total number of events 127 106 0 \n dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 0 \n dcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 0 \ncl D.2 \n Total number of patients with at least one adverse event 47 (35.1%) 58 (43.3%) 0 \n Total number of events 62 72 0 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 0 \ncl B.1 \n Total number of patients with at least one adverse event 47 (35.1%) 49 (36.6%) 0 \n Total number of events 56 60 0 \n dcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 0 \ncl C.1 \n Total number of patients with at least one adverse event 43 (32.1%) 46 (34.3%) 0 \n Total number of events 55 63 0 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 0 \ncl C.2 \n Total number of patients with at least one adverse event 35 (26.1%) 48 (35.8%) 0 \n Total number of events 48 53 0 \n dcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 0 \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = c(count_fraction = 1L)\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\ncriteria_fun <- function(tr) is(tr, \"ContentRow\")\nresult <- trim_rows(result, criteria = criteria_fun)\n\nrow_condition <- has_fraction_in_any_col(\n atleast = 0.05,\n col_names = names(table(adsl$ARM))\n)\nresult <- prune_table(result, keep_rows(row_condition))\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination\n Dictionary-Derived Term (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————\ncl A.1 \n dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) \n dcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 50 (37.9%) \ncl B.2 \n dcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%) \n dcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 52 (39.4%) \ncl D.1 \n dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) \n dcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 50 (37.9%) \ncl D.2 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) \ncl B.1 \n dcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) \ncl C.2 \n dcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) \ncl C.1 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n split_rows_by(\n \"AEHLT\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEHLT)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n count_occurrences(vars = \"AEDECOD\") %>%\n append_varlabels(adae, c(\"AEDECOD\"), indent = 2L)\n\nresult <- build_table(lyt, adae, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEHLT\"),\n scorefun = cont_n_allcols,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEHLT\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences,\n decreasing = TRUE\n )\n\ncriteria_fun <- function(tr) is(tr, \"ContentRow\")\nresult <- trim_rows(result, criteria = criteria_fun)\n\nrow_condition <- has_fraction_in_any_col(\n atleast = 0.05,\n col_names = names(table(adsl$ARM))\n)\nresult <- prune_table(result, keep_rows(row_condition))\n\nresult\n\nBody System or Organ Class \n High Level Term A: Drug X B: Placebo C: Combination\n Dictionary-Derived Term (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————\ncl A.1 \n hlt A.1.1.1 \n dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) \n dcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 50 (37.9%) \ncl B.2 \n hlt B.2.2.3 \n dcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%) \n hlt B.2.1.2 \n dcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 52 (39.4%) \ncl D.1 \n hlt D.1.1.1 \n dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) \n hlt D.1.1.4 \n dcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 50 (37.9%) \ncl D.2 \n hlt D.2.1.5 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) \ncl B.1 \n hlt B.1.1.1 \n dcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) \ncl C.2 \n hlt C.2.1.2 \n dcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) \ncl C.1 \n hlt C.1.1.1 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = c(count_fraction = 1L)\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\ncriteria_fun <- function(tr) is(tr, \"ContentRow\")\nresult <- trim_rows(result, criteria = criteria_fun)\n\nrow_condition <- has_fraction_in_any_col(\n atleast = 0.10,\n col_names = names(table(adsl$ARM))\n)\nresult <- prune_table(result, keep_rows(row_condition))\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination\n Dictionary-Derived Term (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————\ncl A.1 \n dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) \n dcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 50 (37.9%) \ncl B.2 \n dcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%) \n dcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 52 (39.4%) \ncl D.1 \n dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) \n dcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 50 (37.9%) \ncl D.2 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) \ncl B.1 \n dcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) \ncl C.2 \n dcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) \ncl C.1 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n indent_mod = -1L,\n split_fun = split_fun,\n split_label = obj_label(adae$AEBODSYS),\n label_pos = \"topleft\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = c(count_fraction = 1L)\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\ncriteria_fun <- function(tr) is(tr, \"ContentRow\")\nresult <- trim_rows(result, criteria = criteria_fun)\n\nrow_condition <- has_count_in_any_col(\n atleast = 3,\n col_names = names(table(adsl$ARM))\n)\nresult <- prune_table(result, keep_rows(row_condition))\n\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination\n Dictionary-Derived Term (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————\ncl A.1 \n dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) \n dcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 50 (37.9%) \ncl B.2 \n dcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%) \n dcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 52 (39.4%) \ncl D.1 \n dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) \n dcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 50 (37.9%) \ncl D.2 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) \ncl B.1 \n dcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) \ncl C.2 \n dcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) \ncl C.1 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = c(count_fraction = 1L)\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\ncriteria_fun <- function(tr) is(tr, \"ContentRow\")\nresult <- trim_rows(result, criteria = criteria_fun)\n\nrow_condition <- has_fractions_difference(\n atleast = 0.05,\n col_names = levels(adsl$ARM)\n)\nresult <- prune_table(result, keep_rows(row_condition))\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination\n Dictionary-Derived Term (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————\ncl A.1 \n dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) \ncl B.2 \n dcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 52 (39.4%) \ncl D.1 \n dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) \n dcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 50 (37.9%) \ncl D.2 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) \ncl C.2 \n dcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = c(count_fraction = 1L)\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\nresult <- build_table(\n lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\ncriteria_fun <- function(tr) is(tr, \"ContentRow\")\nresult <- trim_rows(result, criteria = criteria_fun)\nrow_condition <- has_fraction_in_cols(\n atleast = 0.05,\n col_names = c(\"B: Placebo\")\n)\nresult <- prune_table(result, keep_rows(row_condition))\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination\n Dictionary-Derived Term (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————\ncl A.1 \n dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) \n dcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 50 (37.9%) \ncl B.2 \n dcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%) \n dcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 52 (39.4%) \ncl D.1 \n dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) \n dcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 50 (37.9%) \ncl D.2 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) \ncl B.1 \n dcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) \ncl C.2 \n dcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) \ncl C.1 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = c(count_fraction = 1L)\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt,\n df = adae,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\ncriteria_fun <- function(tr) is(tr, \"ContentRow\")\nresult <- trim_rows(result, criteria = criteria_fun)\n\nrow_condition1 <- has_fractions_difference(atleast = 0.05, col_names = c(\"A: Drug X\", \"B: Placebo\"))\nrow_condition2 <- has_fractions_difference(atleast = 0.05, col_names = c(\"A: Drug X\", \"C: Combination\"))\nrow_condition <- row_condition1 | row_condition2\n\nresult <- prune_table(result, keep_rows(row_condition))\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination\n Dictionary-Derived Term (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————\ncl A.1 \n dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) \ncl D.1 \n dcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) \ncl D.2 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) \ncl C.2 \n dcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'),\n cdisc_dataset(\"ADAE\", adae, code = 'ADAE <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adae\"))'),\n check = TRUE\n ),\n modules = modules(\n tm_t_events(\n label = \"Adverse Event Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\")),\n selected = c(\"AEDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(adae, c(\"AEBODSYS\", \"AESOC\")),\n selected = \"AEBODSYS\"\n ),\n add_total = TRUE,\n event_type = \"adverse event\"\n )\n )\n)\n\n[INFO] 2023-08-04 15:10:16.6688 pid:11309 token:[] teal.modules.clinical Initializing tm_t_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet02.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable with Event Totals\nTable with High-Level Term\nTable with Preferred Terms Only\nTable with Fill-In of Treatment Groups\nTable of AEs with an Incidence Rate \\(\\geq\\) 5% in Any Treatment Group (subsetting preferred terms based on frequency)\nTable of AEs with an Incidence Rate \\(\\geq\\) 5% in Any Treatment Group (subsetting preferred terms based on frequency with high-level terms)\nTable of AEs with an Incidence Rate \\(\\geq\\) 10% in Any Treatment Group (subsetting preferred terms based on frequency)\nTable of AEs with an Incidence Rate \\(\\geq\\) 3 Patients in Any Treatment Group (subsetting preferred terms based on number of patients)\nTable of AEs with a Difference in Incidence Rate \\(\\geq\\) 5% Between Any Treatment (subsetting preferred terms based on difference in percentage between treatment groups)\nTable of AEs with an Incidence Rate \\(\\geq\\) 5% in B: Placebo (subsetting preferred terms based on frequency for a particular treatment group)\nTable of AEs with a Difference in Incidence Rate \\(\\geq\\) 5% Between Arm A and Arm B or Arm C (displaying preferred terms with a difference of at least x% between selected treatment groups)\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae) %>%\n var_relabel(\n AEBODSYS = \"MedDRA System Organ Class\",\n AEDECOD = \"MedDRA Preferred Term\"\n ) %>%\n filter(ANL01FL == \"Y\")\n\n# Define the split function\nsplit_fun <- drop_split_levels\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n add_overall_col(label = \"All Patients\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = -1L\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(lyt, df = adae, alt_counts_df = adsl)\n\n\nThe variable result corresponds to the adverse events table. However, it includes many empty rows accounting for events which were not reported. The table can be post-processed to prune empty rows and to sort rows, for example by occurrence.\n\nCoderesult <- result %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination All Patients\n MedDRA Preferred Term (N=134) (N=134) (N=132) (N=400) \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 100 (74.6%) 98 (73.1%) 103 (78.0%) 301 (75.2%) \nOverall total number of events 502 480 604 1586 \ncl A.1 \n Total number of patients with at least one adverse event 68 (50.7%) 58 (43.3%) 76 (57.6%) 202 (50.5%) \n Total number of events 115 99 137 351 \n dcd A.1.1.1.1 45 (33.6%) 31 (23.1%) 52 (39.4%) 128 (32.0%) \n dcd A.1.1.1.2 41 (30.6%) 39 (29.1%) 42 (31.8%) 122 (30.5%) \ncl B.2 \n Total number of patients with at least one adverse event 62 (46.3%) 56 (41.8%) 74 (56.1%) 192 (48.0%) \n Total number of events 102 106 127 335 \n dcd B.2.2.3.1 38 (28.4%) 40 (29.9%) 45 (34.1%) 123 (30.8%) \n dcd B.2.1.2.1 39 (29.1%) 34 (25.4%) 46 (34.8%) 119 (29.8%) \ncl D.1 \n Total number of patients with at least one adverse event 64 (47.8%) 54 (40.3%) 68 (51.5%) 186 (46.5%) \n Total number of events 106 84 114 304 \n dcd D.1.1.1.1 42 (31.3%) 32 (23.9%) 46 (34.8%) 120 (30.0%) \n dcd D.1.1.4.2 38 (28.4%) 34 (25.4%) 40 (30.3%) 112 (28.0%) \ncl D.2 \n Total number of patients with at least one adverse event 37 (27.6%) 46 (34.3%) 50 (37.9%) 133 (33.2%) \n Total number of events 49 57 65 171 \n dcd D.2.1.5.3 37 (27.6%) 46 (34.3%) 50 (37.9%) 133 (33.2%) \ncl C.2 \n Total number of patients with at least one adverse event 28 (20.9%) 36 (26.9%) 48 (36.4%) 112 (28.0%) \n Total number of events 39 40 57 136 \n dcd C.2.1.2.1 28 (20.9%) 36 (26.9%) 48 (36.4%) 112 (28.0%) \ncl B.1 \n Total number of patients with at least one adverse event 38 (28.4%) 37 (27.6%) 36 (27.3%) 111 (27.8%) \n Total number of events 44 43 50 137 \n dcd B.1.1.1.1 38 (28.4%) 37 (27.6%) 36 (27.3%) 111 (27.8%) \ncl C.1 \n Total number of patients with at least one adverse event 36 (26.9%) 34 (25.4%) 36 (27.3%) 106 (26.5%) \n Total number of events 47 51 54 152 \n dcd C.1.1.1.3 36 (26.9%) 34 (25.4%) 36 (27.3%) 106 (26.5%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n add_overall_col(label = \"All Patients\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L) %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total number of events\"),\n .indent_mods = c(count = -1L)\n )\n\nresult <- build_table(lyt, df = adae, alt_counts_df = adsl) %>% # col_count = c(table(adsl$ACTARM), sum(table(adsl$ACTARM)))\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n )\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination All Patients\n MedDRA Preferred Term (N=134) (N=134) (N=132) (N=400) \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 100 (74.6%) 98 (73.1%) 103 (78.0%) 301 (75.2%) \nOverall total number of events 502 480 604 1586 \ncl A.1 \n Total number of patients with at least one adverse event 68 (50.7%) 58 (43.3%) 76 (57.6%) 202 (50.5%) \n dcd A.1.1.1.1 45 (33.6%) 31 (23.1%) 52 (39.4%) 128 (32.0%) \n dcd A.1.1.1.2 41 (30.6%) 39 (29.1%) 42 (31.8%) 122 (30.5%) \n Total number of events 115 99 137 351 \ncl B.2 \n Total number of patients with at least one adverse event 62 (46.3%) 56 (41.8%) 74 (56.1%) 192 (48.0%) \n dcd B.2.2.3.1 38 (28.4%) 40 (29.9%) 45 (34.1%) 123 (30.8%) \n dcd B.2.1.2.1 39 (29.1%) 34 (25.4%) 46 (34.8%) 119 (29.8%) \n Total number of events 102 106 127 335 \ncl D.1 \n Total number of patients with at least one adverse event 64 (47.8%) 54 (40.3%) 68 (51.5%) 186 (46.5%) \n dcd D.1.1.1.1 42 (31.3%) 32 (23.9%) 46 (34.8%) 120 (30.0%) \n dcd D.1.1.4.2 38 (28.4%) 34 (25.4%) 40 (30.3%) 112 (28.0%) \n Total number of events 106 84 114 304 \ncl D.2 \n Total number of patients with at least one adverse event 37 (27.6%) 46 (34.3%) 50 (37.9%) 133 (33.2%) \n dcd D.2.1.5.3 37 (27.6%) 46 (34.3%) 50 (37.9%) 133 (33.2%) \n Total number of events 49 57 65 171 \ncl C.2 \n Total number of patients with at least one adverse event 28 (20.9%) 36 (26.9%) 48 (36.4%) 112 (28.0%) \n dcd C.2.1.2.1 28 (20.9%) 36 (26.9%) 48 (36.4%) 112 (28.0%) \n Total number of events 39 40 57 136 \ncl B.1 \n Total number of patients with at least one adverse event 38 (28.4%) 37 (27.6%) 36 (27.3%) 111 (27.8%) \n dcd B.1.1.1.1 38 (28.4%) 37 (27.6%) 36 (27.3%) 111 (27.8%) \n Total number of events 44 43 50 137 \ncl C.1 \n Total number of patients with at least one adverse event 36 (26.9%) 34 (25.4%) 36 (27.3%) 106 (26.5%) \n dcd C.1.1.1.3 36 (26.9%) 34 (25.4%) 36 (27.3%) 106 (26.5%) \n Total number of events 47 51 54 152 \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEHLT\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n indent_mod = -1L,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEHLT)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", .indent_mods = c(count_fraction = -1L)) %>%\n append_varlabels(adae, c(\"AEDECOD\"), indent = 2L)\n\nresult <- build_table(lyt, df = adae, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEHLT\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEHLT\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nMedDRA System Organ Class \n High Level Term A: Drug X B: Placebo C: Combination\n MedDRA Preferred Term (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 100 (74.6%) 98 (73.1%) 103 (78.0%) \nOverall total number of events 502 480 604 \ncl A.1 \n Total number of patients with at least one adverse event 68 (50.7%) 58 (43.3%) 76 (57.6%) \n Total number of events 115 99 137 \n hlt A.1.1.1 \n Total number of patients with at least one adverse event 68 (50.7%) 58 (43.3%) 76 (57.6%) \n Total number of events 115 99 137 \n dcd A.1.1.1.1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n Total number of patients with at least one adverse event 62 (46.3%) 56 (41.8%) 74 (56.1%) \n Total number of events 102 106 127 \n hlt B.2.2.3 \n Total number of patients with at least one adverse event 38 (28.4%) 40 (29.9%) 45 (34.1%) \n Total number of events 50 55 68 \n dcd B.2.2.3.1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n hlt B.2.1.2 \n Total number of patients with at least one adverse event 39 (29.1%) 34 (25.4%) 46 (34.8%) \n Total number of events 52 51 59 \n dcd B.2.1.2.1 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n Total number of patients with at least one adverse event 64 (47.8%) 54 (40.3%) 68 (51.5%) \n Total number of events 106 84 114 \n hlt D.1.1.1 \n Total number of patients with at least one adverse event 42 (31.3%) 32 (23.9%) 46 (34.8%) \n Total number of events 52 40 64 \n dcd D.1.1.1.1 42 (31.3%) 32 (23.9%) 46 (34.8%) \n hlt D.1.1.4 \n Total number of patients with at least one adverse event 38 (28.4%) 34 (25.4%) 40 (30.3%) \n Total number of events 54 44 50 \n dcd D.1.1.4.2 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n Total number of patients with at least one adverse event 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Total number of events 49 57 65 \n hlt D.2.1.5 \n Total number of patients with at least one adverse event 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Total number of events 49 57 65 \n dcd D.2.1.5.3 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n Total number of patients with at least one adverse event 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Total number of events 39 40 57 \n hlt C.2.1.2 \n Total number of patients with at least one adverse event 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Total number of events 39 40 57 \n dcd C.2.1.2.1 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n Total number of patients with at least one adverse event 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Total number of events 44 43 50 \n hlt B.1.1.1 \n Total number of patients with at least one adverse event 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Total number of events 44 43 50 \n dcd B.1.1.1.1 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n Total number of patients with at least one adverse event 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Total number of events 47 51 54 \n hlt C.1.1.1 \n Total number of patients with at least one adverse event 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Total number of events 47 51 54 \n dcd C.1.1.1.3 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n ),\n show_labels = \"hidden\"\n ) %>%\n count_occurrences(vars = \"AEDECOD\") %>%\n append_varlabels(adae, \"AEDECOD\")\n\nresult <- build_table(lyt, df = adae, alt_counts_df = adsl) %>%\n sort_at_path(\n path = c(\"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nMedDRA Preferred Term A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 100 (74.6%) 98 (73.1%) 103 (78.0%) \nTotal number of events 502 480 604 \ndcd D.2.1.5.3 37 (27.6%) 46 (34.3%) 50 (37.9%) \ndcd A.1.1.1.1 45 (33.6%) 31 (23.1%) 52 (39.4%) \ndcd B.2.2.3.1 38 (28.4%) 40 (29.9%) 45 (34.1%) \ndcd A.1.1.1.2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ndcd D.1.1.1.1 42 (31.3%) 32 (23.9%) 46 (34.8%) \ndcd B.2.1.2.1 39 (29.1%) 34 (25.4%) 46 (34.8%) \ndcd C.2.1.2.1 28 (20.9%) 36 (26.9%) 48 (36.4%) \ndcd D.1.1.4.2 38 (28.4%) 34 (25.4%) 40 (30.3%) \ndcd B.1.1.1.1 38 (28.4%) 37 (27.6%) 36 (27.3%) \ndcd C.1.1.1.3 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCodeadae_5 <- adae %>% dplyr::filter(ACTARM != \"C: Combination\")\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Overall total number of events\"\n )\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", .indent_mods = c(count_fraction = -1L)) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(lyt, df = adae_5, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination\n MedDRA Preferred Term (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 100 (74.6%) 98 (73.1%) 0 \nOverall total number of events 502 480 0 \ncl A.1 \n Total number of patients with at least one adverse event 68 (50.7%) 58 (43.3%) 0 \n Total number of events 115 99 0 \n dcd A.1.1.1.2 41 (30.6%) 39 (29.1%) 0 \n dcd A.1.1.1.1 45 (33.6%) 31 (23.1%) 0 \ncl B.2 \n Total number of patients with at least one adverse event 62 (46.3%) 56 (41.8%) 0 \n Total number of events 102 106 0 \n dcd B.2.2.3.1 38 (28.4%) 40 (29.9%) 0 \n dcd B.2.1.2.1 39 (29.1%) 34 (25.4%) 0 \ncl D.1 \n Total number of patients with at least one adverse event 64 (47.8%) 54 (40.3%) 0 \n Total number of events 106 84 0 \n dcd D.1.1.1.1 42 (31.3%) 32 (23.9%) 0 \n dcd D.1.1.4.2 38 (28.4%) 34 (25.4%) 0 \ncl D.2 \n Total number of patients with at least one adverse event 37 (27.6%) 46 (34.3%) 0 \n Total number of events 49 57 0 \n dcd D.2.1.5.3 37 (27.6%) 46 (34.3%) 0 \ncl B.1 \n Total number of patients with at least one adverse event 38 (28.4%) 37 (27.6%) 0 \n Total number of events 44 43 0 \n dcd B.1.1.1.1 38 (28.4%) 37 (27.6%) 0 \ncl C.1 \n Total number of patients with at least one adverse event 36 (26.9%) 34 (25.4%) 0 \n Total number of events 47 51 0 \n dcd C.1.1.1.3 36 (26.9%) 34 (25.4%) 0 \ncl C.2 \n Total number of patients with at least one adverse event 28 (20.9%) 36 (26.9%) 0 \n Total number of events 39 40 0 \n dcd C.2.1.2.1 28 (20.9%) 36 (26.9%) 0 \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = c(count_fraction = 1L)\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(lyt, df = adae, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\ncriteria_fun <- function(tr) is(tr, \"ContentRow\")\nresult <- trim_rows(result, criteria = criteria_fun)\n\nrow_condition <- has_fraction_in_any_col(\n atleast = 0.05,\n col_names = names(table(adsl$ACTARM))\n)\nresult <- prune_table(result, keep_rows(row_condition))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination\n MedDRA Preferred Term (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————\ncl A.1 \n dcd A.1.1.1.1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n dcd B.2.2.3.1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n dcd D.1.1.1.1 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n dcd D.2.1.5.3 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n dcd C.2.1.2.1 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n dcd B.1.1.1.1 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n dcd C.1.1.1.3 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n split_rows_by(\n \"AEHLT\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEHLT)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n count_occurrences(vars = \"AEDECOD\") %>%\n append_varlabels(adae, c(\"AEDECOD\"), indent = 2L)\n\nresult <- build_table(lyt, adae, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEHLT\"),\n scorefun = cont_n_allcols,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEHLT\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences,\n decreasing = TRUE\n )\n\ncriteria_fun <- function(tr) is(tr, \"ContentRow\")\nresult <- trim_rows(result, criteria = criteria_fun)\n\nrow_condition <- has_fraction_in_any_col(\n atleast = 0.05,\n col_names = names(table(adsl$ACTARM))\n)\nresult <- prune_table(result, keep_rows(row_condition))\n\nresult\n\nMedDRA System Organ Class \n High Level Term A: Drug X B: Placebo C: Combination\n MedDRA Preferred Term (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————\ncl A.1 \n hlt A.1.1.1 \n dcd A.1.1.1.1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n hlt B.2.2.3 \n dcd B.2.2.3.1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n hlt B.2.1.2 \n dcd B.2.1.2.1 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n hlt D.1.1.1 \n dcd D.1.1.1.1 42 (31.3%) 32 (23.9%) 46 (34.8%) \n hlt D.1.1.4 \n dcd D.1.1.4.2 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n hlt D.2.1.5 \n dcd D.2.1.5.3 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n hlt C.2.1.2 \n dcd C.2.1.2.1 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n hlt B.1.1.1 \n dcd B.1.1.1.1 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n hlt C.1.1.1 \n dcd C.1.1.1.3 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = c(count_fraction = 1L)\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(lyt, df = adae, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\ncriteria_fun <- function(tr) is(tr, \"ContentRow\")\nresult <- trim_rows(result, criteria = criteria_fun)\n\nrow_condition <- has_fraction_in_any_col(\n atleast = 0.10,\n col_names = names(table(adsl$ACTARM))\n)\nresult <- prune_table(result, keep_rows(row_condition))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination\n MedDRA Preferred Term (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————\ncl A.1 \n dcd A.1.1.1.1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n dcd B.2.2.3.1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n dcd D.1.1.1.1 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n dcd D.2.1.5.3 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n dcd C.2.1.2.1 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n dcd B.1.1.1.1 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n dcd C.1.1.1.3 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n indent_mod = -1L,\n split_fun = split_fun,\n split_label = obj_label(adae$AEBODSYS),\n label_pos = \"topleft\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = c(count_fraction = 1L)\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(lyt, df = adae, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\ncriteria_fun <- function(tr) is(tr, \"ContentRow\")\nresult <- trim_rows(result, criteria = criteria_fun)\n\nrow_condition <- has_count_in_any_col(\n atleast = 3,\n col_names = names(table(adsl$ACTARM))\n)\nresult <- prune_table(result, keep_rows(row_condition))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination\n MedDRA Preferred Term (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————\ncl A.1 \n dcd A.1.1.1.1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n dcd B.2.2.3.1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n dcd D.1.1.1.1 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n dcd D.2.1.5.3 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n dcd C.2.1.2.1 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n dcd B.1.1.1.1 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n dcd C.1.1.1.3 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = c(count_fraction = 1L)\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(lyt, df = adae, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\ncriteria_fun <- function(tr) is(tr, \"ContentRow\")\nresult <- trim_rows(result, criteria = criteria_fun)\n\nrow_condition <- has_fractions_difference(\n atleast = 0.05,\n col_names = levels(adsl$ACTARM)\n)\nresult <- prune_table(result, keep_rows(row_condition))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination\n MedDRA Preferred Term (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————\ncl A.1 \n dcd A.1.1.1.1 45 (33.6%) 31 (23.1%) 52 (39.4%) \ncl B.2 \n dcd B.2.2.3.1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n dcd D.1.1.1.1 42 (31.3%) 32 (23.9%) 46 (34.8%) \ncl D.2 \n dcd D.2.1.5.3 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n dcd C.2.1.2.1 28 (20.9%) 36 (26.9%) 48 (36.4%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = c(count_fraction = 1L)\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(lyt, df = adae, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\ncriteria_fun <- function(tr) is(tr, \"ContentRow\")\nresult <- trim_rows(result, criteria = criteria_fun)\n\nrow_condition <- has_fraction_in_cols(\n atleast = 0.05,\n col_names = c(\"B: Placebo\")\n)\nresult <- prune_table(result, keep_rows(row_condition))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination\n MedDRA Preferred Term (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————\ncl A.1 \n dcd A.1.1.1.1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n dcd B.2.2.3.1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n dcd D.1.1.1.1 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n dcd D.2.1.5.3 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n dcd C.2.1.2.1 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n dcd B.1.1.1.1 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n dcd C.1.1.1.3 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = c(count_fraction = 1L)\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(lyt, df = adae, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = cont_n_allcols\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences\n )\n\ncriteria_fun <- function(tr) is(tr, \"ContentRow\")\nresult <- trim_rows(result, criteria = criteria_fun)\n\nrow_condition1 <- has_fractions_difference(atleast = 0.05, col_names = c(\"A: Drug X\", \"B: Placebo\"))\nrow_condition2 <- has_fractions_difference(atleast = 0.05, col_names = c(\"A: Drug X\", \"C: Combination\"))\nrow_condition <- row_condition1 | row_condition2\nresult <- prune_table(result, keep_rows(row_condition))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination\n MedDRA Preferred Term (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————\ncl A.1 \n dcd A.1.1.1.1 45 (33.6%) 31 (23.1%) 52 (39.4%) \ncl B.2 \n dcd B.2.2.3.1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n dcd D.1.1.1.1 42 (31.3%) 32 (23.9%) 46 (34.8%) \ncl D.2 \n dcd D.2.1.5.3 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n dcd C.2.1.2.1 28 (20.9%) 36 (26.9%) 48 (36.4%) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'),\n cdisc_dataset(\"ADAE\", adae, code = 'ADAE <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adae\"))'),\n check = TRUE\n ),\n modules = modules(\n tm_t_events(\n label = \"Adverse Event Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\")),\n selected = c(\"AEDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(adae, c(\"AEBODSYS\", \"AESOC\")),\n selected = \"AEBODSYS\"\n ),\n add_total = TRUE,\n event_type = \"adverse event\"\n )\n )\n)\n\n[INFO] 2023-08-04 15:28:32.7293 pid:11312 token:[] teal.modules.clinical Initializing tm_t_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet02.lock'.\n\n\nDownload" }, { "objectID": "tables/adverse-events/aet06_smq.html", "href": "tables/adverse-events/aet06_smq.html", "title": "AET06_SMQ", "section": "", - "text": "Data Setup\nAdverse Events by Sex, by SMQ and Preferred Term\nAdverse Events by Sex, by SMQ and Preferred Term (with Customized Queries)\nAdverse Events by Other Baseline Characteristics (e.g. Age Group)\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\nlibrary(stringr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nadsl_labels <- var_labels(adsl)\nadae_labels <- var_labels(adae)\n\nadsl <- adsl %>%\n mutate(\n AGE65 = case_when(\n AGE >= 65 ~ \">= 65\",\n TRUE ~ \"< 65\"\n ),\n AGE65 = factor(\n AGE65,\n levels = c(\"< 65\", \">= 65\")\n )\n )\n\nadae <- adae %>%\n mutate(\n AGE65 = case_when(\n AGE >= 65 ~ \">= 65\",\n TRUE ~ \"< 65\"\n ),\n AGE65 = factor(\n AGE65,\n levels = c(\"< 65\", \">= 65\")\n )\n )\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing\n# levels. For details, refer to Teal and Study Data article.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\n# Simulate a random AAG dataset.\naag <- data.frame(\n NAMVAR = c(\"SMQ01NAM\", \"SMQ01NAM\", \"SMQ02NAM\", \"CQ01NAM\", \"CQ01NAM\"),\n SRCVAR = rep(\"AEDECOD\", 5),\n GRPTYPE = c(\"SMQ\", \"SMQ\", \"SMQ\", \"CUSTOM\", \"CUSTOM\"),\n REFID = c(1, 1, 2, 3, 3),\n REFNAME = c(rep(\"C.1.1.1.3/B.2.2.3.1 AESI\", 2), \"non observed SMQ02NAM level\", rep(\"D.2.1.5.3/A.1.1.1.1 AESI\", 2)),\n SCOPE = c(\"BROAD\", \"BROAD\", \"BROAD\", \"\", \"\"),\n REFTERM = c(\"C.1.1.1.3\", \"B.2.2.3.1\", \"Z.9.9.9.9\", \"D.2.1.5.3\", \"A.1.1.1.1\"),\n stringsAsFactors = FALSE\n)\n\n# Create summary AAG dataset (used for labelling).\n# Note it's important to incorporate SCOPE into the basket names for SMQs so as to\n# match the flags present in ADAE.\naag_summary <- aag %>%\n select(NAMVAR, REFNAME, SCOPE) %>%\n unique() %>%\n mutate(\n REFNAME_SCOPE = ifelse(SCOPE == \"\", REFNAME, paste0(REFNAME, \"(\", SCOPE, \")\"))\n ) %>%\n rename(basket = NAMVAR, basket_name = REFNAME_SCOPE) %>%\n select(basket, basket_name)\n\n# Make a summary of the full ADAE based on AAG by using h_stack_by_baskets helper function\nadae_smq_all <- h_stack_by_baskets(\n df = adae,\n aag_summary = aag_summary,\n keys = c(\"STUDYID\", \"USUBJID\", \"ACTARMCD\", \"AEDECOD\", \"SEX\", \"AGE65\")\n)\n# Post-process adae_smq_all to keep only certain baskets of interest for variant 1\n# Not need to drop baskets for variant 2 as all baskets will be considered.\nbaskets_to_drop_variant <- aag_summary$basket_name[!aag_summary$basket %in% c(\"SMQ01NAM\")]\n\n# Adjust the analysis dataset based on basket subset for variant 1.\nadae_smq_1 <- adae_smq_all %>%\n filter(!adae_smq_all$SMQ %in% baskets_to_drop_variant) %>%\n mutate(\n SMQ = tern::fct_discard(SMQ, discard = baskets_to_drop_variant)\n )\n\n\n\n\n\nCodecriteria_fun <- function(tr) !is(tr, \"ContentRow\") && all_zero_or_na(tr)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n split_cols_by(\"SEX\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(unique = \"Total number of patients with at least one adverse event\")\n ) %>%\n split_rows_by(\n \"SMQ\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = trim_levels_in_group(\"AEDECOD\", drop_outlevs = FALSE),\n label_pos = \"topleft\",\n split_label = \"Standardized MedDRA Query\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", drop = FALSE) %>%\n append_varlabels(adae_smq_1, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adae_smq_1,\n alt_counts_df = adsl\n) %>%\n sort_at_path(path = c(\"SMQ\"), scorefun = cont_n_allcols) %>%\n sort_at_path(path = c(\"SMQ\", \"*\", \"AEDECOD\"), scorefun = score_occurrences, na.pos = \"last\") %>%\n trim_rows(criteria = criteria_fun)\n\nresult\n\nStandardized MedDRA Query ARM A ARM B ARM C \n Dictionary-Derived Term F M F M F M \n (N=79) (N=55) (N=82) (N=52) (N=70) (N=62) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 47 (59.5%) 25 (45.5%) 51 (62.2%) 28 (53.8%) 42 (60.0%) 33 (53.2%)\nC.1.1.1.3/B.2.2.3.1 AESI(BROAD) \n Total number of patients with at least one adverse event 47 (59.5%) 25 (45.5%) 51 (62.2%) 28 (53.8%) 42 (60.0%) 33 (53.2%)\n Total number of events 79 40 95 44 81 60 \n dcd B.2.2.3.1 30 (38.0%) 18 (32.7%) 32 (39.0%) 22 (42.3%) 26 (37.1%) 25 (40.3%)\n dcd C.1.1.1.3 30 (38.0%) 13 (23.6%) 36 (43.9%) 10 (19.2%) 27 (38.6%) 16 (25.8%)\n\n\n\n\n\nCodecriteria_fun <- function(tr) !is(tr, \"ContentRow\") && all_zero_or_na(tr)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n split_cols_by(\"SEX\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(unique = \"Total number of patients with at least one adverse event\")\n ) %>%\n split_rows_by(\n \"SMQ\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = trim_levels_in_group(\"AEDECOD\", drop_outlevs = FALSE),\n label_pos = \"topleft\",\n split_label = \"Standardized MedDRA Query\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", drop = FALSE) %>%\n append_varlabels(adae_smq_all, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adae_smq_all,\n alt_counts_df = adsl\n) %>%\n sort_at_path(path = c(\"SMQ\"), scorefun = cont_n_allcols) %>%\n sort_at_path(path = c(\"SMQ\", \"*\", \"AEDECOD\"), scorefun = score_occurrences, na.pos = \"last\") %>%\n trim_rows(criteria = criteria_fun)\n\nresult\n\nStandardized MedDRA Query ARM A ARM B ARM C \n Dictionary-Derived Term F M F M F M \n (N=79) (N=55) (N=82) (N=52) (N=70) (N=62) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 59 (74.7%) 36 (65.5%) 68 (82.9%) 35 (67.3%) 61 (87.1%) 47 (75.8%)\nD.2.1.5.3/A.1.1.1.1 AESI \n Total number of patients with at least one adverse event 45 (57.0%) 29 (52.7%) 54 (65.9%) 26 (50.0%) 50 (71.4%) 37 (59.7%)\n Total number of events 78 48 91 43 88 74 \n dcd D.2.1.5.3 26 (32.9%) 21 (38.2%) 40 (48.8%) 18 (34.6%) 34 (48.6%) 23 (37.1%)\n dcd A.1.1.1.1 34 (43.0%) 16 (29.1%) 31 (37.8%) 14 (26.9%) 33 (47.1%) 30 (48.4%)\nC.1.1.1.3/B.2.2.3.1 AESI(BROAD) \n Total number of patients with at least one adverse event 47 (59.5%) 25 (45.5%) 51 (62.2%) 28 (53.8%) 42 (60.0%) 33 (53.2%)\n Total number of events 79 40 95 44 81 60 \n dcd B.2.2.3.1 30 (38.0%) 18 (32.7%) 32 (39.0%) 22 (42.3%) 26 (37.1%) 25 (40.3%)\n dcd C.1.1.1.3 30 (38.0%) 13 (23.6%) 36 (43.9%) 10 (19.2%) 27 (38.6%) 16 (25.8%)\nnon observed SMQ02NAM level(BROAD) \n Total number of patients with at least one adverse event 0 0 0 0 0 0 \n Total number of events 0 0 0 0 0 0 \n\n\n\n\n\nCodecriteria_fun <- function(tr) !is(tr, \"ContentRow\") && all_zero_or_na(tr)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n split_cols_by(\"AGE65\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(unique = \"Total number of patients with at least one adverse event\")\n ) %>%\n split_rows_by(\n \"SMQ\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = trim_levels_in_group(\"AEDECOD\", drop_outlevs = FALSE),\n label_pos = \"topleft\",\n split_label = \"Standardized MedDRA Query\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", drop = FALSE) %>%\n append_varlabels(adae_smq_1, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adae_smq_1,\n alt_counts_df = adsl\n) %>%\n sort_at_path(path = c(\"SMQ\"), scorefun = cont_n_allcols) %>%\n sort_at_path(path = c(\"SMQ\", \"*\", \"AEDECOD\"), scorefun = score_occurrences, na.pos = \"last\") %>%\n trim_rows(criteria = criteria_fun)\n\nresult\n\nStandardized MedDRA Query ARM A ARM B ARM C \n Dictionary-Derived Term < 65 >= 65 < 65 >= 65 < 65 >= 65\n (N=134) (N=0) (N=134) (N=0) (N=131) (N=1)\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 72 (53.7%) 0 79 (59.0%) 0 75 (57.3%) 0 \nC.1.1.1.3/B.2.2.3.1 AESI(BROAD) \n Total number of patients with at least one adverse event 72 (53.7%) 0 79 (59.0%) 0 75 (57.3%) 0 \n Total number of events 119 0 139 0 141 0 \n dcd B.2.2.3.1 48 (35.8%) 0 54 (40.3%) 0 51 (38.9%) 0 \n dcd C.1.1.1.3 43 (32.1%) 0 46 (34.3%) 0 43 (32.8%) 0 \n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n mutate(\n AGE65 = case_when(\n AGE >= 65 ~ \">= 65\",\n TRUE ~ \"< 65\"\n ),\n AGE65 = factor(\n AGE65,\n levels = c(\"< 65\", \">= 65\")\n )\n )\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\") %>%\n mutate(\n AGE65 = case_when(\n AGE >= 65 ~ \">= 65\",\n TRUE ~ \"< 65\"\n ),\n AGE65 = factor(\n AGE65,\n levels = c(\"< 65\", \">= 65\")\n )\n )\n\nnames_baskets <- grep(\"^(SMQ|CQ).*NAM$\", names(adae), value = TRUE)\nnames_scopes <- grep(\"^SMQ.*SC$\", names(adae), value = TRUE)\n\ncs_baskets <- choices_selected(\n choices = variable_choices(adae, subset = names_baskets),\n selected = names_baskets\n)\ncs_scopes <- choices_selected(\n choices = variable_choices(adae, subset = names_scopes),\n selected = names_scopes,\n fixed = TRUE\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n mutate(\n AGE65 = case_when(\n AGE >= 65 ~ \">= 65\",\n TRUE ~ \"< 65\"\n ),\n AGE65 = factor(\n AGE65,\n levels = c(\"< 65\", \">= 65\")\n )\n )'\n ),\n cdisc_dataset(\"ADAE\", adae,\n code = 'ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\") %>%\n mutate(\n AGE65 = case_when(\n AGE >= 65 ~ \">= 65\",\n TRUE ~ \"< 65\"\n ),\n AGE65 = factor(\n AGE65,\n levels = c(\"< 65\", \">= 65\")\n )\n )'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_smq(\n label = \"Adverse events by `SMQ` Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"SEX\", \"AGE65\")),\n selected = c(\"ARM\", \"SEX\")\n ),\n add_total = FALSE,\n baskets = cs_baskets,\n scopes = cs_scopes,\n llt = choices_selected(\n choices = variable_choices(adae, subset = c(\"AEDECOD\")),\n selected = \"AEDECOD\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:09:10.5885 pid:11095 token:[] teal.modules.clinical Initializing tm_t_smq\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] stringr_1.5.0 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n[13] dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] stringi_1.7.12 gtable_0.3.3 later_1.3.1 \n[61] shinycssloaders_1.0.0 munsell_0.5.0 tibble_3.2.1 \n[64] styler_1.10.1 logger_0.2.2 pillar_1.9.0 \n[67] htmltools_0.5.5 brio_1.1.3 R6_2.5.1 \n[70] Rdpack_2.4 evaluate_0.21 lattice_0.21-8 \n[73] R.methodsS3_1.8.2 rbibutils_2.2.13 backports_1.4.1 \n[76] memoise_2.0.1 broom_1.0.5 teal.reporter_0.1.1.9020\n[79] httpuv_1.6.11 bslib_0.5.0 Rcpp_1.0.11 \n[82] teal.code_0.3.0.9009 shinyvalidate_0.1.2 coda_0.19-4 \n[85] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[88] forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet06_smq.lock'.\n\n\nDownload" + "text": "Data Setup\nAdverse Events by Sex, by SMQ and Preferred Term\nAdverse Events by Sex, by SMQ and Preferred Term (with Customized Queries)\nAdverse Events by Other Baseline Characteristics (e.g. Age Group)\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\nlibrary(stringr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nadsl_labels <- var_labels(adsl)\nadae_labels <- var_labels(adae)\n\nadsl <- adsl %>%\n mutate(\n AGE65 = case_when(\n AGE >= 65 ~ \">= 65\",\n TRUE ~ \"< 65\"\n ),\n AGE65 = factor(\n AGE65,\n levels = c(\"< 65\", \">= 65\")\n )\n )\n\nadae <- adae %>%\n mutate(\n AGE65 = case_when(\n AGE >= 65 ~ \">= 65\",\n TRUE ~ \"< 65\"\n ),\n AGE65 = factor(\n AGE65,\n levels = c(\"< 65\", \">= 65\")\n )\n )\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing\n# levels. For details, refer to Teal and Study Data article.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\n# Simulate a random AAG dataset.\naag <- data.frame(\n NAMVAR = c(\"SMQ01NAM\", \"SMQ01NAM\", \"SMQ02NAM\", \"CQ01NAM\", \"CQ01NAM\"),\n SRCVAR = rep(\"AEDECOD\", 5),\n GRPTYPE = c(\"SMQ\", \"SMQ\", \"SMQ\", \"CUSTOM\", \"CUSTOM\"),\n REFID = c(1, 1, 2, 3, 3),\n REFNAME = c(rep(\"C.1.1.1.3/B.2.2.3.1 AESI\", 2), \"non observed SMQ02NAM level\", rep(\"D.2.1.5.3/A.1.1.1.1 AESI\", 2)),\n SCOPE = c(\"BROAD\", \"BROAD\", \"BROAD\", \"\", \"\"),\n REFTERM = c(\"C.1.1.1.3\", \"B.2.2.3.1\", \"Z.9.9.9.9\", \"D.2.1.5.3\", \"A.1.1.1.1\"),\n stringsAsFactors = FALSE\n)\n\n# Create summary AAG dataset (used for labelling).\n# Note it's important to incorporate SCOPE into the basket names for SMQs so as to\n# match the flags present in ADAE.\naag_summary <- aag %>%\n select(NAMVAR, REFNAME, SCOPE) %>%\n unique() %>%\n mutate(\n REFNAME_SCOPE = ifelse(SCOPE == \"\", REFNAME, paste0(REFNAME, \"(\", SCOPE, \")\"))\n ) %>%\n rename(basket = NAMVAR, basket_name = REFNAME_SCOPE) %>%\n select(basket, basket_name)\n\n# Make a summary of the full ADAE based on AAG by using h_stack_by_baskets helper function\nadae_smq_all <- h_stack_by_baskets(\n df = adae,\n aag_summary = aag_summary,\n keys = c(\"STUDYID\", \"USUBJID\", \"ACTARMCD\", \"AEDECOD\", \"SEX\", \"AGE65\")\n)\n# Post-process adae_smq_all to keep only certain baskets of interest for variant 1\n# Not need to drop baskets for variant 2 as all baskets will be considered.\nbaskets_to_drop_variant <- aag_summary$basket_name[!aag_summary$basket %in% c(\"SMQ01NAM\")]\n\n# Adjust the analysis dataset based on basket subset for variant 1.\nadae_smq_1 <- adae_smq_all %>%\n filter(!adae_smq_all$SMQ %in% baskets_to_drop_variant) %>%\n mutate(\n SMQ = tern::fct_discard(SMQ, discard = baskets_to_drop_variant)\n )\n\n\n\n\n\nCodecriteria_fun <- function(tr) !is(tr, \"ContentRow\") && all_zero_or_na(tr)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n split_cols_by(\"SEX\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(unique = \"Total number of patients with at least one adverse event\")\n ) %>%\n split_rows_by(\n \"SMQ\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = trim_levels_in_group(\"AEDECOD\", drop_outlevs = FALSE),\n label_pos = \"topleft\",\n split_label = \"Standardized MedDRA Query\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", drop = FALSE) %>%\n append_varlabels(adae_smq_1, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adae_smq_1,\n alt_counts_df = adsl\n) %>%\n sort_at_path(path = c(\"SMQ\"), scorefun = cont_n_allcols) %>%\n sort_at_path(path = c(\"SMQ\", \"*\", \"AEDECOD\"), scorefun = score_occurrences, na.pos = \"last\") %>%\n trim_rows(criteria = criteria_fun)\n\nresult\n\nStandardized MedDRA Query ARM A ARM B ARM C \n Dictionary-Derived Term F M F M F M \n (N=79) (N=55) (N=82) (N=52) (N=70) (N=62) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 47 (59.5%) 25 (45.5%) 51 (62.2%) 28 (53.8%) 42 (60.0%) 33 (53.2%)\nC.1.1.1.3/B.2.2.3.1 AESI(BROAD) \n Total number of patients with at least one adverse event 47 (59.5%) 25 (45.5%) 51 (62.2%) 28 (53.8%) 42 (60.0%) 33 (53.2%)\n Total number of events 79 40 95 44 81 60 \n dcd B.2.2.3.1 30 (38.0%) 18 (32.7%) 32 (39.0%) 22 (42.3%) 26 (37.1%) 25 (40.3%)\n dcd C.1.1.1.3 30 (38.0%) 13 (23.6%) 36 (43.9%) 10 (19.2%) 27 (38.6%) 16 (25.8%)\n\n\n\n\n\nCodecriteria_fun <- function(tr) !is(tr, \"ContentRow\") && all_zero_or_na(tr)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n split_cols_by(\"SEX\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(unique = \"Total number of patients with at least one adverse event\")\n ) %>%\n split_rows_by(\n \"SMQ\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = trim_levels_in_group(\"AEDECOD\", drop_outlevs = FALSE),\n label_pos = \"topleft\",\n split_label = \"Standardized MedDRA Query\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", drop = FALSE) %>%\n append_varlabels(adae_smq_all, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adae_smq_all,\n alt_counts_df = adsl\n) %>%\n sort_at_path(path = c(\"SMQ\"), scorefun = cont_n_allcols) %>%\n sort_at_path(path = c(\"SMQ\", \"*\", \"AEDECOD\"), scorefun = score_occurrences, na.pos = \"last\") %>%\n trim_rows(criteria = criteria_fun)\n\nresult\n\nStandardized MedDRA Query ARM A ARM B ARM C \n Dictionary-Derived Term F M F M F M \n (N=79) (N=55) (N=82) (N=52) (N=70) (N=62) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 59 (74.7%) 36 (65.5%) 68 (82.9%) 35 (67.3%) 61 (87.1%) 47 (75.8%)\nD.2.1.5.3/A.1.1.1.1 AESI \n Total number of patients with at least one adverse event 45 (57.0%) 29 (52.7%) 54 (65.9%) 26 (50.0%) 50 (71.4%) 37 (59.7%)\n Total number of events 78 48 91 43 88 74 \n dcd D.2.1.5.3 26 (32.9%) 21 (38.2%) 40 (48.8%) 18 (34.6%) 34 (48.6%) 23 (37.1%)\n dcd A.1.1.1.1 34 (43.0%) 16 (29.1%) 31 (37.8%) 14 (26.9%) 33 (47.1%) 30 (48.4%)\nC.1.1.1.3/B.2.2.3.1 AESI(BROAD) \n Total number of patients with at least one adverse event 47 (59.5%) 25 (45.5%) 51 (62.2%) 28 (53.8%) 42 (60.0%) 33 (53.2%)\n Total number of events 79 40 95 44 81 60 \n dcd B.2.2.3.1 30 (38.0%) 18 (32.7%) 32 (39.0%) 22 (42.3%) 26 (37.1%) 25 (40.3%)\n dcd C.1.1.1.3 30 (38.0%) 13 (23.6%) 36 (43.9%) 10 (19.2%) 27 (38.6%) 16 (25.8%)\nnon observed SMQ02NAM level(BROAD) \n Total number of patients with at least one adverse event 0 0 0 0 0 0 \n Total number of events 0 0 0 0 0 0 \n\n\n\n\n\nCodecriteria_fun <- function(tr) !is(tr, \"ContentRow\") && all_zero_or_na(tr)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n split_cols_by(\"AGE65\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(unique = \"Total number of patients with at least one adverse event\")\n ) %>%\n split_rows_by(\n \"SMQ\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = trim_levels_in_group(\"AEDECOD\", drop_outlevs = FALSE),\n label_pos = \"topleft\",\n split_label = \"Standardized MedDRA Query\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(vars = \"AEDECOD\", drop = FALSE) %>%\n append_varlabels(adae_smq_1, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adae_smq_1,\n alt_counts_df = adsl\n) %>%\n sort_at_path(path = c(\"SMQ\"), scorefun = cont_n_allcols) %>%\n sort_at_path(path = c(\"SMQ\", \"*\", \"AEDECOD\"), scorefun = score_occurrences, na.pos = \"last\") %>%\n trim_rows(criteria = criteria_fun)\n\nresult\n\nStandardized MedDRA Query ARM A ARM B ARM C \n Dictionary-Derived Term < 65 >= 65 < 65 >= 65 < 65 >= 65\n (N=134) (N=0) (N=134) (N=0) (N=131) (N=1)\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 72 (53.7%) 0 79 (59.0%) 0 75 (57.3%) 0 \nC.1.1.1.3/B.2.2.3.1 AESI(BROAD) \n Total number of patients with at least one adverse event 72 (53.7%) 0 79 (59.0%) 0 75 (57.3%) 0 \n Total number of events 119 0 139 0 141 0 \n dcd B.2.2.3.1 48 (35.8%) 0 54 (40.3%) 0 51 (38.9%) 0 \n dcd C.1.1.1.3 43 (32.1%) 0 46 (34.3%) 0 43 (32.8%) 0 \n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n mutate(\n AGE65 = case_when(\n AGE >= 65 ~ \">= 65\",\n TRUE ~ \"< 65\"\n ),\n AGE65 = factor(\n AGE65,\n levels = c(\"< 65\", \">= 65\")\n )\n )\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\") %>%\n mutate(\n AGE65 = case_when(\n AGE >= 65 ~ \">= 65\",\n TRUE ~ \"< 65\"\n ),\n AGE65 = factor(\n AGE65,\n levels = c(\"< 65\", \">= 65\")\n )\n )\n\nnames_baskets <- grep(\"^(SMQ|CQ).*NAM$\", names(adae), value = TRUE)\nnames_scopes <- grep(\"^SMQ.*SC$\", names(adae), value = TRUE)\n\ncs_baskets <- choices_selected(\n choices = variable_choices(adae, subset = names_baskets),\n selected = names_baskets\n)\ncs_scopes <- choices_selected(\n choices = variable_choices(adae, subset = names_scopes),\n selected = names_scopes,\n fixed = TRUE\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n mutate(\n AGE65 = case_when(\n AGE >= 65 ~ \">= 65\",\n TRUE ~ \"< 65\"\n ),\n AGE65 = factor(\n AGE65,\n levels = c(\"< 65\", \">= 65\")\n )\n )'\n ),\n cdisc_dataset(\"ADAE\", adae,\n code = 'ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\") %>%\n mutate(\n AGE65 = case_when(\n AGE >= 65 ~ \">= 65\",\n TRUE ~ \"< 65\"\n ),\n AGE65 = factor(\n AGE65,\n levels = c(\"< 65\", \">= 65\")\n )\n )'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_smq(\n label = \"Adverse events by `SMQ` Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"SEX\", \"AGE65\")),\n selected = c(\"ARM\", \"SEX\")\n ),\n add_total = FALSE,\n baskets = cs_baskets,\n scopes = cs_scopes,\n llt = choices_selected(\n choices = variable_choices(adae, subset = c(\"AEDECOD\")),\n selected = \"AEDECOD\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:27:22.1940 pid:11098 token:[] teal.modules.clinical Initializing tm_t_smq\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] stringr_1.5.0 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n[13] dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] stringi_1.7.12 gtable_0.3.3 later_1.3.1 \n[61] shinycssloaders_1.0.0 munsell_0.5.0 tibble_3.2.1 \n[64] styler_1.10.1 logger_0.2.2 pillar_1.9.0 \n[67] htmltools_0.5.5 brio_1.1.3 R6_2.5.1 \n[70] Rdpack_2.4 evaluate_0.21 lattice_0.21-8 \n[73] R.methodsS3_1.8.2 rbibutils_2.2.13 backports_1.4.1 \n[76] memoise_2.0.1 broom_1.0.5 teal.reporter_0.1.1.9020\n[79] httpuv_1.6.11 bslib_0.5.0 Rcpp_1.0.11 \n[82] teal.code_0.3.0.9009 shinyvalidate_0.1.2 coda_0.19-4 \n[85] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[88] forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet06_smq.lock'.\n\n\nDownload" }, { "objectID": "tables/adverse-events/aet10.html", "href": "tables/adverse-events/aet10.html", "title": "AET10", "section": "", - "text": "Data Setup\nStandard Table\nMost Common (\\(\\geq\\) 35%) Adverse Events (setting threshold)\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\n\n\n\nThe “All Patients” column is not required in this table but for illustrative purposes we include it to show correct sorting.\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n var = \"ARM\",\n split_fun = add_overall_level(\"All Patients\", first = FALSE)\n ) %>%\n count_occurrences(vars = \"AEDECOD\")\n\ntbl1 <- build_table(\n lyt = lyt,\n df = adae,\n alt_counts_df = adsl\n)\n\ntbl2 <- prune_table(\n tt = tbl1,\n prune_func = keep_rows(\n has_fraction_in_any_col(\n atleast = 0.05, # specify threshold\n col_names = levels(adsl$ARM)\n )\n )\n)\n\nresult <- sort_at_path(\n tbl2,\n path = c(\"AEDECOD\"),\n scorefun = score_occurrences\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————\ndcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) 162 (40.5%) \ndcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) 158 (39.5%) \ndcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%) 153 (38.2%) \ndcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 50 (37.9%) 146 (36.5%) \ndcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 52 (39.4%) 145 (36.2%) \ndcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) 143 (35.8%) \ndcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 50 (37.9%) 140 (35.0%) \ndcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) 139 (34.8%) \ndcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) 138 (34.5%) \ndcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) 132 (33.0%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n var = \"ARM\",\n split_fun = add_overall_level(\"All Patients\", first = FALSE)\n ) %>%\n count_occurrences(vars = \"AEDECOD\")\n\ntbl1 <- build_table(\n lyt = lyt,\n df = adae,\n alt_counts_df = adsl\n)\n\ntbl2 <- prune_table(\n tt = tbl1,\n prune_func = keep_rows(\n has_fraction_in_any_col(\n atleast = 0.35, # specify threshold\n col_names = levels(adsl$ARM)\n )\n )\n)\n\nresult <- sort_at_path(\n tbl2,\n path = c(\"AEDECOD\"),\n scorefun = score_occurrences\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————\ndcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) 162 (40.5%) \ndcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) 158 (39.5%) \ndcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%) 153 (38.2%) \ndcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 50 (37.9%) 146 (36.5%) \ndcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 52 (39.4%) 145 (36.2%) \ndcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) 143 (35.8%) \ndcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 50 (37.9%) 140 (35.0%) \ndcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) 139 (34.8%) \ndcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) 138 (34.5%) \n\n\n\n\nThe desired frequency is specified in prune_freq. For illustration, frequency is set to \\(\\geq\\) 35%.\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'),\n cdisc_dataset(\"ADAE\", adae, code = 'ADAE <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adae\"))'),\n check = TRUE\n ),\n modules = modules(\n tm_t_events(\n label = \"Adverse Event Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\")),\n selected = c(\"AEDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(adae, c(\"AEBODSYS\", \"AESOC\")),\n selected = NULL\n ),\n add_total = TRUE,\n event_type = \"adverse event\",\n prune_freq = 35,\n )\n )\n)\n\n[INFO] 2023-08-04 15:08:06.8334 pid:10883 token:[] teal.modules.clinical Initializing tm_t_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 dplyr_1.1.2 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet10.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nMost Common (\\(\\geq\\) 35%) Adverse Events (setting threshold)\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\n\n\n\nThe “All Patients” column is not required in this table but for illustrative purposes we include it to show correct sorting.\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n var = \"ARM\",\n split_fun = add_overall_level(\"All Patients\", first = FALSE)\n ) %>%\n count_occurrences(vars = \"AEDECOD\")\n\ntbl1 <- build_table(\n lyt = lyt,\n df = adae,\n alt_counts_df = adsl\n)\n\ntbl2 <- prune_table(\n tt = tbl1,\n prune_func = keep_rows(\n has_fraction_in_any_col(\n atleast = 0.05, # specify threshold\n col_names = levels(adsl$ARM)\n )\n )\n)\n\nresult <- sort_at_path(\n tbl2,\n path = c(\"AEDECOD\"),\n scorefun = score_occurrences\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————\ndcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) 162 (40.5%) \ndcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) 158 (39.5%) \ndcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%) 153 (38.2%) \ndcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 50 (37.9%) 146 (36.5%) \ndcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 52 (39.4%) 145 (36.2%) \ndcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) 143 (35.8%) \ndcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 50 (37.9%) 140 (35.0%) \ndcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) 139 (34.8%) \ndcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) 138 (34.5%) \ndcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) 132 (33.0%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n var = \"ARM\",\n split_fun = add_overall_level(\"All Patients\", first = FALSE)\n ) %>%\n count_occurrences(vars = \"AEDECOD\")\n\ntbl1 <- build_table(\n lyt = lyt,\n df = adae,\n alt_counts_df = adsl\n)\n\ntbl2 <- prune_table(\n tt = tbl1,\n prune_func = keep_rows(\n has_fraction_in_any_col(\n atleast = 0.35, # specify threshold\n col_names = levels(adsl$ARM)\n )\n )\n)\n\nresult <- sort_at_path(\n tbl2,\n path = c(\"AEDECOD\"),\n scorefun = score_occurrences\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————\ndcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) 162 (40.5%) \ndcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) 158 (39.5%) \ndcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%) 153 (38.2%) \ndcd A.1.1.1.2 48 (35.8%) 48 (35.8%) 50 (37.9%) 146 (36.5%) \ndcd B.2.1.2.1 49 (36.6%) 44 (32.8%) 52 (39.4%) 145 (36.2%) \ndcd D.1.1.1.1 50 (37.3%) 42 (31.3%) 51 (38.6%) 143 (35.8%) \ndcd D.1.1.4.2 48 (35.8%) 42 (31.3%) 50 (37.9%) 140 (35.0%) \ndcd B.1.1.1.1 47 (35.1%) 49 (36.6%) 43 (32.6%) 139 (34.8%) \ndcd C.2.1.2.1 35 (26.1%) 48 (35.8%) 55 (41.7%) 138 (34.5%) \n\n\n\n\nThe desired frequency is specified in prune_freq. For illustration, frequency is set to \\(\\geq\\) 35%.\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'),\n cdisc_dataset(\"ADAE\", adae, code = 'ADAE <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adae\"))'),\n check = TRUE\n ),\n modules = modules(\n tm_t_events(\n label = \"Adverse Event Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\")),\n selected = c(\"AEDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(adae, c(\"AEBODSYS\", \"AESOC\")),\n selected = NULL\n ),\n add_total = TRUE,\n event_type = \"adverse event\",\n prune_freq = 35,\n )\n )\n)\n\n[INFO] 2023-08-04 15:26:12.7211 pid:10886 token:[] teal.modules.clinical Initializing tm_t_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 dplyr_1.1.2 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet10.lock'.\n\n\nDownload" }, { "objectID": "tables/adverse-events/aet01.html", "href": "tables/adverse-events/aet01.html", "title": "AET01", "section": "", - "text": "Data Setup\nStandard Table\nTable with Medical Concepts Section\nTable with Modified Rows\nTable with Rows Counting Events & Additional Sections\nTeal\nSession Info\n\n\n\nTo illustrate, additional variables such as flags (TRUE/FALSE) for select AEs of interest and select AE baskets are added to the adae dataset.\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(\n adae,\n omit_columns = c(\"SMQ01NAM\", \"SMQ01SC\", \"SMQ02NAM\", \"SMQ02SC\", \"CQ01NAM\", \"STUDYID\", \"USUBJID\")\n)\n\nset.seed(99)\n\nadae <- adae %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n AESDTH = sample(c(\"N\", \"Y\"), size = nrow(adae), replace = TRUE, prob = c(0.99, 0.01)),\n AEACN = sample(\n c(\"DOSE NOT CHANGED\", \"DOSE INCREASED\", \"DRUG INTERRUPTED\", \"DRUG WITHDRAWN\"),\n size = nrow(adae),\n replace = TRUE, prob = c(0.68, 0.02, 0.25, 0.05)\n ),\n FATAL = AESDTH == \"Y\",\n SER = AESER == \"Y\",\n SERWD = AESER == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n SERDSM = AESER == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n RELSER = AESER == \"Y\" & AEREL == \"Y\",\n WD = AEACN == \"DRUG WITHDRAWN\",\n DSM = AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n REL = AEREL == \"Y\",\n RELWD = AEREL == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n RELDSM = AEREL == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n CTC35 = AETOXGR %in% c(\"3\", \"4\", \"5\"),\n CTC45 = AETOXGR %in% c(\"4\", \"5\"),\n SMQ01 = SMQ01NAM != \"\",\n SMQ02 = SMQ02NAM != \"\",\n CQ01 = CQ01NAM != \"\",\n USUBJID_AESEQ = paste(USUBJID, AESEQ, sep = \"@@\") # Create unique ID per AE in dataset.\n ) %>%\n var_relabel(\n AEDECOD = \"Dictionary-Derived Term\",\n AESDTH = \"Results in Death\",\n AEACN = \"Action Taken with Study Treatment\",\n FATAL = \"AE with fatal outcome\",\n SER = \"Serious AE\",\n SERWD = \"Serious AE leading to withdrawal from treatment\",\n SERDSM = \"Serious AE leading to dose modification/interruption\",\n RELSER = \"Related Serious AE\",\n WD = \"AE leading to withdrawal from treatment\",\n DSM = \"AE leading to dose modification/interruption\",\n REL = \"Related AE\",\n RELWD = \"Related AE leading to withdrawal from treatment\",\n RELDSM = \"Related AE leading to dose modification/interruption\",\n CTC35 = \"Grade 3-5 AE\",\n CTC45 = \"Grade 4/5 AE\",\n SMQ01 = aesi_label(adae$SMQ01NAM, adae$SMQ01SC),\n SMQ02 = aesi_label(adae$SMQ02NAM, adae$SMQ02SC),\n CQ01 = aesi_label(adae$CQ01NAM)\n )\n\n\n\n\n\nCodeaesi_vars <- c(\"FATAL\", \"SER\", \"SERWD\", \"SERDSM\", \"RELSER\", \"WD\", \"DSM\", \"REL\", \"RELWD\", \"RELDSM\", \"CTC35\")\n\n# Layout for variables from adsl dataset.\nlyt_adsl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_values(\n \"DTHFL\",\n values = \"Y\",\n .labels = c(count_fraction = \"Total number of deaths\"),\n denom = \"N_col\"\n ) %>%\n count_values(\n \"DCSREAS\",\n values = \"ADVERSE EVENT\",\n .labels = c(count_fraction = \"Total number of patients withdrawn from study due to an AE\"),\n denom = \"N_col\"\n )\n\nresult_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl)\n\n# Layout for variables from adae dataset.\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_patients_with_event(\n vars = \"USUBJID\",\n filters = c(\"STUDYID\" = as.character(unique(adae$STUDYID))),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients with at least one adverse event\")\n ) %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adae[, aesi_vars]),\n denom = \"N_col\",\n var_labels = \"Total number of patients with at least one\",\n show_labels = \"visible\"\n )\n\nresult_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adsl) <- col_info(result_adae)\nresult <- rbind(\n result_adae[1:2, ],\n result_adsl,\n result_adae[3:nrow(result_adae), ]\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) \nTotal AEs 609 622 703 \nTotal number of deaths 25 (18.66%) 23 (17.16%) 22 (16.67%) \nTotal number of patients withdrawn from study due to an AE 3 (2.24%) 6 (4.48%) 5 (3.79%) \nTotal number of patients with at least one \n AE with fatal outcome 6 (4.5%) 9 (6.7%) 6 (4.5%) \n Serious AE 104 (77.6%) 101 (75.4%) 99 (75.0%) \n Serious AE leading to withdrawal from treatment 7 (5.2%) 16 (11.9%) 11 (8.3%) \n Serious AE leading to dose modification/interruption 43 (32.1%) 48 (35.8%) 52 (39.4%) \n Related Serious AE 76 (56.7%) 70 (52.2%) 75 (56.8%) \n AE leading to withdrawal from treatment 25 (18.7%) 31 (23.1%) 31 (23.5%) \n AE leading to dose modification/interruption 79 (59.0%) 89 (66.4%) 90 (68.2%) \n Related AE 105 (78.4%) 108 (80.6%) 109 (82.6%) \n Related AE leading to withdrawal from treatment 14 (10.4%) 14 (10.4%) 15 (11.4%) \n Related AE leading to dose modification/interruption 56 (41.8%) 56 (41.8%) 60 (45.5%) \n Grade 3-5 AE 109 (81.3%) 104 (77.6%) 109 (82.6%) \n\n\n\n\n\nCodeaesi_vars <- c(\"FATAL\", \"SER\", \"SERWD\", \"SERDSM\", \"RELSER\", \"WD\", \"DSM\", \"REL\", \"RELWD\", \"RELDSM\", \"CTC35\")\nbasket_vars <- c(\"SMQ01\", \"SMQ02\", \"CQ01\")\n\n# Layout for variables from adsl dataset.\nlyt_adsl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_values(\n \"DTHFL\",\n values = \"Y\",\n .labels = c(count_fraction = \"Total number of deaths\"),\n denom = \"N_col\"\n ) %>%\n count_values(\n \"DCSREAS\",\n values = \"ADVERSE EVENT\",\n .labels = c(count_fraction = \"Total number of patients withdrawn from study due to an AE\"),\n denom = \"N_col\"\n )\n\nresult_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl)\n\n# Layout for variables from adae dataset.\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_patients_with_event(\n vars = \"USUBJID\",\n filters = c(\"STUDYID\" = as.character(unique(adae$STUDYID))),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients with at least one adverse event\")\n ) %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total AEs\"),\n denom = \"N_col\",\n table_names = \"total_aes\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adae[, aesi_vars]),\n table_names = \"table_ae\",\n denom = \"N_col\",\n var_labels = \"Total number of patients with at least one\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adae[, basket_vars]),\n table_names = \"table_aesi\",\n denom = \"N_col\",\n var_labels = \"Total number of patients with at least one\",\n show_labels = \"visible\"\n )\n\nresult_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adsl) <- col_info(result_adae)\nresult <- rbind(\n result_adae[1:2, ],\n result_adsl,\n result_adae[3:nrow(result_adae), ]\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) \nTotal AEs 609 622 703 \nTotal number of deaths 25 (18.66%) 23 (17.16%) 22 (16.67%) \nTotal number of patients withdrawn from study due to an AE 3 (2.24%) 6 (4.48%) 5 (3.79%) \nTotal number of patients with at least one \n AE with fatal outcome 6 (4.5%) 9 (6.7%) 6 (4.5%) \n Serious AE 104 (77.6%) 101 (75.4%) 99 (75.0%) \n Serious AE leading to withdrawal from treatment 7 (5.2%) 16 (11.9%) 11 (8.3%) \n Serious AE leading to dose modification/interruption 43 (32.1%) 48 (35.8%) 52 (39.4%) \n Related Serious AE 76 (56.7%) 70 (52.2%) 75 (56.8%) \n AE leading to withdrawal from treatment 25 (18.7%) 31 (23.1%) 31 (23.5%) \n AE leading to dose modification/interruption 79 (59.0%) 89 (66.4%) 90 (68.2%) \n Related AE 105 (78.4%) 108 (80.6%) 109 (82.6%) \n Related AE leading to withdrawal from treatment 14 (10.4%) 14 (10.4%) 15 (11.4%) \n Related AE leading to dose modification/interruption 56 (41.8%) 56 (41.8%) 60 (45.5%) \n Grade 3-5 AE 109 (81.3%) 104 (77.6%) 109 (82.6%) \nTotal number of patients with at least one \n C.1.1.1.3/B.2.2.3.1 AESI (BROAD) 72 (53.7%) 79 (59.0%) 75 (56.8%) \n SMQ 02 Reference Name 0 0 0 \n D.2.1.5.3/A.1.1.1.1 AESI 74 (55.2%) 80 (59.7%) 87 (65.9%) \n\n\n\n\n\nCodeaesi_vars <- c(\"FATAL\", \"SER\", \"WD\", \"REL\", \"CTC35\", \"CTC45\")\n# Layout for variables from adsl dataset.\nlyt_adsl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_values(\n \"DTHFL\",\n values = \"Y\",\n .labels = c(count_fraction = \"Total number of deaths\"),\n denom = \"N_col\"\n ) %>%\n count_values(\n \"DCSREAS\",\n values = \"ADVERSE EVENT\",\n .labels = c(count_fraction = \"Total number of patients withdrawn from study due to an AE\"),\n denom = \"N_col\",\n table_names = \"tbl_dscsreas_ae\"\n ) %>%\n count_values(\n \"DCSREAS\",\n values = \"WITHDRAWAL BY SUBJECT\",\n .labels = c(count_fraction = \"Total number of patients withdrawn informed consent\"),\n denom = \"N_col\",\n table_names = \"tbl_dscsreas_wd\"\n )\nresult_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl)\n\n# Layout for variables from adae dataset.\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_patients_with_event(\n vars = \"USUBJID\",\n filters = c(\"STUDYID\" = as.character(unique(adae$STUDYID))),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients with at least one adverse event\")\n ) %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total AEs\"),\n denom = \"N_col\",\n table_names = \"total_aes\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adae[, aesi_vars]),\n denom = \"N_col\",\n var_labels = \"Total number of patients with at least one\",\n show_labels = \"visible\"\n )\n\nresult_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adsl) <- col_info(result_adae)\nresult <- rbind(\n result_adae[1:2, ],\n result_adsl,\n result_adae[3:nrow(result_adae), ]\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) \nTotal AEs 609 622 703 \nTotal number of deaths 25 (18.66%) 23 (17.16%) 22 (16.67%) \nTotal number of patients withdrawn from study due to an AE 3 (2.24%) 6 (4.48%) 5 (3.79%) \nTotal number of patients withdrawn informed consent 1 (0.75%) 1 (0.75%) 1 (0.76%) \nTotal number of patients with at least one \n AE with fatal outcome 6 (4.5%) 9 (6.7%) 6 (4.5%) \n Serious AE 104 (77.6%) 101 (75.4%) 99 (75.0%) \n AE leading to withdrawal from treatment 25 (18.7%) 31 (23.1%) 31 (23.5%) \n Related AE 105 (78.4%) 108 (80.6%) 109 (82.6%) \n Grade 3-5 AE 109 (81.3%) 104 (77.6%) 109 (82.6%) \n Grade 4/5 AE 91 (67.9%) 90 (67.2%) 93 (70.5%) \n\n\n\n\n\nCodecount_subj_vars <- c(\"FATAL\", \"SER\", \"WD\", \"DSM\", \"REL\", \"CTC35\")\ncount_term_vars <- c(\"SER\", \"DSM\", \"REL\", \"CTC35\", \"CTC45\")\ncount_ae_vars <- c(\"SER\", \"DSM\", \"REL\", \"CTC35\", \"CTC45\")\n\n# Layout for variables from adsl dataset.\nlyt_adsl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_values(\n \"DTHFL\",\n values = \"Y\",\n .labels = c(count_fraction = \"Total number of deaths\"),\n denom = \"N_col\"\n ) %>%\n count_values(\n \"DCSREAS\",\n values = \"ADVERSE EVENT\",\n .labels = c(count_fraction = \"Total number of patients withdrawn from study due to an AE\"),\n denom = \"N_col\"\n )\n\nresult_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl)\n\n# Layout for variables from adae dataset.\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_patients_with_event(\n vars = \"USUBJID\",\n filters = c(\"STUDYID\" = as.character(unique(adae$STUDYID))),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients with at least one adverse event\"),\n table_names = \"total_subj\"\n ) %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total AEs\"),\n denom = \"N_col\",\n table_names = \"total_aes\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adae[, count_subj_vars]),\n denom = \"N_col\",\n var_labels = \"Total number of patients with at least one\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"AEDECOD\",\n flag_variables = var_labels(adae[, count_term_vars]),\n .stats = \"count\",\n .formats = c(count = \"xx\"),\n table_names = \"table_term\",\n var_labels = \"Total number of unique preferred terms which are\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID_AESEQ\",\n flag_variables = var_labels(adae[, count_ae_vars]),\n .stats = \"count\",\n .formats = c(count = \"xx\"),\n table_names = \"table_ae\",\n var_labels = \"Total number of adverse events which are\",\n show_labels = \"visible\"\n )\n\nresult_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adsl) <- col_info(result_adae)\nresult <- rbind(\n result_adae[1:2, ],\n result_adsl,\n result_adae[3:nrow(result_adae), ]\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 122 (91.0%) 123 (91.8%) 120 (90.9%) \nTotal AEs 609 622 703 \nTotal number of deaths 25 (18.66%) 23 (17.16%) 22 (16.67%) \nTotal number of patients withdrawn from study due to an AE 3 (2.24%) 6 (4.48%) 5 (3.79%) \nTotal number of patients with at least one \n AE with fatal outcome 6 (4.5%) 9 (6.7%) 6 (4.5%) \n Serious AE 104 (77.6%) 101 (75.4%) 99 (75.0%) \n AE leading to withdrawal from treatment 25 (18.7%) 31 (23.1%) 31 (23.5%) \n AE leading to dose modification/interruption 79 (59.0%) 89 (66.4%) 90 (68.2%) \n Related AE 105 (78.4%) 108 (80.6%) 109 (82.6%) \n Grade 3-5 AE 109 (81.3%) 104 (77.6%) 109 (82.6%) \nTotal number of unique preferred terms which are \n Serious AE 4 4 4 \n AE leading to dose modification/interruption 10 10 10 \n Related AE 5 5 5 \n Grade 3-5 AE 5 5 5 \n Grade 4/5 AE 3 3 3 \nTotal number of adverse events which are \n Serious AE 249 255 282 \n AE leading to dose modification/interruption 150 167 187 \n Related AE 282 299 336 \n Grade 3-5 AE 303 291 327 \n Grade 4/5 AE 172 174 197 \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nadd_event_flags <- function(dat) {\n dat %>%\n dplyr::mutate(\n TMPFL_SER = AESER == \"Y\",\n TMPFL_REL = AEREL == \"Y\",\n TMPFL_GR5 = AETOXGR == \"5\",\n TMP_SMQ01 = !is.na(SMQ01NAM),\n TMP_SMQ02 = !is.na(SMQ02NAM),\n TMP_CQ01 = !is.na(CQ01NAM)\n ) %>%\n var_relabel(\n TMPFL_SER = \"Serious AE\",\n TMPFL_REL = \"Related AE\",\n TMPFL_GR5 = \"Grade 5 AE\",\n TMP_SMQ01 = aesi_label(dat[[\"SMQ01NAM\"]], dat[[\"SMQ01SC\"]]),\n TMP_SMQ02 = aesi_label(dat[[\"SMQ02NAM\"]], dat[[\"SMQ02SC\"]]),\n TMP_CQ01 = aesi_label(dat[[\"CQ01NAM\"]])\n )\n}\n\n# Generating user-defined event flags.\nadae <- adae %>% add_event_flags()\n\nae_anl_vars <- names(adae)[startsWith(names(adae), \"TMPFL_\")]\naesi_vars <- names(adae)[startsWith(names(adae), \"TMP_\")]\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADAE\", adae, code = 'ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n add_event_flags <- function(dat) {\n dat %>%\n dplyr::mutate(\n TMPFL_SER = AESER == \"Y\",\n TMPFL_REL = AEREL == \"Y\",\n TMPFL_GR5 = AETOXGR == \"5\",\n TMP_SMQ01 = !is.na(SMQ01NAM),\n TMP_SMQ02 = !is.na(SMQ02NAM),\n TMP_CQ01 = !is.na(CQ01NAM)\n ) %>%\n var_relabel(\n TMPFL_SER = \"Serious AE\",\n TMPFL_REL = \"Related AE\",\n TMPFL_GR5 = \"Grade 5 AE\",\n TMP_SMQ01 = aesi_label(dat[[\"SMQ01NAM\"]], dat[[\"SMQ01SC\"]]),\n TMP_SMQ02 = aesi_label(dat[[\"SMQ02NAM\"]], dat[[\"SMQ02SC\"]]),\n TMP_CQ01 = aesi_label(dat[[\"CQ01NAM\"]])\n )\n }\n ADAE <- ADAE %>% add_event_flags()'),\n check = TRUE\n ),\n modules = modules(\n tm_t_events_summary(\n label = \"Adverse Events Summary\",\n dataname = \"ADAE\",\n arm_var = choices_selected(\n choices = variable_choices(\"ADSL\", c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n flag_var_anl = choices_selected(\n choices = variable_choices(\"ADAE\", ae_anl_vars),\n selected = ae_anl_vars[1],\n keep_order = TRUE,\n fixed = FALSE\n ),\n flag_var_aesi = choices_selected(\n choices = variable_choices(\"ADAE\", aesi_vars),\n selected = aesi_vars[1],\n keep_order = TRUE,\n fixed = FALSE\n ),\n add_total = TRUE\n )\n )\n)\n\n[INFO] 2023-08-04 15:07:15.5596 pid:10671 token:[] teal.modules.clinical Initializing tm_t_events_summary\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 dplyr_1.1.2 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable with Medical Concepts Section\nTable with Modified Rows\nTable with Rows Counting Events & Additional Sections\nTeal\nSession Info\n\n\n\nTo illustrate, additional variables such as flags (TRUE/FALSE) for select AEs of interest and select AE baskets are added to the adae dataset.\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(\n adae,\n omit_columns = c(\"SMQ01NAM\", \"SMQ01SC\", \"SMQ02NAM\", \"SMQ02SC\", \"CQ01NAM\", \"STUDYID\", \"USUBJID\")\n)\n\nset.seed(99)\n\nadae <- adae %>%\n mutate(\n AEDECOD = with_label(as.character(AEDECOD), \"Dictionary-Derived Term\"),\n AESDTH = with_label(sample(c(\"N\", \"Y\"), size = nrow(adae), replace = TRUE, prob = c(0.99, 0.01)), \"Results in Death\"),\n AEACN = with_label(sample(\n c(\"DOSE NOT CHANGED\", \"DOSE INCREASED\", \"DRUG INTERRUPTED\", \"DRUG WITHDRAWN\"),\n size = nrow(adae),\n replace = TRUE, prob = c(0.68, 0.02, 0.25, 0.05)\n ), \"Action Taken with Study Treatment\"),\n FATAL = with_label(AESDTH == \"Y\", \"AE with fatal outcome\"),\n SEV = with_label(AESEV == \"SEVERE\", \"Severe AE (at greatest intensity)\"),\n SER = with_label(AESER == \"Y\", \"Serious AE\"),\n SERWD = with_label(AESER == \"Y\" & AEACN == \"DRUG WITHDRAWN\", \"Serious AE leading to withdrawal from treatment\"),\n SERDSM = with_label(\n AESER == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"Serious AE leading to dose modification/interruption\"\n ),\n RELSER = with_label(AESER == \"Y\" & AEREL == \"Y\", \"Related Serious AE\"),\n WD = with_label(AEACN == \"DRUG WITHDRAWN\", \"AE leading to withdrawal from treatment\"),\n DSM = with_label(\n AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"), \"AE leading to dose modification/interruption\"\n ),\n REL = with_label(AEREL == \"Y\", \"Related AE\"),\n RELWD = with_label(AEREL == \"Y\" & AEACN == \"DRUG WITHDRAWN\", \"Related AE leading to withdrawal from treatment\"),\n RELDSM = with_label(\n AEREL == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"Related AE leading to dose modification/interruption\"\n ),\n CTC35 = with_label(AETOXGR %in% c(\"3\", \"4\", \"5\"), \"Grade 3-5 AE\"),\n CTC45 = with_label(AETOXGR %in% c(\"4\", \"5\"), \"Grade 4/5 AE\"),\n SMQ01 = with_label(SMQ01NAM != \"\", aesi_label(adae$SMQ01NAM, adae$SMQ01SC)),\n SMQ02 = with_label(SMQ02NAM != \"\", aesi_label(adae$SMQ02NAM, adae$SMQ02SC)),\n CQ01 = with_label(CQ01NAM != \"\", aesi_label(adae$CQ01NAM)),\n USUBJID_AESEQ = paste(USUBJID, AESEQ, sep = \"@@\") # Create unique ID per AE in dataset.\n ) %>%\n filter(ANL01FL == \"Y\")\n\n\n\n\n\nCodeaesi_vars <- c(\"FATAL\", \"SER\", \"SERWD\", \"SERDSM\", \"RELSER\", \"WD\", \"DSM\", \"REL\", \"RELWD\", \"RELDSM\", \"SEV\")\n\n# Layout for variables from adsl dataset.\nlyt_adsl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_patients_with_event(\n \"USUBJID\",\n filters = c(\"DTHFL\" = \"Y\"),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of deaths\")\n ) %>%\n count_patients_with_event(\n \"USUBJID\",\n filters = c(\"DCSREAS\" = \"ADVERSE EVENT\"),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients withdrawn from study due to an AE\"),\n table_names = \"tot_wd\"\n )\n\nresult_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl)\n\n# Layout for variables from adae dataset.\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one AE\",\n nonunique = \"Total number of AEs\"\n ),\n .formats = list(unique = format_count_fraction_fixed_dp, nonunique = \"xx\"),\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_vars,\n denom = \"N_col\",\n var_labels = \"Total number of patients with at least one\",\n show_labels = \"visible\"\n )\n\nresult_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adsl) <- col_info(result_adae)\nresult <- rbind(\n result_adae[1:2, ],\n result_adsl,\n result_adae[3:nrow(result_adae), ]\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one AE 100 (74.6%) 98 (73.1%) 103 (78.0%) \nTotal number of AEs 502 480 604 \nTotal number of deaths 25 (18.7%) 23 (17.2%) 22 (16.7%) \nTotal number of patients withdrawn from study due to an AE 3 (2.2%) 6 (4.5%) 5 (3.8%) \nTotal number of patients with at least one \n AE with fatal outcome 5 (3.7%) 5 (3.7%) 6 (4.5%) \n Serious AE 85 (63.4%) 80 (59.7%) 87 (65.9%) \n Serious AE leading to withdrawal from treatment 6 (4.5%) 12 (9.0%) 9 (6.8%) \n Serious AE leading to dose modification/interruption 36 (26.9%) 40 (29.9%) 47 (35.6%) \n Related Serious AE 64 (47.8%) 52 (38.8%) 64 (48.5%) \n AE leading to withdrawal from treatment 20 (14.9%) 24 (17.9%) 26 (19.7%) \n AE leading to dose modification/interruption 63 (47.0%) 70 (52.2%) 77 (58.3%) \n Related AE 86 (64.2%) 85 (63.4%) 92 (69.7%) \n Related AE leading to withdrawal from treatment 10 (7.5%) 9 (6.7%) 12 (9.1%) \n Related AE leading to dose modification/interruption 44 (32.8%) 44 (32.8%) 51 (38.6%) \n Severe AE (at greatest intensity) 77 (57.5%) 70 (52.2%) 79 (59.8%) \n\n\n\n\n\nCodeaesi_vars <- c(\"FATAL\", \"SER\", \"SERWD\", \"SERDSM\", \"RELSER\", \"WD\", \"DSM\", \"REL\", \"RELWD\", \"RELDSM\", \"CTC35\")\nbasket_vars <- c(\"SMQ01\", \"SMQ02\", \"CQ01\")\n\n# Layout for variables from adsl dataset.\nlyt_adsl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_patients_with_event(\n \"USUBJID\",\n filters = c(\"DTHFL\" = \"Y\"),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of deaths\")\n ) %>%\n count_patients_with_event(\n \"USUBJID\",\n filters = c(\"DCSREAS\" = \"ADVERSE EVENT\"),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients withdrawn from study due to an AE\"),\n table_names = \"tot_wd\"\n )\n\nresult_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl)\n\n# Layout for variables from adae dataset.\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one AE\",\n nonunique = \"Total number of AEs\"\n ),\n .formats = list(unique = format_count_fraction_fixed_dp, nonunique = \"xx\"),\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_vars,\n denom = \"N_col\",\n var_labels = \"Total number of patients with at least one\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = basket_vars,\n table_names = \"table_aesi\",\n denom = \"N_col\",\n var_labels = \"Total number of patients with at least one\",\n show_labels = \"visible\"\n )\n\nresult_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adsl) <- col_info(result_adae)\nresult <- rbind(\n result_adae[1:2, ],\n result_adsl,\n result_adae[3:nrow(result_adae), ]\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one AE 100 (74.6%) 98 (73.1%) 103 (78.0%) \nTotal number of AEs 502 480 604 \nTotal number of deaths 25 (18.7%) 23 (17.2%) 22 (16.7%) \nTotal number of patients withdrawn from study due to an AE 3 (2.2%) 6 (4.5%) 5 (3.8%) \nTotal number of patients with at least one \n AE with fatal outcome 5 (3.7%) 5 (3.7%) 6 (4.5%) \n Serious AE 85 (63.4%) 80 (59.7%) 87 (65.9%) \n Serious AE leading to withdrawal from treatment 6 (4.5%) 12 (9.0%) 9 (6.8%) \n Serious AE leading to dose modification/interruption 36 (26.9%) 40 (29.9%) 47 (35.6%) \n Related Serious AE 64 (47.8%) 52 (38.8%) 64 (48.5%) \n AE leading to withdrawal from treatment 20 (14.9%) 24 (17.9%) 26 (19.7%) \n AE leading to dose modification/interruption 63 (47.0%) 70 (52.2%) 77 (58.3%) \n Related AE 86 (64.2%) 85 (63.4%) 92 (69.7%) \n Related AE leading to withdrawal from treatment 10 (7.5%) 9 (6.7%) 12 (9.1%) \n Related AE leading to dose modification/interruption 44 (32.8%) 44 (32.8%) 51 (38.6%) \n Grade 3-5 AE 90 (67.2%) 83 (61.9%) 93 (70.5%) \nTotal number of patients with at least one \n C.1.1.1.3/B.2.2.3.1 AESI (BROAD) 58 (43.3%) 60 (44.8%) 66 (50.0%) \n SMQ 02 Reference Name 0 0 0 \n D.2.1.5.3/A.1.1.1.1 AESI 62 (46.3%) 61 (45.5%) 76 (57.6%) \n\n\n\n\n\nCodeaesi_vars <- c(\"FATAL\", \"SER\", \"WD\", \"REL\", \"CTC35\", \"CTC45\")\n# Layout for variables from adsl dataset.\nlyt_adsl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_patients_with_event(\n \"USUBJID\",\n filters = c(\"DTHFL\" = \"Y\"),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of deaths\")\n ) %>%\n count_patients_with_event(\n \"USUBJID\",\n filters = c(\"DCSREAS\" = \"ADVERSE EVENT\"),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients withdrawn from study due to an AE\"),\n table_names = \"tot_wd\"\n ) %>%\n count_patients_with_event(\n \"USUBJID\",\n filters = c(\"DCSREAS\" = \"WITHDRAWAL BY SUBJECT\"),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients withdrawn informed consent\"),\n table_names = \"tot_dscsreas_wd\"\n )\nresult_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl)\n\n# Layout for variables from adae dataset.\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one AE\",\n nonunique = \"Total number of AEs\"\n ),\n .formats = list(unique = format_count_fraction_fixed_dp, nonunique = \"xx\"),\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_vars,\n denom = \"N_col\",\n var_labels = \"Total number of patients with at least one\",\n show_labels = \"visible\"\n )\nresult_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adsl) <- col_info(result_adae)\nresult <- rbind(\n result_adae[1:2, ],\n result_adsl,\n result_adae[3:nrow(result_adae), ]\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one AE 100 (74.6%) 98 (73.1%) 103 (78.0%) \nTotal number of AEs 502 480 604 \nTotal number of deaths 25 (18.7%) 23 (17.2%) 22 (16.7%) \nTotal number of patients withdrawn from study due to an AE 3 (2.2%) 6 (4.5%) 5 (3.8%) \nTotal number of patients withdrawn informed consent 1 (0.7%) 1 (0.7%) 1 (0.8%) \nTotal number of patients with at least one \n AE with fatal outcome 5 (3.7%) 5 (3.7%) 6 (4.5%) \n Serious AE 85 (63.4%) 80 (59.7%) 87 (65.9%) \n AE leading to withdrawal from treatment 20 (14.9%) 24 (17.9%) 26 (19.7%) \n Related AE 86 (64.2%) 85 (63.4%) 92 (69.7%) \n Grade 3-5 AE 90 (67.2%) 83 (61.9%) 93 (70.5%) \n Grade 4/5 AE 77 (57.5%) 70 (52.2%) 79 (59.8%) \n\n\n\n\n\nCodecount_subj_vars <- c(\"FATAL\", \"SER\", \"WD\", \"DSM\", \"REL\", \"CTC35\")\ncount_term_vars <- c(\"SER\", \"DSM\", \"REL\", \"CTC35\", \"CTC45\")\ncount_ae_vars <- c(\"SER\", \"DSM\", \"REL\", \"CTC35\", \"CTC45\")\n\n# Layout for variables from adsl dataset.\nlyt_adsl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_patients_with_event(\n \"USUBJID\",\n filters = c(\"DTHFL\" = \"Y\"),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of deaths\")\n ) %>%\n count_patients_with_event(\n \"USUBJID\",\n filters = c(\"DCSREAS\" = \"ADVERSE EVENT\"),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients withdrawn from study due to an AE\"),\n table_names = \"tot_wd\"\n )\n\nresult_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl)\n\n# Layout for variables from adae dataset.\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one AE\",\n nonunique = \"Total number of AEs\"\n ),\n .formats = list(unique = format_count_fraction_fixed_dp, nonunique = \"xx\"),\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = count_subj_vars,\n denom = \"N_col\",\n var_labels = \"Total number of patients with at least one\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"AEDECOD\",\n flag_variables = count_term_vars,\n .stats = \"count\",\n .formats = c(count = \"xx\"),\n table_names = \"table_term\",\n var_labels = \"Total number of unique preferred terms which are\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID_AESEQ\",\n flag_variables = count_ae_vars,\n .stats = \"count\",\n .formats = c(count = \"xx\"),\n table_names = \"table_ae\",\n var_labels = \"Total number of adverse events which are\",\n show_labels = \"visible\"\n )\n\nresult_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adsl) <- col_info(result_adae)\nresult <- rbind(\n result_adae[1:2, ],\n result_adsl,\n result_adae[3:nrow(result_adae), ]\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one AE 100 (74.6%) 98 (73.1%) 103 (78.0%) \nTotal number of AEs 502 480 604 \nTotal number of deaths 25 (18.7%) 23 (17.2%) 22 (16.7%) \nTotal number of patients withdrawn from study due to an AE 3 (2.2%) 6 (4.5%) 5 (3.8%) \nTotal number of patients with at least one \n AE with fatal outcome 5 (3.7%) 5 (3.7%) 6 (4.5%) \n Serious AE 85 (63.4%) 80 (59.7%) 87 (65.9%) \n AE leading to withdrawal from treatment 20 (14.9%) 24 (17.9%) 26 (19.7%) \n AE leading to dose modification/interruption 63 (47.0%) 70 (52.2%) 77 (58.3%) \n Related AE 86 (64.2%) 85 (63.4%) 92 (69.7%) \n Grade 3-5 AE 90 (67.2%) 83 (61.9%) 93 (70.5%) \nTotal number of unique preferred terms which are \n Serious AE 4 4 4 \n AE leading to dose modification/interruption 10 10 10 \n Related AE 5 5 5 \n Grade 3-5 AE 5 5 5 \n Grade 4/5 AE 3 3 3 \nTotal number of adverse events which are \n Serious AE 204 194 245 \n AE leading to dose modification/interruption 123 135 158 \n Related AE 231 231 290 \n Grade 3-5 AE 249 229 277 \n Grade 4/5 AE 143 134 168 \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nadd_event_flags <- function(dat) {\n dat %>%\n dplyr::mutate(\n TMPFL_SER = AESER == \"Y\",\n TMPFL_REL = AEREL == \"Y\",\n TMPFL_GR5 = AETOXGR == \"5\",\n TMP_SMQ01 = !is.na(SMQ01NAM),\n TMP_SMQ02 = !is.na(SMQ02NAM),\n TMP_CQ01 = !is.na(CQ01NAM)\n ) %>%\n var_relabel(\n TMPFL_SER = \"Serious AE\",\n TMPFL_REL = \"Related AE\",\n TMPFL_GR5 = \"Grade 5 AE\",\n TMP_SMQ01 = aesi_label(dat[[\"SMQ01NAM\"]], dat[[\"SMQ01SC\"]]),\n TMP_SMQ02 = aesi_label(dat[[\"SMQ02NAM\"]], dat[[\"SMQ02SC\"]]),\n TMP_CQ01 = aesi_label(dat[[\"CQ01NAM\"]])\n )\n}\n\n# Generating user-defined event flags.\nadae <- adae %>% add_event_flags()\n\nae_anl_vars <- names(adae)[startsWith(names(adae), \"TMPFL_\")]\naesi_vars <- names(adae)[startsWith(names(adae), \"TMP_\")]\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADAE\", adae, code = 'ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n add_event_flags <- function(dat) {\n dat %>%\n dplyr::mutate(\n TMPFL_SER = AESER == \"Y\",\n TMPFL_REL = AEREL == \"Y\",\n TMPFL_GR5 = AETOXGR == \"5\",\n TMP_SMQ01 = !is.na(SMQ01NAM),\n TMP_SMQ02 = !is.na(SMQ02NAM),\n TMP_CQ01 = !is.na(CQ01NAM)\n ) %>%\n var_relabel(\n TMPFL_SER = \"Serious AE\",\n TMPFL_REL = \"Related AE\",\n TMPFL_GR5 = \"Grade 5 AE\",\n TMP_SMQ01 = aesi_label(dat[[\"SMQ01NAM\"]], dat[[\"SMQ01SC\"]]),\n TMP_SMQ02 = aesi_label(dat[[\"SMQ02NAM\"]], dat[[\"SMQ02SC\"]]),\n TMP_CQ01 = aesi_label(dat[[\"CQ01NAM\"]])\n )\n }\n ADAE <- ADAE %>% add_event_flags()'),\n check = TRUE\n ),\n modules = modules(\n tm_t_events_summary(\n label = \"Adverse Events Summary\",\n dataname = \"ADAE\",\n arm_var = choices_selected(\n choices = variable_choices(\"ADSL\", c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n flag_var_anl = choices_selected(\n choices = variable_choices(\"ADAE\", ae_anl_vars),\n selected = ae_anl_vars[1],\n keep_order = TRUE,\n fixed = FALSE\n ),\n flag_var_aesi = choices_selected(\n choices = variable_choices(\"ADAE\", aesi_vars),\n selected = aesi_vars[1],\n keep_order = TRUE,\n fixed = FALSE\n ),\n add_total = TRUE\n )\n )\n)\n\n[INFO] 2023-08-04 15:25:17.8600 pid:10674 token:[] teal.modules.clinical Initializing tm_t_events_summary\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 dplyr_1.1.2 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet01.lock'.\n\n\nDownload" }, { "objectID": "tables/pharmacokinetic/adat02.html", "href": "tables/pharmacokinetic/adat02.html", "title": "ADAT02", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadab <- synthetic_cdisc_dataset(\"latest\", \"adab\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadab <- df_explicit_na(adab) %>%\n mutate(ADPBLPFL = \"Y\") %>% # temp fix\n filter(\n ADPBLPFL == \"Y\",\n !PARAM %in% c(\n \"NAB interpreted per sample result\",\n \"NAB Status of a patient\",\n \"Treatment enhanced ADA\"\n )\n ) %>%\n select(-PARAMCD, -AVALC, -AVALU, -ARRLT, -NRRLT) %>%\n unique() %>%\n tidyr::pivot_wider(\n names_from = PARAM,\n values_from = AVAL\n ) %>%\n mutate(\n across(\n any_of(c(\n \"Treatment induced ADA\",\n \"Transient ADA\",\n \"Persistent ADA\"\n )),\n as.logical\n )\n ) %>%\n mutate(\n ADPBLPFL = ADPBLPFL == \"Y\",\n TI_ADA = if (exists(\"Treatment induced ADA\", where = .)) `Treatment induced ADA` else FALSE\n ) %>%\n var_relabel(\n ADPBLPFL = \"Post-baseline evaluable patients\",\n TI_ADA = \"Treatment-induced ADA patients\"\n )\n\nadab_ti <- adab %>%\n filter(TI_ADA)\n\n\n\n\n\nCode# Layout for post-baseline evaluable patient variables from adab dataset.\nlyt_adab <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = drop_split_levels\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(data.frame(ADPBLPFL = adab[, \"ADPBLPFL\"])),\n .stats = \"count\",\n table_names = \"post_baseline\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(data.frame(TI_ADA = adab[, \"TI_ADA\"]))\n )\n\n# Layout for treatment-induced patient variables from adab dataset.\nlyt_adab_ti <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = keep_split_levels(c(\"A: Drug X\", \"C: Combination\", \"<Missing>\")) # temp fix\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = c(\"Transient ADA\", \"Persistent ADA\"),\n var_labels = \"Treatment-induced ADA patients with\",\n show_labels = \"visible\"\n ) %>%\n summarize_vars(\n \"Time to onset of ADA\",\n .stats = \"median\",\n nested = FALSE,\n .labels = c(median = \"Median time to onset of ADA (weeks)\")\n ) %>%\n summarize_vars(\n \"Antibody titer units\",\n .stats = \"range\",\n nested = FALSE,\n .labels = c(range = \"ADA titer range (min - max)\")\n )\n\nresult_adab <- build_table(lyt_adab, df = adab, alt_counts_df = adsl)\nresult_adab_ti <- build_table(lyt_adab_ti, df = adab_ti, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adab) <- col_info(result_adab_ti)\nresult <- rbind(\n result_adab,\n result_adab_ti\n)\n\nmain_title(result) <- paste(\n \"Summary of Patients with Treatment-Induced ADA, PK Population\"\n)\nsubtitles(result) <- paste(\"Protocol:\", unique(adab$PARCAT1)[1])\nmain_footer(result) <- paste(\n \"ADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic\n Antibodies)\n Treatment-induced ADA = negative or missing baseline.\n ADA result(s) and at least one positive post-baseline ADA result.\n Transient ADA = ADA positive result detected (a) at only one post-baseline\n sampling timepoint (excluding last timepoint) OR (b) at 2 or more timepoints\n during treatment where the first and last ADA positive samples are separated\n by a period of < 16 weeks, irrespective of any negative samples in between.\n Persistent ADA = ADA positive result detected (a) at the last post-baseline\n sampling timepoint, OR (b) at 2 or more time points during treatment where\n the first and last ADA positive samples are separated by a period ≥ 16\n weeks, irrespective of any negative samples in between.\"\n)\nresult\n\nSummary of Patients with Treatment-Induced ADA, PK Population\nProtocol: A: Drug X Antibody\n\n—————————————————————————————————————————————————————————————————————————————\n A: Drug X C: Combination <Missing> \n (N=134) (N=132) (N=0) \n—————————————————————————————————————————————————————————————————————————————\nPost-baseline evaluable patients 134 132 266 \nTreatment-induced ADA patients 0 0 64 (24.1%)\nTreatment-induced ADA patients with \n Transient ADA NA NA 0 \n Persistent ADA NA NA 0 \nMedian time to onset of ADA (weeks) NA NA 0.1 \nADA titer range (min - max) NA NA NA \n—————————————————————————————————————————————————————————————————————————————\n\nADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic\n Antibodies)\n Treatment-induced ADA = negative or missing baseline.\n ADA result(s) and at least one positive post-baseline ADA result.\n Transient ADA = ADA positive result detected (a) at only one post-baseline\n sampling timepoint (excluding last timepoint) OR (b) at 2 or more timepoints\n during treatment where the first and last ADA positive samples are separated\n by a period of < 16 weeks, irrespective of any negative samples in between.\n Persistent ADA = ADA positive result detected (a) at the last post-baseline\n sampling timepoint, OR (b) at 2 or more time points during treatment where\n the first and last ADA positive samples are separated by a period ≥ 16\n weeks, irrespective of any negative samples in between.\n\n\n\n\n\nCode# In progress\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] scda_0.1.6.9010 dplyr_1.1.2 tern_0.8.5.9006 \n[4] rtables_0.6.2.9001 magrittr_2.0.3 formatters_0.5.1.9001\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-0 gtable_0.3.3 jsonlite_1.8.7 compiler_4.3.1 \n [5] brio_1.1.3 tidyselect_1.2.0 tidyr_1.3.0 splines_4.3.1 \n [9] scales_1.2.1 yaml_2.3.7 fastmap_1.1.1 lattice_0.21-8 \n[13] ggplot2_3.4.2 R6_2.5.1 generics_0.1.3 knitr_1.43 \n[17] forcats_1.0.0 rbibutils_2.2.13 htmlwidgets_1.6.2 backports_1.4.1 \n[21] checkmate_2.2.0 tibble_3.2.1 munsell_0.5.0 pillar_1.9.0 \n[25] rlang_1.1.1 utf8_1.2.3 testthat_3.1.10 broom_1.0.5 \n[29] xfun_0.39 cli_3.6.1 withr_2.5.0 Rdpack_2.4 \n[33] digest_0.6.33 grid_4.3.1 rstudioapi_0.15.0 lifecycle_1.0.3 \n[37] vctrs_0.6.3 evaluate_0.21 glue_1.6.2 codetools_0.2-19 \n[41] survival_3.5-5 fansi_1.0.4 colorspace_2.1-0 purrr_1.0.1 \n[45] rmarkdown_2.23 tools_4.3.1 pkgconfig_2.0.3 htmltools_0.5.5 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- colorspace [* -> 2.1-0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- fs [* -> 1.6.3]\n- generics [* -> 0.1.3]\n- ggplot2 [* -> 3.4.2]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- highr [* -> 0.10]\n- htmltools [* -> 0.5.5]\n- isoband [* -> 0.2.7]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- lattice [* -> 0.21-8]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- praise [* -> 1.0.0]\n- processx [* -> 3.8.2]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quantreg [* -> 5.96]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- survival [* -> 3.5-5]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- yaml [* -> 2.3.7]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- tern [* -> 0.8.5.9006]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/pharmacokinetic/adat02.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadab <- synthetic_cdisc_dataset(\"latest\", \"adab\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadab <- df_explicit_na(adab) %>%\n mutate(ADPBLPFL = \"Y\") %>% # temp fix\n filter(\n ADPBLPFL == \"Y\",\n !PARAM %in% c(\n \"NAB interpreted per sample result\",\n \"NAB Status of a patient\",\n \"Treatment enhanced ADA\"\n )\n ) %>%\n select(-PARAMCD, -AVALC, -AVALU, -ARRLT, -NRRLT) %>%\n unique() %>%\n tidyr::pivot_wider(\n names_from = PARAM,\n values_from = AVAL\n ) %>%\n mutate(\n across(\n any_of(c(\n \"Treatment induced ADA\",\n \"Transient ADA\",\n \"Persistent ADA\"\n )),\n as.logical\n )\n ) %>%\n mutate(\n ADPBLPFL = ADPBLPFL == \"Y\",\n TI_ADA = if (exists(\"Treatment induced ADA\", where = .)) `Treatment induced ADA` else FALSE\n ) %>%\n var_relabel(\n ADPBLPFL = \"Post-baseline evaluable patients\",\n TI_ADA = \"Treatment-induced ADA patients\"\n )\n\nadab_ti <- adab %>%\n filter(TI_ADA)\n\n\n\n\n\nCode# Layout for post-baseline evaluable patient variables from adab dataset.\nlyt_adab <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = drop_split_levels\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"ADPBLPFL\",\n .stats = \"count\",\n table_names = \"post_baseline\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"TI_ADA\"\n )\n\n# Layout for treatment-induced patient variables from adab dataset.\nlyt_adab_ti <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = keep_split_levels(c(\"A: Drug X\", \"C: Combination\", \"<Missing>\")) # temp fix\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = c(\"Transient ADA\", \"Persistent ADA\"),\n var_labels = \"Treatment-induced ADA patients with\",\n show_labels = \"visible\"\n ) %>%\n summarize_vars(\n \"Time to onset of ADA\",\n .stats = \"median\",\n nested = FALSE,\n .labels = c(median = \"Median time to onset of ADA (weeks)\")\n ) %>%\n summarize_vars(\n \"Antibody titer units\",\n .stats = \"range\",\n nested = FALSE,\n .labels = c(range = \"ADA titer range (min - max)\")\n )\n\nresult_adab <- build_table(lyt_adab, df = adab, alt_counts_df = adsl)\nresult_adab_ti <- build_table(lyt_adab_ti, df = adab_ti, alt_counts_df = adsl)\n\n# Combine tables.\ncol_info(result_adab) <- col_info(result_adab_ti)\nresult <- rbind(\n result_adab,\n result_adab_ti\n)\n\nmain_title(result) <- paste(\n \"Summary of Patients with Treatment-Induced ADA, PK Population\"\n)\nsubtitles(result) <- paste(\"Protocol:\", unique(adab$PARCAT1)[1])\nmain_footer(result) <- paste(\n \"ADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic\n Antibodies)\n Treatment-induced ADA = negative or missing baseline.\n ADA result(s) and at least one positive post-baseline ADA result.\n Transient ADA = ADA positive result detected (a) at only one post-baseline\n sampling timepoint (excluding last timepoint) OR (b) at 2 or more timepoints\n during treatment where the first and last ADA positive samples are separated\n by a period of < 16 weeks, irrespective of any negative samples in between.\n Persistent ADA = ADA positive result detected (a) at the last post-baseline\n sampling timepoint, OR (b) at 2 or more time points during treatment where\n the first and last ADA positive samples are separated by a period ≥ 16\n weeks, irrespective of any negative samples in between.\"\n)\nresult\n\nSummary of Patients with Treatment-Induced ADA, PK Population\nProtocol: A: Drug X Antibody\n\n—————————————————————————————————————————————————————————————————————————————\n A: Drug X C: Combination <Missing> \n (N=134) (N=132) (N=0) \n—————————————————————————————————————————————————————————————————————————————\nPost-baseline evaluable patients 134 132 266 \nTreatment-induced ADA patients 0 0 64 (24.1%)\nTreatment-induced ADA patients with \n Transient ADA NA NA 0 \n Persistent ADA NA NA 0 \nMedian time to onset of ADA (weeks) NA NA 0.1 \nADA titer range (min - max) NA NA NA \n—————————————————————————————————————————————————————————————————————————————\n\nADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic\n Antibodies)\n Treatment-induced ADA = negative or missing baseline.\n ADA result(s) and at least one positive post-baseline ADA result.\n Transient ADA = ADA positive result detected (a) at only one post-baseline\n sampling timepoint (excluding last timepoint) OR (b) at 2 or more timepoints\n during treatment where the first and last ADA positive samples are separated\n by a period of < 16 weeks, irrespective of any negative samples in between.\n Persistent ADA = ADA positive result detected (a) at the last post-baseline\n sampling timepoint, OR (b) at 2 or more time points during treatment where\n the first and last ADA positive samples are separated by a period ≥ 16\n weeks, irrespective of any negative samples in between.\n\n\n\n\n\nCode# In progress\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] scda_0.1.6.9010 dplyr_1.1.2 tern_0.8.5.9006 \n[4] rtables_0.6.2.9001 magrittr_2.0.3 formatters_0.5.1.9001\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-0 gtable_0.3.3 jsonlite_1.8.7 compiler_4.3.1 \n [5] brio_1.1.3 tidyselect_1.2.0 tidyr_1.3.0 splines_4.3.1 \n [9] scales_1.2.1 yaml_2.3.7 fastmap_1.1.1 lattice_0.21-8 \n[13] ggplot2_3.4.2 R6_2.5.1 generics_0.1.3 knitr_1.43 \n[17] forcats_1.0.0 rbibutils_2.2.13 htmlwidgets_1.6.2 backports_1.4.1 \n[21] checkmate_2.2.0 tibble_3.2.1 munsell_0.5.0 pillar_1.9.0 \n[25] rlang_1.1.1 utf8_1.2.3 testthat_3.1.10 broom_1.0.5 \n[29] xfun_0.39 cli_3.6.1 withr_2.5.0 Rdpack_2.4 \n[33] digest_0.6.33 grid_4.3.1 rstudioapi_0.15.0 lifecycle_1.0.3 \n[37] vctrs_0.6.3 evaluate_0.21 glue_1.6.2 codetools_0.2-19 \n[41] survival_3.5-5 fansi_1.0.4 colorspace_2.1-0 purrr_1.0.1 \n[45] rmarkdown_2.23 tools_4.3.1 pkgconfig_2.0.3 htmltools_0.5.5 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- colorspace [* -> 2.1-0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- fs [* -> 1.6.3]\n- generics [* -> 0.1.3]\n- ggplot2 [* -> 3.4.2]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- highr [* -> 0.10]\n- htmltools [* -> 0.5.5]\n- isoband [* -> 0.2.7]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- lattice [* -> 0.21-8]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- praise [* -> 1.0.0]\n- processx [* -> 3.8.2]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quantreg [* -> 5.96]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- survival [* -> 3.5-5]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- yaml [* -> 2.3.7]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- tern [* -> 0.8.5.9006]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/pharmacokinetic/adat02.lock'.\n\n\nDownload" }, { "objectID": "tables/pharmacokinetic/pkpt04.html", @@ -158,14 +158,14 @@ "href": "tables/lab-results/lbt03.html", "title": "LBT03", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\nFor illustration purposes, this example focuses on “C-Reactive Protein Measurement” starting from baseline, while excluding visit at week 1 for subjects who were randomized to the placebo group.\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\nsaved_labels <- var_labels(adlb)\n\nadlb_f <- adlb %>%\n filter(\n PARAM == \"C-Reactive Protein Measurement\",\n !(ARM == \"B: Placebo\" &\n AVISIT == \"WEEK 1 DAY 8\"),\n AVISIT != \"SCREENING\"\n ) %>%\n dplyr::mutate(\n AVISIT = droplevels(AVISIT),\n ABLFLL = ABLFL == \"Y\"\n )\n\nvar_labels(adlb_f) <- c(saved_labels, \"\")\n\n\n\n\nThe LBT03 template is the result of a junction between the analysis of AVAL at baseline and CHG at visit time. AVAL is summarized for baseline visits and and CHG is summarized for post-baseline visits.\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adlb_f$AVISIT)) %>%\n summarize_change(\n \"CHG\",\n variables = list(value = \"AVAL\", baseline_flag = \"ABLFLL\"),\n na.rm = TRUE\n )\n\nresult <- build_table(\n lyt = lyt,\n df = adlb_f,\n alt_counts_df = adsl\n)\n\nresult\n\nAnalysis Visit A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————\nBASELINE \n n 134 134 132 \n Mean (SD) 9.06 (0.93) 8.99 (0.98) 8.98 (0.89) \n Median 9.07 8.92 8.96 \n Min - Max 6.21 - 11.87 6.23 - 11.63 6.24 - 11.18 \nWEEK 1 DAY 8 \n n 134 0 132 \n Mean (SD) -0.05 (1.38) NA -0.02 (1.30) \n Median -0.17 NA 0.02 \n Min - Max -3.56 - 3.48 NA -3.28 - 3.33 \nWEEK 2 DAY 15 \n n 134 134 132 \n Mean (SD) -0.19 (1.47) 0.01 (1.45) 0.15 (1.25) \n Median -0.27 -0.00 0.15 \n Min - Max -4.53 - 4.45 -3.79 - 3.43 -2.92 - 3.28 \nWEEK 3 DAY 22 \n n 134 134 132 \n Mean (SD) 0.03 (1.38) -0.02 (1.49) 0.02 (1.34) \n Median 0.15 -0.04 0.20 \n Min - Max -3.95 - 2.99 -4.28 - 4.24 -2.76 - 3.26 \nWEEK 4 DAY 29 \n n 134 134 132 \n Mean (SD) -0.26 (1.45) 0.05 (1.24) -0.01 (1.17) \n Median -0.37 0.10 -0.06 \n Min - Max -3.74 - 4.15 -3.34 - 3.71 -3.06 - 3.22 \nWEEK 5 DAY 36 \n n 134 134 132 \n Mean (SD) -0.02 (1.50) 0.07 (1.34) 0.03 (1.27) \n Median 0.01 0.15 0.05 \n Min - Max -4.15 - 3.96 -3.50 - 3.53 -3.63 - 4.78 \n\n\nIn the final step, a new variable is derived from AVISIT that can specify the method of estimation of the evaluated change.\n\nCodeadlb_f <- adlb_f %>% mutate(AVISIT_header = recode(AVISIT,\n \"BASELINE\" = \"BASELINE\",\n \"WEEK 1 DAY 8\" = \"WEEK 1 DAY 8 value minus baseline\",\n \"WEEK 2 DAY 15\" = \"WEEK 2 DAY 15 value minus baseline\",\n \"WEEK 3 DAY 22\" = \"WEEK 3 DAY 22 value minus baseline\",\n \"WEEK 4 DAY 29\" = \"WEEK 4 DAY 29 value minus baseline\",\n \"WEEK 5 DAY 36\" = \"WEEK 5 DAY 36 value minus baseline\"\n))\n\n# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_rows_by(\"AVISIT_header\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adlb_f$AVISIT)\n ) %>%\n summarize_change(\n \"CHG\",\n variables = list(value = \"AVAL\", baseline_flag = \"ABLFLL\"),\n na.rm = TRUE\n )\n\nresult <- build_table(\n lyt = lyt,\n df = adlb_f,\n alt_counts_df = adsl\n)\n\nresult\n\nAnalysis Visit A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————\nBASELINE \n n 134 134 132 \n Mean (SD) 9.06 (0.93) 8.99 (0.98) 8.98 (0.89) \n Median 9.07 8.92 8.96 \n Min - Max 6.21 - 11.87 6.23 - 11.63 6.24 - 11.18 \nWEEK 1 DAY 8 value minus baseline \n n 134 0 132 \n Mean (SD) -0.05 (1.38) NA -0.02 (1.30) \n Median -0.17 NA 0.02 \n Min - Max -3.56 - 3.48 NA -3.28 - 3.33 \nWEEK 2 DAY 15 value minus baseline \n n 134 134 132 \n Mean (SD) -0.19 (1.47) 0.01 (1.45) 0.15 (1.25) \n Median -0.27 -0.00 0.15 \n Min - Max -4.53 - 4.45 -3.79 - 3.43 -2.92 - 3.28 \nWEEK 3 DAY 22 value minus baseline \n n 134 134 132 \n Mean (SD) 0.03 (1.38) -0.02 (1.49) 0.02 (1.34) \n Median 0.15 -0.04 0.20 \n Min - Max -3.95 - 2.99 -4.28 - 4.24 -2.76 - 3.26 \nWEEK 4 DAY 29 value minus baseline \n n 134 134 132 \n Mean (SD) -0.26 (1.45) 0.05 (1.24) -0.01 (1.17) \n Median -0.37 0.10 -0.06 \n Min - Max -3.74 - 4.15 -3.34 - 3.71 -3.06 - 3.22 \nWEEK 5 DAY 36 value minus baseline \n n 134 134 132 \n Mean (SD) -0.02 (1.50) 0.07 (1.34) 0.03 (1.27) \n Median 0.01 0.15 0.05 \n Min - Max -4.15 - 3.96 -3.50 - 3.53 -3.63 - 4.78 \n\n\n\n\nHere, we pre-process and manually define the variable “Baseline or Absolute Change from Baseline”.\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\n\nadsl <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))\nadlb <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adlb\")) %>%\n filter(\n !(ARM == \"B: Placebo\" & AVISIT == \"WEEK 1 DAY 8\"),\n AVISIT != \"SCREENING\"\n ) %>%\n dplyr::mutate(\n AVISIT = droplevels(AVISIT),\n ABLFLL = ABLFL == \"Y\",\n AVISIT_header = recode(AVISIT,\n \"BASELINE\" = \"BASELINE\",\n \"WEEK 1 DAY 8\" = \"WEEK 1 DAY 8 value minus baseline\",\n \"WEEK 2 DAY 15\" = \"WEEK 2 DAY 15 value minus baseline\",\n \"WEEK 3 DAY 22\" = \"WEEK 3 DAY 22 value minus baseline\",\n \"WEEK 4 DAY 29\" = \"WEEK 4 DAY 29 value minus baseline\",\n \"WEEK 5 DAY 36\" = \"WEEK 5 DAY 36 value minus baseline\"\n )\n ) %>%\n dplyr::group_by(USUBJID, PARAM) %>%\n dplyr::mutate(\n AVAL_CHG = AVAL - (!ABLFLL) * sum(AVAL * ABLFLL)\n ) %>%\n dplyr::ungroup() %>%\n var_relabel(\n AVAL_CHG = \"Baseline or Absolute Change from Baseline\",\n ABLFLL = \"Baseline Flag (TRUE/FALSE)\",\n AVISIT_header = \"Analysis Visit\"\n )\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'),\n cdisc_dataset(\"ADLB\", adlb, code = '\n ADLB <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adlb\")) %>%\n filter(\n !(ARM == \"B: Placebo\" & AVISIT == \"WEEK 1 DAY 8\"),\n AVISIT != \"SCREENING\"\n ) %>%\n dplyr::mutate(\n AVISIT = droplevels(AVISIT),\n ABLFLL = ABLFL == \"Y\",\n AVISIT_header = recode(AVISIT,\n \"BASELINE\" = \"BASELINE\",\n \"WEEK 1 DAY 8\" = \"WEEK 1 DAY 8 value minus baseline\",\n \"WEEK 2 DAY 15\" = \"WEEK 2 DAY 15 value minus baseline\",\n \"WEEK 3 DAY 22\" = \"WEEK 3 DAY 22 value minus baseline\",\n \"WEEK 4 DAY 29\" = \"WEEK 4 DAY 29 value minus baseline\",\n \"WEEK 5 DAY 36\" = \"WEEK 5 DAY 36 value minus baseline\"\n )\n ) %>%\n dplyr::group_by(USUBJID, PARAM) %>%\n dplyr::mutate(\n AVAL_CHG = AVAL - (!ABLFLL) * sum(AVAL * ABLFLL)\n ) %>%\n dplyr::ungroup() %>%\n var_relabel(\n AVAL_CHG = \"Baseline or Absolute Change from Baseline\",\n ABLFLL = \"Baseline Flag (TRUE/FALSE)\",\n AVISIT_header = \"Analysis Visit\"\n )'),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"Laboratory Test Results Change from Baseline by Visit\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adlb, c(\"PARAM\", \"AVISIT_header\")), # note: order matters here. If `PARAM` is first, the split will be first by `PARAM`and then by `AVISIT`\n selected = c(\"PARAM\", \"AVISIT_header\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(adlb, c(\"AVAL\", \"CHG\", \"AVAL_CHG\")),\n selected = c(\"AVAL_CHG\")\n ),\n useNA = \"ifany\",\n paramcd = choices_selected(\n choices = value_choices(adlb, \"PARAMCD\", \"PARAM\"),\n selected = \"CRP\"\n )\n )\n ),\n filter = list(ADLB = list(AVAL = list()))\n)\n\n[INFO] 2023-08-04 15:04:11.6649 pid:9642 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\nWarning: The 'plotly_relayout' event tied a source ID of\n'teal-main_ui-filter_panel-active-ADLB-filter-ADLB_AVAL-inputs-histogram_plot'\nis not registered. In order to obtain this event data, please add\n`event_register(p, 'plotly_relayout')` to the plot (`p`) that you wish to\nobtain event data from.\n\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] dplyr_1.1.2 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[13] ellipsis_0.3.2 fontawesome_0.5.1 utf8_1.2.3 \n[16] promises_1.2.0.1 rmarkdown_2.23 ps_1.7.5 \n[19] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[22] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[25] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[31] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[34] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[37] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[40] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[43] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[46] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[49] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[52] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[55] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[58] plotly_4.10.2 generics_0.1.3 ggplot2_3.4.2 \n[61] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[64] glue_1.6.2 emmeans_1.8.7 lazyeval_0.2.2 \n[67] tools_4.3.1 data.table_1.14.8 webshot_0.5.5 \n[70] forcats_1.0.0 mvtnorm_1.2-2 grid_4.3.1 \n[73] tidyr_1.3.0 rbibutils_2.2.13 colorspace_2.1-0 \n[76] nlme_3.1-162 cli_3.6.1 fansi_1.0.4 \n[79] viridisLite_0.4.2 geepack_1.3.9 gtable_0.3.3 \n[82] R.methodsS3_1.8.2 sass_0.4.7 digest_0.6.33 \n[85] htmlwidgets_1.6.2 memoise_2.0.1 htmltools_0.5.5 \n[88] R.oo_1.25.0 lifecycle_1.0.3 httr_1.4.6 \n[91] shinyWidgets_0.7.6 mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt03.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\nFor illustration purposes, this example focuses on “C-Reactive Protein Measurement” starting from baseline, while excluding visit at week 1 for subjects who were randomized to the placebo group.\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\nsaved_labels <- var_labels(adlb)\n\nadlb_f <- adlb %>%\n filter(\n PARAM == \"C-Reactive Protein Measurement\",\n !(ARM == \"B: Placebo\" &\n AVISIT == \"WEEK 1 DAY 8\"),\n AVISIT != \"SCREENING\"\n ) %>%\n dplyr::mutate(\n AVISIT = droplevels(AVISIT),\n ABLFLL = ABLFL == \"Y\"\n )\n\nvar_labels(adlb_f) <- c(saved_labels, \"\")\n\n\n\n\nThe LBT03 template is the result of a junction between the analysis of AVAL at baseline and CHG at visit time. AVAL is summarized for baseline visits and and CHG is summarized for post-baseline visits.\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adlb_f$AVISIT)) %>%\n summarize_change(\n \"CHG\",\n variables = list(value = \"AVAL\", baseline_flag = \"ABLFLL\"),\n na.rm = TRUE\n )\n\nresult <- build_table(\n lyt = lyt,\n df = adlb_f,\n alt_counts_df = adsl\n)\n\nresult\n\nAnalysis Visit A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————\nBASELINE \n n 134 134 132 \n Mean (SD) 9.06 (0.93) 8.99 (0.98) 8.98 (0.89) \n Median 9.07 8.92 8.96 \n Min - Max 6.21 - 11.87 6.23 - 11.63 6.24 - 11.18 \nWEEK 1 DAY 8 \n n 134 0 132 \n Mean (SD) -0.05 (1.38) NA -0.02 (1.30) \n Median -0.17 NA 0.02 \n Min - Max -3.56 - 3.48 NA -3.28 - 3.33 \nWEEK 2 DAY 15 \n n 134 134 132 \n Mean (SD) -0.19 (1.47) 0.01 (1.45) 0.15 (1.25) \n Median -0.27 -0.00 0.15 \n Min - Max -4.53 - 4.45 -3.79 - 3.43 -2.92 - 3.28 \nWEEK 3 DAY 22 \n n 134 134 132 \n Mean (SD) 0.03 (1.38) -0.02 (1.49) 0.02 (1.34) \n Median 0.15 -0.04 0.20 \n Min - Max -3.95 - 2.99 -4.28 - 4.24 -2.76 - 3.26 \nWEEK 4 DAY 29 \n n 134 134 132 \n Mean (SD) -0.26 (1.45) 0.05 (1.24) -0.01 (1.17) \n Median -0.37 0.10 -0.06 \n Min - Max -3.74 - 4.15 -3.34 - 3.71 -3.06 - 3.22 \nWEEK 5 DAY 36 \n n 134 134 132 \n Mean (SD) -0.02 (1.50) 0.07 (1.34) 0.03 (1.27) \n Median 0.01 0.15 0.05 \n Min - Max -4.15 - 3.96 -3.50 - 3.53 -3.63 - 4.78 \n\n\nIn the final step, a new variable is derived from AVISIT that can specify the method of estimation of the evaluated change.\n\nCodeadlb_f <- adlb_f %>% mutate(AVISIT_header = recode(AVISIT,\n \"BASELINE\" = \"BASELINE\",\n \"WEEK 1 DAY 8\" = \"WEEK 1 DAY 8 value minus baseline\",\n \"WEEK 2 DAY 15\" = \"WEEK 2 DAY 15 value minus baseline\",\n \"WEEK 3 DAY 22\" = \"WEEK 3 DAY 22 value minus baseline\",\n \"WEEK 4 DAY 29\" = \"WEEK 4 DAY 29 value minus baseline\",\n \"WEEK 5 DAY 36\" = \"WEEK 5 DAY 36 value minus baseline\"\n))\n\n# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_rows_by(\"AVISIT_header\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adlb_f$AVISIT)\n ) %>%\n summarize_change(\n \"CHG\",\n variables = list(value = \"AVAL\", baseline_flag = \"ABLFLL\"),\n na.rm = TRUE\n )\n\nresult <- build_table(\n lyt = lyt,\n df = adlb_f,\n alt_counts_df = adsl\n)\n\nresult\n\nAnalysis Visit A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————\nBASELINE \n n 134 134 132 \n Mean (SD) 9.06 (0.93) 8.99 (0.98) 8.98 (0.89) \n Median 9.07 8.92 8.96 \n Min - Max 6.21 - 11.87 6.23 - 11.63 6.24 - 11.18 \nWEEK 1 DAY 8 value minus baseline \n n 134 0 132 \n Mean (SD) -0.05 (1.38) NA -0.02 (1.30) \n Median -0.17 NA 0.02 \n Min - Max -3.56 - 3.48 NA -3.28 - 3.33 \nWEEK 2 DAY 15 value minus baseline \n n 134 134 132 \n Mean (SD) -0.19 (1.47) 0.01 (1.45) 0.15 (1.25) \n Median -0.27 -0.00 0.15 \n Min - Max -4.53 - 4.45 -3.79 - 3.43 -2.92 - 3.28 \nWEEK 3 DAY 22 value minus baseline \n n 134 134 132 \n Mean (SD) 0.03 (1.38) -0.02 (1.49) 0.02 (1.34) \n Median 0.15 -0.04 0.20 \n Min - Max -3.95 - 2.99 -4.28 - 4.24 -2.76 - 3.26 \nWEEK 4 DAY 29 value minus baseline \n n 134 134 132 \n Mean (SD) -0.26 (1.45) 0.05 (1.24) -0.01 (1.17) \n Median -0.37 0.10 -0.06 \n Min - Max -3.74 - 4.15 -3.34 - 3.71 -3.06 - 3.22 \nWEEK 5 DAY 36 value minus baseline \n n 134 134 132 \n Mean (SD) -0.02 (1.50) 0.07 (1.34) 0.03 (1.27) \n Median 0.01 0.15 0.05 \n Min - Max -4.15 - 3.96 -3.50 - 3.53 -3.63 - 4.78 \n\n\n\n\nHere, we pre-process and manually define the variable “Baseline or Absolute Change from Baseline”.\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\n\nadsl <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))\nadlb <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adlb\")) %>%\n filter(\n !(ARM == \"B: Placebo\" & AVISIT == \"WEEK 1 DAY 8\"),\n AVISIT != \"SCREENING\"\n ) %>%\n dplyr::mutate(\n AVISIT = droplevels(AVISIT),\n ABLFLL = ABLFL == \"Y\",\n AVISIT_header = recode(AVISIT,\n \"BASELINE\" = \"BASELINE\",\n \"WEEK 1 DAY 8\" = \"WEEK 1 DAY 8 value minus baseline\",\n \"WEEK 2 DAY 15\" = \"WEEK 2 DAY 15 value minus baseline\",\n \"WEEK 3 DAY 22\" = \"WEEK 3 DAY 22 value minus baseline\",\n \"WEEK 4 DAY 29\" = \"WEEK 4 DAY 29 value minus baseline\",\n \"WEEK 5 DAY 36\" = \"WEEK 5 DAY 36 value minus baseline\"\n )\n ) %>%\n dplyr::group_by(USUBJID, PARAM) %>%\n dplyr::mutate(\n AVAL_CHG = AVAL - (!ABLFLL) * sum(AVAL * ABLFLL)\n ) %>%\n dplyr::ungroup() %>%\n var_relabel(\n AVAL_CHG = \"Baseline or Absolute Change from Baseline\",\n ABLFLL = \"Baseline Flag (TRUE/FALSE)\",\n AVISIT_header = \"Analysis Visit\"\n )\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'),\n cdisc_dataset(\"ADLB\", adlb, code = '\n ADLB <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adlb\")) %>%\n filter(\n !(ARM == \"B: Placebo\" & AVISIT == \"WEEK 1 DAY 8\"),\n AVISIT != \"SCREENING\"\n ) %>%\n dplyr::mutate(\n AVISIT = droplevels(AVISIT),\n ABLFLL = ABLFL == \"Y\",\n AVISIT_header = recode(AVISIT,\n \"BASELINE\" = \"BASELINE\",\n \"WEEK 1 DAY 8\" = \"WEEK 1 DAY 8 value minus baseline\",\n \"WEEK 2 DAY 15\" = \"WEEK 2 DAY 15 value minus baseline\",\n \"WEEK 3 DAY 22\" = \"WEEK 3 DAY 22 value minus baseline\",\n \"WEEK 4 DAY 29\" = \"WEEK 4 DAY 29 value minus baseline\",\n \"WEEK 5 DAY 36\" = \"WEEK 5 DAY 36 value minus baseline\"\n )\n ) %>%\n dplyr::group_by(USUBJID, PARAM) %>%\n dplyr::mutate(\n AVAL_CHG = AVAL - (!ABLFLL) * sum(AVAL * ABLFLL)\n ) %>%\n dplyr::ungroup() %>%\n var_relabel(\n AVAL_CHG = \"Baseline or Absolute Change from Baseline\",\n ABLFLL = \"Baseline Flag (TRUE/FALSE)\",\n AVISIT_header = \"Analysis Visit\"\n )'),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"Laboratory Test Results Change from Baseline by Visit\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adlb, c(\"PARAM\", \"AVISIT_header\")), # note: order matters here. If `PARAM` is first, the split will be first by `PARAM`and then by `AVISIT`\n selected = c(\"PARAM\", \"AVISIT_header\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(adlb, c(\"AVAL\", \"CHG\", \"AVAL_CHG\")),\n selected = c(\"AVAL_CHG\")\n ),\n useNA = \"ifany\",\n paramcd = choices_selected(\n choices = value_choices(adlb, \"PARAMCD\", \"PARAM\"),\n selected = \"CRP\"\n )\n )\n ),\n filter = list(ADLB = list(AVAL = list()))\n)\n\n[INFO] 2023-08-04 15:21:51.1667 pid:9646 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\nWarning: The 'plotly_relayout' event tied a source ID of\n'teal-main_ui-filter_panel-active-ADLB-filter-ADLB_AVAL-inputs-histogram_plot'\nis not registered. In order to obtain this event data, please add\n`event_register(p, 'plotly_relayout')` to the plot (`p`) that you wish to\nobtain event data from.\n\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] dplyr_1.1.2 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[13] ellipsis_0.3.2 fontawesome_0.5.1 utf8_1.2.3 \n[16] promises_1.2.0.1 rmarkdown_2.23 ps_1.7.5 \n[19] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[22] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[25] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[31] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[34] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[37] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[40] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[43] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[46] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[49] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[52] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[55] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[58] plotly_4.10.2 generics_0.1.3 ggplot2_3.4.2 \n[61] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[64] glue_1.6.2 emmeans_1.8.7 lazyeval_0.2.2 \n[67] tools_4.3.1 data.table_1.14.8 webshot_0.5.5 \n[70] forcats_1.0.0 mvtnorm_1.2-2 grid_4.3.1 \n[73] tidyr_1.3.0 rbibutils_2.2.13 colorspace_2.1-0 \n[76] nlme_3.1-162 cli_3.6.1 fansi_1.0.4 \n[79] viridisLite_0.4.2 geepack_1.3.9 gtable_0.3.3 \n[82] R.methodsS3_1.8.2 sass_0.4.7 digest_0.6.33 \n[85] htmlwidgets_1.6.2 memoise_2.0.1 htmltools_0.5.5 \n[88] R.oo_1.25.0 lifecycle_1.0.3 httr_1.4.6 \n[91] shinyWidgets_0.7.6 mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt03.lock'.\n\n\nDownload" }, { "objectID": "tables/lab-results/lbt13.html", "href": "tables/lab-results/lbt13.html", "title": "LBT13", "section": "", - "text": "Data Setup\nStandard Table (Low)\nStandard Table (High)\nTable Without Patients with Missing Baseline (Low)\nTable with Missing Baseline Considered as Grade 0 (High)\nTable with Fill-In of Grades (High)\nTeal\nSession Info\n\n\n\nPlease note that for each variant, the adlb dataset needs to be filtered on correct flags like WGRLOVFL, WGRHIVFL, et al., otherwise the layout function will not return the correct counts. There is an option to create a record for a lab test where no record is found at that visit. If you specified add_derived_type = \"PHANTOM\" & dtype_phantom_cond, you don’t have to use the h_adsl_adlb_merge_using_worst_flag function to preprocess your adlb dataset. Otherwise please follow the pre-processing steps below before applying the layout functions.\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\n# Please note that in real clinical data, population flag like SAFFL, and parameter category like PARCAT2 needs to be\n# selected properly.\nadsl_f <- adsl %>% filter(SAFFL == \"Y\")\nadlb <- adlb %>% filter(PARAMCD == \"CRP\" & SAFFL == \"Y\")\n\n\n\n\nNote that the worst laboratory flag (below WGRLOVFL) must be selected appropriately to match the direction of abnormality (here Low). New grouping variables ATOXGR_GP and BTOXGR_GP are created to display the correct output.\n\nCodeadlb_f <- adlb %>% filter(WGRLOVFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- adsl_f %>%\n h_adsl_adlb_merge_using_worst_flag(\n adlb_f,\n worst_flag = c(\"WGRLOVFL\" = \"Y\"),\n by_visit = TRUE,\n no_fillin_visits = c(\"SCREENING\", \"BASELINE\", \"UNSCHEDULED\")\n )\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n mutate(\n ATOXGR_GP = case_when(\n ATOXGR %in% c(0, 1, 2, 3, 4) ~ \"Not Low\",\n ATOXGR == -1 ~ \"1\",\n ATOXGR == -2 ~ \"2\",\n ATOXGR == -3 ~ \"3\",\n ATOXGR == -4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n )\n ) %>%\n mutate(\n BTOXGR_GP = case_when(\n BTOXGR %in% c(0, 1, 2, 3, 4) ~ \"Not Low\",\n BTOXGR == -1 ~ \"1\",\n BTOXGR == -2 ~ \"2\",\n BTOXGR == -3 ~ \"3\",\n BTOXGR == -4 ~ \"4\",\n BTOXGR == \"<Missing>\" ~ \"Missing\"\n )\n )\n\nadlb_out <- adlb_out %>% mutate(\n AVISIT = forcats::fct_reorder(AVISIT, AVISITN),\n ATOXGR_GP = factor(ATOXGR_GP, levels = c(\"Not Low\", \"1\", \"2\", \"3\", \"4\", \"Missing\")),\n BTOXGR_GP = factor(BTOXGR_GP, levels = c(\"Not Low\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n)\n\nadlb_out <- adlb_out %>%\n var_relabel(\n PARAMCD = \"Parameter Code\",\n AVISIT = \"Visit\",\n ATOXGR_GP = \"NCI CTCAE Grade at Visit\",\n BTOXGR_GP = \"Baseline NCI CTCAE Grade\"\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAMCD\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$PARAMCD)\n ) %>%\n split_rows_by(\n \"AVISIT\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$AVISIT)\n ) %>%\n split_rows_by(\n \"ATOXGR_GP\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$ATOXGR_GP)\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\")) %>%\n count_occurrences(\"BTOXGR_GP\", denom = \"n\", drop = TRUE) %>%\n append_varlabels(adlb_out, \"BTOXGR_GP\", indent = 3L) %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f)\n\nresult\n\nParameter Code \n Visit \n NCI CTCAE Grade at Visit A: Drug X B: Placebo C: Combination\n Baseline NCI CTCAE Grade (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————\nCRP \n WEEK 1 DAY 8 \n Not Low (n) 116 110 101 \n Not Low 103 (88.8%) 91 (82.7%) 88 (87.1%) \n 1 3 (2.6%) 5 (4.5%) 6 (5.9%) \n 2 4 (3.4%) 9 (8.2%) 2 (2.0%) \n 3 3 (2.6%) 4 (3.6%) 4 (4.0%) \n 4 3 (2.6%) 1 (0.9%) 1 (1.0%) \n 1 (n) 4 7 5 \n Not Low 3 (75.0%) 7 (100%) 4 (80.0%) \n 3 1 (25.0%) 0 1 (20.0%) \n 2 (n) 5 6 11 \n Not Low 5 (100%) 5 (83.3%) 8 (72.7%) \n 1 0 0 1 (9.1%) \n 3 0 0 2 (18.2%) \n 4 0 1 (16.7%) 0 \n 3 (n) 6 8 5 \n Not Low 6 (100%) 7 (87.5%) 5 (100%) \n 3 0 1 (12.5%) 0 \n 4 (n) 3 3 10 \n Not Low 2 (66.7%) 3 (100%) 7 (70.0%) \n 1 0 0 2 (20.0%) \n 2 1 (33.3%) 0 0 \n 4 0 0 1 (10.0%) \n WEEK 2 DAY 15 \n Not Low (n) 106 111 116 \n Not Low 93 (87.7%) 93 (83.8%) 100 (86.2%) \n 1 3 (2.8%) 4 (3.6%) 8 (6.9%) \n 2 5 (4.7%) 7 (6.3%) 2 (1.7%) \n 3 2 (1.9%) 5 (4.5%) 6 (5.2%) \n 4 3 (2.8%) 2 (1.8%) 0 \n 1 (n) 15 9 2 \n Not Low 13 (86.7%) 8 (88.9%) 1 (50.0%) \n 2 0 1 (11.1%) 0 \n 3 2 (13.3%) 0 0 \n 4 0 0 1 (50.0%) \n 2 (n) 3 3 6 \n Not Low 3 (100%) 3 (100%) 4 (66.7%) \n 1 0 0 1 (16.7%) \n 3 0 0 1 (16.7%) \n 3 (n) 7 7 6 \n Not Low 7 (100%) 6 (85.7%) 5 (83.3%) \n 2 0 1 (14.3%) 0 \n 4 0 0 1 (16.7%) \n 4 (n) 3 4 2 \n Not Low 3 (100%) 3 (75.0%) 2 (100%) \n 1 0 1 (25.0%) 0 \n WEEK 3 DAY 22 \n Not Low (n) 119 110 114 \n Not Low 104 (87.4%) 92 (83.6%) 94 (82.5%) \n 1 3 (2.5%) 4 (3.6%) 9 (7.9%) \n 2 5 (4.2%) 7 (6.4%) 2 (1.8%) \n 3 4 (3.4%) 5 (4.5%) 7 (6.1%) \n 4 3 (2.5%) 2 (1.8%) 2 (1.8%) \n 1 (n) 9 9 6 \n Not Low 9 (100%) 7 (77.8%) 6 (100%) \n 2 0 2 (22.2%) 0 \n 2 (n) 1 7 3 \n Not Low 1 (100%) 6 (85.7%) 3 (100%) \n 1 0 1 (14.3%) 0 \n 3 (n) 4 5 4 \n Not Low 4 (100%) 5 (100%) 4 (100%) \n 4 (n) 1 3 5 \n Not Low 1 (100%) 3 (100%) 5 (100%) \n WEEK 4 DAY 29 \n Not Low (n) 101 119 111 \n Not Low 89 (88.1%) 100 (84.0%) 96 (86.5%) \n 1 3 (3.0%) 4 (3.4%) 6 (5.4%) \n 2 4 (4.0%) 8 (6.7%) 1 (0.9%) \n 3 2 (2.0%) 5 (4.2%) 6 (5.4%) \n 4 3 (3.0%) 2 (1.7%) 2 (1.8%) \n 1 (n) 10 5 6 \n Not Low 9 (90.0%) 5 (100%) 5 (83.3%) \n 1 0 0 1 (16.7%) \n 2 1 (10.0%) 0 0 \n 2 (n) 13 4 6 \n Not Low 13 (100%) 3 (75.0%) 5 (83.3%) \n 1 0 0 1 (16.7%) \n 2 0 1 (25.0%) 0 \n 3 (n) 8 2 6 \n Not Low 6 (75.0%) 1 (50.0%) 5 (83.3%) \n 1 0 1 (50.0%) 0 \n 2 0 0 1 (16.7%) \n 3 2 (25.0%) 0 0 \n 4 (n) 2 4 3 \n Not Low 2 (100%) 4 (100%) 1 (33.3%) \n 1 0 0 1 (33.3%) \n 3 0 0 1 (33.3%) \n WEEK 5 DAY 36 \n Not Low (n) 115 112 111 \n Not Low 102 (88.7%) 94 (83.9%) 96 (86.5%) \n 1 2 (1.7%) 4 (3.6%) 6 (5.4%) \n 2 5 (4.3%) 7 (6.2%) 2 (1.8%) \n 3 3 (2.6%) 5 (4.5%) 5 (4.5%) \n 4 3 (2.6%) 2 (1.8%) 2 (1.8%) \n 1 (n) 5 7 6 \n Not Low 5 (100%) 4 (57.1%) 5 (83.3%) \n 1 0 1 (14.3%) 1 (16.7%) \n 2 0 2 (28.6%) 0 \n 2 (n) 5 11 6 \n Not Low 5 (100%) 11 (100%) 6 (100%) \n 3 (n) 8 2 7 \n Not Low 6 (75.0%) 2 (100%) 4 (57.1%) \n 1 1 (12.5%) 0 1 (14.3%) \n 3 1 (12.5%) 0 2 (28.6%) \n 4 (n) 1 2 2 \n Not Low 1 (100%) 2 (100%) 1 (50.0%) \n 1 0 0 1 (50.0%) \n\n\n\n\nNote that the worst laboratory flag (below WGRHIVFL) must be selected appropriately to match the direction of abnormality (here High). New grouping variables ATOXGR_GP and BTOXGR_GP are created to display the correct output.\n\nCodeadlb_f <- adlb %>% filter(WGRHIVFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- adsl_f %>%\n h_adsl_adlb_merge_using_worst_flag(\n adlb_f,\n worst_flag = c(\"WGRHIVFL\" = \"Y\"),\n by_visit = TRUE,\n no_fillin_visits = c(\"SCREENING\", \"BASELINE\", \"UNSCHEDULED\")\n )\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n mutate(\n ATOXGR_GP = case_when(\n ATOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n ATOXGR == 1 ~ \"1\",\n ATOXGR == 2 ~ \"2\",\n ATOXGR == 3 ~ \"3\",\n ATOXGR == 4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n )\n ) %>%\n mutate(\n BTOXGR_GP = case_when(\n BTOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n BTOXGR == 1 ~ \"1\",\n BTOXGR == 2 ~ \"2\",\n BTOXGR == 3 ~ \"3\",\n BTOXGR == 4 ~ \"4\",\n BTOXGR == \"<Missing>\" ~ \"Missing\"\n )\n )\n\nadlb_out <- adlb_out %>% mutate(\n AVISIT = forcats::fct_reorder(AVISIT, AVISITN),\n ATOXGR_GP = factor(ATOXGR_GP, levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\")),\n BTOXGR_GP = factor(BTOXGR_GP, levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n)\n\nadlb_out <- adlb_out %>%\n var_relabel(\n PARAMCD = \"Parameter Code\",\n AVISIT = \"Visit\",\n ATOXGR_GP = \"NCI CTCAE Grade at Visit\",\n BTOXGR_GP = \"Baseline NCI CTCAE Grade\"\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAMCD\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$PARAMCD)\n ) %>%\n split_rows_by(\n \"AVISIT\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$AVISIT)\n ) %>%\n split_rows_by(\n \"ATOXGR_GP\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$ATOXGR_GP)\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\")) %>%\n count_occurrences(\"BTOXGR_GP\", denom = \"n\", drop = TRUE) %>%\n append_varlabels(adlb_out, \"BTOXGR_GP\", indent = 3L) %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f)\n\nresult\n\nParameter Code \n Visit \n NCI CTCAE Grade at Visit A: Drug X B: Placebo C: Combination\n Baseline NCI CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————\nCRP \n WEEK 1 DAY 8 \n Not High (n) 111 110 112 \n Not High 93 (83.8%) 92 (83.6%) 98 (87.5%) \n 1 8 (7.2%) 7 (6.4%) 5 (4.5%) \n 2 2 (1.8%) 6 (5.5%) 7 (6.2%) \n 3 6 (5.4%) 3 (2.7%) 2 (1.8%) \n 4 2 (1.8%) 2 (1.8%) 0 \n 1 (n) 8 11 6 \n Not High 7 (87.5%) 11 (100%) 5 (83.3%) \n 3 1 (12.5%) 0 1 (16.7%) \n 2 (n) 6 4 5 \n Not High 6 (100%) 1 (25.0%) 4 (80.0%) \n 1 0 3 (75.0%) 1 (20.0%) \n 3 (n) 8 3 4 \n Not High 7 (87.5%) 3 (100%) 4 (100%) \n 4 1 (12.5%) 0 0 \n 4 (n) 1 6 5 \n Not High 1 (100%) 5 (83.3%) 4 (80.0%) \n 1 0 0 1 (20.0%) \n 3 0 1 (16.7%) 0 \n WEEK 2 DAY 15 \n Not High (n) 117 113 113 \n Not High 99 (84.6%) 95 (84.1%) 100 (88.5%) \n 1 7 (6.0%) 6 (5.3%) 4 (3.5%) \n 2 2 (1.7%) 6 (5.3%) 6 (5.3%) \n 3 6 (5.1%) 4 (3.5%) 3 (2.7%) \n 4 3 (2.6%) 2 (1.8%) 0 \n 1 (n) 6 9 7 \n Not High 5 (83.3%) 8 (88.9%) 6 (85.7%) \n 1 0 1 (11.1%) 0 \n 2 0 0 1 (14.3%) \n 3 1 (16.7%) 0 0 \n 2 (n) 4 4 6 \n Not High 4 (100%) 4 (100%) 3 (50.0%) \n 1 0 0 3 (50.0%) \n 3 (n) 5 3 5 \n Not High 4 (80.0%) 2 (66.7%) 5 (100%) \n 1 1 (20.0%) 1 (33.3%) 0 \n 4 (n) 2 5 1 \n Not High 2 (100%) 3 (60.0%) 1 (100%) \n 1 0 2 (40.0%) 0 \n WEEK 3 DAY 22 \n Not High (n) 110 111 114 \n Not High 92 (83.6%) 94 (84.7%) 98 (86.0%) \n 1 8 (7.3%) 9 (8.1%) 7 (6.1%) \n 2 2 (1.8%) 5 (4.5%) 6 (5.3%) \n 3 5 (4.5%) 2 (1.8%) 3 (2.6%) \n 4 3 (2.7%) 1 (0.9%) 0 \n 1 (n) 7 8 7 \n Not High 7 (100%) 5 (62.5%) 6 (85.7%) \n 1 0 1 (12.5%) 0 \n 2 0 1 (12.5%) 1 (14.3%) \n 3 0 1 (12.5%) 0 \n 2 (n) 9 7 5 \n Not High 9 (100%) 6 (85.7%) 5 (100%) \n 3 0 1 (14.3%) 0 \n 3 (n) 6 3 4 \n Not High 5 (83.3%) 2 (66.7%) 4 (100%) \n 3 1 (16.7%) 0 0 \n 4 0 1 (33.3%) 0 \n 4 (n) 2 5 2 \n Not High 1 (50.0%) 5 (100%) 2 (100%) \n 3 1 (50.0%) 0 0 \n WEEK 4 DAY 29 \n Not High (n) 115 117 113 \n Not High 97 (84.3%) 101 (86.3%) 99 (87.6%) \n 1 8 (7.0%) 7 (6.0%) 6 (5.3%) \n 2 2 (1.7%) 6 (5.1%) 5 (4.4%) \n 3 7 (6.1%) 3 (2.6%) 3 (2.7%) \n 4 1 (0.9%) 0 0 \n 1 (n) 4 3 11 \n Not High 4 (100%) 2 (66.7%) 10 (90.9%) \n 2 0 0 1 (9.1%) \n 4 0 1 (33.3%) 0 \n 2 (n) 6 4 2 \n Not High 6 (100%) 3 (75.0%) 2 (100%) \n 1 0 1 (25.0%) 0 \n 3 (n) 6 7 4 \n Not High 5 (83.3%) 4 (57.1%) 4 (100%) \n 1 0 1 (14.3%) 0 \n 3 0 1 (14.3%) 0 \n 4 1 (16.7%) 1 (14.3%) 0 \n 4 (n) 3 3 2 \n Not High 2 (66.7%) 2 (66.7%) 0 \n 1 0 1 (33.3%) 1 (50.0%) \n 2 0 0 1 (50.0%) \n 4 1 (33.3%) 0 0 \n WEEK 5 DAY 36 \n Not High (n) 111 111 119 \n Not High 95 (85.6%) 95 (85.6%) 104 (87.4%) \n 1 6 (5.4%) 8 (7.2%) 6 (5.0%) \n 2 1 (0.9%) 5 (4.5%) 6 (5.0%) \n 3 6 (5.4%) 2 (1.8%) 3 (2.5%) \n 4 3 (2.7%) 1 (0.9%) 0 \n 1 (n) 8 11 5 \n Not High 7 (87.5%) 9 (81.8%) 4 (80.0%) \n 1 0 1 (9.1%) 0 \n 2 0 0 1 (20.0%) \n 3 1 (12.5%) 1 (9.1%) 0 \n 2 (n) 7 6 3 \n Not High 5 (71.4%) 3 (50.0%) 2 (66.7%) \n 1 1 (14.3%) 1 (16.7%) 1 (33.3%) \n 2 1 (14.3%) 1 (16.7%) 0 \n 4 0 1 (16.7%) 0 \n 3 (n) 3 3 4 \n Not High 3 (100%) 3 (100%) 4 (100%) \n 4 (n) 5 3 1 \n Not High 4 (80.0%) 2 (66.7%) 1 (100%) \n 1 1 (20.0%) 0 0 \n 3 0 1 (33.3%) 0 \n\n\n\n\nNote that missing baseline values are filtered out in the pre-processing step.\n\nCodeadlb_f <- adlb %>% filter(WGRLOVFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- adsl_f %>%\n h_adsl_adlb_merge_using_worst_flag(\n adlb_f,\n worst_flag = c(\"WGRLOVFL\" = \"Y\"),\n by_visit = TRUE,\n no_fillin_visits = c(\"SCREENING\", \"BASELINE\", \"UNSCHEDULED\")\n )\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n filter(BTOXGR != \"<Missing>\") %>% # filter out missing baseline grade\n mutate(\n ATOXGR_GP = case_when(\n ATOXGR %in% c(0, 1, 2, 3, 4) ~ \"Not Low\",\n ATOXGR == -1 ~ \"1\",\n ATOXGR == -2 ~ \"2\",\n ATOXGR == -3 ~ \"3\",\n ATOXGR == -4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n )\n ) %>%\n mutate(\n BTOXGR_GP = case_when(\n BTOXGR %in% c(0, 1, 2, 3, 4) ~ \"Not Low\",\n BTOXGR == -1 ~ \"1\",\n BTOXGR == -2 ~ \"2\",\n BTOXGR == -3 ~ \"3\",\n BTOXGR == -4 ~ \"4\"\n )\n )\n\nadlb_out <- adlb_out %>% mutate(\n AVISIT = forcats::fct_reorder(AVISIT, AVISITN),\n ATOXGR_GP = factor(ATOXGR_GP, levels = c(\"Not Low\", \"1\", \"2\", \"3\", \"4\", \"Missing\")),\n BTOXGR_GP = factor(BTOXGR_GP, levels = c(\"Not Low\", \"1\", \"2\", \"3\", \"4\"))\n)\n\nadlb_out <- adlb_out %>%\n var_relabel(\n PARAMCD = \"Parameter Code\",\n AVISIT = \"Visit\",\n ATOXGR_GP = \"NCI CTCAE Grade at Visit\",\n BTOXGR_GP = \"Baseline NCI CTCAE Grade\"\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAMCD\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$PARAMCD)\n ) %>%\n split_rows_by(\n \"AVISIT\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$AVISIT)\n ) %>%\n split_rows_by(\n \"ATOXGR_GP\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$ATOXGR_GP)\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\")) %>%\n count_occurrences(\"BTOXGR_GP\", denom = \"n\", drop = TRUE) %>%\n append_varlabels(adlb_out, \"BTOXGR_GP\", indent = 3L) %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f)\n\nresult\n\nParameter Code \n Visit \n NCI CTCAE Grade at Visit A: Drug X B: Placebo C: Combination\n Baseline NCI CTCAE Grade (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————\nCRP \n WEEK 1 DAY 8 \n Not Low (n) 116 110 101 \n Not Low 103 (88.8%) 91 (82.7%) 88 (87.1%) \n 1 3 (2.6%) 5 (4.5%) 6 (5.9%) \n 2 4 (3.4%) 9 (8.2%) 2 (2.0%) \n 3 3 (2.6%) 4 (3.6%) 4 (4.0%) \n 4 3 (2.6%) 1 (0.9%) 1 (1.0%) \n 1 (n) 4 7 5 \n Not Low 3 (75.0%) 7 (100%) 4 (80.0%) \n 3 1 (25.0%) 0 1 (20.0%) \n 2 (n) 5 6 11 \n Not Low 5 (100%) 5 (83.3%) 8 (72.7%) \n 1 0 0 1 (9.1%) \n 3 0 0 2 (18.2%) \n 4 0 1 (16.7%) 0 \n 3 (n) 6 8 5 \n Not Low 6 (100%) 7 (87.5%) 5 (100%) \n 3 0 1 (12.5%) 0 \n 4 (n) 3 3 10 \n Not Low 2 (66.7%) 3 (100%) 7 (70.0%) \n 1 0 0 2 (20.0%) \n 2 1 (33.3%) 0 0 \n 4 0 0 1 (10.0%) \n WEEK 2 DAY 15 \n Not Low (n) 106 111 116 \n Not Low 93 (87.7%) 93 (83.8%) 100 (86.2%) \n 1 3 (2.8%) 4 (3.6%) 8 (6.9%) \n 2 5 (4.7%) 7 (6.3%) 2 (1.7%) \n 3 2 (1.9%) 5 (4.5%) 6 (5.2%) \n 4 3 (2.8%) 2 (1.8%) 0 \n 1 (n) 15 9 2 \n Not Low 13 (86.7%) 8 (88.9%) 1 (50.0%) \n 2 0 1 (11.1%) 0 \n 3 2 (13.3%) 0 0 \n 4 0 0 1 (50.0%) \n 2 (n) 3 3 6 \n Not Low 3 (100%) 3 (100%) 4 (66.7%) \n 1 0 0 1 (16.7%) \n 3 0 0 1 (16.7%) \n 3 (n) 7 7 6 \n Not Low 7 (100%) 6 (85.7%) 5 (83.3%) \n 2 0 1 (14.3%) 0 \n 4 0 0 1 (16.7%) \n 4 (n) 3 4 2 \n Not Low 3 (100%) 3 (75.0%) 2 (100%) \n 1 0 1 (25.0%) 0 \n WEEK 3 DAY 22 \n Not Low (n) 119 110 114 \n Not Low 104 (87.4%) 92 (83.6%) 94 (82.5%) \n 1 3 (2.5%) 4 (3.6%) 9 (7.9%) \n 2 5 (4.2%) 7 (6.4%) 2 (1.8%) \n 3 4 (3.4%) 5 (4.5%) 7 (6.1%) \n 4 3 (2.5%) 2 (1.8%) 2 (1.8%) \n 1 (n) 9 9 6 \n Not Low 9 (100%) 7 (77.8%) 6 (100%) \n 2 0 2 (22.2%) 0 \n 2 (n) 1 7 3 \n Not Low 1 (100%) 6 (85.7%) 3 (100%) \n 1 0 1 (14.3%) 0 \n 3 (n) 4 5 4 \n Not Low 4 (100%) 5 (100%) 4 (100%) \n 4 (n) 1 3 5 \n Not Low 1 (100%) 3 (100%) 5 (100%) \n WEEK 4 DAY 29 \n Not Low (n) 101 119 111 \n Not Low 89 (88.1%) 100 (84.0%) 96 (86.5%) \n 1 3 (3.0%) 4 (3.4%) 6 (5.4%) \n 2 4 (4.0%) 8 (6.7%) 1 (0.9%) \n 3 2 (2.0%) 5 (4.2%) 6 (5.4%) \n 4 3 (3.0%) 2 (1.7%) 2 (1.8%) \n 1 (n) 10 5 6 \n Not Low 9 (90.0%) 5 (100%) 5 (83.3%) \n 1 0 0 1 (16.7%) \n 2 1 (10.0%) 0 0 \n 2 (n) 13 4 6 \n Not Low 13 (100%) 3 (75.0%) 5 (83.3%) \n 1 0 0 1 (16.7%) \n 2 0 1 (25.0%) 0 \n 3 (n) 8 2 6 \n Not Low 6 (75.0%) 1 (50.0%) 5 (83.3%) \n 1 0 1 (50.0%) 0 \n 2 0 0 1 (16.7%) \n 3 2 (25.0%) 0 0 \n 4 (n) 2 4 3 \n Not Low 2 (100%) 4 (100%) 1 (33.3%) \n 1 0 0 1 (33.3%) \n 3 0 0 1 (33.3%) \n WEEK 5 DAY 36 \n Not Low (n) 115 112 111 \n Not Low 102 (88.7%) 94 (83.9%) 96 (86.5%) \n 1 2 (1.7%) 4 (3.6%) 6 (5.4%) \n 2 5 (4.3%) 7 (6.2%) 2 (1.8%) \n 3 3 (2.6%) 5 (4.5%) 5 (4.5%) \n 4 3 (2.6%) 2 (1.8%) 2 (1.8%) \n 1 (n) 5 7 6 \n Not Low 5 (100%) 4 (57.1%) 5 (83.3%) \n 1 0 1 (14.3%) 1 (16.7%) \n 2 0 2 (28.6%) 0 \n 2 (n) 5 11 6 \n Not Low 5 (100%) 11 (100%) 6 (100%) \n 3 (n) 8 2 7 \n Not Low 6 (75.0%) 2 (100%) 4 (57.1%) \n 1 1 (12.5%) 0 1 (14.3%) \n 3 1 (12.5%) 0 2 (28.6%) \n 4 (n) 1 2 2 \n Not Low 1 (100%) 2 (100%) 1 (50.0%) \n 1 0 0 1 (50.0%) \n\n\n\n\nNote that when BTOXGR is missing, the grouping variable BTOXGR_GP is now \"Not High\" instead of \"Missing\" compared to Standard Table (High).\n\nCodeadlb_f <- adlb %>% filter(WGRHIVFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- adsl_f %>%\n h_adsl_adlb_merge_using_worst_flag(\n adlb_f,\n worst_flag = c(\"WGRHIVFL\" = \"Y\"),\n by_visit = TRUE,\n no_fillin_visits = c(\"SCREENING\", \"BASELINE\", \"UNSCHEDULED\")\n )\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n mutate(\n ATOXGR_GP = case_when(\n ATOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n ATOXGR == 1 ~ \"1\",\n ATOXGR == 2 ~ \"2\",\n ATOXGR == 3 ~ \"3\",\n ATOXGR == 4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n )\n ) %>%\n mutate(\n BTOXGR_GP = case_when(\n BTOXGR %in% c(0, -1, -2, -3, -4, \"<Missing>\") ~ \"Not High\", # Missing BTOXGR now grouped to \"Not High\"\n BTOXGR == 1 ~ \"1\",\n BTOXGR == 2 ~ \"2\",\n BTOXGR == 3 ~ \"3\",\n BTOXGR == 4 ~ \"4\"\n )\n )\n\nadlb_out <- adlb_out %>% mutate(\n AVISIT = forcats::fct_reorder(AVISIT, AVISITN),\n ATOXGR_GP = factor(ATOXGR_GP, levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\")),\n BTOXGR_GP = factor(BTOXGR_GP, levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n)\n\nadlb_out <- adlb_out %>%\n var_relabel(\n PARAMCD = \"Parameter Code\",\n AVISIT = \"Visit\",\n ATOXGR_GP = \"NCI CTCAE Grade at Visit\",\n BTOXGR_GP = \"Baseline NCI CTCAE Grade\"\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAMCD\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$PARAMCD)\n ) %>%\n split_rows_by(\n \"AVISIT\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$AVISIT)\n ) %>%\n split_rows_by(\n \"ATOXGR_GP\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$ATOXGR_GP)\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\")) %>%\n count_occurrences(\"BTOXGR_GP\", denom = \"n\", drop = TRUE) %>%\n append_varlabels(adlb_out, \"BTOXGR_GP\", indent = 3L) %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f)\n\nresult\n\nParameter Code \n Visit \n NCI CTCAE Grade at Visit A: Drug X B: Placebo C: Combination\n Baseline NCI CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————\nCRP \n WEEK 1 DAY 8 \n Not High (n) 111 110 112 \n Not High 93 (83.8%) 92 (83.6%) 98 (87.5%) \n 1 8 (7.2%) 7 (6.4%) 5 (4.5%) \n 2 2 (1.8%) 6 (5.5%) 7 (6.2%) \n 3 6 (5.4%) 3 (2.7%) 2 (1.8%) \n 4 2 (1.8%) 2 (1.8%) 0 \n 1 (n) 8 11 6 \n Not High 7 (87.5%) 11 (100%) 5 (83.3%) \n 3 1 (12.5%) 0 1 (16.7%) \n 2 (n) 6 4 5 \n Not High 6 (100%) 1 (25.0%) 4 (80.0%) \n 1 0 3 (75.0%) 1 (20.0%) \n 3 (n) 8 3 4 \n Not High 7 (87.5%) 3 (100%) 4 (100%) \n 4 1 (12.5%) 0 0 \n 4 (n) 1 6 5 \n Not High 1 (100%) 5 (83.3%) 4 (80.0%) \n 1 0 0 1 (20.0%) \n 3 0 1 (16.7%) 0 \n WEEK 2 DAY 15 \n Not High (n) 117 113 113 \n Not High 99 (84.6%) 95 (84.1%) 100 (88.5%) \n 1 7 (6.0%) 6 (5.3%) 4 (3.5%) \n 2 2 (1.7%) 6 (5.3%) 6 (5.3%) \n 3 6 (5.1%) 4 (3.5%) 3 (2.7%) \n 4 3 (2.6%) 2 (1.8%) 0 \n 1 (n) 6 9 7 \n Not High 5 (83.3%) 8 (88.9%) 6 (85.7%) \n 1 0 1 (11.1%) 0 \n 2 0 0 1 (14.3%) \n 3 1 (16.7%) 0 0 \n 2 (n) 4 4 6 \n Not High 4 (100%) 4 (100%) 3 (50.0%) \n 1 0 0 3 (50.0%) \n 3 (n) 5 3 5 \n Not High 4 (80.0%) 2 (66.7%) 5 (100%) \n 1 1 (20.0%) 1 (33.3%) 0 \n 4 (n) 2 5 1 \n Not High 2 (100%) 3 (60.0%) 1 (100%) \n 1 0 2 (40.0%) 0 \n WEEK 3 DAY 22 \n Not High (n) 110 111 114 \n Not High 92 (83.6%) 94 (84.7%) 98 (86.0%) \n 1 8 (7.3%) 9 (8.1%) 7 (6.1%) \n 2 2 (1.8%) 5 (4.5%) 6 (5.3%) \n 3 5 (4.5%) 2 (1.8%) 3 (2.6%) \n 4 3 (2.7%) 1 (0.9%) 0 \n 1 (n) 7 8 7 \n Not High 7 (100%) 5 (62.5%) 6 (85.7%) \n 1 0 1 (12.5%) 0 \n 2 0 1 (12.5%) 1 (14.3%) \n 3 0 1 (12.5%) 0 \n 2 (n) 9 7 5 \n Not High 9 (100%) 6 (85.7%) 5 (100%) \n 3 0 1 (14.3%) 0 \n 3 (n) 6 3 4 \n Not High 5 (83.3%) 2 (66.7%) 4 (100%) \n 3 1 (16.7%) 0 0 \n 4 0 1 (33.3%) 0 \n 4 (n) 2 5 2 \n Not High 1 (50.0%) 5 (100%) 2 (100%) \n 3 1 (50.0%) 0 0 \n WEEK 4 DAY 29 \n Not High (n) 115 117 113 \n Not High 97 (84.3%) 101 (86.3%) 99 (87.6%) \n 1 8 (7.0%) 7 (6.0%) 6 (5.3%) \n 2 2 (1.7%) 6 (5.1%) 5 (4.4%) \n 3 7 (6.1%) 3 (2.6%) 3 (2.7%) \n 4 1 (0.9%) 0 0 \n 1 (n) 4 3 11 \n Not High 4 (100%) 2 (66.7%) 10 (90.9%) \n 2 0 0 1 (9.1%) \n 4 0 1 (33.3%) 0 \n 2 (n) 6 4 2 \n Not High 6 (100%) 3 (75.0%) 2 (100%) \n 1 0 1 (25.0%) 0 \n 3 (n) 6 7 4 \n Not High 5 (83.3%) 4 (57.1%) 4 (100%) \n 1 0 1 (14.3%) 0 \n 3 0 1 (14.3%) 0 \n 4 1 (16.7%) 1 (14.3%) 0 \n 4 (n) 3 3 2 \n Not High 2 (66.7%) 2 (66.7%) 0 \n 1 0 1 (33.3%) 1 (50.0%) \n 2 0 0 1 (50.0%) \n 4 1 (33.3%) 0 0 \n WEEK 5 DAY 36 \n Not High (n) 111 111 119 \n Not High 95 (85.6%) 95 (85.6%) 104 (87.4%) \n 1 6 (5.4%) 8 (7.2%) 6 (5.0%) \n 2 1 (0.9%) 5 (4.5%) 6 (5.0%) \n 3 6 (5.4%) 2 (1.8%) 3 (2.5%) \n 4 3 (2.7%) 1 (0.9%) 0 \n 1 (n) 8 11 5 \n Not High 7 (87.5%) 9 (81.8%) 4 (80.0%) \n 1 0 1 (9.1%) 0 \n 2 0 0 1 (20.0%) \n 3 1 (12.5%) 1 (9.1%) 0 \n 2 (n) 7 6 3 \n Not High 5 (71.4%) 3 (50.0%) 2 (66.7%) \n 1 1 (14.3%) 1 (16.7%) 1 (33.3%) \n 2 1 (14.3%) 1 (16.7%) 0 \n 4 0 1 (16.7%) 0 \n 3 (n) 3 3 4 \n Not High 3 (100%) 3 (100%) 4 (100%) \n 4 (n) 5 3 1 \n Not High 4 (80.0%) 2 (66.7%) 1 (100%) \n 1 1 (20.0%) 0 0 \n 3 0 1 (33.3%) 0 \n\n\n\n\nPre-processing is the same as for Standard Table (High), but in order to keep all levels, the drop argument in count_occurrences is set to FALSE.\n\nCodeadlb_f <- adlb %>% filter(WGRHIVFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- adsl_f %>%\n h_adsl_adlb_merge_using_worst_flag(\n adlb_f,\n worst_flag = c(\"WGRHIVFL\" = \"Y\"),\n by_visit = TRUE,\n no_fillin_visits = c(\"SCREENING\", \"BASELINE\", \"UNSCHEDULED\")\n )\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n mutate(\n ATOXGR_GP = case_when(\n ATOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n ATOXGR == 1 ~ \"1\",\n ATOXGR == 2 ~ \"2\",\n ATOXGR == 3 ~ \"3\",\n ATOXGR == 4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n )\n ) %>%\n mutate(\n BTOXGR_GP = case_when(\n BTOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n BTOXGR == 1 ~ \"1\",\n BTOXGR == 2 ~ \"2\",\n BTOXGR == 3 ~ \"3\",\n BTOXGR == 4 ~ \"4\",\n BTOXGR == \"<Missing>\" ~ \"Missing\"\n )\n )\n\nadlb_out <- adlb_out %>% mutate(\n AVISIT = forcats::fct_reorder(AVISIT, AVISITN),\n ATOXGR_GP = factor(ATOXGR_GP, levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\")),\n BTOXGR_GP = factor(BTOXGR_GP, levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n)\n\nadlb_out <- adlb_out %>%\n var_relabel(\n PARAMCD = \"Parameter Code\",\n AVISIT = \"Visit\",\n ATOXGR_GP = \"NCI CTCAE Grade at Visit\",\n BTOXGR_GP = \"Baseline NCI CTCAE Grade\"\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAMCD\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$PARAMCD)\n ) %>%\n split_rows_by(\n \"AVISIT\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$AVISIT)\n ) %>%\n split_rows_by(\n \"ATOXGR_GP\",\n split_fun = keep_split_levels(c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\")),\n label_pos = \"topleft\",\n split_label = obj_label(adlb_out$ATOXGR_GP)\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\")) %>%\n count_occurrences(\"BTOXGR_GP\", denom = \"n\", drop = FALSE) %>%\n append_varlabels(adlb_out, \"BTOXGR_GP\", indent = 3L) %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f)\n\nresult\n\nParameter Code \n Visit \n NCI CTCAE Grade at Visit A: Drug X B: Placebo C: Combination\n Baseline NCI CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————\nCRP \n WEEK 1 DAY 8 \n Not High (n) 111 110 112 \n Not High 93 (83.8%) 92 (83.6%) 98 (87.5%) \n 1 8 (7.2%) 7 (6.4%) 5 (4.5%) \n 2 2 (1.8%) 6 (5.5%) 7 (6.2%) \n 3 6 (5.4%) 3 (2.7%) 2 (1.8%) \n 4 2 (1.8%) 2 (1.8%) 0 \n Missing 0 0 0 \n 1 (n) 8 11 6 \n Not High 7 (87.5%) 11 (100%) 5 (83.3%) \n 1 0 0 0 \n 2 0 0 0 \n 3 1 (12.5%) 0 1 (16.7%) \n 4 0 0 0 \n Missing 0 0 0 \n 2 (n) 6 4 5 \n Not High 6 (100%) 1 (25.0%) 4 (80.0%) \n 1 0 3 (75.0%) 1 (20.0%) \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 3 (n) 8 3 4 \n Not High 7 (87.5%) 3 (100%) 4 (100%) \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 1 (12.5%) 0 0 \n Missing 0 0 0 \n 4 (n) 1 6 5 \n Not High 1 (100%) 5 (83.3%) 4 (80.0%) \n 1 0 0 1 (20.0%) \n 2 0 0 0 \n 3 0 1 (16.7%) 0 \n 4 0 0 0 \n Missing 0 0 0 \n Missing (n) 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n WEEK 2 DAY 15 \n Not High (n) 117 113 113 \n Not High 99 (84.6%) 95 (84.1%) 100 (88.5%) \n 1 7 (6.0%) 6 (5.3%) 4 (3.5%) \n 2 2 (1.7%) 6 (5.3%) 6 (5.3%) \n 3 6 (5.1%) 4 (3.5%) 3 (2.7%) \n 4 3 (2.6%) 2 (1.8%) 0 \n Missing 0 0 0 \n 1 (n) 6 9 7 \n Not High 5 (83.3%) 8 (88.9%) 6 (85.7%) \n 1 0 1 (11.1%) 0 \n 2 0 0 1 (14.3%) \n 3 1 (16.7%) 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 2 (n) 4 4 6 \n Not High 4 (100%) 4 (100%) 3 (50.0%) \n 1 0 0 3 (50.0%) \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 3 (n) 5 3 5 \n Not High 4 (80.0%) 2 (66.7%) 5 (100%) \n 1 1 (20.0%) 1 (33.3%) 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 4 (n) 2 5 1 \n Not High 2 (100%) 3 (60.0%) 1 (100%) \n 1 0 2 (40.0%) 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n Missing (n) 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n WEEK 3 DAY 22 \n Not High (n) 110 111 114 \n Not High 92 (83.6%) 94 (84.7%) 98 (86.0%) \n 1 8 (7.3%) 9 (8.1%) 7 (6.1%) \n 2 2 (1.8%) 5 (4.5%) 6 (5.3%) \n 3 5 (4.5%) 2 (1.8%) 3 (2.6%) \n 4 3 (2.7%) 1 (0.9%) 0 \n Missing 0 0 0 \n 1 (n) 7 8 7 \n Not High 7 (100%) 5 (62.5%) 6 (85.7%) \n 1 0 1 (12.5%) 0 \n 2 0 1 (12.5%) 1 (14.3%) \n 3 0 1 (12.5%) 0 \n 4 0 0 0 \n Missing 0 0 0 \n 2 (n) 9 7 5 \n Not High 9 (100%) 6 (85.7%) 5 (100%) \n 1 0 0 0 \n 2 0 0 0 \n 3 0 1 (14.3%) 0 \n 4 0 0 0 \n Missing 0 0 0 \n 3 (n) 6 3 4 \n Not High 5 (83.3%) 2 (66.7%) 4 (100%) \n 1 0 0 0 \n 2 0 0 0 \n 3 1 (16.7%) 0 0 \n 4 0 1 (33.3%) 0 \n Missing 0 0 0 \n 4 (n) 2 5 2 \n Not High 1 (50.0%) 5 (100%) 2 (100%) \n 1 0 0 0 \n 2 0 0 0 \n 3 1 (50.0%) 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n Missing (n) 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n WEEK 4 DAY 29 \n Not High (n) 115 117 113 \n Not High 97 (84.3%) 101 (86.3%) 99 (87.6%) \n 1 8 (7.0%) 7 (6.0%) 6 (5.3%) \n 2 2 (1.7%) 6 (5.1%) 5 (4.4%) \n 3 7 (6.1%) 3 (2.6%) 3 (2.7%) \n 4 1 (0.9%) 0 0 \n Missing 0 0 0 \n 1 (n) 4 3 11 \n Not High 4 (100%) 2 (66.7%) 10 (90.9%) \n 1 0 0 0 \n 2 0 0 1 (9.1%) \n 3 0 0 0 \n 4 0 1 (33.3%) 0 \n Missing 0 0 0 \n 2 (n) 6 4 2 \n Not High 6 (100%) 3 (75.0%) 2 (100%) \n 1 0 1 (25.0%) 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 3 (n) 6 7 4 \n Not High 5 (83.3%) 4 (57.1%) 4 (100%) \n 1 0 1 (14.3%) 0 \n 2 0 0 0 \n 3 0 1 (14.3%) 0 \n 4 1 (16.7%) 1 (14.3%) 0 \n Missing 0 0 0 \n 4 (n) 3 3 2 \n Not High 2 (66.7%) 2 (66.7%) 0 \n 1 0 1 (33.3%) 1 (50.0%) \n 2 0 0 1 (50.0%) \n 3 0 0 0 \n 4 1 (33.3%) 0 0 \n Missing 0 0 0 \n Missing (n) 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n WEEK 5 DAY 36 \n Not High (n) 111 111 119 \n Not High 95 (85.6%) 95 (85.6%) 104 (87.4%) \n 1 6 (5.4%) 8 (7.2%) 6 (5.0%) \n 2 1 (0.9%) 5 (4.5%) 6 (5.0%) \n 3 6 (5.4%) 2 (1.8%) 3 (2.5%) \n 4 3 (2.7%) 1 (0.9%) 0 \n Missing 0 0 0 \n 1 (n) 8 11 5 \n Not High 7 (87.5%) 9 (81.8%) 4 (80.0%) \n 1 0 1 (9.1%) 0 \n 2 0 0 1 (20.0%) \n 3 1 (12.5%) 1 (9.1%) 0 \n 4 0 0 0 \n Missing 0 0 0 \n 2 (n) 7 6 3 \n Not High 5 (71.4%) 3 (50.0%) 2 (66.7%) \n 1 1 (14.3%) 1 (16.7%) 1 (33.3%) \n 2 1 (14.3%) 1 (16.7%) 0 \n 3 0 0 0 \n 4 0 1 (16.7%) 0 \n Missing 0 0 0 \n 3 (n) 3 3 4 \n Not High 3 (100%) 3 (100%) 4 (100%) \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 4 (n) 5 3 1 \n Not High 4 (80.0%) 2 (66.7%) 1 (100%) \n 1 1 (20.0%) 0 0 \n 2 0 0 0 \n 3 0 1 (33.3%) 0 \n 4 0 0 0 \n Missing 0 0 0 \n Missing (n) 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADLB\", adlb,\n code = 'ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_shift_by_grade(\n label = \"Grade Laboratory Abnormality Table\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n paramcd = choices_selected(\n choices = value_choices(adlb, \"PARAMCD\", \"PARAM\"),\n selected = \"ALT\"\n ),\n worst_flag_var = choices_selected(\n choices = variable_choices(adlb, subset = c(\"WGRLOVFL\", \"WGRLOFL\", \"WGRHIVFL\", \"WGRHIFL\")),\n selected = c(\"WGRLOVFL\")\n ),\n worst_flag_indicator = choices_selected(\n value_choices(adlb, \"WGRLOVFL\"),\n selected = \"Y\", fixed = TRUE\n ),\n anl_toxgrade_var = choices_selected(\n choices = variable_choices(adlb, subset = c(\"ATOXGR\")),\n selected = c(\"ATOXGR\"),\n fixed = TRUE\n ),\n base_toxgrade_var = choices_selected(\n choices = variable_choices(adlb, subset = c(\"BTOXGR\")),\n selected = c(\"BTOXGR\"),\n fixed = TRUE\n ),\n add_total = FALSE\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\")\n )\n)\n\n[INFO] 2023-08-04 15:03:00.9984 pid:9430 token:[] teal.modules.clinical Initializing tm_t_shift_by_grade\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] dplyr_1.1.2 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt13.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table (Low)\nStandard Table (High)\nTable Without Patients with Missing Baseline (Low)\nTable with Missing Baseline Considered as Grade 0 (High)\nTable with Fill-In of Grades (High)\nTeal\nSession Info\n\n\n\nPlease note that for each variant, the adlb dataset needs to be filtered on correct flags like WGRLOVFL, WGRHIVFL, et al., otherwise the layout function will not return the correct counts. There is an option to create a record for a lab test where no record is found at that visit. If you specified add_derived_type = \"PHANTOM\" & dtype_phantom_cond, you don’t have to use the h_adsl_adlb_merge_using_worst_flag function to preprocess your adlb dataset. Otherwise please follow the pre-processing steps below before applying the layout functions.\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\n# Please note that in real clinical data, population flag like SAFFL, and parameter category like PARCAT2 needs to be\n# selected properly.\nadsl_f <- adsl %>% filter(SAFFL == \"Y\")\nadlb <- adlb %>% filter(PARAMCD == \"CRP\" & SAFFL == \"Y\")\n\n\n\n\nNote that the worst laboratory flag (below WGRLOVFL) must be selected appropriately to match the direction of abnormality (here Low). New grouping variables ATOXGR_GP and BTOXGR_GP are created to display the correct output.\n\nCodeadlb_f <- adlb %>% filter(WGRLOVFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- adsl_f %>%\n h_adsl_adlb_merge_using_worst_flag(\n adlb_f,\n worst_flag = c(\"WGRLOVFL\" = \"Y\"),\n by_visit = TRUE,\n no_fillin_visits = c(\"SCREENING\", \"BASELINE\", \"UNSCHEDULED\")\n )\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n mutate(\n ATOXGR_GP = case_when(\n ATOXGR %in% c(0, 1, 2, 3, 4) ~ \"Not Low\",\n ATOXGR == -1 ~ \"1\",\n ATOXGR == -2 ~ \"2\",\n ATOXGR == -3 ~ \"3\",\n ATOXGR == -4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n )\n ) %>%\n mutate(\n BTOXGR_GP = case_when(\n BTOXGR %in% c(0, 1, 2, 3, 4) ~ \"Not Low\",\n BTOXGR == -1 ~ \"1\",\n BTOXGR == -2 ~ \"2\",\n BTOXGR == -3 ~ \"3\",\n BTOXGR == -4 ~ \"4\",\n BTOXGR == \"<Missing>\" ~ \"Missing\"\n )\n )\n\nadlb_out <- adlb_out %>% mutate(\n AVISIT = forcats::fct_reorder(AVISIT, AVISITN),\n ATOXGR_GP = factor(ATOXGR_GP, levels = c(\"Not Low\", \"1\", \"2\", \"3\", \"4\", \"Missing\")),\n BTOXGR_GP = factor(BTOXGR_GP, levels = c(\"Not Low\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n)\n\nadlb_out <- adlb_out %>%\n var_relabel(\n PARAMCD = \"Parameter Code\",\n AVISIT = \"Visit\",\n ATOXGR_GP = \"NCI CTCAE Grade at Visit\",\n BTOXGR_GP = \"Baseline NCI CTCAE Grade\"\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAMCD\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$PARAMCD)\n ) %>%\n split_rows_by(\n \"AVISIT\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$AVISIT)\n ) %>%\n split_rows_by(\n \"ATOXGR_GP\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$ATOXGR_GP)\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\")) %>%\n count_occurrences(\"BTOXGR_GP\", denom = \"n\", drop = TRUE) %>%\n append_varlabels(adlb_out, \"BTOXGR_GP\", indent = 3L) %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f)\n\nresult\n\nParameter Code \n Visit \n NCI CTCAE Grade at Visit A: Drug X B: Placebo C: Combination\n Baseline NCI CTCAE Grade (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————\nCRP \n WEEK 1 DAY 8 \n Not Low (n) 116 110 101 \n Not Low 103 (88.8%) 91 (82.7%) 88 (87.1%) \n 1 3 (2.6%) 5 (4.5%) 6 (5.9%) \n 2 4 (3.4%) 9 (8.2%) 2 (2.0%) \n 3 3 (2.6%) 4 (3.6%) 4 (4.0%) \n 4 3 (2.6%) 1 (0.9%) 1 (1.0%) \n 1 (n) 4 7 5 \n Not Low 3 (75.0%) 7 (100%) 4 (80.0%) \n 3 1 (25.0%) 0 1 (20.0%) \n 2 (n) 5 6 11 \n Not Low 5 (100%) 5 (83.3%) 8 (72.7%) \n 1 0 0 1 (9.1%) \n 3 0 0 2 (18.2%) \n 4 0 1 (16.7%) 0 \n 3 (n) 6 8 5 \n Not Low 6 (100%) 7 (87.5%) 5 (100%) \n 3 0 1 (12.5%) 0 \n 4 (n) 3 3 10 \n Not Low 2 (66.7%) 3 (100%) 7 (70.0%) \n 1 0 0 2 (20.0%) \n 2 1 (33.3%) 0 0 \n 4 0 0 1 (10.0%) \n WEEK 2 DAY 15 \n Not Low (n) 106 111 116 \n Not Low 93 (87.7%) 93 (83.8%) 100 (86.2%) \n 1 3 (2.8%) 4 (3.6%) 8 (6.9%) \n 2 5 (4.7%) 7 (6.3%) 2 (1.7%) \n 3 2 (1.9%) 5 (4.5%) 6 (5.2%) \n 4 3 (2.8%) 2 (1.8%) 0 \n 1 (n) 15 9 2 \n Not Low 13 (86.7%) 8 (88.9%) 1 (50.0%) \n 2 0 1 (11.1%) 0 \n 3 2 (13.3%) 0 0 \n 4 0 0 1 (50.0%) \n 2 (n) 3 3 6 \n Not Low 3 (100%) 3 (100%) 4 (66.7%) \n 1 0 0 1 (16.7%) \n 3 0 0 1 (16.7%) \n 3 (n) 7 7 6 \n Not Low 7 (100%) 6 (85.7%) 5 (83.3%) \n 2 0 1 (14.3%) 0 \n 4 0 0 1 (16.7%) \n 4 (n) 3 4 2 \n Not Low 3 (100%) 3 (75.0%) 2 (100%) \n 1 0 1 (25.0%) 0 \n WEEK 3 DAY 22 \n Not Low (n) 119 110 114 \n Not Low 104 (87.4%) 92 (83.6%) 94 (82.5%) \n 1 3 (2.5%) 4 (3.6%) 9 (7.9%) \n 2 5 (4.2%) 7 (6.4%) 2 (1.8%) \n 3 4 (3.4%) 5 (4.5%) 7 (6.1%) \n 4 3 (2.5%) 2 (1.8%) 2 (1.8%) \n 1 (n) 9 9 6 \n Not Low 9 (100%) 7 (77.8%) 6 (100%) \n 2 0 2 (22.2%) 0 \n 2 (n) 1 7 3 \n Not Low 1 (100%) 6 (85.7%) 3 (100%) \n 1 0 1 (14.3%) 0 \n 3 (n) 4 5 4 \n Not Low 4 (100%) 5 (100%) 4 (100%) \n 4 (n) 1 3 5 \n Not Low 1 (100%) 3 (100%) 5 (100%) \n WEEK 4 DAY 29 \n Not Low (n) 101 119 111 \n Not Low 89 (88.1%) 100 (84.0%) 96 (86.5%) \n 1 3 (3.0%) 4 (3.4%) 6 (5.4%) \n 2 4 (4.0%) 8 (6.7%) 1 (0.9%) \n 3 2 (2.0%) 5 (4.2%) 6 (5.4%) \n 4 3 (3.0%) 2 (1.7%) 2 (1.8%) \n 1 (n) 10 5 6 \n Not Low 9 (90.0%) 5 (100%) 5 (83.3%) \n 1 0 0 1 (16.7%) \n 2 1 (10.0%) 0 0 \n 2 (n) 13 4 6 \n Not Low 13 (100%) 3 (75.0%) 5 (83.3%) \n 1 0 0 1 (16.7%) \n 2 0 1 (25.0%) 0 \n 3 (n) 8 2 6 \n Not Low 6 (75.0%) 1 (50.0%) 5 (83.3%) \n 1 0 1 (50.0%) 0 \n 2 0 0 1 (16.7%) \n 3 2 (25.0%) 0 0 \n 4 (n) 2 4 3 \n Not Low 2 (100%) 4 (100%) 1 (33.3%) \n 1 0 0 1 (33.3%) \n 3 0 0 1 (33.3%) \n WEEK 5 DAY 36 \n Not Low (n) 115 112 111 \n Not Low 102 (88.7%) 94 (83.9%) 96 (86.5%) \n 1 2 (1.7%) 4 (3.6%) 6 (5.4%) \n 2 5 (4.3%) 7 (6.2%) 2 (1.8%) \n 3 3 (2.6%) 5 (4.5%) 5 (4.5%) \n 4 3 (2.6%) 2 (1.8%) 2 (1.8%) \n 1 (n) 5 7 6 \n Not Low 5 (100%) 4 (57.1%) 5 (83.3%) \n 1 0 1 (14.3%) 1 (16.7%) \n 2 0 2 (28.6%) 0 \n 2 (n) 5 11 6 \n Not Low 5 (100%) 11 (100%) 6 (100%) \n 3 (n) 8 2 7 \n Not Low 6 (75.0%) 2 (100%) 4 (57.1%) \n 1 1 (12.5%) 0 1 (14.3%) \n 3 1 (12.5%) 0 2 (28.6%) \n 4 (n) 1 2 2 \n Not Low 1 (100%) 2 (100%) 1 (50.0%) \n 1 0 0 1 (50.0%) \n\n\n\n\nNote that the worst laboratory flag (below WGRHIVFL) must be selected appropriately to match the direction of abnormality (here High). New grouping variables ATOXGR_GP and BTOXGR_GP are created to display the correct output.\n\nCodeadlb_f <- adlb %>% filter(WGRHIVFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- adsl_f %>%\n h_adsl_adlb_merge_using_worst_flag(\n adlb_f,\n worst_flag = c(\"WGRHIVFL\" = \"Y\"),\n by_visit = TRUE,\n no_fillin_visits = c(\"SCREENING\", \"BASELINE\", \"UNSCHEDULED\")\n )\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n mutate(\n ATOXGR_GP = case_when(\n ATOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n ATOXGR == 1 ~ \"1\",\n ATOXGR == 2 ~ \"2\",\n ATOXGR == 3 ~ \"3\",\n ATOXGR == 4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n )\n ) %>%\n mutate(\n BTOXGR_GP = case_when(\n BTOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n BTOXGR == 1 ~ \"1\",\n BTOXGR == 2 ~ \"2\",\n BTOXGR == 3 ~ \"3\",\n BTOXGR == 4 ~ \"4\",\n BTOXGR == \"<Missing>\" ~ \"Missing\"\n )\n )\n\nadlb_out <- adlb_out %>% mutate(\n AVISIT = forcats::fct_reorder(AVISIT, AVISITN),\n ATOXGR_GP = factor(ATOXGR_GP, levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\")),\n BTOXGR_GP = factor(BTOXGR_GP, levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n)\n\nadlb_out <- adlb_out %>%\n var_relabel(\n PARAMCD = \"Parameter Code\",\n AVISIT = \"Visit\",\n ATOXGR_GP = \"NCI CTCAE Grade at Visit\",\n BTOXGR_GP = \"Baseline NCI CTCAE Grade\"\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAMCD\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$PARAMCD)\n ) %>%\n split_rows_by(\n \"AVISIT\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$AVISIT)\n ) %>%\n split_rows_by(\n \"ATOXGR_GP\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$ATOXGR_GP)\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\")) %>%\n count_occurrences(\"BTOXGR_GP\", denom = \"n\", drop = TRUE) %>%\n append_varlabels(adlb_out, \"BTOXGR_GP\", indent = 3L) %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f)\n\nresult\n\nParameter Code \n Visit \n NCI CTCAE Grade at Visit A: Drug X B: Placebo C: Combination\n Baseline NCI CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————\nCRP \n WEEK 1 DAY 8 \n Not High (n) 111 110 112 \n Not High 93 (83.8%) 92 (83.6%) 98 (87.5%) \n 1 8 (7.2%) 7 (6.4%) 5 (4.5%) \n 2 2 (1.8%) 6 (5.5%) 7 (6.2%) \n 3 6 (5.4%) 3 (2.7%) 2 (1.8%) \n 4 2 (1.8%) 2 (1.8%) 0 \n 1 (n) 8 11 6 \n Not High 7 (87.5%) 11 (100%) 5 (83.3%) \n 3 1 (12.5%) 0 1 (16.7%) \n 2 (n) 6 4 5 \n Not High 6 (100%) 1 (25.0%) 4 (80.0%) \n 1 0 3 (75.0%) 1 (20.0%) \n 3 (n) 8 3 4 \n Not High 7 (87.5%) 3 (100%) 4 (100%) \n 4 1 (12.5%) 0 0 \n 4 (n) 1 6 5 \n Not High 1 (100%) 5 (83.3%) 4 (80.0%) \n 1 0 0 1 (20.0%) \n 3 0 1 (16.7%) 0 \n WEEK 2 DAY 15 \n Not High (n) 117 113 113 \n Not High 99 (84.6%) 95 (84.1%) 100 (88.5%) \n 1 7 (6.0%) 6 (5.3%) 4 (3.5%) \n 2 2 (1.7%) 6 (5.3%) 6 (5.3%) \n 3 6 (5.1%) 4 (3.5%) 3 (2.7%) \n 4 3 (2.6%) 2 (1.8%) 0 \n 1 (n) 6 9 7 \n Not High 5 (83.3%) 8 (88.9%) 6 (85.7%) \n 1 0 1 (11.1%) 0 \n 2 0 0 1 (14.3%) \n 3 1 (16.7%) 0 0 \n 2 (n) 4 4 6 \n Not High 4 (100%) 4 (100%) 3 (50.0%) \n 1 0 0 3 (50.0%) \n 3 (n) 5 3 5 \n Not High 4 (80.0%) 2 (66.7%) 5 (100%) \n 1 1 (20.0%) 1 (33.3%) 0 \n 4 (n) 2 5 1 \n Not High 2 (100%) 3 (60.0%) 1 (100%) \n 1 0 2 (40.0%) 0 \n WEEK 3 DAY 22 \n Not High (n) 110 111 114 \n Not High 92 (83.6%) 94 (84.7%) 98 (86.0%) \n 1 8 (7.3%) 9 (8.1%) 7 (6.1%) \n 2 2 (1.8%) 5 (4.5%) 6 (5.3%) \n 3 5 (4.5%) 2 (1.8%) 3 (2.6%) \n 4 3 (2.7%) 1 (0.9%) 0 \n 1 (n) 7 8 7 \n Not High 7 (100%) 5 (62.5%) 6 (85.7%) \n 1 0 1 (12.5%) 0 \n 2 0 1 (12.5%) 1 (14.3%) \n 3 0 1 (12.5%) 0 \n 2 (n) 9 7 5 \n Not High 9 (100%) 6 (85.7%) 5 (100%) \n 3 0 1 (14.3%) 0 \n 3 (n) 6 3 4 \n Not High 5 (83.3%) 2 (66.7%) 4 (100%) \n 3 1 (16.7%) 0 0 \n 4 0 1 (33.3%) 0 \n 4 (n) 2 5 2 \n Not High 1 (50.0%) 5 (100%) 2 (100%) \n 3 1 (50.0%) 0 0 \n WEEK 4 DAY 29 \n Not High (n) 115 117 113 \n Not High 97 (84.3%) 101 (86.3%) 99 (87.6%) \n 1 8 (7.0%) 7 (6.0%) 6 (5.3%) \n 2 2 (1.7%) 6 (5.1%) 5 (4.4%) \n 3 7 (6.1%) 3 (2.6%) 3 (2.7%) \n 4 1 (0.9%) 0 0 \n 1 (n) 4 3 11 \n Not High 4 (100%) 2 (66.7%) 10 (90.9%) \n 2 0 0 1 (9.1%) \n 4 0 1 (33.3%) 0 \n 2 (n) 6 4 2 \n Not High 6 (100%) 3 (75.0%) 2 (100%) \n 1 0 1 (25.0%) 0 \n 3 (n) 6 7 4 \n Not High 5 (83.3%) 4 (57.1%) 4 (100%) \n 1 0 1 (14.3%) 0 \n 3 0 1 (14.3%) 0 \n 4 1 (16.7%) 1 (14.3%) 0 \n 4 (n) 3 3 2 \n Not High 2 (66.7%) 2 (66.7%) 0 \n 1 0 1 (33.3%) 1 (50.0%) \n 2 0 0 1 (50.0%) \n 4 1 (33.3%) 0 0 \n WEEK 5 DAY 36 \n Not High (n) 111 111 119 \n Not High 95 (85.6%) 95 (85.6%) 104 (87.4%) \n 1 6 (5.4%) 8 (7.2%) 6 (5.0%) \n 2 1 (0.9%) 5 (4.5%) 6 (5.0%) \n 3 6 (5.4%) 2 (1.8%) 3 (2.5%) \n 4 3 (2.7%) 1 (0.9%) 0 \n 1 (n) 8 11 5 \n Not High 7 (87.5%) 9 (81.8%) 4 (80.0%) \n 1 0 1 (9.1%) 0 \n 2 0 0 1 (20.0%) \n 3 1 (12.5%) 1 (9.1%) 0 \n 2 (n) 7 6 3 \n Not High 5 (71.4%) 3 (50.0%) 2 (66.7%) \n 1 1 (14.3%) 1 (16.7%) 1 (33.3%) \n 2 1 (14.3%) 1 (16.7%) 0 \n 4 0 1 (16.7%) 0 \n 3 (n) 3 3 4 \n Not High 3 (100%) 3 (100%) 4 (100%) \n 4 (n) 5 3 1 \n Not High 4 (80.0%) 2 (66.7%) 1 (100%) \n 1 1 (20.0%) 0 0 \n 3 0 1 (33.3%) 0 \n\n\n\n\nNote that missing baseline values are filtered out in the pre-processing step.\n\nCodeadlb_f <- adlb %>% filter(WGRLOVFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- adsl_f %>%\n h_adsl_adlb_merge_using_worst_flag(\n adlb_f,\n worst_flag = c(\"WGRLOVFL\" = \"Y\"),\n by_visit = TRUE,\n no_fillin_visits = c(\"SCREENING\", \"BASELINE\", \"UNSCHEDULED\")\n )\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n filter(BTOXGR != \"<Missing>\") %>% # filter out missing baseline grade\n mutate(\n ATOXGR_GP = case_when(\n ATOXGR %in% c(0, 1, 2, 3, 4) ~ \"Not Low\",\n ATOXGR == -1 ~ \"1\",\n ATOXGR == -2 ~ \"2\",\n ATOXGR == -3 ~ \"3\",\n ATOXGR == -4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n )\n ) %>%\n mutate(\n BTOXGR_GP = case_when(\n BTOXGR %in% c(0, 1, 2, 3, 4) ~ \"Not Low\",\n BTOXGR == -1 ~ \"1\",\n BTOXGR == -2 ~ \"2\",\n BTOXGR == -3 ~ \"3\",\n BTOXGR == -4 ~ \"4\"\n )\n )\n\nadlb_out <- adlb_out %>% mutate(\n AVISIT = forcats::fct_reorder(AVISIT, AVISITN),\n ATOXGR_GP = factor(ATOXGR_GP, levels = c(\"Not Low\", \"1\", \"2\", \"3\", \"4\", \"Missing\")),\n BTOXGR_GP = factor(BTOXGR_GP, levels = c(\"Not Low\", \"1\", \"2\", \"3\", \"4\"))\n)\n\nadlb_out <- adlb_out %>%\n var_relabel(\n PARAMCD = \"Parameter Code\",\n AVISIT = \"Visit\",\n ATOXGR_GP = \"NCI CTCAE Grade at Visit\",\n BTOXGR_GP = \"Baseline NCI CTCAE Grade\"\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAMCD\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$PARAMCD)\n ) %>%\n split_rows_by(\n \"AVISIT\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$AVISIT)\n ) %>%\n split_rows_by(\n \"ATOXGR_GP\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$ATOXGR_GP)\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\")) %>%\n count_occurrences(\"BTOXGR_GP\", denom = \"n\", drop = TRUE) %>%\n append_varlabels(adlb_out, \"BTOXGR_GP\", indent = 3L) %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f)\n\nresult\n\nParameter Code \n Visit \n NCI CTCAE Grade at Visit A: Drug X B: Placebo C: Combination\n Baseline NCI CTCAE Grade (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————\nCRP \n WEEK 1 DAY 8 \n Not Low (n) 116 110 101 \n Not Low 103 (88.8%) 91 (82.7%) 88 (87.1%) \n 1 3 (2.6%) 5 (4.5%) 6 (5.9%) \n 2 4 (3.4%) 9 (8.2%) 2 (2.0%) \n 3 3 (2.6%) 4 (3.6%) 4 (4.0%) \n 4 3 (2.6%) 1 (0.9%) 1 (1.0%) \n 1 (n) 4 7 5 \n Not Low 3 (75.0%) 7 (100%) 4 (80.0%) \n 3 1 (25.0%) 0 1 (20.0%) \n 2 (n) 5 6 11 \n Not Low 5 (100%) 5 (83.3%) 8 (72.7%) \n 1 0 0 1 (9.1%) \n 3 0 0 2 (18.2%) \n 4 0 1 (16.7%) 0 \n 3 (n) 6 8 5 \n Not Low 6 (100%) 7 (87.5%) 5 (100%) \n 3 0 1 (12.5%) 0 \n 4 (n) 3 3 10 \n Not Low 2 (66.7%) 3 (100%) 7 (70.0%) \n 1 0 0 2 (20.0%) \n 2 1 (33.3%) 0 0 \n 4 0 0 1 (10.0%) \n WEEK 2 DAY 15 \n Not Low (n) 106 111 116 \n Not Low 93 (87.7%) 93 (83.8%) 100 (86.2%) \n 1 3 (2.8%) 4 (3.6%) 8 (6.9%) \n 2 5 (4.7%) 7 (6.3%) 2 (1.7%) \n 3 2 (1.9%) 5 (4.5%) 6 (5.2%) \n 4 3 (2.8%) 2 (1.8%) 0 \n 1 (n) 15 9 2 \n Not Low 13 (86.7%) 8 (88.9%) 1 (50.0%) \n 2 0 1 (11.1%) 0 \n 3 2 (13.3%) 0 0 \n 4 0 0 1 (50.0%) \n 2 (n) 3 3 6 \n Not Low 3 (100%) 3 (100%) 4 (66.7%) \n 1 0 0 1 (16.7%) \n 3 0 0 1 (16.7%) \n 3 (n) 7 7 6 \n Not Low 7 (100%) 6 (85.7%) 5 (83.3%) \n 2 0 1 (14.3%) 0 \n 4 0 0 1 (16.7%) \n 4 (n) 3 4 2 \n Not Low 3 (100%) 3 (75.0%) 2 (100%) \n 1 0 1 (25.0%) 0 \n WEEK 3 DAY 22 \n Not Low (n) 119 110 114 \n Not Low 104 (87.4%) 92 (83.6%) 94 (82.5%) \n 1 3 (2.5%) 4 (3.6%) 9 (7.9%) \n 2 5 (4.2%) 7 (6.4%) 2 (1.8%) \n 3 4 (3.4%) 5 (4.5%) 7 (6.1%) \n 4 3 (2.5%) 2 (1.8%) 2 (1.8%) \n 1 (n) 9 9 6 \n Not Low 9 (100%) 7 (77.8%) 6 (100%) \n 2 0 2 (22.2%) 0 \n 2 (n) 1 7 3 \n Not Low 1 (100%) 6 (85.7%) 3 (100%) \n 1 0 1 (14.3%) 0 \n 3 (n) 4 5 4 \n Not Low 4 (100%) 5 (100%) 4 (100%) \n 4 (n) 1 3 5 \n Not Low 1 (100%) 3 (100%) 5 (100%) \n WEEK 4 DAY 29 \n Not Low (n) 101 119 111 \n Not Low 89 (88.1%) 100 (84.0%) 96 (86.5%) \n 1 3 (3.0%) 4 (3.4%) 6 (5.4%) \n 2 4 (4.0%) 8 (6.7%) 1 (0.9%) \n 3 2 (2.0%) 5 (4.2%) 6 (5.4%) \n 4 3 (3.0%) 2 (1.7%) 2 (1.8%) \n 1 (n) 10 5 6 \n Not Low 9 (90.0%) 5 (100%) 5 (83.3%) \n 1 0 0 1 (16.7%) \n 2 1 (10.0%) 0 0 \n 2 (n) 13 4 6 \n Not Low 13 (100%) 3 (75.0%) 5 (83.3%) \n 1 0 0 1 (16.7%) \n 2 0 1 (25.0%) 0 \n 3 (n) 8 2 6 \n Not Low 6 (75.0%) 1 (50.0%) 5 (83.3%) \n 1 0 1 (50.0%) 0 \n 2 0 0 1 (16.7%) \n 3 2 (25.0%) 0 0 \n 4 (n) 2 4 3 \n Not Low 2 (100%) 4 (100%) 1 (33.3%) \n 1 0 0 1 (33.3%) \n 3 0 0 1 (33.3%) \n WEEK 5 DAY 36 \n Not Low (n) 115 112 111 \n Not Low 102 (88.7%) 94 (83.9%) 96 (86.5%) \n 1 2 (1.7%) 4 (3.6%) 6 (5.4%) \n 2 5 (4.3%) 7 (6.2%) 2 (1.8%) \n 3 3 (2.6%) 5 (4.5%) 5 (4.5%) \n 4 3 (2.6%) 2 (1.8%) 2 (1.8%) \n 1 (n) 5 7 6 \n Not Low 5 (100%) 4 (57.1%) 5 (83.3%) \n 1 0 1 (14.3%) 1 (16.7%) \n 2 0 2 (28.6%) 0 \n 2 (n) 5 11 6 \n Not Low 5 (100%) 11 (100%) 6 (100%) \n 3 (n) 8 2 7 \n Not Low 6 (75.0%) 2 (100%) 4 (57.1%) \n 1 1 (12.5%) 0 1 (14.3%) \n 3 1 (12.5%) 0 2 (28.6%) \n 4 (n) 1 2 2 \n Not Low 1 (100%) 2 (100%) 1 (50.0%) \n 1 0 0 1 (50.0%) \n\n\n\n\nNote that when BTOXGR is missing, the grouping variable BTOXGR_GP is now \"Not High\" instead of \"Missing\" compared to Standard Table (High).\n\nCodeadlb_f <- adlb %>% filter(WGRHIVFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- adsl_f %>%\n h_adsl_adlb_merge_using_worst_flag(\n adlb_f,\n worst_flag = c(\"WGRHIVFL\" = \"Y\"),\n by_visit = TRUE,\n no_fillin_visits = c(\"SCREENING\", \"BASELINE\", \"UNSCHEDULED\")\n )\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n mutate(\n ATOXGR_GP = case_when(\n ATOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n ATOXGR == 1 ~ \"1\",\n ATOXGR == 2 ~ \"2\",\n ATOXGR == 3 ~ \"3\",\n ATOXGR == 4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n )\n ) %>%\n mutate(\n BTOXGR_GP = case_when(\n BTOXGR %in% c(0, -1, -2, -3, -4, \"<Missing>\") ~ \"Not High\", # Missing BTOXGR now grouped to \"Not High\"\n BTOXGR == 1 ~ \"1\",\n BTOXGR == 2 ~ \"2\",\n BTOXGR == 3 ~ \"3\",\n BTOXGR == 4 ~ \"4\"\n )\n )\n\nadlb_out <- adlb_out %>% mutate(\n AVISIT = forcats::fct_reorder(AVISIT, AVISITN),\n ATOXGR_GP = factor(ATOXGR_GP, levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\")),\n BTOXGR_GP = factor(BTOXGR_GP, levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n)\n\nadlb_out <- adlb_out %>%\n var_relabel(\n PARAMCD = \"Parameter Code\",\n AVISIT = \"Visit\",\n ATOXGR_GP = \"NCI CTCAE Grade at Visit\",\n BTOXGR_GP = \"Baseline NCI CTCAE Grade\"\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAMCD\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$PARAMCD)\n ) %>%\n split_rows_by(\n \"AVISIT\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$AVISIT)\n ) %>%\n split_rows_by(\n \"ATOXGR_GP\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$ATOXGR_GP)\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\")) %>%\n count_occurrences(\"BTOXGR_GP\", denom = \"n\", drop = TRUE) %>%\n append_varlabels(adlb_out, \"BTOXGR_GP\", indent = 3L) %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f)\n\nresult\n\nParameter Code \n Visit \n NCI CTCAE Grade at Visit A: Drug X B: Placebo C: Combination\n Baseline NCI CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————\nCRP \n WEEK 1 DAY 8 \n Not High (n) 111 110 112 \n Not High 93 (83.8%) 92 (83.6%) 98 (87.5%) \n 1 8 (7.2%) 7 (6.4%) 5 (4.5%) \n 2 2 (1.8%) 6 (5.5%) 7 (6.2%) \n 3 6 (5.4%) 3 (2.7%) 2 (1.8%) \n 4 2 (1.8%) 2 (1.8%) 0 \n 1 (n) 8 11 6 \n Not High 7 (87.5%) 11 (100%) 5 (83.3%) \n 3 1 (12.5%) 0 1 (16.7%) \n 2 (n) 6 4 5 \n Not High 6 (100%) 1 (25.0%) 4 (80.0%) \n 1 0 3 (75.0%) 1 (20.0%) \n 3 (n) 8 3 4 \n Not High 7 (87.5%) 3 (100%) 4 (100%) \n 4 1 (12.5%) 0 0 \n 4 (n) 1 6 5 \n Not High 1 (100%) 5 (83.3%) 4 (80.0%) \n 1 0 0 1 (20.0%) \n 3 0 1 (16.7%) 0 \n WEEK 2 DAY 15 \n Not High (n) 117 113 113 \n Not High 99 (84.6%) 95 (84.1%) 100 (88.5%) \n 1 7 (6.0%) 6 (5.3%) 4 (3.5%) \n 2 2 (1.7%) 6 (5.3%) 6 (5.3%) \n 3 6 (5.1%) 4 (3.5%) 3 (2.7%) \n 4 3 (2.6%) 2 (1.8%) 0 \n 1 (n) 6 9 7 \n Not High 5 (83.3%) 8 (88.9%) 6 (85.7%) \n 1 0 1 (11.1%) 0 \n 2 0 0 1 (14.3%) \n 3 1 (16.7%) 0 0 \n 2 (n) 4 4 6 \n Not High 4 (100%) 4 (100%) 3 (50.0%) \n 1 0 0 3 (50.0%) \n 3 (n) 5 3 5 \n Not High 4 (80.0%) 2 (66.7%) 5 (100%) \n 1 1 (20.0%) 1 (33.3%) 0 \n 4 (n) 2 5 1 \n Not High 2 (100%) 3 (60.0%) 1 (100%) \n 1 0 2 (40.0%) 0 \n WEEK 3 DAY 22 \n Not High (n) 110 111 114 \n Not High 92 (83.6%) 94 (84.7%) 98 (86.0%) \n 1 8 (7.3%) 9 (8.1%) 7 (6.1%) \n 2 2 (1.8%) 5 (4.5%) 6 (5.3%) \n 3 5 (4.5%) 2 (1.8%) 3 (2.6%) \n 4 3 (2.7%) 1 (0.9%) 0 \n 1 (n) 7 8 7 \n Not High 7 (100%) 5 (62.5%) 6 (85.7%) \n 1 0 1 (12.5%) 0 \n 2 0 1 (12.5%) 1 (14.3%) \n 3 0 1 (12.5%) 0 \n 2 (n) 9 7 5 \n Not High 9 (100%) 6 (85.7%) 5 (100%) \n 3 0 1 (14.3%) 0 \n 3 (n) 6 3 4 \n Not High 5 (83.3%) 2 (66.7%) 4 (100%) \n 3 1 (16.7%) 0 0 \n 4 0 1 (33.3%) 0 \n 4 (n) 2 5 2 \n Not High 1 (50.0%) 5 (100%) 2 (100%) \n 3 1 (50.0%) 0 0 \n WEEK 4 DAY 29 \n Not High (n) 115 117 113 \n Not High 97 (84.3%) 101 (86.3%) 99 (87.6%) \n 1 8 (7.0%) 7 (6.0%) 6 (5.3%) \n 2 2 (1.7%) 6 (5.1%) 5 (4.4%) \n 3 7 (6.1%) 3 (2.6%) 3 (2.7%) \n 4 1 (0.9%) 0 0 \n 1 (n) 4 3 11 \n Not High 4 (100%) 2 (66.7%) 10 (90.9%) \n 2 0 0 1 (9.1%) \n 4 0 1 (33.3%) 0 \n 2 (n) 6 4 2 \n Not High 6 (100%) 3 (75.0%) 2 (100%) \n 1 0 1 (25.0%) 0 \n 3 (n) 6 7 4 \n Not High 5 (83.3%) 4 (57.1%) 4 (100%) \n 1 0 1 (14.3%) 0 \n 3 0 1 (14.3%) 0 \n 4 1 (16.7%) 1 (14.3%) 0 \n 4 (n) 3 3 2 \n Not High 2 (66.7%) 2 (66.7%) 0 \n 1 0 1 (33.3%) 1 (50.0%) \n 2 0 0 1 (50.0%) \n 4 1 (33.3%) 0 0 \n WEEK 5 DAY 36 \n Not High (n) 111 111 119 \n Not High 95 (85.6%) 95 (85.6%) 104 (87.4%) \n 1 6 (5.4%) 8 (7.2%) 6 (5.0%) \n 2 1 (0.9%) 5 (4.5%) 6 (5.0%) \n 3 6 (5.4%) 2 (1.8%) 3 (2.5%) \n 4 3 (2.7%) 1 (0.9%) 0 \n 1 (n) 8 11 5 \n Not High 7 (87.5%) 9 (81.8%) 4 (80.0%) \n 1 0 1 (9.1%) 0 \n 2 0 0 1 (20.0%) \n 3 1 (12.5%) 1 (9.1%) 0 \n 2 (n) 7 6 3 \n Not High 5 (71.4%) 3 (50.0%) 2 (66.7%) \n 1 1 (14.3%) 1 (16.7%) 1 (33.3%) \n 2 1 (14.3%) 1 (16.7%) 0 \n 4 0 1 (16.7%) 0 \n 3 (n) 3 3 4 \n Not High 3 (100%) 3 (100%) 4 (100%) \n 4 (n) 5 3 1 \n Not High 4 (80.0%) 2 (66.7%) 1 (100%) \n 1 1 (20.0%) 0 0 \n 3 0 1 (33.3%) 0 \n\n\n\n\nPre-processing is the same as for Standard Table (High), but in order to keep all levels, the drop argument in count_occurrences is set to FALSE.\n\nCodeadlb_f <- adlb %>% filter(WGRHIVFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- adsl_f %>%\n h_adsl_adlb_merge_using_worst_flag(\n adlb_f,\n worst_flag = c(\"WGRHIVFL\" = \"Y\"),\n by_visit = TRUE,\n no_fillin_visits = c(\"SCREENING\", \"BASELINE\", \"UNSCHEDULED\")\n )\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n mutate(\n ATOXGR_GP = case_when(\n ATOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n ATOXGR == 1 ~ \"1\",\n ATOXGR == 2 ~ \"2\",\n ATOXGR == 3 ~ \"3\",\n ATOXGR == 4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n )\n ) %>%\n mutate(\n BTOXGR_GP = case_when(\n BTOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n BTOXGR == 1 ~ \"1\",\n BTOXGR == 2 ~ \"2\",\n BTOXGR == 3 ~ \"3\",\n BTOXGR == 4 ~ \"4\",\n BTOXGR == \"<Missing>\" ~ \"Missing\"\n )\n )\n\nadlb_out <- adlb_out %>% mutate(\n AVISIT = forcats::fct_reorder(AVISIT, AVISITN),\n ATOXGR_GP = factor(ATOXGR_GP, levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\")),\n BTOXGR_GP = factor(BTOXGR_GP, levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n)\n\nadlb_out <- adlb_out %>%\n var_relabel(\n PARAMCD = \"Parameter Code\",\n AVISIT = \"Visit\",\n ATOXGR_GP = \"NCI CTCAE Grade at Visit\",\n BTOXGR_GP = \"Baseline NCI CTCAE Grade\"\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAMCD\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$PARAMCD)\n ) %>%\n split_rows_by(\n \"AVISIT\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb_out$AVISIT)\n ) %>%\n split_rows_by(\n \"ATOXGR_GP\",\n split_fun = keep_split_levels(c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\")),\n label_pos = \"topleft\",\n split_label = obj_label(adlb_out$ATOXGR_GP)\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\")) %>%\n count_occurrences(\"BTOXGR_GP\", denom = \"n\", drop = FALSE) %>%\n append_varlabels(adlb_out, \"BTOXGR_GP\", indent = 3L) %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f)\n\nresult\n\nParameter Code \n Visit \n NCI CTCAE Grade at Visit A: Drug X B: Placebo C: Combination\n Baseline NCI CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————\nCRP \n WEEK 1 DAY 8 \n Not High (n) 111 110 112 \n Not High 93 (83.8%) 92 (83.6%) 98 (87.5%) \n 1 8 (7.2%) 7 (6.4%) 5 (4.5%) \n 2 2 (1.8%) 6 (5.5%) 7 (6.2%) \n 3 6 (5.4%) 3 (2.7%) 2 (1.8%) \n 4 2 (1.8%) 2 (1.8%) 0 \n Missing 0 0 0 \n 1 (n) 8 11 6 \n Not High 7 (87.5%) 11 (100%) 5 (83.3%) \n 1 0 0 0 \n 2 0 0 0 \n 3 1 (12.5%) 0 1 (16.7%) \n 4 0 0 0 \n Missing 0 0 0 \n 2 (n) 6 4 5 \n Not High 6 (100%) 1 (25.0%) 4 (80.0%) \n 1 0 3 (75.0%) 1 (20.0%) \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 3 (n) 8 3 4 \n Not High 7 (87.5%) 3 (100%) 4 (100%) \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 1 (12.5%) 0 0 \n Missing 0 0 0 \n 4 (n) 1 6 5 \n Not High 1 (100%) 5 (83.3%) 4 (80.0%) \n 1 0 0 1 (20.0%) \n 2 0 0 0 \n 3 0 1 (16.7%) 0 \n 4 0 0 0 \n Missing 0 0 0 \n Missing (n) 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n WEEK 2 DAY 15 \n Not High (n) 117 113 113 \n Not High 99 (84.6%) 95 (84.1%) 100 (88.5%) \n 1 7 (6.0%) 6 (5.3%) 4 (3.5%) \n 2 2 (1.7%) 6 (5.3%) 6 (5.3%) \n 3 6 (5.1%) 4 (3.5%) 3 (2.7%) \n 4 3 (2.6%) 2 (1.8%) 0 \n Missing 0 0 0 \n 1 (n) 6 9 7 \n Not High 5 (83.3%) 8 (88.9%) 6 (85.7%) \n 1 0 1 (11.1%) 0 \n 2 0 0 1 (14.3%) \n 3 1 (16.7%) 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 2 (n) 4 4 6 \n Not High 4 (100%) 4 (100%) 3 (50.0%) \n 1 0 0 3 (50.0%) \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 3 (n) 5 3 5 \n Not High 4 (80.0%) 2 (66.7%) 5 (100%) \n 1 1 (20.0%) 1 (33.3%) 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 4 (n) 2 5 1 \n Not High 2 (100%) 3 (60.0%) 1 (100%) \n 1 0 2 (40.0%) 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n Missing (n) 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n WEEK 3 DAY 22 \n Not High (n) 110 111 114 \n Not High 92 (83.6%) 94 (84.7%) 98 (86.0%) \n 1 8 (7.3%) 9 (8.1%) 7 (6.1%) \n 2 2 (1.8%) 5 (4.5%) 6 (5.3%) \n 3 5 (4.5%) 2 (1.8%) 3 (2.6%) \n 4 3 (2.7%) 1 (0.9%) 0 \n Missing 0 0 0 \n 1 (n) 7 8 7 \n Not High 7 (100%) 5 (62.5%) 6 (85.7%) \n 1 0 1 (12.5%) 0 \n 2 0 1 (12.5%) 1 (14.3%) \n 3 0 1 (12.5%) 0 \n 4 0 0 0 \n Missing 0 0 0 \n 2 (n) 9 7 5 \n Not High 9 (100%) 6 (85.7%) 5 (100%) \n 1 0 0 0 \n 2 0 0 0 \n 3 0 1 (14.3%) 0 \n 4 0 0 0 \n Missing 0 0 0 \n 3 (n) 6 3 4 \n Not High 5 (83.3%) 2 (66.7%) 4 (100%) \n 1 0 0 0 \n 2 0 0 0 \n 3 1 (16.7%) 0 0 \n 4 0 1 (33.3%) 0 \n Missing 0 0 0 \n 4 (n) 2 5 2 \n Not High 1 (50.0%) 5 (100%) 2 (100%) \n 1 0 0 0 \n 2 0 0 0 \n 3 1 (50.0%) 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n Missing (n) 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n WEEK 4 DAY 29 \n Not High (n) 115 117 113 \n Not High 97 (84.3%) 101 (86.3%) 99 (87.6%) \n 1 8 (7.0%) 7 (6.0%) 6 (5.3%) \n 2 2 (1.7%) 6 (5.1%) 5 (4.4%) \n 3 7 (6.1%) 3 (2.6%) 3 (2.7%) \n 4 1 (0.9%) 0 0 \n Missing 0 0 0 \n 1 (n) 4 3 11 \n Not High 4 (100%) 2 (66.7%) 10 (90.9%) \n 1 0 0 0 \n 2 0 0 1 (9.1%) \n 3 0 0 0 \n 4 0 1 (33.3%) 0 \n Missing 0 0 0 \n 2 (n) 6 4 2 \n Not High 6 (100%) 3 (75.0%) 2 (100%) \n 1 0 1 (25.0%) 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 3 (n) 6 7 4 \n Not High 5 (83.3%) 4 (57.1%) 4 (100%) \n 1 0 1 (14.3%) 0 \n 2 0 0 0 \n 3 0 1 (14.3%) 0 \n 4 1 (16.7%) 1 (14.3%) 0 \n Missing 0 0 0 \n 4 (n) 3 3 2 \n Not High 2 (66.7%) 2 (66.7%) 0 \n 1 0 1 (33.3%) 1 (50.0%) \n 2 0 0 1 (50.0%) \n 3 0 0 0 \n 4 1 (33.3%) 0 0 \n Missing 0 0 0 \n Missing (n) 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n WEEK 5 DAY 36 \n Not High (n) 111 111 119 \n Not High 95 (85.6%) 95 (85.6%) 104 (87.4%) \n 1 6 (5.4%) 8 (7.2%) 6 (5.0%) \n 2 1 (0.9%) 5 (4.5%) 6 (5.0%) \n 3 6 (5.4%) 2 (1.8%) 3 (2.5%) \n 4 3 (2.7%) 1 (0.9%) 0 \n Missing 0 0 0 \n 1 (n) 8 11 5 \n Not High 7 (87.5%) 9 (81.8%) 4 (80.0%) \n 1 0 1 (9.1%) 0 \n 2 0 0 1 (20.0%) \n 3 1 (12.5%) 1 (9.1%) 0 \n 4 0 0 0 \n Missing 0 0 0 \n 2 (n) 7 6 3 \n Not High 5 (71.4%) 3 (50.0%) 2 (66.7%) \n 1 1 (14.3%) 1 (16.7%) 1 (33.3%) \n 2 1 (14.3%) 1 (16.7%) 0 \n 3 0 0 0 \n 4 0 1 (16.7%) 0 \n Missing 0 0 0 \n 3 (n) 3 3 4 \n Not High 3 (100%) 3 (100%) 4 (100%) \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 4 (n) 5 3 1 \n Not High 4 (80.0%) 2 (66.7%) 1 (100%) \n 1 1 (20.0%) 0 0 \n 2 0 0 0 \n 3 0 1 (33.3%) 0 \n 4 0 0 0 \n Missing 0 0 0 \n Missing (n) 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADLB\", adlb,\n code = 'ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_shift_by_grade(\n label = \"Grade Laboratory Abnormality Table\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n paramcd = choices_selected(\n choices = value_choices(adlb, \"PARAMCD\", \"PARAM\"),\n selected = \"ALT\"\n ),\n worst_flag_var = choices_selected(\n choices = variable_choices(adlb, subset = c(\"WGRLOVFL\", \"WGRLOFL\", \"WGRHIVFL\", \"WGRHIFL\")),\n selected = c(\"WGRLOVFL\")\n ),\n worst_flag_indicator = choices_selected(\n value_choices(adlb, \"WGRLOVFL\"),\n selected = \"Y\", fixed = TRUE\n ),\n anl_toxgrade_var = choices_selected(\n choices = variable_choices(adlb, subset = c(\"ATOXGR\")),\n selected = c(\"ATOXGR\"),\n fixed = TRUE\n ),\n base_toxgrade_var = choices_selected(\n choices = variable_choices(adlb, subset = c(\"BTOXGR\")),\n selected = c(\"BTOXGR\"),\n fixed = TRUE\n ),\n add_total = FALSE\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\")\n )\n)\n\n[INFO] 2023-08-04 15:20:36.1473 pid:9434 token:[] teal.modules.clinical Initializing tm_t_shift_by_grade\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] dplyr_1.1.2 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt13.lock'.\n\n\nDownload" }, { "objectID": "tables/lab-results/lbt10_bl.html", @@ -207,35 +207,35 @@ "href": "tables/lab-results/lbt14.html", "title": "LBT14", "section": "", - "text": "Data Setup\nStandard Table (High)\nStandard Table (Low)\nTable Without Patients with Missing Baseline (High)\nTable with Missing Baseline Considered as Grade 0 (Low)\nTable with Fill-In of Grades\nTeal\nSession Info\n\n\n\nPlease note that for each variant, the adlb dataset needs to be filtered on correct flags like WGRLOFL, WGRHIFL, et al., otherwise the layout function will not return the correct counts. There is an option to create a record for a lab test where no record is found at that visit. If you specified add_derived_type = \"PHANTOM\" & dtype_phantom_cond, you don’t have to use the h_adsl_adlb_merge_using_worst_flag function to preprocess your adlb dataset. Otherwise please follow the pre-processing steps below before applying the layout functions.\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\n# Please note that in real clinical data, population flag like SAFFL, and parameter category like PARCAT2 needs to be\n# selected properly.\nadsl_f <- adsl %>% filter(SAFFL == \"Y\")\nadlb <- adlb %>% filter(SAFFL == \"Y\")\n\n\n\n\nNote that the worst laboratory flag (below WGRHIFL) must be selected appropriately in the pre-processing step. New grouping variables ATOXGR_GP (post-baseline) and BTOXGR_GP (baseline) are created to display the correct output.\n\nCodeadlb_f <- adlb %>% filter(WGRHIFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- h_adsl_adlb_merge_using_worst_flag(adsl_f, adlb_f, worst_flag = c(\"WGRHIFL\" = \"Y\"))\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n mutate(\n ATOXGR_GP = factor(case_when(\n ATOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n ATOXGR == 1 ~ \"1\",\n ATOXGR == 2 ~ \"2\",\n ATOXGR == 3 ~ \"3\",\n ATOXGR == 4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n ), levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n ) %>%\n mutate(\n BTOXGR_GP = factor(case_when(\n BTOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n BTOXGR == 1 ~ \"1\",\n BTOXGR == 2 ~ \"2\",\n BTOXGR == 3 ~ \"3\",\n BTOXGR == 4 ~ \"4\",\n BTOXGR == \"<Missing>\" ~ \"Missing\"\n ), levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_fun = drop_split_levels,\n label_pos = \"topleft\",\n split_label = \"Parameter\"\n ) %>%\n split_rows_by(\n \"BTOXGR_GP\",\n label_pos = \"topleft\",\n split_label = \" Baseline NCI-CTCAE Grade\",\n indent_mod = 2L\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\"), unique_count_suffix = FALSE) %>%\n count_occurrences_by_grade(\"ATOXGR_GP\", denom = \"n\", drop = FALSE, .indent_mods = 3L) %>%\n append_topleft(\" Post-baseline NCI-CTCAE Grade\") %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f) %>%\n prune_table()\n\nresult\n\nParameter \n Baseline NCI-CTCAE Grade A: Drug X B: Placebo C: Combination\n Post-baseline NCI-CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement \n Not High 134 134 132 \n Not High 134 (100%) 134 (100%) 132 (100%) \nC-Reactive Protein Measurement \n Not High 114 112 115 \n Not High 45 (33.6%) 55 (41.0%) 57 (43.2%) \n 1 18 (13.4%) 18 (13.4%) 19 (14.4%) \n 2 19 (14.2%) 10 (7.5%) 11 (8.3%) \n 3 22 (16.4%) 13 (9.7%) 20 (15.2%) \n 4 10 (7.5%) 16 (11.9%) 8 (6.1%) \n 1 8 10 7 \n Not High 5 (3.7%) 2 (1.5%) 2 (1.5%) \n 1 0 1 (0.7%) 0 \n 2 1 (0.7%) 3 (2.2%) 3 (2.3%) \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 3 (2.2%) 2 (1.5%) \n 2 2 6 7 \n Not High 1 (0.7%) 4 (3.0%) 4 (3.0%) \n 1 0 1 (0.7%) 2 (1.5%) \n 2 1 (0.7%) 1 (0.7%) 0 \n 4 0 0 1 (0.8%) \n 3 7 4 3 \n Not High 3 (2.2%) 0 2 (1.5%) \n 1 2 (1.5%) 1 (0.7%) 1 (0.8%) \n 2 0 1 (0.7%) 0 \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 1 (0.7%) 0 \n 4 3 2 0 \n Not High 1 (0.7%) 0 0 \n 1 0 1 (0.7%) 0 \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 0 0 \nImmunoglobulin A Measurement \n Not High 119 116 113 \n Not High 55 (41.0%) 54 (40.3%) 51 (38.6%) \n 1 18 (13.4%) 11 (8.2%) 15 (11.4%) \n 2 14 (10.4%) 22 (16.4%) 19 (14.4%) \n 3 20 (14.9%) 19 (14.2%) 20 (15.2%) \n 4 12 (9.0%) 10 (7.5%) 8 (6.1%) \n 1 5 4 2 \n Not High 4 (3.0%) 1 (0.7%) 2 (1.5%) \n 2 1 (0.7%) 1 (0.7%) 0 \n 3 0 2 (1.5%) 0 \n 2 4 4 5 \n Not High 2 (1.5%) 3 (2.2%) 3 (2.3%) \n 1 1 (0.7%) 0 2 (1.5%) \n 3 1 (0.7%) 0 0 \n 4 0 1 (0.7%) 0 \n 3 4 5 11 \n Not High 3 (2.2%) 1 (0.7%) 6 (4.5%) \n 1 0 1 (0.7%) 1 (0.8%) \n 2 1 (0.7%) 0 0 \n 3 0 2 (1.5%) 3 (2.3%) \n 4 0 1 (0.7%) 1 (0.8%) \n 4 2 5 1 \n Not High 0 3 (2.2%) 1 (0.8%) \n 2 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 1 (0.7%) 0 \n\n\n\n\nNote that the worst laboratory flag (below WGRLOFL) must be selected appropriately in the pre-processing step. New grouping variables ATOXGR_GP (post-baseline) and BTOXGR_GP (baseline) are created to display the correct output.\n\nCodeadlb_f <- adlb %>% filter(WGRLOFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- h_adsl_adlb_merge_using_worst_flag(adsl_f, adlb_f, worst_flag = c(\"WGRLOFL\" = \"Y\"))\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n mutate(\n ATOXGR_GP = factor(case_when(\n ATOXGR %in% c(0, 1, 2, 3, 4) ~ \"Not Low\",\n ATOXGR == -1 ~ \"1\",\n ATOXGR == -2 ~ \"2\",\n ATOXGR == -3 ~ \"3\",\n ATOXGR == -4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n ), levels = c(\"Not Low\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n ) %>%\n mutate(\n BTOXGR_GP = factor(case_when(\n BTOXGR %in% c(0, 1, 2, 3, 4) ~ \"Not Low\",\n BTOXGR == -1 ~ \"1\",\n BTOXGR == -2 ~ \"2\",\n BTOXGR == -3 ~ \"3\",\n BTOXGR == -4 ~ \"4\",\n BTOXGR == \"<Missing>\" ~ \"Missing\"\n ), levels = c(\"Not Low\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_fun = drop_split_levels,\n label_pos = \"topleft\",\n split_label = \"Parameter\"\n ) %>%\n split_rows_by(\n \"BTOXGR_GP\",\n label_pos = \"topleft\",\n split_label = \" Baseline NCI-CTCAE Grade\",\n indent_mod = 2L\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\"), unique_count_suffix = FALSE) %>%\n count_occurrences_by_grade(\"ATOXGR_GP\", denom = \"n\", drop = FALSE, .indent_mods = 3L) %>%\n append_topleft(\" Post-baseline NCI-CTCAE Grade\") %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f) %>%\n prune_table()\n\nresult\n\nParameter \n Baseline NCI-CTCAE Grade A: Drug X B: Placebo C: Combination\n Post-baseline NCI-CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement \n Not Low 113 117 123 \n Not Low 56 (41.8%) 55 (41.0%) 62 (47.0%) \n 1 11 (8.2%) 9 (6.7%) 15 (11.4%) \n 2 15 (11.2%) 23 (17.2%) 16 (12.1%) \n 3 15 (11.2%) 21 (15.7%) 13 (9.8%) \n 4 16 (11.9%) 9 (6.7%) 17 (12.9%) \n 1 6 6 4 \n Not Low 3 (2.2%) 5 (3.7%) 3 (2.3%) \n 1 3 (2.2%) 0 0 \n 4 0 1 (0.7%) 1 (0.8%) \n 2 8 5 1 \n Not Low 5 (3.7%) 3 (2.2%) 0 \n 1 0 1 (0.7%) 0 \n 2 2 (1.5%) 0 0 \n 3 0 1 (0.7%) 1 (0.8%) \n 4 1 (0.7%) 0 0 \n 3 3 3 2 \n Not Low 0 1 (0.7%) 0 \n 1 1 (0.7%) 0 0 \n 2 1 (0.7%) 0 1 (0.8%) \n 3 1 (0.7%) 2 (1.5%) 1 (0.8%) \n 4 4 3 2 \n Not Low 4 (3.0%) 1 (0.7%) 1 (0.8%) \n 1 0 1 (0.7%) 0 \n 2 0 1 (0.7%) 0 \n 3 0 0 1 (0.8%) \nC-Reactive Protein Measurement \n Not Low 119 113 112 \n Not Low 41 (30.6%) 42 (31.3%) 50 (37.9%) \n 1 20 (14.9%) 18 (13.4%) 11 (8.3%) \n 2 24 (17.9%) 20 (14.9%) 14 (10.6%) \n 3 25 (18.7%) 18 (13.4%) 21 (15.9%) \n 4 9 (6.7%) 15 (11.2%) 16 (12.1%) \n 1 3 5 9 \n Not Low 2 (1.5%) 2 (1.5%) 2 (1.5%) \n 2 0 1 (0.7%) 3 (2.3%) \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 0 1 (0.7%) 4 (3.0%) \n 2 5 9 2 \n Not Low 3 (2.2%) 4 (3.0%) 1 (0.8%) \n 1 1 (0.7%) 4 (3.0%) 0 \n 3 0 1 (0.7%) 1 (0.8%) \n 4 1 (0.7%) 0 0 \n 3 4 5 7 \n Not Low 1 (0.7%) 4 (3.0%) 2 (1.5%) \n 1 0 0 1 (0.8%) \n 2 0 0 1 (0.8%) \n 3 3 (2.2%) 1 (0.7%) 2 (1.5%) \n 4 0 0 1 (0.8%) \n 4 3 2 2 \n Not Low 3 (2.2%) 1 (0.7%) 0 \n 2 0 1 (0.7%) 0 \n 3 0 0 1 (0.8%) \n 4 0 0 1 (0.8%) \nImmunoglobulin A Measurement \n Not Low 134 134 132 \n Not Low 134 (100%) 134 (100%) 132 (100%) \n\n\n\n\nNote that missing baseline values are filtered out in the pre-processing step.\n\nCodeadlb_f <- adlb %>% filter(WGRHIFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- h_adsl_adlb_merge_using_worst_flag(adsl_f, adlb_f, worst_flag = c(\"WGRHIFL\" = \"Y\"))\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n filter(BTOXGR != \"<Missing>\") %>%\n mutate(\n ATOXGR_GP = factor(case_when(\n ATOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n ATOXGR == 1 ~ \"1\",\n ATOXGR == 2 ~ \"2\",\n ATOXGR == 3 ~ \"3\",\n ATOXGR == 4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n ), levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n ) %>%\n mutate(\n BTOXGR_GP = factor(case_when(\n BTOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n BTOXGR == 1 ~ \"1\",\n BTOXGR == 2 ~ \"2\",\n BTOXGR == 3 ~ \"3\",\n BTOXGR == 4 ~ \"4\"\n ), levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\"))\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_fun = drop_split_levels,\n label_pos = \"topleft\",\n split_label = \"Parameter\"\n ) %>%\n split_rows_by(\n \"BTOXGR_GP\",\n label_pos = \"topleft\",\n split_label = \" Baseline NCI-CTCAE Grade\",\n indent_mod = 2L\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\"), unique_count_suffix = FALSE) %>%\n count_occurrences_by_grade(\"ATOXGR_GP\", denom = \"n\", drop = FALSE, .indent_mods = 3L) %>%\n append_topleft(\" Post-baseline NCI-CTCAE Grade\") %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f) %>%\n prune_table()\n\nresult\n\nParameter \n Baseline NCI-CTCAE Grade A: Drug X B: Placebo C: Combination\n Post-baseline NCI-CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement \n Not High 134 134 132 \n Not High 134 (100%) 134 (100%) 132 (100%) \nC-Reactive Protein Measurement \n Not High 114 112 115 \n Not High 45 (33.6%) 55 (41.0%) 57 (43.2%) \n 1 18 (13.4%) 18 (13.4%) 19 (14.4%) \n 2 19 (14.2%) 10 (7.5%) 11 (8.3%) \n 3 22 (16.4%) 13 (9.7%) 20 (15.2%) \n 4 10 (7.5%) 16 (11.9%) 8 (6.1%) \n 1 8 10 7 \n Not High 5 (3.7%) 2 (1.5%) 2 (1.5%) \n 1 0 1 (0.7%) 0 \n 2 1 (0.7%) 3 (2.2%) 3 (2.3%) \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 3 (2.2%) 2 (1.5%) \n 2 2 6 7 \n Not High 1 (0.7%) 4 (3.0%) 4 (3.0%) \n 1 0 1 (0.7%) 2 (1.5%) \n 2 1 (0.7%) 1 (0.7%) 0 \n 4 0 0 1 (0.8%) \n 3 7 4 3 \n Not High 3 (2.2%) 0 2 (1.5%) \n 1 2 (1.5%) 1 (0.7%) 1 (0.8%) \n 2 0 1 (0.7%) 0 \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 1 (0.7%) 0 \n 4 3 2 0 \n Not High 1 (0.7%) 0 0 \n 1 0 1 (0.7%) 0 \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 0 0 \nImmunoglobulin A Measurement \n Not High 119 116 113 \n Not High 55 (41.0%) 54 (40.3%) 51 (38.6%) \n 1 18 (13.4%) 11 (8.2%) 15 (11.4%) \n 2 14 (10.4%) 22 (16.4%) 19 (14.4%) \n 3 20 (14.9%) 19 (14.2%) 20 (15.2%) \n 4 12 (9.0%) 10 (7.5%) 8 (6.1%) \n 1 5 4 2 \n Not High 4 (3.0%) 1 (0.7%) 2 (1.5%) \n 2 1 (0.7%) 1 (0.7%) 0 \n 3 0 2 (1.5%) 0 \n 2 4 4 5 \n Not High 2 (1.5%) 3 (2.2%) 3 (2.3%) \n 1 1 (0.7%) 0 2 (1.5%) \n 3 1 (0.7%) 0 0 \n 4 0 1 (0.7%) 0 \n 3 4 5 11 \n Not High 3 (2.2%) 1 (0.7%) 6 (4.5%) \n 1 0 1 (0.7%) 1 (0.8%) \n 2 1 (0.7%) 0 0 \n 3 0 2 (1.5%) 3 (2.3%) \n 4 0 1 (0.7%) 1 (0.8%) \n 4 2 5 1 \n Not High 0 3 (2.2%) 1 (0.8%) \n 2 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 1 (0.7%) 0 \n\n\n\n\nNote that when BTOXGR is missing, the grouping variable BTOXGR_GP now is \"Not Low\" instead of \"Missing\" compared to Standard Table (Low).\n\nCodeadlb_f <- adlb %>% filter(WGRLOFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- h_adsl_adlb_merge_using_worst_flag(adsl_f, adlb_f, worst_flag = c(\"WGRLOFL\" = \"Y\"))\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n mutate(\n ATOXGR_GP = factor(case_when(\n ATOXGR %in% c(0, 1, 2, 3, 4) ~ \"Not Low\",\n ATOXGR == -1 ~ \"1\",\n ATOXGR == -2 ~ \"2\",\n ATOXGR == -3 ~ \"3\",\n ATOXGR == -4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n ), levels = c(\"Not Low\", \"1\", \"2\", \"3\", \"4\"))\n ) %>%\n mutate(\n BTOXGR_GP = factor(case_when(\n BTOXGR %in% c(0, 1, 2, 3, 4, \"<Missing>\") ~ \"Not Low\",\n BTOXGR == -1 ~ \"1\",\n BTOXGR == -2 ~ \"2\",\n BTOXGR == -3 ~ \"3\",\n BTOXGR == -4 ~ \"4\"\n ), levels = c(\"Not Low\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_fun = drop_split_levels,\n label_pos = \"topleft\",\n split_label = \"Parameter\"\n ) %>%\n split_rows_by(\n \"BTOXGR_GP\",\n label_pos = \"topleft\",\n split_label = \" Baseline NCI-CTCAE Grade\",\n indent_mod = 2L\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\"), unique_count_suffix = FALSE) %>%\n count_occurrences_by_grade(\"ATOXGR_GP\", denom = \"n\", drop = FALSE, .indent_mods = 3L) %>%\n append_topleft(\" Post-baseline NCI-CTCAE Grade\") %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f) %>%\n prune_table()\n\nresult\n\nParameter \n Baseline NCI-CTCAE Grade A: Drug X B: Placebo C: Combination\n Post-baseline NCI-CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement \n Not Low 113 117 123 \n Not Low 56 (41.8%) 55 (41.0%) 62 (47.0%) \n 1 11 (8.2%) 9 (6.7%) 15 (11.4%) \n 2 15 (11.2%) 23 (17.2%) 16 (12.1%) \n 3 15 (11.2%) 21 (15.7%) 13 (9.8%) \n 4 16 (11.9%) 9 (6.7%) 17 (12.9%) \n 1 6 6 4 \n Not Low 3 (2.2%) 5 (3.7%) 3 (2.3%) \n 1 3 (2.2%) 0 0 \n 4 0 1 (0.7%) 1 (0.8%) \n 2 8 5 1 \n Not Low 5 (3.7%) 3 (2.2%) 0 \n 1 0 1 (0.7%) 0 \n 2 2 (1.5%) 0 0 \n 3 0 1 (0.7%) 1 (0.8%) \n 4 1 (0.7%) 0 0 \n 3 3 3 2 \n Not Low 0 1 (0.7%) 0 \n 1 1 (0.7%) 0 0 \n 2 1 (0.7%) 0 1 (0.8%) \n 3 1 (0.7%) 2 (1.5%) 1 (0.8%) \n 4 4 3 2 \n Not Low 4 (3.0%) 1 (0.7%) 1 (0.8%) \n 1 0 1 (0.7%) 0 \n 2 0 1 (0.7%) 0 \n 3 0 0 1 (0.8%) \nC-Reactive Protein Measurement \n Not Low 119 113 112 \n Not Low 41 (30.6%) 42 (31.3%) 50 (37.9%) \n 1 20 (14.9%) 18 (13.4%) 11 (8.3%) \n 2 24 (17.9%) 20 (14.9%) 14 (10.6%) \n 3 25 (18.7%) 18 (13.4%) 21 (15.9%) \n 4 9 (6.7%) 15 (11.2%) 16 (12.1%) \n 1 3 5 9 \n Not Low 2 (1.5%) 2 (1.5%) 2 (1.5%) \n 2 0 1 (0.7%) 3 (2.3%) \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 0 1 (0.7%) 4 (3.0%) \n 2 5 9 2 \n Not Low 3 (2.2%) 4 (3.0%) 1 (0.8%) \n 1 1 (0.7%) 4 (3.0%) 0 \n 3 0 1 (0.7%) 1 (0.8%) \n 4 1 (0.7%) 0 0 \n 3 4 5 7 \n Not Low 1 (0.7%) 4 (3.0%) 2 (1.5%) \n 1 0 0 1 (0.8%) \n 2 0 0 1 (0.8%) \n 3 3 (2.2%) 1 (0.7%) 2 (1.5%) \n 4 0 0 1 (0.8%) \n 4 3 2 2 \n Not Low 3 (2.2%) 1 (0.7%) 0 \n 2 0 1 (0.7%) 0 \n 3 0 0 1 (0.8%) \n 4 0 0 1 (0.8%) \nImmunoglobulin A Measurement \n Not Low 134 134 132 \n Not Low 134 (100%) 134 (100%) 132 (100%) \n\n\n\n\nPre-processing is the same as Standard Table (High), but in order to keep all levels, prune_table() is not applied.\n\nCodeadlb_f <- adlb %>% filter(WGRHIFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- h_adsl_adlb_merge_using_worst_flag(adsl_f, adlb_f, worst_flag = c(\"WGRHIFL\" = \"Y\"))\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n mutate(\n ATOXGR_GP = factor(case_when(\n ATOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n ATOXGR == 1 ~ \"1\",\n ATOXGR == 2 ~ \"2\",\n ATOXGR == 3 ~ \"3\",\n ATOXGR == 4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n ), levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n ) %>%\n mutate(\n BTOXGR_GP = factor(case_when(\n BTOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n BTOXGR == 1 ~ \"1\",\n BTOXGR == 2 ~ \"2\",\n BTOXGR == 3 ~ \"3\",\n BTOXGR == 4 ~ \"4\",\n BTOXGR == \"<Missing>\" ~ \"Missing\"\n ), levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_fun = drop_split_levels,\n label_pos = \"topleft\",\n split_label = \"Parameter\"\n ) %>%\n split_rows_by(\n \"BTOXGR_GP\",\n label_pos = \"topleft\",\n split_label = \" Baseline NCI-CTCAE Grade\",\n indent_mod = 2L\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\"), unique_count_suffix = FALSE) %>%\n count_occurrences_by_grade(\"ATOXGR_GP\", denom = \"n\", drop = FALSE, .indent_mods = 3L) %>%\n append_topleft(\" Post-baseline NCI-CTCAE Grade\") %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f)\n\nresult\n\nParameter \n Baseline NCI-CTCAE Grade A: Drug X B: Placebo C: Combination\n Post-baseline NCI-CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement \n Not High 134 134 132 \n Not High 134 (100%) 134 (100%) 132 (100%) \n Missing 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n 1 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 2 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 3 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 4 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n Missing 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \nC-Reactive Protein Measurement \n Not High 114 112 115 \n Not High 45 (33.6%) 55 (41.0%) 57 (43.2%) \n Missing 0 0 0 \n 1 18 (13.4%) 18 (13.4%) 19 (14.4%) \n 2 19 (14.2%) 10 (7.5%) 11 (8.3%) \n 3 22 (16.4%) 13 (9.7%) 20 (15.2%) \n 4 10 (7.5%) 16 (11.9%) 8 (6.1%) \n 1 8 10 7 \n Not High 5 (3.7%) 2 (1.5%) 2 (1.5%) \n Missing 0 0 0 \n 1 0 1 (0.7%) 0 \n 2 1 (0.7%) 3 (2.2%) 3 (2.3%) \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 3 (2.2%) 2 (1.5%) \n 2 2 6 7 \n Not High 1 (0.7%) 4 (3.0%) 4 (3.0%) \n Missing 0 0 0 \n 1 0 1 (0.7%) 2 (1.5%) \n 2 1 (0.7%) 1 (0.7%) 0 \n 3 0 0 0 \n 4 0 0 1 (0.8%) \n 3 7 4 3 \n Not High 3 (2.2%) 0 2 (1.5%) \n Missing 0 0 0 \n 1 2 (1.5%) 1 (0.7%) 1 (0.8%) \n 2 0 1 (0.7%) 0 \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 1 (0.7%) 0 \n 4 3 2 0 \n Not High 1 (0.7%) 0 0 \n Missing 0 0 0 \n 1 0 1 (0.7%) 0 \n 2 0 0 0 \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 0 0 \n Missing 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \nImmunoglobulin A Measurement \n Not High 119 116 113 \n Not High 55 (41.0%) 54 (40.3%) 51 (38.6%) \n Missing 0 0 0 \n 1 18 (13.4%) 11 (8.2%) 15 (11.4%) \n 2 14 (10.4%) 22 (16.4%) 19 (14.4%) \n 3 20 (14.9%) 19 (14.2%) 20 (15.2%) \n 4 12 (9.0%) 10 (7.5%) 8 (6.1%) \n 1 5 4 2 \n Not High 4 (3.0%) 1 (0.7%) 2 (1.5%) \n Missing 0 0 0 \n 1 0 0 0 \n 2 1 (0.7%) 1 (0.7%) 0 \n 3 0 2 (1.5%) 0 \n 4 0 0 0 \n 2 4 4 5 \n Not High 2 (1.5%) 3 (2.2%) 3 (2.3%) \n Missing 0 0 0 \n 1 1 (0.7%) 0 2 (1.5%) \n 2 0 0 0 \n 3 1 (0.7%) 0 0 \n 4 0 1 (0.7%) 0 \n 3 4 5 11 \n Not High 3 (2.2%) 1 (0.7%) 6 (4.5%) \n Missing 0 0 0 \n 1 0 1 (0.7%) 1 (0.8%) \n 2 1 (0.7%) 0 0 \n 3 0 2 (1.5%) 3 (2.3%) \n 4 0 1 (0.7%) 1 (0.8%) \n 4 2 5 1 \n Not High 0 3 (2.2%) 1 (0.8%) \n Missing 0 0 0 \n 1 0 0 0 \n 2 1 (0.7%) 1 (0.7%) 0 \n 3 0 0 0 \n 4 1 (0.7%) 1 (0.7%) 0 \n Missing 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADLB\", adlb,\n code = 'ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_shift_by_grade(\n label = \"Grade Laboratory Abnormality Table\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n paramcd = choices_selected(\n choices = value_choices(adlb, \"PARAMCD\", \"PARAM\"),\n selected = \"ALT\"\n ),\n worst_flag_var = choices_selected(\n choices = variable_choices(adlb, subset = c(\"WGRLOVFL\", \"WGRLOFL\", \"WGRHIVFL\", \"WGRHIFL\")),\n selected = c(\"WGRHIFL\")\n ),\n worst_flag_indicator = choices_selected(\n value_choices(adlb, \"WGRLOVFL\"),\n selected = \"Y\", fixed = TRUE\n ),\n anl_toxgrade_var = choices_selected(\n choices = variable_choices(adlb, subset = c(\"ATOXGR\")),\n selected = c(\"ATOXGR\"),\n fixed = TRUE\n ),\n base_toxgrade_var = choices_selected(\n choices = variable_choices(adlb, subset = c(\"BTOXGR\")),\n selected = c(\"BTOXGR\"),\n fixed = TRUE\n ),\n add_total = FALSE\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\")\n )\n)\n\n[INFO] 2023-08-04 14:58:39.7538 pid:8484 token:[] teal.modules.clinical Initializing tm_t_shift_by_grade\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] dplyr_1.1.2 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt14.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table (High)\nStandard Table (Low)\nTable Without Patients with Missing Baseline (High)\nTable with Missing Baseline Considered as Grade 0 (Low)\nTable with Fill-In of Grades\nTeal\nSession Info\n\n\n\nPlease note that for each variant, the adlb dataset needs to be filtered on correct flags like WGRLOFL, WGRHIFL, et al., otherwise the layout function will not return the correct counts. There is an option to create a record for a lab test where no record is found at that visit. If you specified add_derived_type = \"PHANTOM\" & dtype_phantom_cond, you don’t have to use the h_adsl_adlb_merge_using_worst_flag function to preprocess your adlb dataset. Otherwise please follow the pre-processing steps below before applying the layout functions.\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\n# Please note that in real clinical data, population flag like SAFFL, and parameter category like PARCAT2 needs to be\n# selected properly.\nadsl_f <- adsl %>% filter(SAFFL == \"Y\")\nadlb <- adlb %>% filter(SAFFL == \"Y\")\n\n\n\n\nNote that the worst laboratory flag (below WGRHIFL) must be selected appropriately in the pre-processing step. New grouping variables ATOXGR_GP (post-baseline) and BTOXGR_GP (baseline) are created to display the correct output.\n\nCodeadlb_f <- adlb %>% filter(WGRHIFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- h_adsl_adlb_merge_using_worst_flag(adsl_f, adlb_f, worst_flag = c(\"WGRHIFL\" = \"Y\"))\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n mutate(\n ATOXGR_GP = factor(case_when(\n ATOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n ATOXGR == 1 ~ \"1\",\n ATOXGR == 2 ~ \"2\",\n ATOXGR == 3 ~ \"3\",\n ATOXGR == 4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n ), levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n ) %>%\n mutate(\n BTOXGR_GP = factor(case_when(\n BTOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n BTOXGR == 1 ~ \"1\",\n BTOXGR == 2 ~ \"2\",\n BTOXGR == 3 ~ \"3\",\n BTOXGR == 4 ~ \"4\",\n BTOXGR == \"<Missing>\" ~ \"Missing\"\n ), levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_fun = drop_split_levels,\n label_pos = \"topleft\",\n split_label = \"Parameter\"\n ) %>%\n split_rows_by(\n \"BTOXGR_GP\",\n label_pos = \"topleft\",\n split_label = \" Baseline NCI-CTCAE Grade\",\n indent_mod = 2L\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\"), unique_count_suffix = FALSE) %>%\n count_occurrences_by_grade(\"ATOXGR_GP\", denom = \"n\", drop = FALSE, .indent_mods = 3L) %>%\n append_topleft(\" Post-baseline NCI-CTCAE Grade\") %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f) %>%\n prune_table()\n\nresult\n\nParameter \n Baseline NCI-CTCAE Grade A: Drug X B: Placebo C: Combination\n Post-baseline NCI-CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement \n Not High 134 134 132 \n Not High 134 (100%) 134 (100%) 132 (100%) \nC-Reactive Protein Measurement \n Not High 114 112 115 \n Not High 45 (33.6%) 55 (41.0%) 57 (43.2%) \n 1 18 (13.4%) 18 (13.4%) 19 (14.4%) \n 2 19 (14.2%) 10 (7.5%) 11 (8.3%) \n 3 22 (16.4%) 13 (9.7%) 20 (15.2%) \n 4 10 (7.5%) 16 (11.9%) 8 (6.1%) \n 1 8 10 7 \n Not High 5 (3.7%) 2 (1.5%) 2 (1.5%) \n 1 0 1 (0.7%) 0 \n 2 1 (0.7%) 3 (2.2%) 3 (2.3%) \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 3 (2.2%) 2 (1.5%) \n 2 2 6 7 \n Not High 1 (0.7%) 4 (3.0%) 4 (3.0%) \n 1 0 1 (0.7%) 2 (1.5%) \n 2 1 (0.7%) 1 (0.7%) 0 \n 4 0 0 1 (0.8%) \n 3 7 4 3 \n Not High 3 (2.2%) 0 2 (1.5%) \n 1 2 (1.5%) 1 (0.7%) 1 (0.8%) \n 2 0 1 (0.7%) 0 \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 1 (0.7%) 0 \n 4 3 2 0 \n Not High 1 (0.7%) 0 0 \n 1 0 1 (0.7%) 0 \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 0 0 \nImmunoglobulin A Measurement \n Not High 119 116 113 \n Not High 55 (41.0%) 54 (40.3%) 51 (38.6%) \n 1 18 (13.4%) 11 (8.2%) 15 (11.4%) \n 2 14 (10.4%) 22 (16.4%) 19 (14.4%) \n 3 20 (14.9%) 19 (14.2%) 20 (15.2%) \n 4 12 (9.0%) 10 (7.5%) 8 (6.1%) \n 1 5 4 2 \n Not High 4 (3.0%) 1 (0.7%) 2 (1.5%) \n 2 1 (0.7%) 1 (0.7%) 0 \n 3 0 2 (1.5%) 0 \n 2 4 4 5 \n Not High 2 (1.5%) 3 (2.2%) 3 (2.3%) \n 1 1 (0.7%) 0 2 (1.5%) \n 3 1 (0.7%) 0 0 \n 4 0 1 (0.7%) 0 \n 3 4 5 11 \n Not High 3 (2.2%) 1 (0.7%) 6 (4.5%) \n 1 0 1 (0.7%) 1 (0.8%) \n 2 1 (0.7%) 0 0 \n 3 0 2 (1.5%) 3 (2.3%) \n 4 0 1 (0.7%) 1 (0.8%) \n 4 2 5 1 \n Not High 0 3 (2.2%) 1 (0.8%) \n 2 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 1 (0.7%) 0 \n\n\n\n\nNote that the worst laboratory flag (below WGRLOFL) must be selected appropriately in the pre-processing step. New grouping variables ATOXGR_GP (post-baseline) and BTOXGR_GP (baseline) are created to display the correct output.\n\nCodeadlb_f <- adlb %>% filter(WGRLOFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- h_adsl_adlb_merge_using_worst_flag(adsl_f, adlb_f, worst_flag = c(\"WGRLOFL\" = \"Y\"))\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n mutate(\n ATOXGR_GP = factor(case_when(\n ATOXGR %in% c(0, 1, 2, 3, 4) ~ \"Not Low\",\n ATOXGR == -1 ~ \"1\",\n ATOXGR == -2 ~ \"2\",\n ATOXGR == -3 ~ \"3\",\n ATOXGR == -4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n ), levels = c(\"Not Low\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n ) %>%\n mutate(\n BTOXGR_GP = factor(case_when(\n BTOXGR %in% c(0, 1, 2, 3, 4) ~ \"Not Low\",\n BTOXGR == -1 ~ \"1\",\n BTOXGR == -2 ~ \"2\",\n BTOXGR == -3 ~ \"3\",\n BTOXGR == -4 ~ \"4\",\n BTOXGR == \"<Missing>\" ~ \"Missing\"\n ), levels = c(\"Not Low\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_fun = drop_split_levels,\n label_pos = \"topleft\",\n split_label = \"Parameter\"\n ) %>%\n split_rows_by(\n \"BTOXGR_GP\",\n label_pos = \"topleft\",\n split_label = \" Baseline NCI-CTCAE Grade\",\n indent_mod = 2L\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\"), unique_count_suffix = FALSE) %>%\n count_occurrences_by_grade(\"ATOXGR_GP\", denom = \"n\", drop = FALSE, .indent_mods = 3L) %>%\n append_topleft(\" Post-baseline NCI-CTCAE Grade\") %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f) %>%\n prune_table()\n\nresult\n\nParameter \n Baseline NCI-CTCAE Grade A: Drug X B: Placebo C: Combination\n Post-baseline NCI-CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement \n Not Low 113 117 123 \n Not Low 56 (41.8%) 55 (41.0%) 62 (47.0%) \n 1 11 (8.2%) 9 (6.7%) 15 (11.4%) \n 2 15 (11.2%) 23 (17.2%) 16 (12.1%) \n 3 15 (11.2%) 21 (15.7%) 13 (9.8%) \n 4 16 (11.9%) 9 (6.7%) 17 (12.9%) \n 1 6 6 4 \n Not Low 3 (2.2%) 5 (3.7%) 3 (2.3%) \n 1 3 (2.2%) 0 0 \n 4 0 1 (0.7%) 1 (0.8%) \n 2 8 5 1 \n Not Low 5 (3.7%) 3 (2.2%) 0 \n 1 0 1 (0.7%) 0 \n 2 2 (1.5%) 0 0 \n 3 0 1 (0.7%) 1 (0.8%) \n 4 1 (0.7%) 0 0 \n 3 3 3 2 \n Not Low 0 1 (0.7%) 0 \n 1 1 (0.7%) 0 0 \n 2 1 (0.7%) 0 1 (0.8%) \n 3 1 (0.7%) 2 (1.5%) 1 (0.8%) \n 4 4 3 2 \n Not Low 4 (3.0%) 1 (0.7%) 1 (0.8%) \n 1 0 1 (0.7%) 0 \n 2 0 1 (0.7%) 0 \n 3 0 0 1 (0.8%) \nC-Reactive Protein Measurement \n Not Low 119 113 112 \n Not Low 41 (30.6%) 42 (31.3%) 50 (37.9%) \n 1 20 (14.9%) 18 (13.4%) 11 (8.3%) \n 2 24 (17.9%) 20 (14.9%) 14 (10.6%) \n 3 25 (18.7%) 18 (13.4%) 21 (15.9%) \n 4 9 (6.7%) 15 (11.2%) 16 (12.1%) \n 1 3 5 9 \n Not Low 2 (1.5%) 2 (1.5%) 2 (1.5%) \n 2 0 1 (0.7%) 3 (2.3%) \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 0 1 (0.7%) 4 (3.0%) \n 2 5 9 2 \n Not Low 3 (2.2%) 4 (3.0%) 1 (0.8%) \n 1 1 (0.7%) 4 (3.0%) 0 \n 3 0 1 (0.7%) 1 (0.8%) \n 4 1 (0.7%) 0 0 \n 3 4 5 7 \n Not Low 1 (0.7%) 4 (3.0%) 2 (1.5%) \n 1 0 0 1 (0.8%) \n 2 0 0 1 (0.8%) \n 3 3 (2.2%) 1 (0.7%) 2 (1.5%) \n 4 0 0 1 (0.8%) \n 4 3 2 2 \n Not Low 3 (2.2%) 1 (0.7%) 0 \n 2 0 1 (0.7%) 0 \n 3 0 0 1 (0.8%) \n 4 0 0 1 (0.8%) \nImmunoglobulin A Measurement \n Not Low 134 134 132 \n Not Low 134 (100%) 134 (100%) 132 (100%) \n\n\n\n\nNote that missing baseline values are filtered out in the pre-processing step.\n\nCodeadlb_f <- adlb %>% filter(WGRHIFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- h_adsl_adlb_merge_using_worst_flag(adsl_f, adlb_f, worst_flag = c(\"WGRHIFL\" = \"Y\"))\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n filter(BTOXGR != \"<Missing>\") %>%\n mutate(\n ATOXGR_GP = factor(case_when(\n ATOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n ATOXGR == 1 ~ \"1\",\n ATOXGR == 2 ~ \"2\",\n ATOXGR == 3 ~ \"3\",\n ATOXGR == 4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n ), levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n ) %>%\n mutate(\n BTOXGR_GP = factor(case_when(\n BTOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n BTOXGR == 1 ~ \"1\",\n BTOXGR == 2 ~ \"2\",\n BTOXGR == 3 ~ \"3\",\n BTOXGR == 4 ~ \"4\"\n ), levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\"))\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_fun = drop_split_levels,\n label_pos = \"topleft\",\n split_label = \"Parameter\"\n ) %>%\n split_rows_by(\n \"BTOXGR_GP\",\n label_pos = \"topleft\",\n split_label = \" Baseline NCI-CTCAE Grade\",\n indent_mod = 2L\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\"), unique_count_suffix = FALSE) %>%\n count_occurrences_by_grade(\"ATOXGR_GP\", denom = \"n\", drop = FALSE, .indent_mods = 3L) %>%\n append_topleft(\" Post-baseline NCI-CTCAE Grade\") %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f) %>%\n prune_table()\n\nresult\n\nParameter \n Baseline NCI-CTCAE Grade A: Drug X B: Placebo C: Combination\n Post-baseline NCI-CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement \n Not High 134 134 132 \n Not High 134 (100%) 134 (100%) 132 (100%) \nC-Reactive Protein Measurement \n Not High 114 112 115 \n Not High 45 (33.6%) 55 (41.0%) 57 (43.2%) \n 1 18 (13.4%) 18 (13.4%) 19 (14.4%) \n 2 19 (14.2%) 10 (7.5%) 11 (8.3%) \n 3 22 (16.4%) 13 (9.7%) 20 (15.2%) \n 4 10 (7.5%) 16 (11.9%) 8 (6.1%) \n 1 8 10 7 \n Not High 5 (3.7%) 2 (1.5%) 2 (1.5%) \n 1 0 1 (0.7%) 0 \n 2 1 (0.7%) 3 (2.2%) 3 (2.3%) \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 3 (2.2%) 2 (1.5%) \n 2 2 6 7 \n Not High 1 (0.7%) 4 (3.0%) 4 (3.0%) \n 1 0 1 (0.7%) 2 (1.5%) \n 2 1 (0.7%) 1 (0.7%) 0 \n 4 0 0 1 (0.8%) \n 3 7 4 3 \n Not High 3 (2.2%) 0 2 (1.5%) \n 1 2 (1.5%) 1 (0.7%) 1 (0.8%) \n 2 0 1 (0.7%) 0 \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 1 (0.7%) 0 \n 4 3 2 0 \n Not High 1 (0.7%) 0 0 \n 1 0 1 (0.7%) 0 \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 0 0 \nImmunoglobulin A Measurement \n Not High 119 116 113 \n Not High 55 (41.0%) 54 (40.3%) 51 (38.6%) \n 1 18 (13.4%) 11 (8.2%) 15 (11.4%) \n 2 14 (10.4%) 22 (16.4%) 19 (14.4%) \n 3 20 (14.9%) 19 (14.2%) 20 (15.2%) \n 4 12 (9.0%) 10 (7.5%) 8 (6.1%) \n 1 5 4 2 \n Not High 4 (3.0%) 1 (0.7%) 2 (1.5%) \n 2 1 (0.7%) 1 (0.7%) 0 \n 3 0 2 (1.5%) 0 \n 2 4 4 5 \n Not High 2 (1.5%) 3 (2.2%) 3 (2.3%) \n 1 1 (0.7%) 0 2 (1.5%) \n 3 1 (0.7%) 0 0 \n 4 0 1 (0.7%) 0 \n 3 4 5 11 \n Not High 3 (2.2%) 1 (0.7%) 6 (4.5%) \n 1 0 1 (0.7%) 1 (0.8%) \n 2 1 (0.7%) 0 0 \n 3 0 2 (1.5%) 3 (2.3%) \n 4 0 1 (0.7%) 1 (0.8%) \n 4 2 5 1 \n Not High 0 3 (2.2%) 1 (0.8%) \n 2 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 1 (0.7%) 0 \n\n\n\n\nNote that when BTOXGR is missing, the grouping variable BTOXGR_GP now is \"Not Low\" instead of \"Missing\" compared to Standard Table (Low).\n\nCodeadlb_f <- adlb %>% filter(WGRLOFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- h_adsl_adlb_merge_using_worst_flag(adsl_f, adlb_f, worst_flag = c(\"WGRLOFL\" = \"Y\"))\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n mutate(\n ATOXGR_GP = factor(case_when(\n ATOXGR %in% c(0, 1, 2, 3, 4) ~ \"Not Low\",\n ATOXGR == -1 ~ \"1\",\n ATOXGR == -2 ~ \"2\",\n ATOXGR == -3 ~ \"3\",\n ATOXGR == -4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n ), levels = c(\"Not Low\", \"1\", \"2\", \"3\", \"4\"))\n ) %>%\n mutate(\n BTOXGR_GP = factor(case_when(\n BTOXGR %in% c(0, 1, 2, 3, 4, \"<Missing>\") ~ \"Not Low\",\n BTOXGR == -1 ~ \"1\",\n BTOXGR == -2 ~ \"2\",\n BTOXGR == -3 ~ \"3\",\n BTOXGR == -4 ~ \"4\"\n ), levels = c(\"Not Low\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_fun = drop_split_levels,\n label_pos = \"topleft\",\n split_label = \"Parameter\"\n ) %>%\n split_rows_by(\n \"BTOXGR_GP\",\n label_pos = \"topleft\",\n split_label = \" Baseline NCI-CTCAE Grade\",\n indent_mod = 2L\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\"), unique_count_suffix = FALSE) %>%\n count_occurrences_by_grade(\"ATOXGR_GP\", denom = \"n\", drop = FALSE, .indent_mods = 3L) %>%\n append_topleft(\" Post-baseline NCI-CTCAE Grade\") %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f) %>%\n prune_table()\n\nresult\n\nParameter \n Baseline NCI-CTCAE Grade A: Drug X B: Placebo C: Combination\n Post-baseline NCI-CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement \n Not Low 113 117 123 \n Not Low 56 (41.8%) 55 (41.0%) 62 (47.0%) \n 1 11 (8.2%) 9 (6.7%) 15 (11.4%) \n 2 15 (11.2%) 23 (17.2%) 16 (12.1%) \n 3 15 (11.2%) 21 (15.7%) 13 (9.8%) \n 4 16 (11.9%) 9 (6.7%) 17 (12.9%) \n 1 6 6 4 \n Not Low 3 (2.2%) 5 (3.7%) 3 (2.3%) \n 1 3 (2.2%) 0 0 \n 4 0 1 (0.7%) 1 (0.8%) \n 2 8 5 1 \n Not Low 5 (3.7%) 3 (2.2%) 0 \n 1 0 1 (0.7%) 0 \n 2 2 (1.5%) 0 0 \n 3 0 1 (0.7%) 1 (0.8%) \n 4 1 (0.7%) 0 0 \n 3 3 3 2 \n Not Low 0 1 (0.7%) 0 \n 1 1 (0.7%) 0 0 \n 2 1 (0.7%) 0 1 (0.8%) \n 3 1 (0.7%) 2 (1.5%) 1 (0.8%) \n 4 4 3 2 \n Not Low 4 (3.0%) 1 (0.7%) 1 (0.8%) \n 1 0 1 (0.7%) 0 \n 2 0 1 (0.7%) 0 \n 3 0 0 1 (0.8%) \nC-Reactive Protein Measurement \n Not Low 119 113 112 \n Not Low 41 (30.6%) 42 (31.3%) 50 (37.9%) \n 1 20 (14.9%) 18 (13.4%) 11 (8.3%) \n 2 24 (17.9%) 20 (14.9%) 14 (10.6%) \n 3 25 (18.7%) 18 (13.4%) 21 (15.9%) \n 4 9 (6.7%) 15 (11.2%) 16 (12.1%) \n 1 3 5 9 \n Not Low 2 (1.5%) 2 (1.5%) 2 (1.5%) \n 2 0 1 (0.7%) 3 (2.3%) \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 0 1 (0.7%) 4 (3.0%) \n 2 5 9 2 \n Not Low 3 (2.2%) 4 (3.0%) 1 (0.8%) \n 1 1 (0.7%) 4 (3.0%) 0 \n 3 0 1 (0.7%) 1 (0.8%) \n 4 1 (0.7%) 0 0 \n 3 4 5 7 \n Not Low 1 (0.7%) 4 (3.0%) 2 (1.5%) \n 1 0 0 1 (0.8%) \n 2 0 0 1 (0.8%) \n 3 3 (2.2%) 1 (0.7%) 2 (1.5%) \n 4 0 0 1 (0.8%) \n 4 3 2 2 \n Not Low 3 (2.2%) 1 (0.7%) 0 \n 2 0 1 (0.7%) 0 \n 3 0 0 1 (0.8%) \n 4 0 0 1 (0.8%) \nImmunoglobulin A Measurement \n Not Low 134 134 132 \n Not Low 134 (100%) 134 (100%) 132 (100%) \n\n\n\n\nPre-processing is the same as Standard Table (High), but in order to keep all levels, prune_table() is not applied.\n\nCodeadlb_f <- adlb %>% filter(WGRHIFL == \"Y\")\n\n# Please note the step below can be skipped if you are using DTYPE PHANTOM\nadlb_out <- h_adsl_adlb_merge_using_worst_flag(adsl_f, adlb_f, worst_flag = c(\"WGRHIFL\" = \"Y\"))\n\n# Create new grouping variables ATOXGR_GP, BTOXGR_GP\nadlb_out <- adlb_out %>%\n mutate(\n ATOXGR_GP = factor(case_when(\n ATOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n ATOXGR == 1 ~ \"1\",\n ATOXGR == 2 ~ \"2\",\n ATOXGR == 3 ~ \"3\",\n ATOXGR == 4 ~ \"4\",\n ATOXGR == \"<Missing>\" ~ \"Missing\"\n ), levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n ) %>%\n mutate(\n BTOXGR_GP = factor(case_when(\n BTOXGR %in% c(0, -1, -2, -3, -4) ~ \"Not High\",\n BTOXGR == 1 ~ \"1\",\n BTOXGR == 2 ~ \"2\",\n BTOXGR == 3 ~ \"3\",\n BTOXGR == 4 ~ \"4\",\n BTOXGR == \"<Missing>\" ~ \"Missing\"\n ), levels = c(\"Not High\", \"1\", \"2\", \"3\", \"4\", \"Missing\"))\n )\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_fun = drop_split_levels,\n label_pos = \"topleft\",\n split_label = \"Parameter\"\n ) %>%\n split_rows_by(\n \"BTOXGR_GP\",\n label_pos = \"topleft\",\n split_label = \" Baseline NCI-CTCAE Grade\",\n indent_mod = 2L\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = c(\"unique_count\"), unique_count_suffix = FALSE) %>%\n count_occurrences_by_grade(\"ATOXGR_GP\", denom = \"n\", drop = FALSE, .indent_mods = 3L) %>%\n append_topleft(\" Post-baseline NCI-CTCAE Grade\") %>%\n build_table(df = adlb_out, alt_counts_df = adsl_f)\n\nresult\n\nParameter \n Baseline NCI-CTCAE Grade A: Drug X B: Placebo C: Combination\n Post-baseline NCI-CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement \n Not High 134 134 132 \n Not High 134 (100%) 134 (100%) 132 (100%) \n Missing 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n 1 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 2 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 3 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n 4 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n Missing 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \nC-Reactive Protein Measurement \n Not High 114 112 115 \n Not High 45 (33.6%) 55 (41.0%) 57 (43.2%) \n Missing 0 0 0 \n 1 18 (13.4%) 18 (13.4%) 19 (14.4%) \n 2 19 (14.2%) 10 (7.5%) 11 (8.3%) \n 3 22 (16.4%) 13 (9.7%) 20 (15.2%) \n 4 10 (7.5%) 16 (11.9%) 8 (6.1%) \n 1 8 10 7 \n Not High 5 (3.7%) 2 (1.5%) 2 (1.5%) \n Missing 0 0 0 \n 1 0 1 (0.7%) 0 \n 2 1 (0.7%) 3 (2.2%) 3 (2.3%) \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 3 (2.2%) 2 (1.5%) \n 2 2 6 7 \n Not High 1 (0.7%) 4 (3.0%) 4 (3.0%) \n Missing 0 0 0 \n 1 0 1 (0.7%) 2 (1.5%) \n 2 1 (0.7%) 1 (0.7%) 0 \n 3 0 0 0 \n 4 0 0 1 (0.8%) \n 3 7 4 3 \n Not High 3 (2.2%) 0 2 (1.5%) \n Missing 0 0 0 \n 1 2 (1.5%) 1 (0.7%) 1 (0.8%) \n 2 0 1 (0.7%) 0 \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 1 (0.7%) 0 \n 4 3 2 0 \n Not High 1 (0.7%) 0 0 \n Missing 0 0 0 \n 1 0 1 (0.7%) 0 \n 2 0 0 0 \n 3 1 (0.7%) 1 (0.7%) 0 \n 4 1 (0.7%) 0 0 \n Missing 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \nImmunoglobulin A Measurement \n Not High 119 116 113 \n Not High 55 (41.0%) 54 (40.3%) 51 (38.6%) \n Missing 0 0 0 \n 1 18 (13.4%) 11 (8.2%) 15 (11.4%) \n 2 14 (10.4%) 22 (16.4%) 19 (14.4%) \n 3 20 (14.9%) 19 (14.2%) 20 (15.2%) \n 4 12 (9.0%) 10 (7.5%) 8 (6.1%) \n 1 5 4 2 \n Not High 4 (3.0%) 1 (0.7%) 2 (1.5%) \n Missing 0 0 0 \n 1 0 0 0 \n 2 1 (0.7%) 1 (0.7%) 0 \n 3 0 2 (1.5%) 0 \n 4 0 0 0 \n 2 4 4 5 \n Not High 2 (1.5%) 3 (2.2%) 3 (2.3%) \n Missing 0 0 0 \n 1 1 (0.7%) 0 2 (1.5%) \n 2 0 0 0 \n 3 1 (0.7%) 0 0 \n 4 0 1 (0.7%) 0 \n 3 4 5 11 \n Not High 3 (2.2%) 1 (0.7%) 6 (4.5%) \n Missing 0 0 0 \n 1 0 1 (0.7%) 1 (0.8%) \n 2 1 (0.7%) 0 0 \n 3 0 2 (1.5%) 3 (2.3%) \n 4 0 1 (0.7%) 1 (0.8%) \n 4 2 5 1 \n Not High 0 3 (2.2%) 1 (0.8%) \n Missing 0 0 0 \n 1 0 0 0 \n 2 1 (0.7%) 1 (0.7%) 0 \n 3 0 0 0 \n 4 1 (0.7%) 1 (0.7%) 0 \n Missing 0 0 0 \n Not High 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Missing 0 0 0 \n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADLB\", adlb,\n code = 'ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_shift_by_grade(\n label = \"Grade Laboratory Abnormality Table\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n paramcd = choices_selected(\n choices = value_choices(adlb, \"PARAMCD\", \"PARAM\"),\n selected = \"ALT\"\n ),\n worst_flag_var = choices_selected(\n choices = variable_choices(adlb, subset = c(\"WGRLOVFL\", \"WGRLOFL\", \"WGRHIVFL\", \"WGRHIFL\")),\n selected = c(\"WGRHIFL\")\n ),\n worst_flag_indicator = choices_selected(\n value_choices(adlb, \"WGRLOVFL\"),\n selected = \"Y\", fixed = TRUE\n ),\n anl_toxgrade_var = choices_selected(\n choices = variable_choices(adlb, subset = c(\"ATOXGR\")),\n selected = c(\"ATOXGR\"),\n fixed = TRUE\n ),\n base_toxgrade_var = choices_selected(\n choices = variable_choices(adlb, subset = c(\"BTOXGR\")),\n selected = c(\"BTOXGR\"),\n fixed = TRUE\n ),\n add_total = FALSE\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\")\n )\n)\n\n[INFO] 2023-08-04 15:15:53.0873 pid:8488 token:[] teal.modules.clinical Initializing tm_t_shift_by_grade\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] dplyr_1.1.2 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt14.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/cmt01b.html", "href": "tables/safety/cmt01b.html", "title": "CMT01B", "section": "", - "text": "Data Setup\nStandard Table with > 1 ATC Class Level\nTable Changing Class Levels\nTable with Classes Sorted by Frequency\nTable with Total Number of Treatments per Medication Class Suppressed\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\nadcm$CMSEQ <- as.factor(adcm$CMSEQ)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n# If you want your missing levels to show as \"No Coding Available\", please use\n# adsl <- df_explicit_na(adsl, na_level = \"No Coding Available\")\n# adcm <- df_explicit_na(adcm, na_level = \"No Coding Available\")\nadsl <- df_explicit_na(adsl)\nadcm <- df_explicit_na(adcm)\n\n# Keep only safety-evaluable patients and concomitant medications\nadsl <- adsl %>%\n filter(SAFFL == \"Y\")\n\nadcm <- adcm %>%\n filter(SAFFL == \"Y\" & ATIREL == \"CONCOMITANT\")\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\n \"ATC1\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC1)\n ) %>%\n split_rows_by(\n \"ATC2\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC2)\n ) %>%\n split_rows_by(\n \"ATC3\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC3)\n ) %>%\n split_rows_by(\n \"ATC4\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC4)\n ) %>%\n append_topleft(\" Other Treatment\") %>%\n summarize_num_patients(\n var = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adcm,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n # Sort lowest level terms by descending frequency.\n sort_at_path(\n path = c(\"ATC1\", \"*\", \"ATC2\", \"*\", \"ATC3\", \"*\", \"ATC4\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nATC Level 1 Text \n ATC Level 2 Text \n ATC Level 3 Text \n ATC Level 4 Text A: Drug X B: Placebo C: Combination\n Other Treatment (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) \nTotal number of treatments 415 414 460 \nATCCLAS1 A \n ATCCLAS2 A \n ATCCLAS3 A \n ATCCLAS4 A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n Total number of treatments 134 137 143 \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS1 A p2 \n ATCCLAS2 A p2 \n ATCCLAS3 A p2 \n ATCCLAS4 A p2 \n Total number of patients with at least one treatment 45 (33.6%) 54 (40.3%) 48 (36.4%) \n Total number of treatments 58 66 64 \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS1 B \n ATCCLAS2 B \n ATCCLAS3 B \n ATCCLAS4 B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n Total number of treatments 141 137 162 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \nATCCLAS1 B p2 \n ATCCLAS2 B p2 \n ATCCLAS3 B p2 \n ATCCLAS4 B p2 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS1 B p3 \n ATCCLAS2 B p3 \n ATCCLAS3 B p3 \n ATCCLAS4 B p3 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS1 C \n ATCCLAS2 C \n ATCCLAS3 C \n ATCCLAS4 C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS1 C p2 \n ATCCLAS2 C p2 \n ATCCLAS3 C p2 \n ATCCLAS4 C p2 \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS1 C p3 \n ATCCLAS2 C p3 \n ATCCLAS3 C p3 \n ATCCLAS4 C p3 \n Total number of patients with at least one treatment 52 (38.8%) 58 (43.3%) 60 (45.5%) \n Total number of treatments 69 73 80 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n analyze_num_patients(\n var = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\n \"ATC3\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC3)\n ) %>%\n split_rows_by(\n \"ATC2\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC2)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_topleft(\" Other Treatment\")\n\nresult <- build_table(\n lyt = lyt,\n df = adcm,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n # Sort lowest level terms by descending frequency.\n sort_at_path(\n path = c(\"ATC3\", \"*\", \"ATC2\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nATC Level 3 Text \n ATC Level 2 Text A: Drug X B: Placebo C: Combination\n Other Treatment (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) \nTotal number of treatments 415 414 460 \nATCCLAS3 A \n ATCCLAS2 A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n Total number of treatments 134 137 143 \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS3 A p2 \n ATCCLAS2 A p2 \n Total number of patients with at least one treatment 45 (33.6%) 54 (40.3%) 48 (36.4%) \n Total number of treatments 58 66 64 \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS3 B \n ATCCLAS2 B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n Total number of treatments 141 137 162 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \nATCCLAS3 B p2 \n ATCCLAS2 B p2 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS3 B p3 \n ATCCLAS2 B p3 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS3 C \n ATCCLAS2 C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS3 C p2 \n ATCCLAS2 C p2 \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS3 C p3 \n ATCCLAS2 C p3 \n Total number of patients with at least one treatment 52 (38.8%) 58 (43.3%) 60 (45.5%) \n Total number of treatments 69 73 80 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n\n\n\n\n\nCode# In progress\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_rows_by(\n \"ATC1\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC1)\n ) %>%\n split_rows_by(\n \"ATC2\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC2)\n ) %>%\n split_rows_by(\n \"ATC3\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC3)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\n \"ATC4\",\n child_labels = \"visible\",\n nested = TRUE,\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC4)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_topleft(\" Other Treatment\")\n\nresult <- build_table(\n lyt = lyt,\n df = adcm,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n # Sort lowest level terms by descending frequency.\n sort_at_path(\n path = c(\"ATC1\", \"*\", \"ATC2\", \"*\", \"ATC3\", \"*\", \"ATC4\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nATC Level 1 Text \n ATC Level 2 Text \n ATC Level 3 Text \n ATC Level 4 Text A: Drug X B: Placebo C: Combination\n Other Treatment (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————\nATCCLAS1 A \n ATCCLAS2 A \n ATCCLAS3 A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n Total number of treatments 134 137 143 \n ATCCLAS4 A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS1 A p2 \n ATCCLAS2 A p2 \n ATCCLAS3 A p2 \n Total number of patients with at least one treatment 45 (33.6%) 54 (40.3%) 48 (36.4%) \n Total number of treatments 58 66 64 \n ATCCLAS4 A p2 \n Total number of patients with at least one treatment 45 (33.6%) 54 (40.3%) 48 (36.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS1 B \n ATCCLAS2 B \n ATCCLAS3 B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n Total number of treatments 141 137 162 \n ATCCLAS4 B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \nATCCLAS1 B p2 \n ATCCLAS2 B p2 \n ATCCLAS3 B p2 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n ATCCLAS4 B p2 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS1 B p3 \n ATCCLAS2 B p3 \n ATCCLAS3 B p3 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n ATCCLAS4 B p3 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS1 C \n ATCCLAS2 C \n ATCCLAS3 C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n ATCCLAS4 C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS1 C p2 \n ATCCLAS2 C p2 \n ATCCLAS3 C p2 \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n ATCCLAS4 C p2 \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS1 C p3 \n ATCCLAS2 C p3 \n ATCCLAS3 C p3 \n Total number of patients with at least one treatment 52 (38.8%) 58 (43.3%) 60 (45.5%) \n Total number of treatments 69 73 80 \n ATCCLAS4 C p3 \n Total number of patients with at least one treatment 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\nadcm$CMSEQ <- as.integer(adcm$CMSEQ)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n# If you want your missing levels to show as \"No Coding Available\", please use\n# adsl <- df_explicit_na(adsl, na_level = \"No Coding Available\")\n# adcm <- df_explicit_na(adcm, na_level = \"No Coding Available\")\nadsl <- df_explicit_na(adsl)\nadcm <- df_explicit_na(adcm)\n\nadcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = '\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- df_explicit_na(ADSL)\n '),\n cdisc_dataset(\"ADCM\", adcm,\n code = '\n ADCM <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n ADCM$CMSEQ <- as.factor(ADCM$CMSEQ)\n ADCM <- df_explicit_na(ADCM)\n ',\n keys = adcm_keys\n )\n ),\n modules = modules(\n tm_t_mult_events(\n label = \"Concomitant Medications by Medication Class and Preferred Name\",\n dataname = \"ADCM\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n seq_var = choices_selected(\"CMSEQ\", selected = \"CMSEQ\", fixed = TRUE),\n hlt = choices_selected(\n choices = variable_choices(adcm, c(\"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")),\n selected = c(\"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")\n ),\n llt = choices_selected(\n choices = variable_choices(adcm, c(\"CMDECOD\")),\n selected = c(\"CMDECOD\")\n ),\n add_total = FALSE,\n event_type = \"treatment\"\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\"),\n ADCM = list(ATIREL = \"CONCOMITANT\")\n )\n)\n\n[INFO] 2023-08-04 14:57:33.9038 pid:8274 token:[] teal.modules.clinical Initializing tm_t_mult_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/cmt01b.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table with > 1 ATC Class Level\nTable Changing Class Levels\nTable with Classes Sorted by Frequency\nTable with Total Number of Treatments per Medication Class Suppressed\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\nadcm$CMSEQ <- as.factor(adcm$CMSEQ)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n# If you want your missing levels to show as \"No Coding Available\", please use\n# adsl <- df_explicit_na(adsl, na_level = \"No Coding Available\")\n# adcm <- df_explicit_na(adcm, na_level = \"No Coding Available\")\nadsl <- df_explicit_na(adsl)\nadcm <- df_explicit_na(adcm)\n\n# Keep only safety-evaluable patients and concomitant medications\nadsl <- adsl %>%\n filter(SAFFL == \"Y\")\n\nadcm <- adcm %>%\n filter(SAFFL == \"Y\" & ATIREL == \"CONCOMITANT\")\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\n \"ATC1\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC1)\n ) %>%\n split_rows_by(\n \"ATC2\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC2)\n ) %>%\n split_rows_by(\n \"ATC3\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC3)\n ) %>%\n split_rows_by(\n \"ATC4\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC4)\n ) %>%\n append_topleft(\" Other Treatment\") %>%\n summarize_num_patients(\n var = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adcm,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n # Sort lowest level terms by descending frequency.\n sort_at_path(\n path = c(\"ATC1\", \"*\", \"ATC2\", \"*\", \"ATC3\", \"*\", \"ATC4\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nATC Level 1 Text \n ATC Level 2 Text \n ATC Level 3 Text \n ATC Level 4 Text A: Drug X B: Placebo C: Combination\n Other Treatment (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) \nTotal number of treatments 415 414 460 \nATCCLAS1 A \n ATCCLAS2 A \n ATCCLAS3 A \n ATCCLAS4 A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n Total number of treatments 134 137 143 \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS1 A p2 \n ATCCLAS2 A p2 \n ATCCLAS3 A p2 \n ATCCLAS4 A p2 \n Total number of patients with at least one treatment 45 (33.6%) 54 (40.3%) 48 (36.4%) \n Total number of treatments 58 66 64 \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS1 B \n ATCCLAS2 B \n ATCCLAS3 B \n ATCCLAS4 B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n Total number of treatments 141 137 162 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \nATCCLAS1 B p2 \n ATCCLAS2 B p2 \n ATCCLAS3 B p2 \n ATCCLAS4 B p2 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS1 B p3 \n ATCCLAS2 B p3 \n ATCCLAS3 B p3 \n ATCCLAS4 B p3 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS1 C \n ATCCLAS2 C \n ATCCLAS3 C \n ATCCLAS4 C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS1 C p2 \n ATCCLAS2 C p2 \n ATCCLAS3 C p2 \n ATCCLAS4 C p2 \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS1 C p3 \n ATCCLAS2 C p3 \n ATCCLAS3 C p3 \n ATCCLAS4 C p3 \n Total number of patients with at least one treatment 52 (38.8%) 58 (43.3%) 60 (45.5%) \n Total number of treatments 69 73 80 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n analyze_num_patients(\n var = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\n \"ATC3\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC3)\n ) %>%\n split_rows_by(\n \"ATC2\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC2)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_topleft(\" Other Treatment\")\n\nresult <- build_table(\n lyt = lyt,\n df = adcm,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n # Sort lowest level terms by descending frequency.\n sort_at_path(\n path = c(\"ATC3\", \"*\", \"ATC2\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nATC Level 3 Text \n ATC Level 2 Text A: Drug X B: Placebo C: Combination\n Other Treatment (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) \nTotal number of treatments 415 414 460 \nATCCLAS3 A \n ATCCLAS2 A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n Total number of treatments 134 137 143 \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS3 A p2 \n ATCCLAS2 A p2 \n Total number of patients with at least one treatment 45 (33.6%) 54 (40.3%) 48 (36.4%) \n Total number of treatments 58 66 64 \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS3 B \n ATCCLAS2 B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n Total number of treatments 141 137 162 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \nATCCLAS3 B p2 \n ATCCLAS2 B p2 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS3 B p3 \n ATCCLAS2 B p3 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS3 C \n ATCCLAS2 C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS3 C p2 \n ATCCLAS2 C p2 \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS3 C p3 \n ATCCLAS2 C p3 \n Total number of patients with at least one treatment 52 (38.8%) 58 (43.3%) 60 (45.5%) \n Total number of treatments 69 73 80 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n\n\n\n\n\nCode# In progress\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_rows_by(\n \"ATC1\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC1)\n ) %>%\n split_rows_by(\n \"ATC2\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC2)\n ) %>%\n split_rows_by(\n \"ATC3\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC3)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\n \"ATC4\",\n child_labels = \"visible\",\n nested = TRUE,\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC4)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_topleft(\" Other Treatment\")\n\nresult <- build_table(\n lyt = lyt,\n df = adcm,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n # Sort lowest level terms by descending frequency.\n sort_at_path(\n path = c(\"ATC1\", \"*\", \"ATC2\", \"*\", \"ATC3\", \"*\", \"ATC4\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nATC Level 1 Text \n ATC Level 2 Text \n ATC Level 3 Text \n ATC Level 4 Text A: Drug X B: Placebo C: Combination\n Other Treatment (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————\nATCCLAS1 A \n ATCCLAS2 A \n ATCCLAS3 A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n Total number of treatments 134 137 143 \n ATCCLAS4 A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS1 A p2 \n ATCCLAS2 A p2 \n ATCCLAS3 A p2 \n Total number of patients with at least one treatment 45 (33.6%) 54 (40.3%) 48 (36.4%) \n Total number of treatments 58 66 64 \n ATCCLAS4 A p2 \n Total number of patients with at least one treatment 45 (33.6%) 54 (40.3%) 48 (36.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS1 B \n ATCCLAS2 B \n ATCCLAS3 B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n Total number of treatments 141 137 162 \n ATCCLAS4 B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \nATCCLAS1 B p2 \n ATCCLAS2 B p2 \n ATCCLAS3 B p2 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n ATCCLAS4 B p2 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS1 B p3 \n ATCCLAS2 B p3 \n ATCCLAS3 B p3 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n ATCCLAS4 B p3 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS1 C \n ATCCLAS2 C \n ATCCLAS3 C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n ATCCLAS4 C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS1 C p2 \n ATCCLAS2 C p2 \n ATCCLAS3 C p2 \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n ATCCLAS4 C p2 \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS1 C p3 \n ATCCLAS2 C p3 \n ATCCLAS3 C p3 \n Total number of patients with at least one treatment 52 (38.8%) 58 (43.3%) 60 (45.5%) \n Total number of treatments 69 73 80 \n ATCCLAS4 C p3 \n Total number of patients with at least one treatment 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\nadcm$CMSEQ <- as.integer(adcm$CMSEQ)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n# If you want your missing levels to show as \"No Coding Available\", please use\n# adsl <- df_explicit_na(adsl, na_level = \"No Coding Available\")\n# adcm <- df_explicit_na(adcm, na_level = \"No Coding Available\")\nadsl <- df_explicit_na(adsl)\nadcm <- df_explicit_na(adcm)\n\nadcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = '\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- df_explicit_na(ADSL)\n '),\n cdisc_dataset(\"ADCM\", adcm,\n code = '\n ADCM <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n ADCM$CMSEQ <- as.factor(ADCM$CMSEQ)\n ADCM <- df_explicit_na(ADCM)\n ',\n keys = adcm_keys\n )\n ),\n modules = modules(\n tm_t_mult_events(\n label = \"Concomitant Medications by Medication Class and Preferred Name\",\n dataname = \"ADCM\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n seq_var = choices_selected(\"CMSEQ\", selected = \"CMSEQ\", fixed = TRUE),\n hlt = choices_selected(\n choices = variable_choices(adcm, c(\"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")),\n selected = c(\"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")\n ),\n llt = choices_selected(\n choices = variable_choices(adcm, c(\"CMDECOD\")),\n selected = c(\"CMDECOD\")\n ),\n add_total = FALSE,\n event_type = \"treatment\"\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\"),\n ADCM = list(ATIREL = \"CONCOMITANT\")\n )\n)\n\n[INFO] 2023-08-04 15:14:41.3638 pid:8278 token:[] teal.modules.clinical Initializing tm_t_mult_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/cmt01b.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/enrollment01.html", "href": "tables/safety/enrollment01.html", "title": "ENTXX", "section": "", - "text": "Data Setup\nENT01 – Enrollment by Region, Country, and Investigator Number\nENT01A – Enrollment by Country and Investigator Number\nENT02 – Enrollment by Region, Country, and Investigator Number/Name\nENT02A – Enrollment by Country and Investigator Number/Name\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(forcats)\nlibrary(scda)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\n\nadsl <- adsl %>%\n mutate(\n REGION1 = droplevels(REGION1),\n COUNTRY = droplevels(COUNTRY),\n INVID_INVNAM = paste(INVID, INVNAM, sep = \" / \")\n ) %>%\n mutate(\n INVID = factor(INVID),\n SITEID = factor(SITEID),\n INVNAM = factor(INVNAM),\n INVID_INVNAM = factor(INVID_INVNAM)\n ) %>%\n var_relabel(\n INVID_INVNAM = \"Investigator Number/Name\",\n REGION1 = \"Geographic Region 1\",\n COUNTRY = \"Country\",\n INVID = \"Investigator Identifier\"\n ) %>%\n arrange(REGION1, COUNTRY, INVID)\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n add_overall_col(label = \"All Patients\") %>%\n split_rows_by(\"REGION1\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adsl$REGION1)) %>%\n summarize_row_groups() %>%\n split_rows_by(\"COUNTRY\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adsl$COUNTRY)) %>%\n summarize_row_groups() %>%\n split_rows_by(\"INVID\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adsl$INVID)) %>%\n summarize_row_groups()\n\nresult <- build_table(lyt, adsl)\nresult\n\nGeographic Region 1 \n Country A: Drug X B: Placebo C: Combination All Patients\n Investigator Identifier (N=134) (N=134) (N=132) (N=400) \n—————————————————————————————————————————————————————————————————————————————————————\nAfrica 8 (6.0%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \n NGA 8 (6.0%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \n INV ID NGA-1 3 (2.2%) 3 (2.2%) 4 (3.0%) 10 (2.5%) \n INV ID NGA-11 1 (0.7%) 2 (1.5%) 3 (2.3%) 6 (1.5%) \n INV ID NGA-12 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID NGA-17 2 (1.5%) 0 (0.0%) 0 (0.0%) 2 (0.5%) \n INV ID NGA-2 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID NGA-4 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID NGA-5 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID NGA-6 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nAsia 91 (67.9%) 94 (70.1%) 83 (62.9%) 268 (67.0%) \n CHN 74 (55.2%) 81 (60.4%) 64 (48.5%) 219 (54.8%) \n INV ID CHN-1 21 (15.7%) 20 (14.9%) 16 (12.1%) 57 (14.2%) \n INV ID CHN-10 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID CHN-11 12 (9.0%) 20 (14.9%) 16 (12.1%) 48 (12.0%) \n INV ID CHN-12 4 (3.0%) 3 (2.2%) 1 (0.8%) 8 (2.0%) \n INV ID CHN-13 2 (1.5%) 6 (4.5%) 0 (0.0%) 8 (2.0%) \n INV ID CHN-14 4 (3.0%) 2 (1.5%) 3 (2.3%) 9 (2.2%) \n INV ID CHN-15 2 (1.5%) 0 (0.0%) 4 (3.0%) 6 (1.5%) \n INV ID CHN-16 0 (0.0%) 3 (2.2%) 3 (2.3%) 6 (1.5%) \n INV ID CHN-17 4 (3.0%) 4 (3.0%) 3 (2.3%) 11 (2.8%) \n INV ID CHN-18 1 (0.7%) 0 (0.0%) 2 (1.5%) 3 (0.8%) \n INV ID CHN-2 9 (6.7%) 4 (3.0%) 3 (2.3%) 16 (4.0%) \n INV ID CHN-3 5 (3.7%) 1 (0.7%) 5 (3.8%) 11 (2.8%) \n INV ID CHN-4 3 (2.2%) 3 (2.2%) 3 (2.3%) 9 (2.2%) \n INV ID CHN-5 4 (3.0%) 3 (2.2%) 4 (3.0%) 11 (2.8%) \n INV ID CHN-6 1 (0.7%) 3 (2.2%) 0 (0.0%) 4 (1.0%) \n INV ID CHN-7 0 (0.0%) 5 (3.7%) 1 (0.8%) 6 (1.5%) \n INV ID CHN-8 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID CHN-9 1 (0.7%) 2 (1.5%) 0 (0.0%) 3 (0.8%) \n PAK 12 (9.0%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \n INV ID PAK-1 2 (1.5%) 4 (3.0%) 4 (3.0%) 10 (2.5%) \n INV ID PAK-11 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID PAK-12 2 (1.5%) 0 (0.0%) 0 (0.0%) 2 (0.5%) \n INV ID PAK-13 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID PAK-14 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID PAK-15 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID PAK-2 1 (0.7%) 0 (0.0%) 2 (1.5%) 3 (0.8%) \n INV ID PAK-4 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID PAK-5 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n JPN 5 (3.7%) 4 (3.0%) 9 (6.8%) 18 (4.5%) \n INV ID JPN-1 2 (1.5%) 2 (1.5%) 1 (0.8%) 5 (1.2%) \n INV ID JPN-11 0 (0.0%) 0 (0.0%) 3 (2.3%) 3 (0.8%) \n INV ID JPN-12 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID JPN-14 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-17 0 (0.0%) 0 (0.0%) 2 (1.5%) 2 (0.5%) \n INV ID JPN-18 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-2 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID JPN-3 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-5 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID JPN-6 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \nEurasia 5 (3.7%) 8 (6.0%) 6 (4.5%) 19 (4.8%) \n RUS 5 (3.7%) 8 (6.0%) 6 (4.5%) 19 (4.8%) \n INV ID RUS-1 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-11 0 (0.0%) 2 (1.5%) 2 (1.5%) 4 (1.0%) \n INV ID RUS-12 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-13 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-14 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID RUS-16 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID RUS-18 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-2 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-3 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID RUS-4 0 (0.0%) 2 (1.5%) 1 (0.8%) 3 (0.8%) \n INV ID RUS-5 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-6 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-7 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nEurope 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n GBR 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID GBR-1 2 (1.5%) 0 (0.0%) 1 (0.8%) 3 (0.8%) \n INV ID GBR-11 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID GBR-13 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-15 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-17 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-6 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \nNorth America 13 (9.7%) 15 (11.2%) 20 (15.2%) 48 (12.0%) \n USA 10 (7.5%) 13 (9.7%) 17 (12.9%) 40 (10.0%) \n INV ID USA-1 1 (0.7%) 4 (3.0%) 5 (3.8%) 10 (2.5%) \n INV ID USA-11 4 (3.0%) 2 (1.5%) 3 (2.3%) 9 (2.2%) \n INV ID USA-12 1 (0.7%) 2 (1.5%) 3 (2.3%) 6 (1.5%) \n INV ID USA-14 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID USA-15 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID USA-17 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID USA-19 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-2 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-3 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID USA-4 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID USA-5 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID USA-6 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID USA-8 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-9 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n CAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2.0%) \n INV ID CAN-1 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID CAN-11 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID CAN-14 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID CAN-4 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID CAN-5 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nSouth America 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \n BRA 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \n INV ID BRA-1 4 (3.0%) 2 (1.5%) 2 (1.5%) 8 (2.0%) \n INV ID BRA-11 4 (3.0%) 0 (0.0%) 4 (3.0%) 8 (2.0%) \n INV ID BRA-12 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-13 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-14 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID BRA-15 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-2 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID BRA-3 0 (0.0%) 2 (1.5%) 0 (0.0%) 2 (0.5%) \n INV ID BRA-4 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID BRA-5 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID BRA-6 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-7 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n add_overall_col(label = \"All Patients\") %>%\n split_rows_by(\"COUNTRY\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adsl$COUNTRY)) %>%\n summarize_row_groups() %>%\n split_rows_by(\"INVID\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adsl$INVID)) %>%\n summarize_row_groups()\n\nresult <- build_table(lyt, adsl)\nresult\n\nCountry A: Drug X B: Placebo C: Combination All Patients\n Investigator Identifier (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————————————————\nCHN 74 (55.2%) 81 (60.4%) 64 (48.5%) 219 (54.8%) \n INV ID CHN-1 21 (15.7%) 20 (14.9%) 16 (12.1%) 57 (14.2%) \n INV ID CHN-10 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID CHN-11 12 (9.0%) 20 (14.9%) 16 (12.1%) 48 (12.0%) \n INV ID CHN-12 4 (3.0%) 3 (2.2%) 1 (0.8%) 8 (2.0%) \n INV ID CHN-13 2 (1.5%) 6 (4.5%) 0 (0.0%) 8 (2.0%) \n INV ID CHN-14 4 (3.0%) 2 (1.5%) 3 (2.3%) 9 (2.2%) \n INV ID CHN-15 2 (1.5%) 0 (0.0%) 4 (3.0%) 6 (1.5%) \n INV ID CHN-16 0 (0.0%) 3 (2.2%) 3 (2.3%) 6 (1.5%) \n INV ID CHN-17 4 (3.0%) 4 (3.0%) 3 (2.3%) 11 (2.8%) \n INV ID CHN-18 1 (0.7%) 0 (0.0%) 2 (1.5%) 3 (0.8%) \n INV ID CHN-2 9 (6.7%) 4 (3.0%) 3 (2.3%) 16 (4.0%) \n INV ID CHN-3 5 (3.7%) 1 (0.7%) 5 (3.8%) 11 (2.8%) \n INV ID CHN-4 3 (2.2%) 3 (2.2%) 3 (2.3%) 9 (2.2%) \n INV ID CHN-5 4 (3.0%) 3 (2.2%) 4 (3.0%) 11 (2.8%) \n INV ID CHN-6 1 (0.7%) 3 (2.2%) 0 (0.0%) 4 (1.0%) \n INV ID CHN-7 0 (0.0%) 5 (3.7%) 1 (0.8%) 6 (1.5%) \n INV ID CHN-8 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID CHN-9 1 (0.7%) 2 (1.5%) 0 (0.0%) 3 (0.8%) \nUSA 10 (7.5%) 13 (9.7%) 17 (12.9%) 40 (10.0%) \n INV ID USA-1 1 (0.7%) 4 (3.0%) 5 (3.8%) 10 (2.5%) \n INV ID USA-11 4 (3.0%) 2 (1.5%) 3 (2.3%) 9 (2.2%) \n INV ID USA-12 1 (0.7%) 2 (1.5%) 3 (2.3%) 6 (1.5%) \n INV ID USA-14 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID USA-15 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID USA-17 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID USA-19 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-2 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-3 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID USA-4 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID USA-5 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID USA-6 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID USA-8 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-9 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \nBRA 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \n INV ID BRA-1 4 (3.0%) 2 (1.5%) 2 (1.5%) 8 (2.0%) \n INV ID BRA-11 4 (3.0%) 0 (0.0%) 4 (3.0%) 8 (2.0%) \n INV ID BRA-12 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-13 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-14 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID BRA-15 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-2 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID BRA-3 0 (0.0%) 2 (1.5%) 0 (0.0%) 2 (0.5%) \n INV ID BRA-4 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID BRA-5 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID BRA-6 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-7 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nPAK 12 (9.0%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \n INV ID PAK-1 2 (1.5%) 4 (3.0%) 4 (3.0%) 10 (2.5%) \n INV ID PAK-11 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID PAK-12 2 (1.5%) 0 (0.0%) 0 (0.0%) 2 (0.5%) \n INV ID PAK-13 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID PAK-14 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID PAK-15 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID PAK-2 1 (0.7%) 0 (0.0%) 2 (1.5%) 3 (0.8%) \n INV ID PAK-4 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID PAK-5 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nNGA 8 (6.0%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \n INV ID NGA-1 3 (2.2%) 3 (2.2%) 4 (3.0%) 10 (2.5%) \n INV ID NGA-11 1 (0.7%) 2 (1.5%) 3 (2.3%) 6 (1.5%) \n INV ID NGA-12 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID NGA-17 2 (1.5%) 0 (0.0%) 0 (0.0%) 2 (0.5%) \n INV ID NGA-2 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID NGA-4 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID NGA-5 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID NGA-6 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nRUS 5 (3.7%) 8 (6.0%) 6 (4.5%) 19 (4.8%) \n INV ID RUS-1 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-11 0 (0.0%) 2 (1.5%) 2 (1.5%) 4 (1.0%) \n INV ID RUS-12 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-13 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-14 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID RUS-16 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID RUS-18 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-2 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-3 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID RUS-4 0 (0.0%) 2 (1.5%) 1 (0.8%) 3 (0.8%) \n INV ID RUS-5 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-6 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-7 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nJPN 5 (3.7%) 4 (3.0%) 9 (6.8%) 18 (4.5%) \n INV ID JPN-1 2 (1.5%) 2 (1.5%) 1 (0.8%) 5 (1.2%) \n INV ID JPN-11 0 (0.0%) 0 (0.0%) 3 (2.3%) 3 (0.8%) \n INV ID JPN-12 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID JPN-14 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-17 0 (0.0%) 0 (0.0%) 2 (1.5%) 2 (0.5%) \n INV ID JPN-18 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-2 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID JPN-3 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-5 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID JPN-6 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \nGBR 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID GBR-1 2 (1.5%) 0 (0.0%) 1 (0.8%) 3 (0.8%) \n INV ID GBR-11 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID GBR-13 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-15 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-17 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-6 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \nCAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2.0%) \n INV ID CAN-1 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID CAN-11 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID CAN-14 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID CAN-4 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID CAN-5 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n add_overall_col(label = \"All Patients\") %>%\n split_rows_by(\"REGION1\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adsl$REGION1)) %>%\n summarize_row_groups() %>%\n split_rows_by(\"COUNTRY\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adsl$COUNTRY)) %>%\n summarize_row_groups() %>%\n split_rows_by(\"INVID_INVNAM\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adsl$INVID_INVNAM)\n ) %>%\n summarize_row_groups()\n\nresult <- build_table(lyt, adsl)\nresult\n\nGeographic Region 1 \n Country A: Drug X B: Placebo C: Combination All Patients\n Investigator Number/Name (N=134) (N=134) (N=132) (N=400) \n————————————————————————————————————————————————————————————————————————————————————————————\nAfrica 8 (6.0%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \n NGA 8 (6.0%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \n INV ID NGA-1 / Dr. NGA-1 Doe 3 (2.2%) 3 (2.2%) 4 (3.0%) 10 (2.5%) \n INV ID NGA-11 / Dr. NGA-11 Doe 1 (0.7%) 2 (1.5%) 3 (2.3%) 6 (1.5%) \n INV ID NGA-12 / Dr. NGA-12 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID NGA-17 / Dr. NGA-17 Doe 2 (1.5%) 0 (0.0%) 0 (0.0%) 2 (0.5%) \n INV ID NGA-2 / Dr. NGA-2 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID NGA-4 / Dr. NGA-4 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID NGA-5 / Dr. NGA-5 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID NGA-6 / Dr. NGA-6 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nAsia 91 (67.9%) 94 (70.1%) 83 (62.9%) 268 (67.0%) \n CHN 74 (55.2%) 81 (60.4%) 64 (48.5%) 219 (54.8%) \n INV ID CHN-1 / Dr. CHN-1 Doe 21 (15.7%) 20 (14.9%) 16 (12.1%) 57 (14.2%) \n INV ID CHN-10 / Dr. CHN-10 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID CHN-11 / Dr. CHN-11 Doe 12 (9.0%) 20 (14.9%) 16 (12.1%) 48 (12.0%) \n INV ID CHN-12 / Dr. CHN-12 Doe 4 (3.0%) 3 (2.2%) 1 (0.8%) 8 (2.0%) \n INV ID CHN-13 / Dr. CHN-13 Doe 2 (1.5%) 6 (4.5%) 0 (0.0%) 8 (2.0%) \n INV ID CHN-14 / Dr. CHN-14 Doe 4 (3.0%) 2 (1.5%) 3 (2.3%) 9 (2.2%) \n INV ID CHN-15 / Dr. CHN-15 Doe 2 (1.5%) 0 (0.0%) 4 (3.0%) 6 (1.5%) \n INV ID CHN-16 / Dr. CHN-16 Doe 0 (0.0%) 3 (2.2%) 3 (2.3%) 6 (1.5%) \n INV ID CHN-17 / Dr. CHN-17 Doe 4 (3.0%) 4 (3.0%) 3 (2.3%) 11 (2.8%) \n INV ID CHN-18 / Dr. CHN-18 Doe 1 (0.7%) 0 (0.0%) 2 (1.5%) 3 (0.8%) \n INV ID CHN-2 / Dr. CHN-2 Doe 9 (6.7%) 4 (3.0%) 3 (2.3%) 16 (4.0%) \n INV ID CHN-3 / Dr. CHN-3 Doe 5 (3.7%) 1 (0.7%) 5 (3.8%) 11 (2.8%) \n INV ID CHN-4 / Dr. CHN-4 Doe 3 (2.2%) 3 (2.2%) 3 (2.3%) 9 (2.2%) \n INV ID CHN-5 / Dr. CHN-5 Doe 4 (3.0%) 3 (2.2%) 4 (3.0%) 11 (2.8%) \n INV ID CHN-6 / Dr. CHN-6 Doe 1 (0.7%) 3 (2.2%) 0 (0.0%) 4 (1.0%) \n INV ID CHN-7 / Dr. CHN-7 Doe 0 (0.0%) 5 (3.7%) 1 (0.8%) 6 (1.5%) \n INV ID CHN-8 / Dr. CHN-8 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID CHN-9 / Dr. CHN-9 Doe 1 (0.7%) 2 (1.5%) 0 (0.0%) 3 (0.8%) \n PAK 12 (9.0%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \n INV ID PAK-1 / Dr. PAK-1 Doe 2 (1.5%) 4 (3.0%) 4 (3.0%) 10 (2.5%) \n INV ID PAK-11 / Dr. PAK-11 Doe 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID PAK-12 / Dr. PAK-12 Doe 2 (1.5%) 0 (0.0%) 0 (0.0%) 2 (0.5%) \n INV ID PAK-13 / Dr. PAK-13 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID PAK-14 / Dr. PAK-14 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID PAK-15 / Dr. PAK-15 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID PAK-2 / Dr. PAK-2 Doe 1 (0.7%) 0 (0.0%) 2 (1.5%) 3 (0.8%) \n INV ID PAK-4 / Dr. PAK-4 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID PAK-5 / Dr. PAK-5 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n JPN 5 (3.7%) 4 (3.0%) 9 (6.8%) 18 (4.5%) \n INV ID JPN-1 / Dr. JPN-1 Doe 2 (1.5%) 2 (1.5%) 1 (0.8%) 5 (1.2%) \n INV ID JPN-11 / Dr. JPN-11 Doe 0 (0.0%) 0 (0.0%) 3 (2.3%) 3 (0.8%) \n INV ID JPN-12 / Dr. JPN-12 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID JPN-14 / Dr. JPN-14 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-17 / Dr. JPN-17 Doe 0 (0.0%) 0 (0.0%) 2 (1.5%) 2 (0.5%) \n INV ID JPN-18 / Dr. JPN-18 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-2 / Dr. JPN-2 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID JPN-3 / Dr. JPN-3 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-5 / Dr. JPN-5 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID JPN-6 / Dr. JPN-6 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \nEurasia 5 (3.7%) 8 (6.0%) 6 (4.5%) 19 (4.8%) \n RUS 5 (3.7%) 8 (6.0%) 6 (4.5%) 19 (4.8%) \n INV ID RUS-1 / Dr. RUS-1 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-11 / Dr. RUS-11 Doe 0 (0.0%) 2 (1.5%) 2 (1.5%) 4 (1.0%) \n INV ID RUS-12 / Dr. RUS-12 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-13 / Dr. RUS-13 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-14 / Dr. RUS-14 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID RUS-16 / Dr. RUS-16 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID RUS-18 / Dr. RUS-18 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-2 / Dr. RUS-2 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-3 / Dr. RUS-3 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID RUS-4 / Dr. RUS-4 Doe 0 (0.0%) 2 (1.5%) 1 (0.8%) 3 (0.8%) \n INV ID RUS-5 / Dr. RUS-5 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-6 / Dr. RUS-6 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-7 / Dr. RUS-7 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nEurope 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n GBR 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID GBR-1 / Dr. GBR-1 Doe 2 (1.5%) 0 (0.0%) 1 (0.8%) 3 (0.8%) \n INV ID GBR-11 / Dr. GBR-11 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID GBR-13 / Dr. GBR-13 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-15 / Dr. GBR-15 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-17 / Dr. GBR-17 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-6 / Dr. GBR-6 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \nNorth America 13 (9.7%) 15 (11.2%) 20 (15.2%) 48 (12.0%) \n USA 10 (7.5%) 13 (9.7%) 17 (12.9%) 40 (10.0%) \n INV ID USA-1 / Dr. USA-1 Doe 1 (0.7%) 4 (3.0%) 5 (3.8%) 10 (2.5%) \n INV ID USA-11 / Dr. USA-11 Doe 4 (3.0%) 2 (1.5%) 3 (2.3%) 9 (2.2%) \n INV ID USA-12 / Dr. USA-12 Doe 1 (0.7%) 2 (1.5%) 3 (2.3%) 6 (1.5%) \n INV ID USA-14 / Dr. USA-14 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID USA-15 / Dr. USA-15 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID USA-17 / Dr. USA-17 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID USA-19 / Dr. USA-19 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-2 / Dr. USA-2 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-3 / Dr. USA-3 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID USA-4 / Dr. USA-4 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID USA-5 / Dr. USA-5 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID USA-6 / Dr. USA-6 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID USA-8 / Dr. USA-8 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-9 / Dr. USA-9 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n CAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2.0%) \n INV ID CAN-1 / Dr. CAN-1 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID CAN-11 / Dr. CAN-11 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID CAN-14 / Dr. CAN-14 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID CAN-4 / Dr. CAN-4 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID CAN-5 / Dr. CAN-5 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nSouth America 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \n BRA 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \n INV ID BRA-1 / Dr. BRA-1 Doe 4 (3.0%) 2 (1.5%) 2 (1.5%) 8 (2.0%) \n INV ID BRA-11 / Dr. BRA-11 Doe 4 (3.0%) 0 (0.0%) 4 (3.0%) 8 (2.0%) \n INV ID BRA-12 / Dr. BRA-12 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-13 / Dr. BRA-13 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-14 / Dr. BRA-14 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID BRA-15 / Dr. BRA-15 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-2 / Dr. BRA-2 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID BRA-3 / Dr. BRA-3 Doe 0 (0.0%) 2 (1.5%) 0 (0.0%) 2 (0.5%) \n INV ID BRA-4 / Dr. BRA-4 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID BRA-5 / Dr. BRA-5 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID BRA-6 / Dr. BRA-6 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-7 / Dr. BRA-7 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n add_overall_col(label = \"All Patients\") %>%\n split_rows_by(\"COUNTRY\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adsl$COUNTRY)) %>%\n summarize_row_groups() %>%\n split_rows_by(\"INVID_INVNAM\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adsl$INVID_INVNAM)\n ) %>%\n summarize_row_groups()\n\nresult <- build_table(lyt, adsl)\nresult\n\nCountry A: Drug X B: Placebo C: Combination All Patients\n Investigator Number/Name (N=134) (N=134) (N=132) (N=400) \n——————————————————————————————————————————————————————————————————————————————————————————\nCHN 74 (55.2%) 81 (60.4%) 64 (48.5%) 219 (54.8%) \n INV ID CHN-1 / Dr. CHN-1 Doe 21 (15.7%) 20 (14.9%) 16 (12.1%) 57 (14.2%) \n INV ID CHN-10 / Dr. CHN-10 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID CHN-11 / Dr. CHN-11 Doe 12 (9.0%) 20 (14.9%) 16 (12.1%) 48 (12.0%) \n INV ID CHN-12 / Dr. CHN-12 Doe 4 (3.0%) 3 (2.2%) 1 (0.8%) 8 (2.0%) \n INV ID CHN-13 / Dr. CHN-13 Doe 2 (1.5%) 6 (4.5%) 0 (0.0%) 8 (2.0%) \n INV ID CHN-14 / Dr. CHN-14 Doe 4 (3.0%) 2 (1.5%) 3 (2.3%) 9 (2.2%) \n INV ID CHN-15 / Dr. CHN-15 Doe 2 (1.5%) 0 (0.0%) 4 (3.0%) 6 (1.5%) \n INV ID CHN-16 / Dr. CHN-16 Doe 0 (0.0%) 3 (2.2%) 3 (2.3%) 6 (1.5%) \n INV ID CHN-17 / Dr. CHN-17 Doe 4 (3.0%) 4 (3.0%) 3 (2.3%) 11 (2.8%) \n INV ID CHN-18 / Dr. CHN-18 Doe 1 (0.7%) 0 (0.0%) 2 (1.5%) 3 (0.8%) \n INV ID CHN-2 / Dr. CHN-2 Doe 9 (6.7%) 4 (3.0%) 3 (2.3%) 16 (4.0%) \n INV ID CHN-3 / Dr. CHN-3 Doe 5 (3.7%) 1 (0.7%) 5 (3.8%) 11 (2.8%) \n INV ID CHN-4 / Dr. CHN-4 Doe 3 (2.2%) 3 (2.2%) 3 (2.3%) 9 (2.2%) \n INV ID CHN-5 / Dr. CHN-5 Doe 4 (3.0%) 3 (2.2%) 4 (3.0%) 11 (2.8%) \n INV ID CHN-6 / Dr. CHN-6 Doe 1 (0.7%) 3 (2.2%) 0 (0.0%) 4 (1.0%) \n INV ID CHN-7 / Dr. CHN-7 Doe 0 (0.0%) 5 (3.7%) 1 (0.8%) 6 (1.5%) \n INV ID CHN-8 / Dr. CHN-8 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID CHN-9 / Dr. CHN-9 Doe 1 (0.7%) 2 (1.5%) 0 (0.0%) 3 (0.8%) \nUSA 10 (7.5%) 13 (9.7%) 17 (12.9%) 40 (10.0%) \n INV ID USA-1 / Dr. USA-1 Doe 1 (0.7%) 4 (3.0%) 5 (3.8%) 10 (2.5%) \n INV ID USA-11 / Dr. USA-11 Doe 4 (3.0%) 2 (1.5%) 3 (2.3%) 9 (2.2%) \n INV ID USA-12 / Dr. USA-12 Doe 1 (0.7%) 2 (1.5%) 3 (2.3%) 6 (1.5%) \n INV ID USA-14 / Dr. USA-14 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID USA-15 / Dr. USA-15 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID USA-17 / Dr. USA-17 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID USA-19 / Dr. USA-19 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-2 / Dr. USA-2 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-3 / Dr. USA-3 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID USA-4 / Dr. USA-4 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID USA-5 / Dr. USA-5 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID USA-6 / Dr. USA-6 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID USA-8 / Dr. USA-8 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-9 / Dr. USA-9 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \nBRA 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \n INV ID BRA-1 / Dr. BRA-1 Doe 4 (3.0%) 2 (1.5%) 2 (1.5%) 8 (2.0%) \n INV ID BRA-11 / Dr. BRA-11 Doe 4 (3.0%) 0 (0.0%) 4 (3.0%) 8 (2.0%) \n INV ID BRA-12 / Dr. BRA-12 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-13 / Dr. BRA-13 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-14 / Dr. BRA-14 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID BRA-15 / Dr. BRA-15 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-2 / Dr. BRA-2 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID BRA-3 / Dr. BRA-3 Doe 0 (0.0%) 2 (1.5%) 0 (0.0%) 2 (0.5%) \n INV ID BRA-4 / Dr. BRA-4 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID BRA-5 / Dr. BRA-5 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID BRA-6 / Dr. BRA-6 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-7 / Dr. BRA-7 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nPAK 12 (9.0%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \n INV ID PAK-1 / Dr. PAK-1 Doe 2 (1.5%) 4 (3.0%) 4 (3.0%) 10 (2.5%) \n INV ID PAK-11 / Dr. PAK-11 Doe 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID PAK-12 / Dr. PAK-12 Doe 2 (1.5%) 0 (0.0%) 0 (0.0%) 2 (0.5%) \n INV ID PAK-13 / Dr. PAK-13 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID PAK-14 / Dr. PAK-14 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID PAK-15 / Dr. PAK-15 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID PAK-2 / Dr. PAK-2 Doe 1 (0.7%) 0 (0.0%) 2 (1.5%) 3 (0.8%) \n INV ID PAK-4 / Dr. PAK-4 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID PAK-5 / Dr. PAK-5 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nNGA 8 (6.0%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \n INV ID NGA-1 / Dr. NGA-1 Doe 3 (2.2%) 3 (2.2%) 4 (3.0%) 10 (2.5%) \n INV ID NGA-11 / Dr. NGA-11 Doe 1 (0.7%) 2 (1.5%) 3 (2.3%) 6 (1.5%) \n INV ID NGA-12 / Dr. NGA-12 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID NGA-17 / Dr. NGA-17 Doe 2 (1.5%) 0 (0.0%) 0 (0.0%) 2 (0.5%) \n INV ID NGA-2 / Dr. NGA-2 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID NGA-4 / Dr. NGA-4 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID NGA-5 / Dr. NGA-5 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID NGA-6 / Dr. NGA-6 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nRUS 5 (3.7%) 8 (6.0%) 6 (4.5%) 19 (4.8%) \n INV ID RUS-1 / Dr. RUS-1 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-11 / Dr. RUS-11 Doe 0 (0.0%) 2 (1.5%) 2 (1.5%) 4 (1.0%) \n INV ID RUS-12 / Dr. RUS-12 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-13 / Dr. RUS-13 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-14 / Dr. RUS-14 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID RUS-16 / Dr. RUS-16 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID RUS-18 / Dr. RUS-18 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-2 / Dr. RUS-2 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-3 / Dr. RUS-3 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID RUS-4 / Dr. RUS-4 Doe 0 (0.0%) 2 (1.5%) 1 (0.8%) 3 (0.8%) \n INV ID RUS-5 / Dr. RUS-5 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-6 / Dr. RUS-6 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-7 / Dr. RUS-7 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nJPN 5 (3.7%) 4 (3.0%) 9 (6.8%) 18 (4.5%) \n INV ID JPN-1 / Dr. JPN-1 Doe 2 (1.5%) 2 (1.5%) 1 (0.8%) 5 (1.2%) \n INV ID JPN-11 / Dr. JPN-11 Doe 0 (0.0%) 0 (0.0%) 3 (2.3%) 3 (0.8%) \n INV ID JPN-12 / Dr. JPN-12 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID JPN-14 / Dr. JPN-14 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-17 / Dr. JPN-17 Doe 0 (0.0%) 0 (0.0%) 2 (1.5%) 2 (0.5%) \n INV ID JPN-18 / Dr. JPN-18 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-2 / Dr. JPN-2 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID JPN-3 / Dr. JPN-3 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-5 / Dr. JPN-5 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID JPN-6 / Dr. JPN-6 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \nGBR 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID GBR-1 / Dr. GBR-1 Doe 2 (1.5%) 0 (0.0%) 1 (0.8%) 3 (0.8%) \n INV ID GBR-11 / Dr. GBR-11 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID GBR-13 / Dr. GBR-13 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-15 / Dr. GBR-15 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-17 / Dr. GBR-17 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-6 / Dr. GBR-6 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \nCAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2.0%) \n INV ID CAN-1 / Dr. CAN-1 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID CAN-11 / Dr. CAN-11 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID CAN-14 / Dr. CAN-14 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID CAN-4 / Dr. CAN-4 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID CAN-5 / Dr. CAN-5 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n\n\n\n\nNote that for this module application, only the variables passed into by_vars are used when row_groups is selected. Variables passed into summarize_vars are additionally used when row_groups is deselected.\n\nCodelibrary(dplyr)\nlibrary(forcats)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\n\nadsl_labels <- var_labels(adsl)\n\nadsl <- adsl %>%\n mutate(\n REGION1 = droplevels(REGION1),\n COUNTRY = droplevels(COUNTRY),\n INVID_INVNAM = paste(INVID, INVNAM, sep = \" / \")\n ) %>%\n arrange(REGION1, COUNTRY, INVID) %>%\n mutate(\n INVID = factor(INVID),\n SITEID = factor(SITEID),\n INVNAM = factor(INVNAM),\n INVID_INVNAM = factor(INVID_INVNAM)\n )\n\nvar_labels(adsl) <- c(adsl_labels, \"Investigator Number/Name\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl,\n code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))\n ADSL_labels <- var_labels(ADSL)\n ADSL <- ADSL %>% mutate(\n REGION1 = droplevels(REGION1),\n COUNTRY = droplevels(COUNTRY),\n INVID_INVNAM = paste(INVID, INVNAM, sep = \" / \")\n ) %>%\n arrange(REGION1, COUNTRY, INVID) %>%\n mutate(\n INVID = factor(INVID),\n SITEID = factor(SITEID),\n INVNAM = factor(INVNAM),\n INVID_INVNAM = factor(INVID_INVNAM)\n )\n\n var_labels(ADSL) <- c(ADSL_labels, \"Investigator Number/Name\")'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"Enrollment Table\",\n dataname = \"ADSL\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adsl, c(\"REGION1\", \"COUNTRY\", \"SITEID\", \"INVID\", \"INVNAM\", \"INVID_INVNAM\")),\n selected = c(\"REGION1\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(adsl, c(\"REGION1\", \"COUNTRY\", \"SITEID\", \"INVID\", \"INVNAM\", \"INVID_INVNAM\")),\n selected = c(\"SITEID\")\n ),\n denominator = choices_selected(\n choices = c(\"n\", \"N\", \"omit\"),\n selected = \"N\",\n fixed = TRUE\n ),\n useNA = \"ifany\",\n row_groups = TRUE\n )\n )\n)\n\n[INFO] 2023-08-04 14:56:30.9756 pid:8064 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] scda_0.1.6.9010 forcats_1.0.0 \n[13] dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/enrollment01.lock'.\n\n\nDownload" + "text": "Data Setup\nENT01 – Enrollment by Region, Country, and Investigator Number\nENT01A – Enrollment by Country and Investigator Number\nENT02 – Enrollment by Region, Country, and Investigator Number/Name\nENT02A – Enrollment by Country and Investigator Number/Name\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(forcats)\nlibrary(scda)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\n\nadsl <- adsl %>%\n mutate(\n REGION1 = droplevels(REGION1),\n COUNTRY = droplevels(COUNTRY),\n INVID_INVNAM = paste(INVID, INVNAM, sep = \" / \")\n ) %>%\n mutate(\n INVID = factor(INVID),\n SITEID = factor(SITEID),\n INVNAM = factor(INVNAM),\n INVID_INVNAM = factor(INVID_INVNAM)\n ) %>%\n var_relabel(\n INVID_INVNAM = \"Investigator Number/Name\",\n REGION1 = \"Geographic Region 1\",\n COUNTRY = \"Country\",\n INVID = \"Investigator Identifier\"\n ) %>%\n arrange(REGION1, COUNTRY, INVID)\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n add_overall_col(label = \"All Patients\") %>%\n split_rows_by(\"REGION1\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adsl$REGION1)) %>%\n summarize_row_groups() %>%\n split_rows_by(\"COUNTRY\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adsl$COUNTRY)) %>%\n summarize_row_groups() %>%\n split_rows_by(\"INVID\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adsl$INVID)) %>%\n summarize_row_groups()\n\nresult <- build_table(lyt, adsl)\nresult\n\nGeographic Region 1 \n Country A: Drug X B: Placebo C: Combination All Patients\n Investigator Identifier (N=134) (N=134) (N=132) (N=400) \n—————————————————————————————————————————————————————————————————————————————————————\nAfrica 8 (6.0%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \n NGA 8 (6.0%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \n INV ID NGA-1 3 (2.2%) 3 (2.2%) 4 (3.0%) 10 (2.5%) \n INV ID NGA-11 1 (0.7%) 2 (1.5%) 3 (2.3%) 6 (1.5%) \n INV ID NGA-12 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID NGA-17 2 (1.5%) 0 (0.0%) 0 (0.0%) 2 (0.5%) \n INV ID NGA-2 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID NGA-4 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID NGA-5 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID NGA-6 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nAsia 91 (67.9%) 94 (70.1%) 83 (62.9%) 268 (67.0%) \n CHN 74 (55.2%) 81 (60.4%) 64 (48.5%) 219 (54.8%) \n INV ID CHN-1 21 (15.7%) 20 (14.9%) 16 (12.1%) 57 (14.2%) \n INV ID CHN-10 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID CHN-11 12 (9.0%) 20 (14.9%) 16 (12.1%) 48 (12.0%) \n INV ID CHN-12 4 (3.0%) 3 (2.2%) 1 (0.8%) 8 (2.0%) \n INV ID CHN-13 2 (1.5%) 6 (4.5%) 0 (0.0%) 8 (2.0%) \n INV ID CHN-14 4 (3.0%) 2 (1.5%) 3 (2.3%) 9 (2.2%) \n INV ID CHN-15 2 (1.5%) 0 (0.0%) 4 (3.0%) 6 (1.5%) \n INV ID CHN-16 0 (0.0%) 3 (2.2%) 3 (2.3%) 6 (1.5%) \n INV ID CHN-17 4 (3.0%) 4 (3.0%) 3 (2.3%) 11 (2.8%) \n INV ID CHN-18 1 (0.7%) 0 (0.0%) 2 (1.5%) 3 (0.8%) \n INV ID CHN-2 9 (6.7%) 4 (3.0%) 3 (2.3%) 16 (4.0%) \n INV ID CHN-3 5 (3.7%) 1 (0.7%) 5 (3.8%) 11 (2.8%) \n INV ID CHN-4 3 (2.2%) 3 (2.2%) 3 (2.3%) 9 (2.2%) \n INV ID CHN-5 4 (3.0%) 3 (2.2%) 4 (3.0%) 11 (2.8%) \n INV ID CHN-6 1 (0.7%) 3 (2.2%) 0 (0.0%) 4 (1.0%) \n INV ID CHN-7 0 (0.0%) 5 (3.7%) 1 (0.8%) 6 (1.5%) \n INV ID CHN-8 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID CHN-9 1 (0.7%) 2 (1.5%) 0 (0.0%) 3 (0.8%) \n PAK 12 (9.0%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \n INV ID PAK-1 2 (1.5%) 4 (3.0%) 4 (3.0%) 10 (2.5%) \n INV ID PAK-11 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID PAK-12 2 (1.5%) 0 (0.0%) 0 (0.0%) 2 (0.5%) \n INV ID PAK-13 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID PAK-14 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID PAK-15 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID PAK-2 1 (0.7%) 0 (0.0%) 2 (1.5%) 3 (0.8%) \n INV ID PAK-4 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID PAK-5 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n JPN 5 (3.7%) 4 (3.0%) 9 (6.8%) 18 (4.5%) \n INV ID JPN-1 2 (1.5%) 2 (1.5%) 1 (0.8%) 5 (1.2%) \n INV ID JPN-11 0 (0.0%) 0 (0.0%) 3 (2.3%) 3 (0.8%) \n INV ID JPN-12 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID JPN-14 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-17 0 (0.0%) 0 (0.0%) 2 (1.5%) 2 (0.5%) \n INV ID JPN-18 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-2 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID JPN-3 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-5 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID JPN-6 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \nEurasia 5 (3.7%) 8 (6.0%) 6 (4.5%) 19 (4.8%) \n RUS 5 (3.7%) 8 (6.0%) 6 (4.5%) 19 (4.8%) \n INV ID RUS-1 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-11 0 (0.0%) 2 (1.5%) 2 (1.5%) 4 (1.0%) \n INV ID RUS-12 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-13 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-14 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID RUS-16 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID RUS-18 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-2 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-3 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID RUS-4 0 (0.0%) 2 (1.5%) 1 (0.8%) 3 (0.8%) \n INV ID RUS-5 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-6 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-7 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nEurope 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n GBR 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID GBR-1 2 (1.5%) 0 (0.0%) 1 (0.8%) 3 (0.8%) \n INV ID GBR-11 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID GBR-13 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-15 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-17 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-6 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \nNorth America 13 (9.7%) 15 (11.2%) 20 (15.2%) 48 (12.0%) \n USA 10 (7.5%) 13 (9.7%) 17 (12.9%) 40 (10.0%) \n INV ID USA-1 1 (0.7%) 4 (3.0%) 5 (3.8%) 10 (2.5%) \n INV ID USA-11 4 (3.0%) 2 (1.5%) 3 (2.3%) 9 (2.2%) \n INV ID USA-12 1 (0.7%) 2 (1.5%) 3 (2.3%) 6 (1.5%) \n INV ID USA-14 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID USA-15 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID USA-17 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID USA-19 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-2 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-3 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID USA-4 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID USA-5 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID USA-6 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID USA-8 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-9 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n CAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2.0%) \n INV ID CAN-1 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID CAN-11 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID CAN-14 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID CAN-4 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID CAN-5 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nSouth America 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \n BRA 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \n INV ID BRA-1 4 (3.0%) 2 (1.5%) 2 (1.5%) 8 (2.0%) \n INV ID BRA-11 4 (3.0%) 0 (0.0%) 4 (3.0%) 8 (2.0%) \n INV ID BRA-12 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-13 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-14 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID BRA-15 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-2 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID BRA-3 0 (0.0%) 2 (1.5%) 0 (0.0%) 2 (0.5%) \n INV ID BRA-4 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID BRA-5 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID BRA-6 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-7 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n add_overall_col(label = \"All Patients\") %>%\n split_rows_by(\"COUNTRY\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adsl$COUNTRY)) %>%\n summarize_row_groups() %>%\n split_rows_by(\"INVID\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adsl$INVID)) %>%\n summarize_row_groups()\n\nresult <- build_table(lyt, adsl)\nresult\n\nCountry A: Drug X B: Placebo C: Combination All Patients\n Investigator Identifier (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————————————————\nCHN 74 (55.2%) 81 (60.4%) 64 (48.5%) 219 (54.8%) \n INV ID CHN-1 21 (15.7%) 20 (14.9%) 16 (12.1%) 57 (14.2%) \n INV ID CHN-10 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID CHN-11 12 (9.0%) 20 (14.9%) 16 (12.1%) 48 (12.0%) \n INV ID CHN-12 4 (3.0%) 3 (2.2%) 1 (0.8%) 8 (2.0%) \n INV ID CHN-13 2 (1.5%) 6 (4.5%) 0 (0.0%) 8 (2.0%) \n INV ID CHN-14 4 (3.0%) 2 (1.5%) 3 (2.3%) 9 (2.2%) \n INV ID CHN-15 2 (1.5%) 0 (0.0%) 4 (3.0%) 6 (1.5%) \n INV ID CHN-16 0 (0.0%) 3 (2.2%) 3 (2.3%) 6 (1.5%) \n INV ID CHN-17 4 (3.0%) 4 (3.0%) 3 (2.3%) 11 (2.8%) \n INV ID CHN-18 1 (0.7%) 0 (0.0%) 2 (1.5%) 3 (0.8%) \n INV ID CHN-2 9 (6.7%) 4 (3.0%) 3 (2.3%) 16 (4.0%) \n INV ID CHN-3 5 (3.7%) 1 (0.7%) 5 (3.8%) 11 (2.8%) \n INV ID CHN-4 3 (2.2%) 3 (2.2%) 3 (2.3%) 9 (2.2%) \n INV ID CHN-5 4 (3.0%) 3 (2.2%) 4 (3.0%) 11 (2.8%) \n INV ID CHN-6 1 (0.7%) 3 (2.2%) 0 (0.0%) 4 (1.0%) \n INV ID CHN-7 0 (0.0%) 5 (3.7%) 1 (0.8%) 6 (1.5%) \n INV ID CHN-8 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID CHN-9 1 (0.7%) 2 (1.5%) 0 (0.0%) 3 (0.8%) \nUSA 10 (7.5%) 13 (9.7%) 17 (12.9%) 40 (10.0%) \n INV ID USA-1 1 (0.7%) 4 (3.0%) 5 (3.8%) 10 (2.5%) \n INV ID USA-11 4 (3.0%) 2 (1.5%) 3 (2.3%) 9 (2.2%) \n INV ID USA-12 1 (0.7%) 2 (1.5%) 3 (2.3%) 6 (1.5%) \n INV ID USA-14 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID USA-15 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID USA-17 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID USA-19 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-2 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-3 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID USA-4 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID USA-5 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID USA-6 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID USA-8 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-9 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \nBRA 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \n INV ID BRA-1 4 (3.0%) 2 (1.5%) 2 (1.5%) 8 (2.0%) \n INV ID BRA-11 4 (3.0%) 0 (0.0%) 4 (3.0%) 8 (2.0%) \n INV ID BRA-12 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-13 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-14 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID BRA-15 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-2 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID BRA-3 0 (0.0%) 2 (1.5%) 0 (0.0%) 2 (0.5%) \n INV ID BRA-4 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID BRA-5 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID BRA-6 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-7 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nPAK 12 (9.0%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \n INV ID PAK-1 2 (1.5%) 4 (3.0%) 4 (3.0%) 10 (2.5%) \n INV ID PAK-11 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID PAK-12 2 (1.5%) 0 (0.0%) 0 (0.0%) 2 (0.5%) \n INV ID PAK-13 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID PAK-14 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID PAK-15 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID PAK-2 1 (0.7%) 0 (0.0%) 2 (1.5%) 3 (0.8%) \n INV ID PAK-4 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID PAK-5 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nNGA 8 (6.0%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \n INV ID NGA-1 3 (2.2%) 3 (2.2%) 4 (3.0%) 10 (2.5%) \n INV ID NGA-11 1 (0.7%) 2 (1.5%) 3 (2.3%) 6 (1.5%) \n INV ID NGA-12 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID NGA-17 2 (1.5%) 0 (0.0%) 0 (0.0%) 2 (0.5%) \n INV ID NGA-2 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID NGA-4 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID NGA-5 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID NGA-6 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nRUS 5 (3.7%) 8 (6.0%) 6 (4.5%) 19 (4.8%) \n INV ID RUS-1 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-11 0 (0.0%) 2 (1.5%) 2 (1.5%) 4 (1.0%) \n INV ID RUS-12 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-13 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-14 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID RUS-16 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID RUS-18 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-2 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-3 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID RUS-4 0 (0.0%) 2 (1.5%) 1 (0.8%) 3 (0.8%) \n INV ID RUS-5 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-6 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-7 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nJPN 5 (3.7%) 4 (3.0%) 9 (6.8%) 18 (4.5%) \n INV ID JPN-1 2 (1.5%) 2 (1.5%) 1 (0.8%) 5 (1.2%) \n INV ID JPN-11 0 (0.0%) 0 (0.0%) 3 (2.3%) 3 (0.8%) \n INV ID JPN-12 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID JPN-14 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-17 0 (0.0%) 0 (0.0%) 2 (1.5%) 2 (0.5%) \n INV ID JPN-18 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-2 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID JPN-3 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-5 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID JPN-6 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \nGBR 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID GBR-1 2 (1.5%) 0 (0.0%) 1 (0.8%) 3 (0.8%) \n INV ID GBR-11 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID GBR-13 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-15 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-17 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-6 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \nCAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2.0%) \n INV ID CAN-1 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID CAN-11 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID CAN-14 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID CAN-4 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID CAN-5 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n add_overall_col(label = \"All Patients\") %>%\n split_rows_by(\"REGION1\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adsl$REGION1)) %>%\n summarize_row_groups() %>%\n split_rows_by(\"COUNTRY\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adsl$COUNTRY)) %>%\n summarize_row_groups() %>%\n split_rows_by(\"INVID_INVNAM\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adsl$INVID_INVNAM)\n ) %>%\n summarize_row_groups()\n\nresult <- build_table(lyt, adsl)\nresult\n\nGeographic Region 1 \n Country A: Drug X B: Placebo C: Combination All Patients\n Investigator Number/Name (N=134) (N=134) (N=132) (N=400) \n————————————————————————————————————————————————————————————————————————————————————————————\nAfrica 8 (6.0%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \n NGA 8 (6.0%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \n INV ID NGA-1 / Dr. NGA-1 Doe 3 (2.2%) 3 (2.2%) 4 (3.0%) 10 (2.5%) \n INV ID NGA-11 / Dr. NGA-11 Doe 1 (0.7%) 2 (1.5%) 3 (2.3%) 6 (1.5%) \n INV ID NGA-12 / Dr. NGA-12 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID NGA-17 / Dr. NGA-17 Doe 2 (1.5%) 0 (0.0%) 0 (0.0%) 2 (0.5%) \n INV ID NGA-2 / Dr. NGA-2 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID NGA-4 / Dr. NGA-4 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID NGA-5 / Dr. NGA-5 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID NGA-6 / Dr. NGA-6 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nAsia 91 (67.9%) 94 (70.1%) 83 (62.9%) 268 (67.0%) \n CHN 74 (55.2%) 81 (60.4%) 64 (48.5%) 219 (54.8%) \n INV ID CHN-1 / Dr. CHN-1 Doe 21 (15.7%) 20 (14.9%) 16 (12.1%) 57 (14.2%) \n INV ID CHN-10 / Dr. CHN-10 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID CHN-11 / Dr. CHN-11 Doe 12 (9.0%) 20 (14.9%) 16 (12.1%) 48 (12.0%) \n INV ID CHN-12 / Dr. CHN-12 Doe 4 (3.0%) 3 (2.2%) 1 (0.8%) 8 (2.0%) \n INV ID CHN-13 / Dr. CHN-13 Doe 2 (1.5%) 6 (4.5%) 0 (0.0%) 8 (2.0%) \n INV ID CHN-14 / Dr. CHN-14 Doe 4 (3.0%) 2 (1.5%) 3 (2.3%) 9 (2.2%) \n INV ID CHN-15 / Dr. CHN-15 Doe 2 (1.5%) 0 (0.0%) 4 (3.0%) 6 (1.5%) \n INV ID CHN-16 / Dr. CHN-16 Doe 0 (0.0%) 3 (2.2%) 3 (2.3%) 6 (1.5%) \n INV ID CHN-17 / Dr. CHN-17 Doe 4 (3.0%) 4 (3.0%) 3 (2.3%) 11 (2.8%) \n INV ID CHN-18 / Dr. CHN-18 Doe 1 (0.7%) 0 (0.0%) 2 (1.5%) 3 (0.8%) \n INV ID CHN-2 / Dr. CHN-2 Doe 9 (6.7%) 4 (3.0%) 3 (2.3%) 16 (4.0%) \n INV ID CHN-3 / Dr. CHN-3 Doe 5 (3.7%) 1 (0.7%) 5 (3.8%) 11 (2.8%) \n INV ID CHN-4 / Dr. CHN-4 Doe 3 (2.2%) 3 (2.2%) 3 (2.3%) 9 (2.2%) \n INV ID CHN-5 / Dr. CHN-5 Doe 4 (3.0%) 3 (2.2%) 4 (3.0%) 11 (2.8%) \n INV ID CHN-6 / Dr. CHN-6 Doe 1 (0.7%) 3 (2.2%) 0 (0.0%) 4 (1.0%) \n INV ID CHN-7 / Dr. CHN-7 Doe 0 (0.0%) 5 (3.7%) 1 (0.8%) 6 (1.5%) \n INV ID CHN-8 / Dr. CHN-8 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID CHN-9 / Dr. CHN-9 Doe 1 (0.7%) 2 (1.5%) 0 (0.0%) 3 (0.8%) \n PAK 12 (9.0%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \n INV ID PAK-1 / Dr. PAK-1 Doe 2 (1.5%) 4 (3.0%) 4 (3.0%) 10 (2.5%) \n INV ID PAK-11 / Dr. PAK-11 Doe 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID PAK-12 / Dr. PAK-12 Doe 2 (1.5%) 0 (0.0%) 0 (0.0%) 2 (0.5%) \n INV ID PAK-13 / Dr. PAK-13 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID PAK-14 / Dr. PAK-14 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID PAK-15 / Dr. PAK-15 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID PAK-2 / Dr. PAK-2 Doe 1 (0.7%) 0 (0.0%) 2 (1.5%) 3 (0.8%) \n INV ID PAK-4 / Dr. PAK-4 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID PAK-5 / Dr. PAK-5 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n JPN 5 (3.7%) 4 (3.0%) 9 (6.8%) 18 (4.5%) \n INV ID JPN-1 / Dr. JPN-1 Doe 2 (1.5%) 2 (1.5%) 1 (0.8%) 5 (1.2%) \n INV ID JPN-11 / Dr. JPN-11 Doe 0 (0.0%) 0 (0.0%) 3 (2.3%) 3 (0.8%) \n INV ID JPN-12 / Dr. JPN-12 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID JPN-14 / Dr. JPN-14 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-17 / Dr. JPN-17 Doe 0 (0.0%) 0 (0.0%) 2 (1.5%) 2 (0.5%) \n INV ID JPN-18 / Dr. JPN-18 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-2 / Dr. JPN-2 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID JPN-3 / Dr. JPN-3 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-5 / Dr. JPN-5 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID JPN-6 / Dr. JPN-6 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \nEurasia 5 (3.7%) 8 (6.0%) 6 (4.5%) 19 (4.8%) \n RUS 5 (3.7%) 8 (6.0%) 6 (4.5%) 19 (4.8%) \n INV ID RUS-1 / Dr. RUS-1 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-11 / Dr. RUS-11 Doe 0 (0.0%) 2 (1.5%) 2 (1.5%) 4 (1.0%) \n INV ID RUS-12 / Dr. RUS-12 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-13 / Dr. RUS-13 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-14 / Dr. RUS-14 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID RUS-16 / Dr. RUS-16 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID RUS-18 / Dr. RUS-18 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-2 / Dr. RUS-2 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-3 / Dr. RUS-3 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID RUS-4 / Dr. RUS-4 Doe 0 (0.0%) 2 (1.5%) 1 (0.8%) 3 (0.8%) \n INV ID RUS-5 / Dr. RUS-5 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-6 / Dr. RUS-6 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-7 / Dr. RUS-7 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nEurope 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n GBR 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID GBR-1 / Dr. GBR-1 Doe 2 (1.5%) 0 (0.0%) 1 (0.8%) 3 (0.8%) \n INV ID GBR-11 / Dr. GBR-11 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID GBR-13 / Dr. GBR-13 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-15 / Dr. GBR-15 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-17 / Dr. GBR-17 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-6 / Dr. GBR-6 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \nNorth America 13 (9.7%) 15 (11.2%) 20 (15.2%) 48 (12.0%) \n USA 10 (7.5%) 13 (9.7%) 17 (12.9%) 40 (10.0%) \n INV ID USA-1 / Dr. USA-1 Doe 1 (0.7%) 4 (3.0%) 5 (3.8%) 10 (2.5%) \n INV ID USA-11 / Dr. USA-11 Doe 4 (3.0%) 2 (1.5%) 3 (2.3%) 9 (2.2%) \n INV ID USA-12 / Dr. USA-12 Doe 1 (0.7%) 2 (1.5%) 3 (2.3%) 6 (1.5%) \n INV ID USA-14 / Dr. USA-14 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID USA-15 / Dr. USA-15 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID USA-17 / Dr. USA-17 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID USA-19 / Dr. USA-19 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-2 / Dr. USA-2 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-3 / Dr. USA-3 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID USA-4 / Dr. USA-4 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID USA-5 / Dr. USA-5 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID USA-6 / Dr. USA-6 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID USA-8 / Dr. USA-8 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-9 / Dr. USA-9 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n CAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2.0%) \n INV ID CAN-1 / Dr. CAN-1 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID CAN-11 / Dr. CAN-11 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID CAN-14 / Dr. CAN-14 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID CAN-4 / Dr. CAN-4 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID CAN-5 / Dr. CAN-5 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nSouth America 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \n BRA 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \n INV ID BRA-1 / Dr. BRA-1 Doe 4 (3.0%) 2 (1.5%) 2 (1.5%) 8 (2.0%) \n INV ID BRA-11 / Dr. BRA-11 Doe 4 (3.0%) 0 (0.0%) 4 (3.0%) 8 (2.0%) \n INV ID BRA-12 / Dr. BRA-12 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-13 / Dr. BRA-13 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-14 / Dr. BRA-14 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID BRA-15 / Dr. BRA-15 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-2 / Dr. BRA-2 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID BRA-3 / Dr. BRA-3 Doe 0 (0.0%) 2 (1.5%) 0 (0.0%) 2 (0.5%) \n INV ID BRA-4 / Dr. BRA-4 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID BRA-5 / Dr. BRA-5 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID BRA-6 / Dr. BRA-6 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-7 / Dr. BRA-7 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n add_overall_col(label = \"All Patients\") %>%\n split_rows_by(\"COUNTRY\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adsl$COUNTRY)) %>%\n summarize_row_groups() %>%\n split_rows_by(\"INVID_INVNAM\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adsl$INVID_INVNAM)\n ) %>%\n summarize_row_groups()\n\nresult <- build_table(lyt, adsl)\nresult\n\nCountry A: Drug X B: Placebo C: Combination All Patients\n Investigator Number/Name (N=134) (N=134) (N=132) (N=400) \n——————————————————————————————————————————————————————————————————————————————————————————\nCHN 74 (55.2%) 81 (60.4%) 64 (48.5%) 219 (54.8%) \n INV ID CHN-1 / Dr. CHN-1 Doe 21 (15.7%) 20 (14.9%) 16 (12.1%) 57 (14.2%) \n INV ID CHN-10 / Dr. CHN-10 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID CHN-11 / Dr. CHN-11 Doe 12 (9.0%) 20 (14.9%) 16 (12.1%) 48 (12.0%) \n INV ID CHN-12 / Dr. CHN-12 Doe 4 (3.0%) 3 (2.2%) 1 (0.8%) 8 (2.0%) \n INV ID CHN-13 / Dr. CHN-13 Doe 2 (1.5%) 6 (4.5%) 0 (0.0%) 8 (2.0%) \n INV ID CHN-14 / Dr. CHN-14 Doe 4 (3.0%) 2 (1.5%) 3 (2.3%) 9 (2.2%) \n INV ID CHN-15 / Dr. CHN-15 Doe 2 (1.5%) 0 (0.0%) 4 (3.0%) 6 (1.5%) \n INV ID CHN-16 / Dr. CHN-16 Doe 0 (0.0%) 3 (2.2%) 3 (2.3%) 6 (1.5%) \n INV ID CHN-17 / Dr. CHN-17 Doe 4 (3.0%) 4 (3.0%) 3 (2.3%) 11 (2.8%) \n INV ID CHN-18 / Dr. CHN-18 Doe 1 (0.7%) 0 (0.0%) 2 (1.5%) 3 (0.8%) \n INV ID CHN-2 / Dr. CHN-2 Doe 9 (6.7%) 4 (3.0%) 3 (2.3%) 16 (4.0%) \n INV ID CHN-3 / Dr. CHN-3 Doe 5 (3.7%) 1 (0.7%) 5 (3.8%) 11 (2.8%) \n INV ID CHN-4 / Dr. CHN-4 Doe 3 (2.2%) 3 (2.2%) 3 (2.3%) 9 (2.2%) \n INV ID CHN-5 / Dr. CHN-5 Doe 4 (3.0%) 3 (2.2%) 4 (3.0%) 11 (2.8%) \n INV ID CHN-6 / Dr. CHN-6 Doe 1 (0.7%) 3 (2.2%) 0 (0.0%) 4 (1.0%) \n INV ID CHN-7 / Dr. CHN-7 Doe 0 (0.0%) 5 (3.7%) 1 (0.8%) 6 (1.5%) \n INV ID CHN-8 / Dr. CHN-8 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID CHN-9 / Dr. CHN-9 Doe 1 (0.7%) 2 (1.5%) 0 (0.0%) 3 (0.8%) \nUSA 10 (7.5%) 13 (9.7%) 17 (12.9%) 40 (10.0%) \n INV ID USA-1 / Dr. USA-1 Doe 1 (0.7%) 4 (3.0%) 5 (3.8%) 10 (2.5%) \n INV ID USA-11 / Dr. USA-11 Doe 4 (3.0%) 2 (1.5%) 3 (2.3%) 9 (2.2%) \n INV ID USA-12 / Dr. USA-12 Doe 1 (0.7%) 2 (1.5%) 3 (2.3%) 6 (1.5%) \n INV ID USA-14 / Dr. USA-14 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID USA-15 / Dr. USA-15 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID USA-17 / Dr. USA-17 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID USA-19 / Dr. USA-19 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-2 / Dr. USA-2 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-3 / Dr. USA-3 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID USA-4 / Dr. USA-4 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID USA-5 / Dr. USA-5 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID USA-6 / Dr. USA-6 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID USA-8 / Dr. USA-8 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID USA-9 / Dr. USA-9 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \nBRA 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \n INV ID BRA-1 / Dr. BRA-1 Doe 4 (3.0%) 2 (1.5%) 2 (1.5%) 8 (2.0%) \n INV ID BRA-11 / Dr. BRA-11 Doe 4 (3.0%) 0 (0.0%) 4 (3.0%) 8 (2.0%) \n INV ID BRA-12 / Dr. BRA-12 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-13 / Dr. BRA-13 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-14 / Dr. BRA-14 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID BRA-15 / Dr. BRA-15 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-2 / Dr. BRA-2 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID BRA-3 / Dr. BRA-3 Doe 0 (0.0%) 2 (1.5%) 0 (0.0%) 2 (0.5%) \n INV ID BRA-4 / Dr. BRA-4 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID BRA-5 / Dr. BRA-5 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID BRA-6 / Dr. BRA-6 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID BRA-7 / Dr. BRA-7 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nPAK 12 (9.0%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \n INV ID PAK-1 / Dr. PAK-1 Doe 2 (1.5%) 4 (3.0%) 4 (3.0%) 10 (2.5%) \n INV ID PAK-11 / Dr. PAK-11 Doe 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID PAK-12 / Dr. PAK-12 Doe 2 (1.5%) 0 (0.0%) 0 (0.0%) 2 (0.5%) \n INV ID PAK-13 / Dr. PAK-13 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID PAK-14 / Dr. PAK-14 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID PAK-15 / Dr. PAK-15 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID PAK-2 / Dr. PAK-2 Doe 1 (0.7%) 0 (0.0%) 2 (1.5%) 3 (0.8%) \n INV ID PAK-4 / Dr. PAK-4 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID PAK-5 / Dr. PAK-5 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nNGA 8 (6.0%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \n INV ID NGA-1 / Dr. NGA-1 Doe 3 (2.2%) 3 (2.2%) 4 (3.0%) 10 (2.5%) \n INV ID NGA-11 / Dr. NGA-11 Doe 1 (0.7%) 2 (1.5%) 3 (2.3%) 6 (1.5%) \n INV ID NGA-12 / Dr. NGA-12 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID NGA-17 / Dr. NGA-17 Doe 2 (1.5%) 0 (0.0%) 0 (0.0%) 2 (0.5%) \n INV ID NGA-2 / Dr. NGA-2 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID NGA-4 / Dr. NGA-4 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID NGA-5 / Dr. NGA-5 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID NGA-6 / Dr. NGA-6 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nRUS 5 (3.7%) 8 (6.0%) 6 (4.5%) 19 (4.8%) \n INV ID RUS-1 / Dr. RUS-1 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-11 / Dr. RUS-11 Doe 0 (0.0%) 2 (1.5%) 2 (1.5%) 4 (1.0%) \n INV ID RUS-12 / Dr. RUS-12 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-13 / Dr. RUS-13 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-14 / Dr. RUS-14 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID RUS-16 / Dr. RUS-16 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID RUS-18 / Dr. RUS-18 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-2 / Dr. RUS-2 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-3 / Dr. RUS-3 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID RUS-4 / Dr. RUS-4 Doe 0 (0.0%) 2 (1.5%) 1 (0.8%) 3 (0.8%) \n INV ID RUS-5 / Dr. RUS-5 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-6 / Dr. RUS-6 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID RUS-7 / Dr. RUS-7 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \nJPN 5 (3.7%) 4 (3.0%) 9 (6.8%) 18 (4.5%) \n INV ID JPN-1 / Dr. JPN-1 Doe 2 (1.5%) 2 (1.5%) 1 (0.8%) 5 (1.2%) \n INV ID JPN-11 / Dr. JPN-11 Doe 0 (0.0%) 0 (0.0%) 3 (2.3%) 3 (0.8%) \n INV ID JPN-12 / Dr. JPN-12 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID JPN-14 / Dr. JPN-14 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-17 / Dr. JPN-17 Doe 0 (0.0%) 0 (0.0%) 2 (1.5%) 2 (0.5%) \n INV ID JPN-18 / Dr. JPN-18 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-2 / Dr. JPN-2 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n INV ID JPN-3 / Dr. JPN-3 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID JPN-5 / Dr. JPN-5 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID JPN-6 / Dr. JPN-6 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \nGBR 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID GBR-1 / Dr. GBR-1 Doe 2 (1.5%) 0 (0.0%) 1 (0.8%) 3 (0.8%) \n INV ID GBR-11 / Dr. GBR-11 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID GBR-13 / Dr. GBR-13 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-15 / Dr. GBR-15 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-17 / Dr. GBR-17 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \n INV ID GBR-6 / Dr. GBR-6 Doe 0 (0.0%) 1 (0.7%) 0 (0.0%) 1 (0.2%) \nCAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2.0%) \n INV ID CAN-1 / Dr. CAN-1 Doe 1 (0.7%) 1 (0.7%) 0 (0.0%) 2 (0.5%) \n INV ID CAN-11 / Dr. CAN-11 Doe 1 (0.7%) 0 (0.0%) 1 (0.8%) 2 (0.5%) \n INV ID CAN-14 / Dr. CAN-14 Doe 1 (0.7%) 0 (0.0%) 0 (0.0%) 1 (0.2%) \n INV ID CAN-4 / Dr. CAN-4 Doe 0 (0.0%) 1 (0.7%) 1 (0.8%) 2 (0.5%) \n INV ID CAN-5 / Dr. CAN-5 Doe 0 (0.0%) 0 (0.0%) 1 (0.8%) 1 (0.2%) \n\n\n\n\nNote that for this module application, only the variables passed into by_vars are used when row_groups is selected. Variables passed into summarize_vars are additionally used when row_groups is deselected.\n\nCodelibrary(dplyr)\nlibrary(forcats)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\n\nadsl_labels <- var_labels(adsl)\n\nadsl <- adsl %>%\n mutate(\n REGION1 = droplevels(REGION1),\n COUNTRY = droplevels(COUNTRY),\n INVID_INVNAM = paste(INVID, INVNAM, sep = \" / \")\n ) %>%\n arrange(REGION1, COUNTRY, INVID) %>%\n mutate(\n INVID = factor(INVID),\n SITEID = factor(SITEID),\n INVNAM = factor(INVNAM),\n INVID_INVNAM = factor(INVID_INVNAM)\n )\n\nvar_labels(adsl) <- c(adsl_labels, \"Investigator Number/Name\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl,\n code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))\n ADSL_labels <- var_labels(ADSL)\n ADSL <- ADSL %>% mutate(\n REGION1 = droplevels(REGION1),\n COUNTRY = droplevels(COUNTRY),\n INVID_INVNAM = paste(INVID, INVNAM, sep = \" / \")\n ) %>%\n arrange(REGION1, COUNTRY, INVID) %>%\n mutate(\n INVID = factor(INVID),\n SITEID = factor(SITEID),\n INVNAM = factor(INVNAM),\n INVID_INVNAM = factor(INVID_INVNAM)\n )\n\n var_labels(ADSL) <- c(ADSL_labels, \"Investigator Number/Name\")'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"Enrollment Table\",\n dataname = \"ADSL\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adsl, c(\"REGION1\", \"COUNTRY\", \"SITEID\", \"INVID\", \"INVNAM\", \"INVID_INVNAM\")),\n selected = c(\"REGION1\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(adsl, c(\"REGION1\", \"COUNTRY\", \"SITEID\", \"INVID\", \"INVNAM\", \"INVID_INVNAM\")),\n selected = c(\"SITEID\")\n ),\n denominator = choices_selected(\n choices = c(\"n\", \"N\", \"omit\"),\n selected = \"N\",\n fixed = TRUE\n ),\n useNA = \"ifany\",\n row_groups = TRUE\n )\n )\n)\n\n[INFO] 2023-08-04 15:13:34.1824 pid:8068 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] scda_0.1.6.9010 forcats_1.0.0 \n[13] dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/enrollment01.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/pdt01.html", "href": "tables/safety/pdt01.html", "title": "PDT01", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\naddv <- synthetic_cdisc_dataset(\"latest\", \"addv\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\naddv <- df_explicit_na(addv)\n\naddv <- addv %>%\n var_relabel(\n DVDECOD = \"Category\",\n DVTERM = \"Description\"\n )\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one major protocol deviation\",\n nonunique = \"Total number of major protocol deviations\"\n )\n ) %>%\n split_rows_by(\n \"DVDECOD\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(addv$DVDECOD)\n ) %>%\n count_occurrences(vars = \"DVTERM\") %>%\n append_varlabels(addv, \"DVTERM\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = addv, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(path = c(\"DVDECOD\", \"*\", \"DVTERM\"), scorefun = score_occurrences)\n\nresult\n\nCategory A: Drug X B: Placebo C: Combination\n Description (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one major protocol deviation 28 (20.9%) 22 (16.4%) 18 (13.6%) \nTotal number of major protocol deviations 49 35 35 \nEXCLUSION CRITERIA \n Active or untreated or other excluded cns metastases 2 (1.5%) 4 (3.0%) 1 (0.8%) \n Pregnancy criteria 3 (2.2%) 3 (2.2%) 1 (0.8%) \n History of other malignancies within the last 5 years 3 (2.2%) 1 (0.7%) 1 (0.8%) \n Uncontrolled concurrent condition 2 (1.5%) 0 3 (2.3%) \n Other exclusion criteria 1 (0.7%) 0 2 (1.5%) \n Received prior prohibited therapy or medication 2 (1.5%) 1 (0.7%) 0 \nINCLUSION CRITERIA \n No signed ICF at study entry 5 (3.7%) 0 6 (4.5%) \n Ineligible cancer type or current cancer stage 3 (2.2%) 2 (1.5%) 4 (3.0%) \n Inclusion lab values outside allowed limits 4 (3.0%) 1 (0.7%) 0 \n Does not meet prior therapy requirements 2 (1.5%) 1 (0.7%) 1 (0.8%) \n Inclusion-related test not done/out of window 1 (0.7%) 1 (0.7%) 0 \nMEDICATION \n Discontinued study drug for unspecified reason 3 (2.2%) 2 (1.5%) 1 (0.8%) \n Significant deviation from planned dose 3 (2.2%) 1 (0.7%) 2 (1.5%) \n Received incorrect study medication 0 3 (2.2%) 1 (0.8%) \n Received prohibited concomitant medication 1 (0.7%) 2 (1.5%) 1 (0.8%) \n Dose missed or significantly out of window 2 (1.5%) 0 1 (0.8%) \nPROCEDURAL \n Eligibility-related test not done/out of window 2 (1.5%) 4 (3.0%) 3 (2.3%) \n Omission of screening tumor assessment 4 (3.0%) 1 (0.7%) 3 (2.3%) \n Missed assessment affecting safety/study outcomes 2 (1.5%) 3 (2.2%) 1 (0.8%) \n Failure to sign updated ICF within two visits 2 (1.5%) 1 (0.7%) 1 (0.8%) \n Missed 2 or more efficacy assessments 1 (0.7%) 2 (1.5%) 0 \n Omission of complete lab panel required by protocol 0 0 1 (0.8%) \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\naddv <- synthetic_cdisc_dataset(\"latest\", \"addv\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\naddv <- df_explicit_na(addv)\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'),\n cdisc_dataset(\"ADDV\", addv, code = 'ADDV <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"addv\"))'),\n check = TRUE\n ),\n modules = modules(\n tm_t_events(\n label = \"Major Protocol Deviations Table\",\n dataname = \"ADDV\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(addv, c(\"DVTERM\")),\n selected = c(\"DVTERM\")\n ),\n hlt = choices_selected(\n choices = variable_choices(addv, c(\"DVDECOD\")),\n selected = \"DVDECOD\"\n ),\n add_total = TRUE,\n event_type = \"major protocol deviation\"\n )\n )\n)\n\n[INFO] 2023-08-04 14:55:13.1613 pid:7852 token:[] teal.modules.clinical Initializing tm_t_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/pdt01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\naddv <- synthetic_cdisc_dataset(\"latest\", \"addv\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\naddv <- df_explicit_na(addv)\n\naddv <- addv %>%\n var_relabel(\n DVDECOD = \"Category\",\n DVTERM = \"Description\"\n )\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one major protocol deviation\",\n nonunique = \"Total number of major protocol deviations\"\n )\n ) %>%\n split_rows_by(\n \"DVDECOD\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(addv$DVDECOD)\n ) %>%\n count_occurrences(vars = \"DVTERM\") %>%\n append_varlabels(addv, \"DVTERM\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = addv, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(path = c(\"DVDECOD\", \"*\", \"DVTERM\"), scorefun = score_occurrences)\n\nresult\n\nCategory A: Drug X B: Placebo C: Combination\n Description (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one major protocol deviation 28 (20.9%) 22 (16.4%) 18 (13.6%) \nTotal number of major protocol deviations 49 35 35 \nEXCLUSION CRITERIA \n Active or untreated or other excluded cns metastases 2 (1.5%) 4 (3.0%) 1 (0.8%) \n Pregnancy criteria 3 (2.2%) 3 (2.2%) 1 (0.8%) \n History of other malignancies within the last 5 years 3 (2.2%) 1 (0.7%) 1 (0.8%) \n Uncontrolled concurrent condition 2 (1.5%) 0 3 (2.3%) \n Other exclusion criteria 1 (0.7%) 0 2 (1.5%) \n Received prior prohibited therapy or medication 2 (1.5%) 1 (0.7%) 0 \nINCLUSION CRITERIA \n No signed ICF at study entry 5 (3.7%) 0 6 (4.5%) \n Ineligible cancer type or current cancer stage 3 (2.2%) 2 (1.5%) 4 (3.0%) \n Inclusion lab values outside allowed limits 4 (3.0%) 1 (0.7%) 0 \n Does not meet prior therapy requirements 2 (1.5%) 1 (0.7%) 1 (0.8%) \n Inclusion-related test not done/out of window 1 (0.7%) 1 (0.7%) 0 \nMEDICATION \n Discontinued study drug for unspecified reason 3 (2.2%) 2 (1.5%) 1 (0.8%) \n Significant deviation from planned dose 3 (2.2%) 1 (0.7%) 2 (1.5%) \n Received incorrect study medication 0 3 (2.2%) 1 (0.8%) \n Received prohibited concomitant medication 1 (0.7%) 2 (1.5%) 1 (0.8%) \n Dose missed or significantly out of window 2 (1.5%) 0 1 (0.8%) \nPROCEDURAL \n Eligibility-related test not done/out of window 2 (1.5%) 4 (3.0%) 3 (2.3%) \n Omission of screening tumor assessment 4 (3.0%) 1 (0.7%) 3 (2.3%) \n Missed assessment affecting safety/study outcomes 2 (1.5%) 3 (2.2%) 1 (0.8%) \n Failure to sign updated ICF within two visits 2 (1.5%) 1 (0.7%) 1 (0.8%) \n Missed 2 or more efficacy assessments 1 (0.7%) 2 (1.5%) 0 \n Omission of complete lab panel required by protocol 0 0 1 (0.8%) \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\naddv <- synthetic_cdisc_dataset(\"latest\", \"addv\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\naddv <- df_explicit_na(addv)\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'),\n cdisc_dataset(\"ADDV\", addv, code = 'ADDV <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"addv\"))'),\n check = TRUE\n ),\n modules = modules(\n tm_t_events(\n label = \"Major Protocol Deviations Table\",\n dataname = \"ADDV\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(addv, c(\"DVTERM\")),\n selected = c(\"DVTERM\")\n ),\n hlt = choices_selected(\n choices = variable_choices(addv, c(\"DVDECOD\")),\n selected = \"DVDECOD\"\n ),\n add_total = TRUE,\n event_type = \"major protocol deviation\"\n )\n )\n)\n\n[INFO] 2023-08-04 15:12:09.9721 pid:7856 token:[] teal.modules.clinical Initializing tm_t_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/pdt01.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/egt05_qtcat.html", "href": "tables/safety/egt05_qtcat.html", "title": "EGT05_QTCAT", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadeg <- df_explicit_na(adeg)\n\nadeg_labels <- var_labels(adeg)\nadeg_f <- adeg %>%\n filter(\n PARAMCD == \"QT\",\n ANL01FL == \"Y\"\n ) %>%\n mutate(\n AVALCAT1 = case_when(\n AVAL <= 450 ~ \"<=450 msec\",\n AVAL <= 480 ~ \">450 to <=480 msec\",\n AVAL <= 500 ~ \">480 to <= 500 msec\",\n AVAL > 500 ~ \">500 msec\",\n is.na(AVAL) ~ \"<Missing>\"\n ),\n CHGCAT1 = case_when(\n CHG <= 30 ~ \"<=30 msec\",\n CHG <= 60 ~ \">30 to <=60 msec\",\n CHG > 60 ~ \">60 msec\",\n is.na(CHG) ~ \"<Missing>\"\n )\n ) %>%\n mutate(\n AVALCAT1 = factor(\n AVALCAT1,\n levels = c(\n \"<=450 msec\",\n \">450 to <=480 msec\",\n \">480 to <= 500 msec\",\n \">500 msec\",\n \"<Missing>\"\n )\n ),\n CHGCAT1 = factor(\n CHGCAT1,\n levels = c(\n \"<=30 msec\",\n \">30 to <=60 msec\",\n \">60 msec\",\n \"<Missing>\"\n )\n )\n ) %>%\n var_relabel(\n AVALCAT1 = \"Value at Visit\",\n CHGCAT1 = \"Change from Baseline\"\n )\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_label = obj_label(adeg_f$PARAM),\n split_fun = split_fun,\n label_pos = \"topleft\"\n ) %>%\n split_rows_by(\n \"AVISIT\",\n split_label = obj_label(adeg_f$AVISIT),\n split_fun = split_fun,\n label_pos = \"topleft\"\n ) %>%\n summarize_vars(\n vars = c(\"AVALCAT1\", \"CHGCAT1\"),\n var_labels = c(\"Value at Visit\", \"Change from Baseline\")\n ) %>%\n append_topleft(\" Category\")\n\nresult <- build_table(lyt = lyt, df = adeg_f, alt_counts_df = adsl) %>%\n prune_table()\n\nresult\n\nParameter \n Analysis Visit A: Drug X B: Placebo C: Combination\n Category (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————\nQT Duration \n BASELINE \n Value at Visit \n n 134 134 132 \n <=450 msec 115 (85.8%) 117 (87.3%) 104 (78.8%) \n >450 to <=480 msec 6 (4.5%) 10 (7.5%) 9 (6.8%) \n >480 to <= 500 msec 4 (3%) 3 (2.2%) 6 (4.5%) \n >500 msec 9 (6.7%) 4 (3%) 13 (9.8%) \n WEEK 1 DAY 8 \n Value at Visit \n n 134 134 132 \n <=450 msec 113 (84.3%) 106 (79.1%) 106 (80.3%) \n >450 to <=480 msec 10 (7.5%) 10 (7.5%) 11 (8.3%) \n >480 to <= 500 msec 4 (3%) 4 (3%) 3 (2.3%) \n >500 msec 7 (5.2%) 14 (10.4%) 12 (9.1%) \n Change from Baseline \n n 134 134 132 \n <=30 msec 76 (56.7%) 75 (56%) 75 (56.8%) \n >30 to <=60 msec 7 (5.2%) 13 (9.7%) 11 (8.3%) \n >60 msec 51 (38.1%) 46 (34.3%) 46 (34.8%) \n WEEK 2 DAY 15 \n Value at Visit \n n 134 134 132 \n <=450 msec 111 (82.8%) 114 (85.1%) 112 (84.8%) \n >450 to <=480 msec 10 (7.5%) 9 (6.7%) 9 (6.8%) \n >480 to <= 500 msec 7 (5.2%) 2 (1.5%) 5 (3.8%) \n >500 msec 6 (4.5%) 9 (6.7%) 6 (4.5%) \n Change from Baseline \n n 134 134 132 \n <=30 msec 71 (53%) 87 (64.9%) 89 (67.4%) \n >30 to <=60 msec 11 (8.2%) 9 (6.7%) 9 (6.8%) \n >60 msec 52 (38.8%) 38 (28.4%) 34 (25.8%) \n WEEK 3 DAY 22 \n Value at Visit \n n 134 134 132 \n <=450 msec 106 (79.1%) 112 (83.6%) 118 (89.4%) \n >450 to <=480 msec 13 (9.7%) 7 (5.2%) 3 (2.3%) \n >480 to <= 500 msec 4 (3%) 5 (3.7%) 2 (1.5%) \n >500 msec 11 (8.2%) 10 (7.5%) 9 (6.8%) \n Change from Baseline \n n 134 134 132 \n <=30 msec 63 (47%) 80 (59.7%) 81 (61.4%) \n >30 to <=60 msec 14 (10.4%) 8 (6%) 11 (8.3%) \n >60 msec 57 (42.5%) 46 (34.3%) 40 (30.3%) \n WEEK 4 DAY 29 \n Value at Visit \n n 134 134 132 \n <=450 msec 117 (87.3%) 103 (76.9%) 114 (86.4%) \n >450 to <=480 msec 7 (5.2%) 14 (10.4%) 6 (4.5%) \n >480 to <= 500 msec 4 (3%) 7 (5.2%) 3 (2.3%) \n >500 msec 6 (4.5%) 10 (7.5%) 9 (6.8%) \n Change from Baseline \n n 134 134 132 \n <=30 msec 79 (59%) 80 (59.7%) 79 (59.8%) \n >30 to <=60 msec 11 (8.2%) 7 (5.2%) 10 (7.6%) \n >60 msec 44 (32.8%) 47 (35.1%) 43 (32.6%) \n WEEK 5 DAY 36 \n Value at Visit \n n 134 134 132 \n <=450 msec 107 (79.9%) 117 (87.3%) 112 (84.8%) \n >450 to <=480 msec 16 (11.9%) 5 (3.7%) 13 (9.8%) \n >480 to <= 500 msec 5 (3.7%) 9 (6.7%) 3 (2.3%) \n >500 msec 6 (4.5%) 3 (2.2%) 4 (3%) \n Change from Baseline \n n 134 134 132 \n <=30 msec 72 (53.7%) 82 (61.2%) 73 (55.3%) \n >30 to <=60 msec 10 (7.5%) 11 (8.2%) 11 (8.3%) \n >60 msec 52 (38.8%) 41 (30.6%) 48 (36.4%) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\nadsl <- df_explicit_na(adsl)\nadeg <- df_explicit_na(adeg)\nadeg_labels <- var_labels(adeg)\n\nadeg_f <- adeg %>%\n filter(\n ANL01FL == \"Y\" # no need to filter for PARAMCD here\n ) %>%\n mutate(\n AVALCAT1 = case_when(\n AVAL <= 450 ~ \"<=450 msec\",\n AVAL <= 480 ~ \">450 to <=480 msec\",\n AVAL <= 500 ~ \">480 to <= 500 msec\",\n AVAL > 500 ~ \">500 msec\",\n is.na(AVAL) ~ \"<Missing>\"\n ),\n CHGCAT1 = case_when(\n CHG <= 30 ~ \"<=30 msec\",\n CHG <= 60 ~ \">30 to <=60 msec\",\n CHG > 60 ~ \">60 msec\",\n is.na(CHG) ~ \"<Missing>\"\n )\n ) %>%\n mutate(\n AVALCAT1 = factor(\n AVALCAT1,\n levels = c(\n \"<=450 msec\",\n \">450 to <=480 msec\",\n \">480 to <= 500 msec\",\n \">500 msec\",\n \"<Missing>\"\n )\n ),\n CHGCAT1 = factor(\n CHGCAT1,\n levels = c(\n \"<=30 msec\",\n \">30 to <=60 msec\",\n \">60 msec\",\n \"<Missing>\"\n )\n )\n )\nvar_labels(adeg_f) <- c(\n adeg_labels,\n \"AVALCAT1\" = \"Value at Visit\",\n \"CHGCAT1\" = \"Change from Baseline\"\n)\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\",\n adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- df_explicit_na(ADSL)'\n ),\n cdisc_dataset(\"ADEG\",\n adeg_f,\n code = 'ADEG <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n ADEG <- df_explicit_na(ADEG)\n ADEG_labels <- var_labels(ADEG)\n\n ADEG <- ADEG %>%\n filter(\n ANL01FL == \"Y\"\n ) %>%\n mutate(\n AVALCAT1 = case_when(\n AVAL <= 450 ~ \"<=450 msec\",\n AVAL <= 480 ~ \">450 to <=480 msec\",\n AVAL <= 500 ~ \">480 to <= 500 msec\",\n AVAL > 500 ~ \">500 msec\",\n is.na(AVAL) ~ \"<Missing>\"),\n CHGCAT1 = case_when(\n CHG <= 30 ~ \"<=30 msec\",\n CHG <= 60 ~ \">30 to <=60 msec\",\n CHG > 60 ~ \">60 msec\",\n is.na(CHG) ~ \"<Missing>\")\n ) %>% mutate(\n AVALCAT1 = factor(\n AVALCAT1,\n levels = c(\n \"<=450 msec\",\n \">450 to <=480 msec\",\n \">480 to <= 500 msec\",\n \">500 msec\",\n \"<Missing>\"\n )\n ),\n CHGCAT1 = factor(\n CHGCAT1,\n levels = c(\n \"<=30 msec\",\n \">30 to <=60 msec\",\n \">60 msec\",\n \"<Missing>\"\n )\n )\n )\n var_labels(ADEG) <- c(\n ADEG_labels,\n \"AVALCAT1\" = \"Value at Visit\",\n \"CHGCAT1\" = \"Change from Baseline\"\n )'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"ECG Actual Values and Changes from Baseline by Visit\",\n dataname = \"ADEG\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adeg_f, c(\"PARAM\", \"AVISIT\")),\n selected = c(\"AVISIT\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(adeg_f, c(\"AVALCAT1\", \"CHGCAT1\")),\n selected = c(\"AVALCAT1\", \"CHGCAT1\")\n ),\n useNA = \"ifany\",\n paramcd = choices_selected(\n choices = value_choices(adeg_f, \"PARAMCD\", \"PARAM\"),\n selected = \"QT\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 14:54:06.0916 pid:7641 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/egt05_qtcat.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadeg <- df_explicit_na(adeg)\n\nadeg_labels <- var_labels(adeg)\nadeg_f <- adeg %>%\n filter(\n PARAMCD == \"QT\",\n ANL01FL == \"Y\"\n ) %>%\n mutate(\n AVALCAT1 = case_when(\n AVAL <= 450 ~ \"<=450 msec\",\n AVAL <= 480 ~ \">450 to <=480 msec\",\n AVAL <= 500 ~ \">480 to <= 500 msec\",\n AVAL > 500 ~ \">500 msec\",\n is.na(AVAL) ~ \"<Missing>\"\n ),\n CHGCAT1 = case_when(\n CHG <= 30 ~ \"<=30 msec\",\n CHG <= 60 ~ \">30 to <=60 msec\",\n CHG > 60 ~ \">60 msec\",\n is.na(CHG) ~ \"<Missing>\"\n )\n ) %>%\n mutate(\n AVALCAT1 = factor(\n AVALCAT1,\n levels = c(\n \"<=450 msec\",\n \">450 to <=480 msec\",\n \">480 to <= 500 msec\",\n \">500 msec\",\n \"<Missing>\"\n )\n ),\n CHGCAT1 = factor(\n CHGCAT1,\n levels = c(\n \"<=30 msec\",\n \">30 to <=60 msec\",\n \">60 msec\",\n \"<Missing>\"\n )\n )\n ) %>%\n var_relabel(\n AVALCAT1 = \"Value at Visit\",\n CHGCAT1 = \"Change from Baseline\"\n )\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_label = obj_label(adeg_f$PARAM),\n split_fun = split_fun,\n label_pos = \"topleft\"\n ) %>%\n split_rows_by(\n \"AVISIT\",\n split_label = obj_label(adeg_f$AVISIT),\n split_fun = split_fun,\n label_pos = \"topleft\"\n ) %>%\n summarize_vars(\n vars = c(\"AVALCAT1\", \"CHGCAT1\"),\n var_labels = c(\"Value at Visit\", \"Change from Baseline\")\n ) %>%\n append_topleft(\" Category\")\n\nresult <- build_table(lyt = lyt, df = adeg_f, alt_counts_df = adsl) %>%\n prune_table()\n\nresult\n\nParameter \n Analysis Visit A: Drug X B: Placebo C: Combination\n Category (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————\nQT Duration \n BASELINE \n Value at Visit \n n 134 134 132 \n <=450 msec 115 (85.8%) 117 (87.3%) 104 (78.8%) \n >450 to <=480 msec 6 (4.5%) 10 (7.5%) 9 (6.8%) \n >480 to <= 500 msec 4 (3%) 3 (2.2%) 6 (4.5%) \n >500 msec 9 (6.7%) 4 (3%) 13 (9.8%) \n WEEK 1 DAY 8 \n Value at Visit \n n 134 134 132 \n <=450 msec 113 (84.3%) 106 (79.1%) 106 (80.3%) \n >450 to <=480 msec 10 (7.5%) 10 (7.5%) 11 (8.3%) \n >480 to <= 500 msec 4 (3%) 4 (3%) 3 (2.3%) \n >500 msec 7 (5.2%) 14 (10.4%) 12 (9.1%) \n Change from Baseline \n n 134 134 132 \n <=30 msec 76 (56.7%) 75 (56%) 75 (56.8%) \n >30 to <=60 msec 7 (5.2%) 13 (9.7%) 11 (8.3%) \n >60 msec 51 (38.1%) 46 (34.3%) 46 (34.8%) \n WEEK 2 DAY 15 \n Value at Visit \n n 134 134 132 \n <=450 msec 111 (82.8%) 114 (85.1%) 112 (84.8%) \n >450 to <=480 msec 10 (7.5%) 9 (6.7%) 9 (6.8%) \n >480 to <= 500 msec 7 (5.2%) 2 (1.5%) 5 (3.8%) \n >500 msec 6 (4.5%) 9 (6.7%) 6 (4.5%) \n Change from Baseline \n n 134 134 132 \n <=30 msec 71 (53%) 87 (64.9%) 89 (67.4%) \n >30 to <=60 msec 11 (8.2%) 9 (6.7%) 9 (6.8%) \n >60 msec 52 (38.8%) 38 (28.4%) 34 (25.8%) \n WEEK 3 DAY 22 \n Value at Visit \n n 134 134 132 \n <=450 msec 106 (79.1%) 112 (83.6%) 118 (89.4%) \n >450 to <=480 msec 13 (9.7%) 7 (5.2%) 3 (2.3%) \n >480 to <= 500 msec 4 (3%) 5 (3.7%) 2 (1.5%) \n >500 msec 11 (8.2%) 10 (7.5%) 9 (6.8%) \n Change from Baseline \n n 134 134 132 \n <=30 msec 63 (47%) 80 (59.7%) 81 (61.4%) \n >30 to <=60 msec 14 (10.4%) 8 (6%) 11 (8.3%) \n >60 msec 57 (42.5%) 46 (34.3%) 40 (30.3%) \n WEEK 4 DAY 29 \n Value at Visit \n n 134 134 132 \n <=450 msec 117 (87.3%) 103 (76.9%) 114 (86.4%) \n >450 to <=480 msec 7 (5.2%) 14 (10.4%) 6 (4.5%) \n >480 to <= 500 msec 4 (3%) 7 (5.2%) 3 (2.3%) \n >500 msec 6 (4.5%) 10 (7.5%) 9 (6.8%) \n Change from Baseline \n n 134 134 132 \n <=30 msec 79 (59%) 80 (59.7%) 79 (59.8%) \n >30 to <=60 msec 11 (8.2%) 7 (5.2%) 10 (7.6%) \n >60 msec 44 (32.8%) 47 (35.1%) 43 (32.6%) \n WEEK 5 DAY 36 \n Value at Visit \n n 134 134 132 \n <=450 msec 107 (79.9%) 117 (87.3%) 112 (84.8%) \n >450 to <=480 msec 16 (11.9%) 5 (3.7%) 13 (9.8%) \n >480 to <= 500 msec 5 (3.7%) 9 (6.7%) 3 (2.3%) \n >500 msec 6 (4.5%) 3 (2.2%) 4 (3%) \n Change from Baseline \n n 134 134 132 \n <=30 msec 72 (53.7%) 82 (61.2%) 73 (55.3%) \n >30 to <=60 msec 10 (7.5%) 11 (8.2%) 11 (8.3%) \n >60 msec 52 (38.8%) 41 (30.6%) 48 (36.4%) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\nadsl <- df_explicit_na(adsl)\nadeg <- df_explicit_na(adeg)\nadeg_labels <- var_labels(adeg)\n\nadeg_f <- adeg %>%\n filter(\n ANL01FL == \"Y\" # no need to filter for PARAMCD here\n ) %>%\n mutate(\n AVALCAT1 = case_when(\n AVAL <= 450 ~ \"<=450 msec\",\n AVAL <= 480 ~ \">450 to <=480 msec\",\n AVAL <= 500 ~ \">480 to <= 500 msec\",\n AVAL > 500 ~ \">500 msec\",\n is.na(AVAL) ~ \"<Missing>\"\n ),\n CHGCAT1 = case_when(\n CHG <= 30 ~ \"<=30 msec\",\n CHG <= 60 ~ \">30 to <=60 msec\",\n CHG > 60 ~ \">60 msec\",\n is.na(CHG) ~ \"<Missing>\"\n )\n ) %>%\n mutate(\n AVALCAT1 = factor(\n AVALCAT1,\n levels = c(\n \"<=450 msec\",\n \">450 to <=480 msec\",\n \">480 to <= 500 msec\",\n \">500 msec\",\n \"<Missing>\"\n )\n ),\n CHGCAT1 = factor(\n CHGCAT1,\n levels = c(\n \"<=30 msec\",\n \">30 to <=60 msec\",\n \">60 msec\",\n \"<Missing>\"\n )\n )\n )\nvar_labels(adeg_f) <- c(\n adeg_labels,\n \"AVALCAT1\" = \"Value at Visit\",\n \"CHGCAT1\" = \"Change from Baseline\"\n)\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\",\n adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- df_explicit_na(ADSL)'\n ),\n cdisc_dataset(\"ADEG\",\n adeg_f,\n code = 'ADEG <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n ADEG <- df_explicit_na(ADEG)\n ADEG_labels <- var_labels(ADEG)\n\n ADEG <- ADEG %>%\n filter(\n ANL01FL == \"Y\"\n ) %>%\n mutate(\n AVALCAT1 = case_when(\n AVAL <= 450 ~ \"<=450 msec\",\n AVAL <= 480 ~ \">450 to <=480 msec\",\n AVAL <= 500 ~ \">480 to <= 500 msec\",\n AVAL > 500 ~ \">500 msec\",\n is.na(AVAL) ~ \"<Missing>\"),\n CHGCAT1 = case_when(\n CHG <= 30 ~ \"<=30 msec\",\n CHG <= 60 ~ \">30 to <=60 msec\",\n CHG > 60 ~ \">60 msec\",\n is.na(CHG) ~ \"<Missing>\")\n ) %>% mutate(\n AVALCAT1 = factor(\n AVALCAT1,\n levels = c(\n \"<=450 msec\",\n \">450 to <=480 msec\",\n \">480 to <= 500 msec\",\n \">500 msec\",\n \"<Missing>\"\n )\n ),\n CHGCAT1 = factor(\n CHGCAT1,\n levels = c(\n \"<=30 msec\",\n \">30 to <=60 msec\",\n \">60 msec\",\n \"<Missing>\"\n )\n )\n )\n var_labels(ADEG) <- c(\n ADEG_labels,\n \"AVALCAT1\" = \"Value at Visit\",\n \"CHGCAT1\" = \"Change from Baseline\"\n )'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"ECG Actual Values and Changes from Baseline by Visit\",\n dataname = \"ADEG\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adeg_f, c(\"PARAM\", \"AVISIT\")),\n selected = c(\"AVISIT\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(adeg_f, c(\"AVALCAT1\", \"CHGCAT1\")),\n selected = c(\"AVALCAT1\", \"CHGCAT1\")\n ),\n useNA = \"ifany\",\n paramcd = choices_selected(\n choices = value_choices(adeg_f, \"PARAMCD\", \"PARAM\"),\n selected = \"QT\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:10:58.9564 pid:7645 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/egt05_qtcat.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/egt04.html", @@ -249,28 +249,28 @@ "href": "tables/safety/vst02.html", "title": "VST02", "section": "", - "text": "Data Setup\nVST02_1 – Table of Abnormalities Regardless of Abnormality at Baseline\nVST02_2 – Table of Abnormalities Among Subjects Without Abnormality at Baseline\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadvs <- synthetic_cdisc_dataset(\"latest\", \"advs\")\n\n# Ensure character variables are converted to factors and empty strings\n# and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadvs <- df_explicit_na(advs)\n\n# Note: We keep only post-baseline for analysis.\nadvs_f <- advs %>%\n filter(ONTRTFL == \"Y\", ANRIND != \"<Missing>\") %>%\n var_relabel(\n PARAM = \"Assessment\",\n ANRIND = \"Abnormality\"\n )\n\n# If you want to control which parameters in the table have only `LOW` or only `HIGH` theoretical ranges defined,\n# see `tern::h_map_for_count_abnormal` with method \"range\" or refer to the `EGT02` example.\n# For `VST02` we want to keep both directions for all parameters so we will not use `trim_levels_to_map` as the split function.\nsplit_fun <- drop_split_levels\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n add_overall_col(\"All Patients\") %>%\n split_rows_by(\"PARAM\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(advs_f$PARAM)) %>%\n count_abnormal(\n \"ANRIND\",\n abnormal = list(Low = c(\"LOW\", \"LOW LOW\"), High = c(\"HIGH\", \"HIGH HIGH\")),\n exclude_base_abn = FALSE\n ) %>%\n append_varlabels(advs_f, \"ANRIND\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = advs_f, alt_counts_df = adsl)\n\nresult\n\nAssessment A: Drug X B: Placebo C: Combination All Patients \n Abnormality (N=134) (N=134) (N=132) (N=400) \n————————————————————————————————————————————————————————————————————————————————————————————————\nDiastolic Blood Pressure \n Low 66/134 (49.3%) 86/134 (64.2%) 78/132 (59.1%) 230/400 (57.5%)\n High 88/134 (65.7%) 70/134 (52.2%) 76/132 (57.6%) 234/400 (58.5%)\nPulse Rate \n Low 58/134 (43.3%) 32/134 (23.9%) 48/132 (36.4%) 138/400 (34.5%)\n High 53/134 (39.6%) 49/134 (36.6%) 44/132 (33.3%) 146/400 (36.5%)\nRespiratory Rate \n Low 97/134 (72.4%) 84/134 (62.7%) 98/132 (74.2%) 279/400 (69.8%)\n High 96/134 (71.6%) 98/134 (73.1%) 98/132 (74.2%) 292/400 (73%) \nSystolic Blood Pressure \n Low 71/134 (53%) 77/134 (57.5%) 73/132 (55.3%) 221/400 (55.2%)\n High 78/134 (58.2%) 74/134 (55.2%) 73/132 (55.3%) 225/400 (56.2%)\nTemperature \n Low 108/134 (80.6%) 110/134 (82.1%) 108/132 (81.8%) 326/400 (81.5%)\n High 112/134 (83.6%) 106/134 (79.1%) 107/132 (81.1%) 325/400 (81.2%)\nWeight \n Low 43/134 (32.1%) 39/134 (29.1%) 39/132 (29.5%) 121/400 (30.2%)\n High 46/134 (34.3%) 43/134 (32.1%) 44/132 (33.3%) 133/400 (33.2%)\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n add_overall_col(\"All Patients\") %>%\n split_rows_by(\"PARAM\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(advs_f$PARAM)) %>%\n count_abnormal(\n \"ANRIND\",\n abnormal = list(Low = c(\"LOW\", \"LOW LOW\"), High = c(\"HIGH\", \"HIGH HIGH\")),\n exclude_base_abn = TRUE\n ) %>%\n append_varlabels(advs_f, \"ANRIND\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = advs_f, alt_counts_df = adsl)\n\nresult\n\nAssessment A: Drug X B: Placebo C: Combination All Patients \n Abnormality (N=134) (N=134) (N=132) (N=400) \n—————————————————————————————————————————————————————————————————————————————————————————————\nDiastolic Blood Pressure \n Low 54/108 (50%) 76/116 (65.5%) 68/114 (59.6%) 198/338 (58.6%)\n High 74/114 (64.9%) 56/109 (51.4%) 62/106 (58.5%) 192/329 (58.4%)\nPulse Rate \n Low 53/121 (43.8%) 30/125 (24%) 42/119 (35.3%) 125/365 (34.2%)\n High 48/123 (39%) 45/116 (38.8%) 39/120 (32.5%) 132/359 (36.8%)\nRespiratory Rate \n Low 72/100 (72%) 72/110 (65.5%) 79/102 (77.5%) 223/312 (71.5%)\n High 77/107 (72%) 78/108 (72.2%) 79/109 (72.5%) 234/324 (72.2%)\nSystolic Blood Pressure \n Low 62/117 (53%) 63/114 (55.3%) 57/103 (55.3%) 182/334 (54.5%)\n High 64/110 (58.2%) 67/120 (55.8%) 68/115 (59.1%) 199/345 (57.7%)\nTemperature \n Low 77/96 (80.2%) 78/94 (83%) 74/90 (82.2%) 229/280 (81.8%)\n High 78/93 (83.9%) 73/92 (79.3%) 81/100 (81%) 232/285 (81.4%)\nWeight \n Low 42/129 (32.6%) 37/125 (29.6%) 37/123 (30.1%) 116/377 (30.8%)\n High 41/126 (32.5%) 41/124 (33.1%) 42/121 (34.7%) 124/371 (33.4%)\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadvs <- synthetic_cdisc_dataset(\"latest\", \"advs\") %>%\n mutate(ONTRTFL = ifelse(AVISIT %in% c(\"SCREENING\", \"BASELINE\"), \"\", \"Y\")) %>%\n var_relabel(ONTRTFL = \"On Treatment Record Flag\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADVS\", advs, code = 'ADVS <- synthetic_cdisc_dataset(\"latest\", \"advs\") %>%\n mutate(ONTRTFL = ifelse(AVISIT %in% c(\"SCREENING\", \"BASELINE\"), \"\", \"Y\")) %>%\n var_relabel(ONTRTFL = \"On Treatment Record Flag\")'),\n check = TRUE\n ),\n modules = modules(\n tm_t_abnormality(\n label = \"Abnormality Table\",\n dataname = \"ADVS\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(advs, subset = c(\"VSCAT\", \"PARAM\", \"AVISIT\")),\n selected = c(\"PARAM\"),\n keep_order = TRUE\n ),\n grade = choices_selected(\n choices = variable_choices(advs, subset = \"ANRIND\"),\n selected = \"ANRIND\",\n fixed = TRUE\n ),\n abnormal = list(Low = c(\"LOW\", \"LOW LOW\"), High = c(\"HIGH\", \"HIGH HIGH\")),\n exclude_base_abn = FALSE\n )\n )\n)\n\n[INFO] 2023-08-04 14:52:50.0192 pid:7329 token:[] teal.modules.clinical Initializing tm_t_abnormality\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] dplyr_1.1.2 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/vst02.lock'.\n\n\nDownload" + "text": "Data Setup\nVST02_1 – Table of Abnormalities Regardless of Abnormality at Baseline\nVST02_2 – Table of Abnormalities Among Subjects Without Abnormality at Baseline\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadvs <- synthetic_cdisc_dataset(\"latest\", \"advs\")\n\n# Ensure character variables are converted to factors and empty strings\n# and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadvs <- df_explicit_na(advs)\n\n# Note: We keep only post-baseline for analysis.\nadvs_f <- advs %>%\n filter(ONTRTFL == \"Y\", ANRIND != \"<Missing>\") %>%\n var_relabel(\n PARAM = \"Assessment\",\n ANRIND = \"Abnormality\"\n )\n\n# If you want to control which parameters in the table have only `LOW` or only `HIGH` theoretical ranges defined,\n# see `tern::h_map_for_count_abnormal` with method \"range\" or refer to the `EGT02` example.\n# For `VST02` we want to keep both directions for all parameters so we will not use `trim_levels_to_map` as the split function.\nsplit_fun <- drop_split_levels\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n add_overall_col(\"All Patients\") %>%\n split_rows_by(\"PARAM\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(advs_f$PARAM)) %>%\n count_abnormal(\n \"ANRIND\",\n abnormal = list(Low = c(\"LOW\", \"LOW LOW\"), High = c(\"HIGH\", \"HIGH HIGH\")),\n exclude_base_abn = FALSE\n ) %>%\n append_varlabels(advs_f, \"ANRIND\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = advs_f, alt_counts_df = adsl)\n\nresult\n\nAssessment A: Drug X B: Placebo C: Combination All Patients \n Abnormality (N=134) (N=134) (N=132) (N=400) \n————————————————————————————————————————————————————————————————————————————————————————————————\nDiastolic Blood Pressure \n Low 66/134 (49.3%) 86/134 (64.2%) 78/132 (59.1%) 230/400 (57.5%)\n High 88/134 (65.7%) 70/134 (52.2%) 76/132 (57.6%) 234/400 (58.5%)\nPulse Rate \n Low 58/134 (43.3%) 32/134 (23.9%) 48/132 (36.4%) 138/400 (34.5%)\n High 53/134 (39.6%) 49/134 (36.6%) 44/132 (33.3%) 146/400 (36.5%)\nRespiratory Rate \n Low 97/134 (72.4%) 84/134 (62.7%) 98/132 (74.2%) 279/400 (69.8%)\n High 96/134 (71.6%) 98/134 (73.1%) 98/132 (74.2%) 292/400 (73%) \nSystolic Blood Pressure \n Low 71/134 (53%) 77/134 (57.5%) 73/132 (55.3%) 221/400 (55.2%)\n High 78/134 (58.2%) 74/134 (55.2%) 73/132 (55.3%) 225/400 (56.2%)\nTemperature \n Low 108/134 (80.6%) 110/134 (82.1%) 108/132 (81.8%) 326/400 (81.5%)\n High 112/134 (83.6%) 106/134 (79.1%) 107/132 (81.1%) 325/400 (81.2%)\nWeight \n Low 43/134 (32.1%) 39/134 (29.1%) 39/132 (29.5%) 121/400 (30.2%)\n High 46/134 (34.3%) 43/134 (32.1%) 44/132 (33.3%) 133/400 (33.2%)\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n add_overall_col(\"All Patients\") %>%\n split_rows_by(\"PARAM\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(advs_f$PARAM)) %>%\n count_abnormal(\n \"ANRIND\",\n abnormal = list(Low = c(\"LOW\", \"LOW LOW\"), High = c(\"HIGH\", \"HIGH HIGH\")),\n exclude_base_abn = TRUE\n ) %>%\n append_varlabels(advs_f, \"ANRIND\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = advs_f, alt_counts_df = adsl)\n\nresult\n\nAssessment A: Drug X B: Placebo C: Combination All Patients \n Abnormality (N=134) (N=134) (N=132) (N=400) \n—————————————————————————————————————————————————————————————————————————————————————————————\nDiastolic Blood Pressure \n Low 54/108 (50%) 76/116 (65.5%) 68/114 (59.6%) 198/338 (58.6%)\n High 74/114 (64.9%) 56/109 (51.4%) 62/106 (58.5%) 192/329 (58.4%)\nPulse Rate \n Low 53/121 (43.8%) 30/125 (24%) 42/119 (35.3%) 125/365 (34.2%)\n High 48/123 (39%) 45/116 (38.8%) 39/120 (32.5%) 132/359 (36.8%)\nRespiratory Rate \n Low 72/100 (72%) 72/110 (65.5%) 79/102 (77.5%) 223/312 (71.5%)\n High 77/107 (72%) 78/108 (72.2%) 79/109 (72.5%) 234/324 (72.2%)\nSystolic Blood Pressure \n Low 62/117 (53%) 63/114 (55.3%) 57/103 (55.3%) 182/334 (54.5%)\n High 64/110 (58.2%) 67/120 (55.8%) 68/115 (59.1%) 199/345 (57.7%)\nTemperature \n Low 77/96 (80.2%) 78/94 (83%) 74/90 (82.2%) 229/280 (81.8%)\n High 78/93 (83.9%) 73/92 (79.3%) 81/100 (81%) 232/285 (81.4%)\nWeight \n Low 42/129 (32.6%) 37/125 (29.6%) 37/123 (30.1%) 116/377 (30.8%)\n High 41/126 (32.5%) 41/124 (33.1%) 42/121 (34.7%) 124/371 (33.4%)\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadvs <- synthetic_cdisc_dataset(\"latest\", \"advs\") %>%\n mutate(ONTRTFL = ifelse(AVISIT %in% c(\"SCREENING\", \"BASELINE\"), \"\", \"Y\")) %>%\n var_relabel(ONTRTFL = \"On Treatment Record Flag\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADVS\", advs, code = 'ADVS <- synthetic_cdisc_dataset(\"latest\", \"advs\") %>%\n mutate(ONTRTFL = ifelse(AVISIT %in% c(\"SCREENING\", \"BASELINE\"), \"\", \"Y\")) %>%\n var_relabel(ONTRTFL = \"On Treatment Record Flag\")'),\n check = TRUE\n ),\n modules = modules(\n tm_t_abnormality(\n label = \"Abnormality Table\",\n dataname = \"ADVS\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(advs, subset = c(\"VSCAT\", \"PARAM\", \"AVISIT\")),\n selected = c(\"PARAM\"),\n keep_order = TRUE\n ),\n grade = choices_selected(\n choices = variable_choices(advs, subset = \"ANRIND\"),\n selected = \"ANRIND\",\n fixed = TRUE\n ),\n abnormal = list(Low = c(\"LOW\", \"LOW LOW\"), High = c(\"HIGH\", \"HIGH HIGH\")),\n exclude_base_abn = FALSE\n )\n )\n)\n\n[INFO] 2023-08-04 15:09:37.2421 pid:7333 token:[] teal.modules.clinical Initializing tm_t_abnormality\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] dplyr_1.1.2 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/vst02.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/vst01.html", "href": "tables/safety/vst01.html", "title": "VST01", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadvs <- synthetic_cdisc_dataset(\"latest\", \"advs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadvs <- df_explicit_na(advs)\n\nadvs_label <- var_labels(advs)\n\nadvs <- advs %>%\n filter(\n PARAMCD == \"DIABP\",\n PARAM == \"Diastolic Blood Pressure\"\n ) %>%\n mutate(\n PARAMCD = droplevels(PARAMCD),\n PARAM = droplevels(PARAM)\n )\n\n# post-baseline\nadvs_pb <- advs %>%\n filter(ABLFL != \"Y\", ABLFL2 != \"Y\")\n\nadvs_pb_max <- advs_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(desc(AVAL)) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Maximum\")\n\nadvs_pb_min <- advs_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(AVAL) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Minimum\")\n\nadvs_pb_last <- advs_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(desc(AVISITN)) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Last\")\n\n# Please note that for real data, per ADaM Spec 1.1, the advs_f can be obtained by filtering on PARAMCD, then\n# ANL01FL == 'Y' or AVISIT in c('POST-BASELINE MAXIMUM', 'POST-BASELINE MINIMUM', 'POST-BASELINE LAST')\n\nadvs_f <- rbind(\n advs,\n advs_pb_last,\n advs_pb_min,\n advs_pb_max\n)\n\nadvs_f <- advs_f %>%\n mutate(AVISIT = droplevels(AVISIT))\n\nvar_labels(advs_f) <- advs_label\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nafun <- function(x, .var, .spl_context, ...) {\n n_fun <- sum(!is.na(x), na.rm = TRUE)\n if (n_fun == 0) {\n mean_sd_fun <- c(NA, NA)\n median_fun <- NA\n min_max_fun <- c(NA, NA)\n } else {\n mean_sd_fun <- c(mean(x, na.rm = TRUE), sd(x, na.rm = TRUE))\n median_fun <- median(x, na.rm = TRUE)\n min_max_fun <- c(min(x), max(x))\n }\n is_chg <- .var == \"CHG\"\n is_baseline <- .spl_context$value[which(.spl_context$split == \"AVISIT\")] == \"BASELINE\"\n if (is_baseline && is_chg) n_fun <- mean_sd_fun <- median_fun <- min_max_fun <- NULL\n\n in_rows(\n \"n\" = n_fun,\n \"Mean (SD)\" = mean_sd_fun,\n \"Median\" = median_fun,\n \"Min - Max\" = min_max_fun,\n .formats = list(\"n\" = \"xx\", \"Mean (SD)\" = \"xx.xx (xx.xx)\", \"Median\" = \"xx.xx\", \"Min - Max\" = \"xx.xx - xx.xx\"),\n .format_na_strs = list(\"n\" = \"NE\", \"Mean (SD)\" = \"NE (NE)\", \"Median\" = \"NE\", \"Min - Max\" = \"NE - NE\")\n )\n}\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = \"\\n\\nAnalysis Visit\") %>%\n split_cols_by_multivar(\n vars = c(\"AVAL\", \"CHG\"),\n varlabels = c(\"Value at Visit\", \"Change from\\nBaseline\")\n ) %>%\n analyze_colvars(afun = afun)\n\nresult <- build_table(lyt = lyt, df = advs_f, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination \n Change from Change from Change from \nAnalysis Visit Value at Visit Baseline Value at Visit Baseline Value at Visit Baseline \n (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nSCREENING \n n 134 0 134 0 132 0 \n Mean (SD) 99.92 (17.99) NE (NE) 101.88 (21.07) NE (NE) 100.48 (19.07) NE (NE) \n Median 99.26 NE 100.22 NE 99.10 NE \n Min - Max 54.22 - 152.98 NE - NE 48.15 - 148.03 NE - NE 42.22 - 149.95 NE - NE \nBASELINE \n n 134 134 132 \n Mean (SD) 96.50 (19.90) 101.10 (19.87) 102.77 (19.48) \n Median 96.05 100.45 102.01 \n Min - Max 44.28 - 136.59 29.21 - 143.77 49.37 - 153.50 \nWEEK 1 DAY 8 \n n 134 134 134 134 132 132 \n Mean (SD) 100.65 (18.79) 4.14 (26.93) 99.19 (19.36) -1.92 (27.37) 97.14 (19.72) -5.63 (25.95) \n Median 100.22 1.52 99.37 -2.79 94.19 -5.57 \n Min - Max 57.60 - 147.46 -50.92 - 74.84 59.28 - 141.21 -64.50 - 70.93 50.98 - 142.47 -55.15 - 56.11\nWEEK 2 DAY 15 \n n 134 134 134 134 132 132 \n Mean (SD) 102.09 (19.62) 5.58 (29.38) 99.29 (21.11) -1.81 (31.11) 99.95 (20.85) -2.81 (29.10) \n Median 103.59 7.82 100.57 -1.77 102.52 -5.68 \n Min - Max 54.73 - 150.85 -59.71 - 98.08 51.60 - 145.28 -71.00 - 92.43 37.06 - 138.92 -73.10 - 76.80\nWEEK 3 DAY 22 \n n 134 134 134 134 132 132 \n Mean (SD) 101.78 (19.54) 5.28 (27.16) 97.73 (19.85) -3.37 (27.76) 99.86 (19.15) -2.91 (27.25) \n Median 100.39 6.53 98.83 -5.79 100.06 -1.54 \n Min - Max 47.68 - 162.22 -64.46 - 76.64 36.25 - 142.78 -70.23 - 84.74 53.80 - 146.37 -74.30 - 67.46\nWEEK 4 DAY 29 \n n 134 134 134 134 132 132 \n Mean (SD) 100.18 (20.18) 3.68 (27.21) 99.06 (17.75) -2.04 (26.59) 99.27 (20.12) -3.50 (27.62) \n Median 98.17 3.00 97.98 -1.89 99.61 -0.46 \n Min - Max 48.52 - 153.41 -77.30 - 61.90 56.78 - 142.45 -82.96 - 89.87 46.87 - 146.12 -88.68 - 70.90\nWEEK 5 DAY 36 \n n 134 134 134 134 132 132 \n Mean (SD) 101.42 (18.83) 4.92 (28.02) 95.92 (19.90) -5.19 (29.34) 97.73 (18.92) -5.04 (26.64) \n Median 98.56 3.93 94.30 -7.18 98.09 -5.62 \n Min - Max 62.66 - 155.52 -63.05 - 78.66 51.06 - 151.52 -78.07 - 72.91 51.48 - 157.27 -76.13 - 86.42\nPost-Baseline Last \n n 134 134 134 134 132 132 \n Mean (SD) 101.42 (18.83) 4.92 (28.02) 95.92 (19.90) -5.19 (29.34) 97.73 (18.92) -5.04 (26.64) \n Median 98.56 3.93 94.30 -7.18 98.09 -5.62 \n Min - Max 62.66 - 155.52 -63.05 - 78.66 51.06 - 151.52 -78.07 - 72.91 51.48 - 157.27 -76.13 - 86.42\nPost-Baseline Minimum \n n 134 134 134 134 132 132 \n Mean (SD) 78.98 (11.94) -17.52 (23.92) 75.77 (13.25) -25.33 (25.39) 76.35 (13.13) -26.41 (22.78)\n Median 80.14 -13.96 75.71 -26.70 76.26 -27.17 \n Min - Max 47.68 - 110.54 -77.30 - 33.00 36.25 - 113.53 -82.96 - 69.23 37.06 - 112.35 -88.68 - 34.24\nPost-Baseline Maximum \n n 134 134 134 134 132 132 \n Mean (SD) 125.08 (12.28) 28.57 (23.20) 121.33 (12.01) 20.23 (23.64) 121.42 (12.09) 18.65 (22.74) \n Median 124.20 29.14 120.80 18.74 122.55 16.93 \n Min - Max 94.06 - 162.22 -21.49 - 98.08 94.43 - 151.52 -34.95 - 92.43 79.39 - 157.27 -43.32 - 86.42\n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadvs <- synthetic_cdisc_dataset(\"latest\", \"advs\")\nadvs_label <- var_labels(advs)\n\n# post-baseline\nadvs_pb <- advs %>%\n filter(\n ABLFL != \"Y\",\n ABLFL2 != \"Y\"\n )\n\nadvs_pb_max <- advs_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(desc(AVAL)) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Maximum\")\n\nadvs_pb_min <- advs_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(AVAL) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Minimum\")\n\nadvs_pb_last <- advs_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(desc(AVISITN)) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Last\")\n\nadvs_f <- rbind(\n advs,\n advs_pb_last,\n advs_pb_min,\n advs_pb_max\n)\n\nadvs_f <- advs_f %>%\n mutate(AVISIT = droplevels(AVISIT))\n\nvar_labels(advs_f) <- advs_label\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\",\n adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'\n ),\n cdisc_dataset(\"ADVS\",\n advs_f,\n code = 'ADVS <- synthetic_cdisc_dataset(\"latest\", \"advs\")\n ADVS_label <- var_labels(ADVS)\n\n # post-baseline\n ADVS_pb <- ADVS %>%\n filter(\n ABLFL != \"Y\",\n ABLFL2 != \"Y\"\n )\n\n ADVS_pb_max <- ADVS_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(desc(AVAL)) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Maximum\")\n\n ADVS_pb_min <- ADVS_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(AVAL) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Minimum\")\n\n ADVS_pb_last <- ADVS_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(desc(AVISITN)) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Last\")\n\n ADVS_f <- rbind(\n ADVS,\n ADVS_pb_last,\n ADVS_pb_min,\n ADVS_pb_max\n )\n\n ADVS <- ADVS_f %>%\n mutate(AVISIT = droplevels(AVISIT))\n var_labels(ADVS) <- ADVS_label'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"Vital Sign Results and Change from Baseline by Visit\",\n dataname = \"ADVS\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(advs, c(\"PARAM\", \"AVISIT\")),\n selected = c(\"AVISIT\", \"PARAM\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(advs, c(\"AVAL\", \"CHG\")),\n selected = c(\"AVAL\", \"CHG\")\n ),\n useNA = \"ifany\",\n paramcd = choices_selected(\n choices = value_choices(advs, \"PARAMCD\", \"PARAM\"),\n selected = \"DIABP\"\n ),\n parallel_vars = TRUE\n )\n ),\n filter = list(ADVS = list(AVAL = list()))\n)\n\n[INFO] 2023-08-04 14:51:54.7468 pid:7171 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\nWarning: The 'plotly_relayout' event tied a source ID of\n'teal-main_ui-filter_panel-active-ADVS-filter-ADVS_AVAL-inputs-histogram_plot'\nis not registered. In order to obtain this event data, please add\n`event_register(p, 'plotly_relayout')` to the plot (`p`) that you wish to\nobtain event data from.\n\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[13] ellipsis_0.3.2 fontawesome_0.5.1 utf8_1.2.3 \n[16] promises_1.2.0.1 rmarkdown_2.23 ps_1.7.5 \n[19] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[22] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[25] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[31] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[34] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[37] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[40] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[43] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[46] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[49] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[52] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[55] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[58] plotly_4.10.2 generics_0.1.3 ggplot2_3.4.2 \n[61] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[64] glue_1.6.2 emmeans_1.8.7 lazyeval_0.2.2 \n[67] tools_4.3.1 data.table_1.14.8 webshot_0.5.5 \n[70] forcats_1.0.0 mvtnorm_1.2-2 grid_4.3.1 \n[73] tidyr_1.3.0 rbibutils_2.2.13 colorspace_2.1-0 \n[76] nlme_3.1-162 cli_3.6.1 fansi_1.0.4 \n[79] viridisLite_0.4.2 geepack_1.3.9 gtable_0.3.3 \n[82] R.methodsS3_1.8.2 sass_0.4.7 digest_0.6.33 \n[85] htmlwidgets_1.6.2 memoise_2.0.1 htmltools_0.5.5 \n[88] R.oo_1.25.0 lifecycle_1.0.3 httr_1.4.6 \n[91] shinyWidgets_0.7.6 mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/vst01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadvs <- synthetic_cdisc_dataset(\"latest\", \"advs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadvs <- df_explicit_na(advs)\n\nadvs_label <- var_labels(advs)\n\nadvs <- advs %>%\n filter(\n PARAMCD == \"DIABP\",\n PARAM == \"Diastolic Blood Pressure\"\n ) %>%\n mutate(\n PARAMCD = droplevels(PARAMCD),\n PARAM = droplevels(PARAM)\n )\n\n# post-baseline\nadvs_pb <- advs %>%\n filter(ABLFL != \"Y\", ABLFL2 != \"Y\")\n\nadvs_pb_max <- advs_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(desc(AVAL)) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Maximum\")\n\nadvs_pb_min <- advs_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(AVAL) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Minimum\")\n\nadvs_pb_last <- advs_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(desc(AVISITN)) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Last\")\n\n# Please note that for real data, per ADaM Spec 1.1, the advs_f can be obtained by filtering on PARAMCD, then\n# ANL01FL == 'Y' or AVISIT in c('POST-BASELINE MAXIMUM', 'POST-BASELINE MINIMUM', 'POST-BASELINE LAST')\n\nadvs_f <- rbind(\n advs,\n advs_pb_last,\n advs_pb_min,\n advs_pb_max\n)\n\nadvs_f <- advs_f %>%\n mutate(AVISIT = droplevels(AVISIT))\n\nvar_labels(advs_f) <- advs_label\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nafun <- function(x, .var, .spl_context, ...) {\n n_fun <- sum(!is.na(x), na.rm = TRUE)\n if (n_fun == 0) {\n mean_sd_fun <- c(NA, NA)\n median_fun <- NA\n min_max_fun <- c(NA, NA)\n } else {\n mean_sd_fun <- c(mean(x, na.rm = TRUE), sd(x, na.rm = TRUE))\n median_fun <- median(x, na.rm = TRUE)\n min_max_fun <- c(min(x), max(x))\n }\n is_chg <- .var == \"CHG\"\n is_baseline <- .spl_context$value[which(.spl_context$split == \"AVISIT\")] == \"BASELINE\"\n if (is_baseline && is_chg) n_fun <- mean_sd_fun <- median_fun <- min_max_fun <- NULL\n\n in_rows(\n \"n\" = n_fun,\n \"Mean (SD)\" = mean_sd_fun,\n \"Median\" = median_fun,\n \"Min - Max\" = min_max_fun,\n .formats = list(\"n\" = \"xx\", \"Mean (SD)\" = \"xx.xx (xx.xx)\", \"Median\" = \"xx.xx\", \"Min - Max\" = \"xx.xx - xx.xx\"),\n .format_na_strs = list(\"n\" = \"NE\", \"Mean (SD)\" = \"NE (NE)\", \"Median\" = \"NE\", \"Min - Max\" = \"NE - NE\")\n )\n}\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = \"\\n\\nAnalysis Visit\") %>%\n split_cols_by_multivar(\n vars = c(\"AVAL\", \"CHG\"),\n varlabels = c(\"Value at Visit\", \"Change from\\nBaseline\")\n ) %>%\n analyze_colvars(afun = afun)\n\nresult <- build_table(lyt = lyt, df = advs_f, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination \n Change from Change from Change from \nAnalysis Visit Value at Visit Baseline Value at Visit Baseline Value at Visit Baseline \n (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nSCREENING \n n 134 0 134 0 132 0 \n Mean (SD) 99.92 (17.99) NE (NE) 101.88 (21.07) NE (NE) 100.48 (19.07) NE (NE) \n Median 99.26 NE 100.22 NE 99.10 NE \n Min - Max 54.22 - 152.98 NE - NE 48.15 - 148.03 NE - NE 42.22 - 149.95 NE - NE \nBASELINE \n n 134 134 132 \n Mean (SD) 96.50 (19.90) 101.10 (19.87) 102.77 (19.48) \n Median 96.05 100.45 102.01 \n Min - Max 44.28 - 136.59 29.21 - 143.77 49.37 - 153.50 \nWEEK 1 DAY 8 \n n 134 134 134 134 132 132 \n Mean (SD) 100.65 (18.79) 4.14 (26.93) 99.19 (19.36) -1.92 (27.37) 97.14 (19.72) -5.63 (25.95) \n Median 100.22 1.52 99.37 -2.79 94.19 -5.57 \n Min - Max 57.60 - 147.46 -50.92 - 74.84 59.28 - 141.21 -64.50 - 70.93 50.98 - 142.47 -55.15 - 56.11\nWEEK 2 DAY 15 \n n 134 134 134 134 132 132 \n Mean (SD) 102.09 (19.62) 5.58 (29.38) 99.29 (21.11) -1.81 (31.11) 99.95 (20.85) -2.81 (29.10) \n Median 103.59 7.82 100.57 -1.77 102.52 -5.68 \n Min - Max 54.73 - 150.85 -59.71 - 98.08 51.60 - 145.28 -71.00 - 92.43 37.06 - 138.92 -73.10 - 76.80\nWEEK 3 DAY 22 \n n 134 134 134 134 132 132 \n Mean (SD) 101.78 (19.54) 5.28 (27.16) 97.73 (19.85) -3.37 (27.76) 99.86 (19.15) -2.91 (27.25) \n Median 100.39 6.53 98.83 -5.79 100.06 -1.54 \n Min - Max 47.68 - 162.22 -64.46 - 76.64 36.25 - 142.78 -70.23 - 84.74 53.80 - 146.37 -74.30 - 67.46\nWEEK 4 DAY 29 \n n 134 134 134 134 132 132 \n Mean (SD) 100.18 (20.18) 3.68 (27.21) 99.06 (17.75) -2.04 (26.59) 99.27 (20.12) -3.50 (27.62) \n Median 98.17 3.00 97.98 -1.89 99.61 -0.46 \n Min - Max 48.52 - 153.41 -77.30 - 61.90 56.78 - 142.45 -82.96 - 89.87 46.87 - 146.12 -88.68 - 70.90\nWEEK 5 DAY 36 \n n 134 134 134 134 132 132 \n Mean (SD) 101.42 (18.83) 4.92 (28.02) 95.92 (19.90) -5.19 (29.34) 97.73 (18.92) -5.04 (26.64) \n Median 98.56 3.93 94.30 -7.18 98.09 -5.62 \n Min - Max 62.66 - 155.52 -63.05 - 78.66 51.06 - 151.52 -78.07 - 72.91 51.48 - 157.27 -76.13 - 86.42\nPost-Baseline Last \n n 134 134 134 134 132 132 \n Mean (SD) 101.42 (18.83) 4.92 (28.02) 95.92 (19.90) -5.19 (29.34) 97.73 (18.92) -5.04 (26.64) \n Median 98.56 3.93 94.30 -7.18 98.09 -5.62 \n Min - Max 62.66 - 155.52 -63.05 - 78.66 51.06 - 151.52 -78.07 - 72.91 51.48 - 157.27 -76.13 - 86.42\nPost-Baseline Minimum \n n 134 134 134 134 132 132 \n Mean (SD) 78.98 (11.94) -17.52 (23.92) 75.77 (13.25) -25.33 (25.39) 76.35 (13.13) -26.41 (22.78)\n Median 80.14 -13.96 75.71 -26.70 76.26 -27.17 \n Min - Max 47.68 - 110.54 -77.30 - 33.00 36.25 - 113.53 -82.96 - 69.23 37.06 - 112.35 -88.68 - 34.24\nPost-Baseline Maximum \n n 134 134 134 134 132 132 \n Mean (SD) 125.08 (12.28) 28.57 (23.20) 121.33 (12.01) 20.23 (23.64) 121.42 (12.09) 18.65 (22.74) \n Median 124.20 29.14 120.80 18.74 122.55 16.93 \n Min - Max 94.06 - 162.22 -21.49 - 98.08 94.43 - 151.52 -34.95 - 92.43 79.39 - 157.27 -43.32 - 86.42\n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadvs <- synthetic_cdisc_dataset(\"latest\", \"advs\")\nadvs_label <- var_labels(advs)\n\n# post-baseline\nadvs_pb <- advs %>%\n filter(\n ABLFL != \"Y\",\n ABLFL2 != \"Y\"\n )\n\nadvs_pb_max <- advs_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(desc(AVAL)) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Maximum\")\n\nadvs_pb_min <- advs_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(AVAL) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Minimum\")\n\nadvs_pb_last <- advs_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(desc(AVISITN)) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Last\")\n\nadvs_f <- rbind(\n advs,\n advs_pb_last,\n advs_pb_min,\n advs_pb_max\n)\n\nadvs_f <- advs_f %>%\n mutate(AVISIT = droplevels(AVISIT))\n\nvar_labels(advs_f) <- advs_label\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\",\n adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'\n ),\n cdisc_dataset(\"ADVS\",\n advs_f,\n code = 'ADVS <- synthetic_cdisc_dataset(\"latest\", \"advs\")\n ADVS_label <- var_labels(ADVS)\n\n # post-baseline\n ADVS_pb <- ADVS %>%\n filter(\n ABLFL != \"Y\",\n ABLFL2 != \"Y\"\n )\n\n ADVS_pb_max <- ADVS_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(desc(AVAL)) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Maximum\")\n\n ADVS_pb_min <- ADVS_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(AVAL) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Minimum\")\n\n ADVS_pb_last <- ADVS_pb %>%\n group_by(PARAM, USUBJID) %>%\n arrange(desc(AVISITN)) %>%\n slice(1) %>%\n ungroup() %>%\n mutate(AVISIT = \"Post-Baseline Last\")\n\n ADVS_f <- rbind(\n ADVS,\n ADVS_pb_last,\n ADVS_pb_min,\n ADVS_pb_max\n )\n\n ADVS <- ADVS_f %>%\n mutate(AVISIT = droplevels(AVISIT))\n var_labels(ADVS) <- ADVS_label'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"Vital Sign Results and Change from Baseline by Visit\",\n dataname = \"ADVS\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(advs, c(\"PARAM\", \"AVISIT\")),\n selected = c(\"AVISIT\", \"PARAM\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(advs, c(\"AVAL\", \"CHG\")),\n selected = c(\"AVAL\", \"CHG\")\n ),\n useNA = \"ifany\",\n paramcd = choices_selected(\n choices = value_choices(advs, \"PARAMCD\", \"PARAM\"),\n selected = \"DIABP\"\n ),\n parallel_vars = TRUE\n )\n ),\n filter = list(ADVS = list(AVAL = list()))\n)\n\n[INFO] 2023-08-04 15:08:38.7784 pid:7175 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\nWarning: The 'plotly_relayout' event tied a source ID of\n'teal-main_ui-filter_panel-active-ADVS-filter-ADVS_AVAL-inputs-histogram_plot'\nis not registered. In order to obtain this event data, please add\n`event_register(p, 'plotly_relayout')` to the plot (`p`) that you wish to\nobtain event data from.\n\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[13] ellipsis_0.3.2 fontawesome_0.5.1 utf8_1.2.3 \n[16] promises_1.2.0.1 rmarkdown_2.23 ps_1.7.5 \n[19] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[22] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[25] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[31] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[34] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[37] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[40] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[43] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[46] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[49] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[52] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[55] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[58] plotly_4.10.2 generics_0.1.3 ggplot2_3.4.2 \n[61] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[64] glue_1.6.2 emmeans_1.8.7 lazyeval_0.2.2 \n[67] tools_4.3.1 data.table_1.14.8 webshot_0.5.5 \n[70] forcats_1.0.0 mvtnorm_1.2-2 grid_4.3.1 \n[73] tidyr_1.3.0 rbibutils_2.2.13 colorspace_2.1-0 \n[76] nlme_3.1-162 cli_3.6.1 fansi_1.0.4 \n[79] viridisLite_0.4.2 geepack_1.3.9 gtable_0.3.3 \n[82] R.methodsS3_1.8.2 sass_0.4.7 digest_0.6.33 \n[85] htmlwidgets_1.6.2 memoise_2.0.1 htmltools_0.5.5 \n[88] R.oo_1.25.0 lifecycle_1.0.3 httr_1.4.6 \n[91] shinyWidgets_0.7.6 mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/vst01.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/mht01.html", "href": "tables/safety/mht01.html", "title": "MHT01", "section": "", - "text": "Data Setup\nStandard Table\nTable of History Prior to Study\nTable with Total Number of Conditions Suppressed\nTable with Total Number of Conditions Per Body System After The Summary of Patients\nTable Showing Additional “All Patients” Column\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadmh <- synthetic_cdisc_dataset(\"latest\", \"admh\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadmh <- df_explicit_na(admh)\n\nadsl_f <- adsl %>%\n filter(SAFFL == \"Y\") %>%\n select(USUBJID, ACTARM)\n\nadmh_f <- admh %>%\n filter(SAFFL == \"Y\" & MHBODSYS != \"\" & MHDECOD != \"\") %>%\n var_relabel(\n MHBODSYS = \"MedDRA System Organ Class\",\n MHDECOD = \"MedDRA Preferred Term\"\n )\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\"Total number of patients with at least one condition\", \"Total number of conditions\")\n ) %>%\n split_rows_by(\n var = \"MHBODSYS\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(admh_f$MHBODSYS)\n ) %>%\n analyze_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\"Total number of patients with at least one condition\", \"Total number of conditions\"),\n show_labels = \"hidden\"\n ) %>%\n count_occurrences(vars = \"MHDECOD\") %>%\n append_varlabels(admh_f, \"MHDECOD\", indent = 1L)\n\nresult <- build_table(lyt, admh_f, alt_counts_df = adsl_f) %>%\n prune_table()\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination\n MedDRA Preferred Term (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one condition 122 (91.0%) 123 (91.8%) 120 (90.9%) \nTotal number of conditions 609 622 703 \ncl A \n Total number of patients with at least one condition 78 (58.2%) 75 (56.0%) 89 (67.4%) \n Total number of conditions 132 130 160 \n trm A_1/2 50 (37.3%) 45 (33.6%) 63 (47.7%) \n trm A_2/2 48 (35.8%) 48 (35.8%) 50 (37.9%) \ncl B \n Total number of patients with at least one condition 96 (71.6%) 89 (66.4%) 97 (73.5%) \n Total number of conditions 185 198 205 \n trm B_1/3 47 (35.1%) 49 (36.6%) 43 (32.6%) \n trm B_2/3 49 (36.6%) 44 (32.8%) 52 (39.4%) \n trm B_3/3 48 (35.8%) 54 (40.3%) 51 (38.6%) \ncl C \n Total number of patients with at least one condition 67 (50.0%) 75 (56.0%) 79 (59.8%) \n Total number of conditions 103 116 129 \n trm C_1/2 43 (32.1%) 46 (34.3%) 43 (32.6%) \n trm C_2/2 35 (26.1%) 48 (35.8%) 55 (41.7%) \ncl D \n Total number of patients with at least one condition 96 (71.6%) 90 (67.2%) 98 (74.2%) \n Total number of conditions 189 178 209 \n trm D_1/3 50 (37.3%) 42 (31.3%) 51 (38.6%) \n trm D_2/3 48 (35.8%) 42 (31.3%) 50 (37.9%) \n trm D_3/3 47 (35.1%) 58 (43.3%) 57 (43.2%) \n\n\n\n\n\nCodeadmh_f_prior <- admh_f %>%\n filter(ASTDY <= 0)\n\nresult <- build_table(lyt, admh_f_prior, alt_counts_df = adsl_f) %>%\n prune_table()\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination\n MedDRA Preferred Term (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one condition 0 0 1 (0.8%) \nTotal number of conditions 0 0 1 \ncl D \n Total number of patients with at least one condition 0 0 1 (0.8%) \n Total number of conditions 0 0 1 \n trm D_2/3 0 0 1 (0.8%) \n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(\"Total number of patients with at least one condition\")\n ) %>%\n split_rows_by(\n var = \"MHBODSYS\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(admh_f$MHBODSYS)\n ) %>%\n analyze_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(\"Total number of patients with at least one condition\"),\n show_labels = \"hidden\"\n ) %>%\n count_occurrences(vars = \"MHDECOD\") %>%\n append_varlabels(admh_f, \"MHDECOD\", indent = 1L)\n\nresult <- build_table(lyt, admh_f, alt_counts_df = adsl) %>%\n prune_table()\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination\n MedDRA Preferred Term (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one condition 122 (91.0%) 123 (91.8%) 120 (90.9%) \ncl A \n Total number of patients with at least one condition 78 (58.2%) 75 (56.0%) 89 (67.4%) \n trm A_1/2 50 (37.3%) 45 (33.6%) 63 (47.7%) \n trm A_2/2 48 (35.8%) 48 (35.8%) 50 (37.9%) \ncl B \n Total number of patients with at least one condition 96 (71.6%) 89 (66.4%) 97 (73.5%) \n trm B_1/3 47 (35.1%) 49 (36.6%) 43 (32.6%) \n trm B_2/3 49 (36.6%) 44 (32.8%) 52 (39.4%) \n trm B_3/3 48 (35.8%) 54 (40.3%) 51 (38.6%) \ncl C \n Total number of patients with at least one condition 67 (50.0%) 75 (56.0%) 79 (59.8%) \n trm C_1/2 43 (32.1%) 46 (34.3%) 43 (32.6%) \n trm C_2/2 35 (26.1%) 48 (35.8%) 55 (41.7%) \ncl D \n Total number of patients with at least one condition 96 (71.6%) 90 (67.2%) 98 (74.2%) \n trm D_1/3 50 (37.3%) 42 (31.3%) 51 (38.6%) \n trm D_2/3 48 (35.8%) 42 (31.3%) 50 (37.9%) \n trm D_3/3 47 (35.1%) 58 (43.3%) 57 (43.2%) \n\n\n\n\nNot currently supported by rtables. Users, please notify us if this variation is important to you.\n\n\nConditions are further sorted by decreasing high level terms and low level terms.\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n add_overall_col(\"All Patients\") %>%\n analyze_num_patients(\n \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(unique = \"Total number of patients with at least one event\", nonunique = \"Total number of conditions\")\n ) %>%\n split_rows_by(\n var = \"MHBODSYS\",\n split_fun = split_fun,\n child_labels = \"visible\",\n label_pos = \"topleft\",\n split_label = obj_label(admh_f$MHBODSYS)\n ) %>%\n summarize_num_patients(\n \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(unique = \"Total number of patients with at least one event\", nonunique = \"Total number of conditions\")\n ) %>%\n count_occurrences(vars = \"MHDECOD\", .indent_mods = -1L) %>%\n append_varlabels(admh_f, \"MHDECOD\", indent = 1L)\n\nscorefun_hlt <- cont_n_allcols\nscorefun_llt <- score_occurrences_cols(col_indices = nlevels(adsl_f$ACTARM) + 1)\n\nresult <- build_table(lyt, admh_f, alt_counts_df = adsl_f) %>%\n prune_table() %>%\n sort_at_path(path = c(\"MHBODSYS\"), scorefun = scorefun_hlt) %>%\n sort_at_path(path = c(\"MHBODSYS\", \"*\", \"MHDECOD\"), scorefun = scorefun_llt)\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination All Patients\n MedDRA Preferred Term (N=134) (N=134) (N=132) (N=400) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one event 122 (91.0%) 123 (91.8%) 120 (90.9%) 365 (91.2%) \nTotal number of conditions 609 622 703 1934 \ncl D \n Total number of patients with at least one event 96 (71.6%) 90 (67.2%) 98 (74.2%) 284 (71.0%) \n Total number of conditions 189 178 209 576 \n trm D_3/3 47 (35.1%) 58 (43.3%) 57 (43.2%) 162 (40.5%) \n trm D_1/3 50 (37.3%) 42 (31.3%) 51 (38.6%) 143 (35.8%) \n trm D_2/3 48 (35.8%) 42 (31.3%) 50 (37.9%) 140 (35.0%) \ncl B \n Total number of patients with at least one event 96 (71.6%) 89 (66.4%) 97 (73.5%) 282 (70.5%) \n Total number of conditions 185 198 205 588 \n trm B_3/3 48 (35.8%) 54 (40.3%) 51 (38.6%) 153 (38.2%) \n trm B_2/3 49 (36.6%) 44 (32.8%) 52 (39.4%) 145 (36.2%) \n trm B_1/3 47 (35.1%) 49 (36.6%) 43 (32.6%) 139 (34.8%) \ncl A \n Total number of patients with at least one event 78 (58.2%) 75 (56.0%) 89 (67.4%) 242 (60.5%) \n Total number of conditions 132 130 160 422 \n trm A_1/2 50 (37.3%) 45 (33.6%) 63 (47.7%) 158 (39.5%) \n trm A_2/2 48 (35.8%) 48 (35.8%) 50 (37.9%) 146 (36.5%) \ncl C \n Total number of patients with at least one event 67 (50.0%) 75 (56.0%) 79 (59.8%) 221 (55.2%) \n Total number of conditions 103 116 129 348 \n trm C_2/2 35 (26.1%) 48 (35.8%) 55 (41.7%) 138 (34.5%) \n trm C_1/2 43 (32.1%) 46 (34.3%) 43 (32.6%) 132 (33.0%) \n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl_f <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n filter(SAFFL == \"Y\")\nadmh_f <- synthetic_cdisc_dataset(\"latest\", \"admh\") %>%\n filter(SAFFL == \"Y\" & MHBODSYS != \"\" & MHDECOD != \"\")\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl_f, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n filter(SAFFL == \"Y\")'),\n cdisc_dataset(\"ADMH\", admh_f, code = 'ADMH <- synthetic_cdisc_dataset(\"latest\", \"admh\") %>%\n filter(SAFFL == \"Y\" & MHBODSYS != \"\" & MHDECOD != \"\")'),\n check = TRUE\n ),\n modules = modules(\n tm_t_events(\n label = \"Medical History Table\",\n dataname = \"ADMH\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(admh_f, c(\"MHTERM\", \"MHDECOD\")),\n selected = c(\"MHDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(admh_f, c(\"MHBODSYS\", \"MHSOC\")),\n selected = \"MHBODSYS\"\n ),\n add_total = TRUE,\n event_type = \"condition\"\n )\n )\n)\n\n[INFO] 2023-08-04 14:50:53.0308 pid:6957 token:[] teal.modules.clinical Initializing tm_t_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 dplyr_1.1.2 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/mht01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable of History Prior to Study\nTable with Total Number of Conditions Suppressed\nTable with Total Number of Conditions Per Body System After The Summary of Patients\nTable Showing Additional “All Patients” Column\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadmh <- synthetic_cdisc_dataset(\"latest\", \"admh\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadmh <- df_explicit_na(admh)\n\nadsl_f <- adsl %>%\n filter(SAFFL == \"Y\") %>%\n select(USUBJID, ACTARM)\n\nadmh_f <- admh %>%\n filter(SAFFL == \"Y\" & MHBODSYS != \"\" & MHDECOD != \"\") %>%\n var_relabel(\n MHBODSYS = \"MedDRA System Organ Class\",\n MHDECOD = \"MedDRA Preferred Term\"\n )\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\"Total number of patients with at least one condition\", \"Total number of conditions\")\n ) %>%\n split_rows_by(\n var = \"MHBODSYS\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(admh_f$MHBODSYS)\n ) %>%\n analyze_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\"Total number of patients with at least one condition\", \"Total number of conditions\"),\n show_labels = \"hidden\"\n ) %>%\n count_occurrences(vars = \"MHDECOD\") %>%\n append_varlabels(admh_f, \"MHDECOD\", indent = 1L)\n\nresult <- build_table(lyt, admh_f, alt_counts_df = adsl_f) %>%\n prune_table()\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination\n MedDRA Preferred Term (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one condition 122 (91.0%) 123 (91.8%) 120 (90.9%) \nTotal number of conditions 609 622 703 \ncl A \n Total number of patients with at least one condition 78 (58.2%) 75 (56.0%) 89 (67.4%) \n Total number of conditions 132 130 160 \n trm A_1/2 50 (37.3%) 45 (33.6%) 63 (47.7%) \n trm A_2/2 48 (35.8%) 48 (35.8%) 50 (37.9%) \ncl B \n Total number of patients with at least one condition 96 (71.6%) 89 (66.4%) 97 (73.5%) \n Total number of conditions 185 198 205 \n trm B_1/3 47 (35.1%) 49 (36.6%) 43 (32.6%) \n trm B_2/3 49 (36.6%) 44 (32.8%) 52 (39.4%) \n trm B_3/3 48 (35.8%) 54 (40.3%) 51 (38.6%) \ncl C \n Total number of patients with at least one condition 67 (50.0%) 75 (56.0%) 79 (59.8%) \n Total number of conditions 103 116 129 \n trm C_1/2 43 (32.1%) 46 (34.3%) 43 (32.6%) \n trm C_2/2 35 (26.1%) 48 (35.8%) 55 (41.7%) \ncl D \n Total number of patients with at least one condition 96 (71.6%) 90 (67.2%) 98 (74.2%) \n Total number of conditions 189 178 209 \n trm D_1/3 50 (37.3%) 42 (31.3%) 51 (38.6%) \n trm D_2/3 48 (35.8%) 42 (31.3%) 50 (37.9%) \n trm D_3/3 47 (35.1%) 58 (43.3%) 57 (43.2%) \n\n\n\n\n\nCodeadmh_f_prior <- admh_f %>%\n filter(ASTDY <= 0)\n\nresult <- build_table(lyt, admh_f_prior, alt_counts_df = adsl_f) %>%\n prune_table()\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination\n MedDRA Preferred Term (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one condition 0 0 1 (0.8%) \nTotal number of conditions 0 0 1 \ncl D \n Total number of patients with at least one condition 0 0 1 (0.8%) \n Total number of conditions 0 0 1 \n trm D_2/3 0 0 1 (0.8%) \n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(\"Total number of patients with at least one condition\")\n ) %>%\n split_rows_by(\n var = \"MHBODSYS\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(admh_f$MHBODSYS)\n ) %>%\n analyze_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(\"Total number of patients with at least one condition\"),\n show_labels = \"hidden\"\n ) %>%\n count_occurrences(vars = \"MHDECOD\") %>%\n append_varlabels(admh_f, \"MHDECOD\", indent = 1L)\n\nresult <- build_table(lyt, admh_f, alt_counts_df = adsl) %>%\n prune_table()\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination\n MedDRA Preferred Term (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one condition 122 (91.0%) 123 (91.8%) 120 (90.9%) \ncl A \n Total number of patients with at least one condition 78 (58.2%) 75 (56.0%) 89 (67.4%) \n trm A_1/2 50 (37.3%) 45 (33.6%) 63 (47.7%) \n trm A_2/2 48 (35.8%) 48 (35.8%) 50 (37.9%) \ncl B \n Total number of patients with at least one condition 96 (71.6%) 89 (66.4%) 97 (73.5%) \n trm B_1/3 47 (35.1%) 49 (36.6%) 43 (32.6%) \n trm B_2/3 49 (36.6%) 44 (32.8%) 52 (39.4%) \n trm B_3/3 48 (35.8%) 54 (40.3%) 51 (38.6%) \ncl C \n Total number of patients with at least one condition 67 (50.0%) 75 (56.0%) 79 (59.8%) \n trm C_1/2 43 (32.1%) 46 (34.3%) 43 (32.6%) \n trm C_2/2 35 (26.1%) 48 (35.8%) 55 (41.7%) \ncl D \n Total number of patients with at least one condition 96 (71.6%) 90 (67.2%) 98 (74.2%) \n trm D_1/3 50 (37.3%) 42 (31.3%) 51 (38.6%) \n trm D_2/3 48 (35.8%) 42 (31.3%) 50 (37.9%) \n trm D_3/3 47 (35.1%) 58 (43.3%) 57 (43.2%) \n\n\n\n\nNot currently supported by rtables. Users, please notify us if this variation is important to you.\n\n\nConditions are further sorted by decreasing high level terms and low level terms.\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n add_overall_col(\"All Patients\") %>%\n analyze_num_patients(\n \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(unique = \"Total number of patients with at least one event\", nonunique = \"Total number of conditions\")\n ) %>%\n split_rows_by(\n var = \"MHBODSYS\",\n split_fun = split_fun,\n child_labels = \"visible\",\n label_pos = \"topleft\",\n split_label = obj_label(admh_f$MHBODSYS)\n ) %>%\n summarize_num_patients(\n \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(unique = \"Total number of patients with at least one event\", nonunique = \"Total number of conditions\")\n ) %>%\n count_occurrences(vars = \"MHDECOD\", .indent_mods = -1L) %>%\n append_varlabels(admh_f, \"MHDECOD\", indent = 1L)\n\nscorefun_hlt <- cont_n_allcols\nscorefun_llt <- score_occurrences_cols(col_indices = nlevels(adsl_f$ACTARM) + 1)\n\nresult <- build_table(lyt, admh_f, alt_counts_df = adsl_f) %>%\n prune_table() %>%\n sort_at_path(path = c(\"MHBODSYS\"), scorefun = scorefun_hlt) %>%\n sort_at_path(path = c(\"MHBODSYS\", \"*\", \"MHDECOD\"), scorefun = scorefun_llt)\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination All Patients\n MedDRA Preferred Term (N=134) (N=134) (N=132) (N=400) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one event 122 (91.0%) 123 (91.8%) 120 (90.9%) 365 (91.2%) \nTotal number of conditions 609 622 703 1934 \ncl D \n Total number of patients with at least one event 96 (71.6%) 90 (67.2%) 98 (74.2%) 284 (71.0%) \n Total number of conditions 189 178 209 576 \n trm D_3/3 47 (35.1%) 58 (43.3%) 57 (43.2%) 162 (40.5%) \n trm D_1/3 50 (37.3%) 42 (31.3%) 51 (38.6%) 143 (35.8%) \n trm D_2/3 48 (35.8%) 42 (31.3%) 50 (37.9%) 140 (35.0%) \ncl B \n Total number of patients with at least one event 96 (71.6%) 89 (66.4%) 97 (73.5%) 282 (70.5%) \n Total number of conditions 185 198 205 588 \n trm B_3/3 48 (35.8%) 54 (40.3%) 51 (38.6%) 153 (38.2%) \n trm B_2/3 49 (36.6%) 44 (32.8%) 52 (39.4%) 145 (36.2%) \n trm B_1/3 47 (35.1%) 49 (36.6%) 43 (32.6%) 139 (34.8%) \ncl A \n Total number of patients with at least one event 78 (58.2%) 75 (56.0%) 89 (67.4%) 242 (60.5%) \n Total number of conditions 132 130 160 422 \n trm A_1/2 50 (37.3%) 45 (33.6%) 63 (47.7%) 158 (39.5%) \n trm A_2/2 48 (35.8%) 48 (35.8%) 50 (37.9%) 146 (36.5%) \ncl C \n Total number of patients with at least one event 67 (50.0%) 75 (56.0%) 79 (59.8%) 221 (55.2%) \n Total number of conditions 103 116 129 348 \n trm C_2/2 35 (26.1%) 48 (35.8%) 55 (41.7%) 138 (34.5%) \n trm C_1/2 43 (32.1%) 46 (34.3%) 43 (32.6%) 132 (33.0%) \n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl_f <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n filter(SAFFL == \"Y\")\nadmh_f <- synthetic_cdisc_dataset(\"latest\", \"admh\") %>%\n filter(SAFFL == \"Y\" & MHBODSYS != \"\" & MHDECOD != \"\")\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl_f, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n filter(SAFFL == \"Y\")'),\n cdisc_dataset(\"ADMH\", admh_f, code = 'ADMH <- synthetic_cdisc_dataset(\"latest\", \"admh\") %>%\n filter(SAFFL == \"Y\" & MHBODSYS != \"\" & MHDECOD != \"\")'),\n check = TRUE\n ),\n modules = modules(\n tm_t_events(\n label = \"Medical History Table\",\n dataname = \"ADMH\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(admh_f, c(\"MHTERM\", \"MHDECOD\")),\n selected = c(\"MHDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(admh_f, c(\"MHBODSYS\", \"MHSOC\")),\n selected = \"MHBODSYS\"\n ),\n add_total = TRUE,\n event_type = \"condition\"\n )\n )\n)\n\n[INFO] 2023-08-04 15:07:33.0565 pid:6961 token:[] teal.modules.clinical Initializing tm_t_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 dplyr_1.1.2 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/mht01.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/egt02.html", "href": "tables/safety/egt02.html", "title": "EGT02", "section": "", - "text": "Data Setup\nECG Abnormalities Regardless of Abnormality at Baseline\nECG Abnormalities Among Subjects Without Abnormality at Baseline\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadeg <- df_explicit_na(adeg)\n\n# Note: We keep only post-baseline for analysis.\nadeg_f <- adeg %>%\n filter(ONTRTFL == \"Y\") %>%\n filter(PARAM %in% c(\"Heart Rate\", \"QT Duration\", \"RR Duration\")) %>%\n filter(ANRIND != \"<Missing>\") %>%\n var_relabel(\n PARAM = \"Assessment\",\n ANRIND = \"Abnormality\"\n )\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adeg_f$PARAM)\n ) %>%\n count_abnormal(\"ANRIND\", abnormal = list(Low = \"LOW\", High = \"HIGH\"), exclude_base_abn = FALSE) %>%\n append_varlabels(adeg_f, \"ANRIND\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = adeg_f, alt_counts_df = adsl)\nresult\n\nAssessment A: Drug X B: Placebo C: Combination\n Abnormality (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————\nHeart Rate \n Low 40/134 (29.9%) 43/134 (32.1%) 37/132 (28%) \n High 39/134 (29.1%) 45/134 (33.6%) 36/132 (27.3%)\nQT Duration \n Low 33/134 (24.6%) 44/134 (32.8%) 47/132 (35.6%)\n High 30/134 (22.4%) 42/134 (31.3%) 34/132 (25.8%)\nRR Duration \n Low 45/134 (33.6%) 26/134 (19.4%) 38/132 (28.8%)\n High 29/134 (21.6%) 49/134 (36.6%) 27/132 (20.5%)\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adeg_f$PARAM)\n ) %>%\n count_abnormal(\"ANRIND\", abnormal = list(Low = \"LOW\", High = \"HIGH\"), exclude_base_abn = TRUE) %>%\n append_varlabels(adeg_f, \"ANRIND\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = adeg_f, alt_counts_df = adsl)\nresult\n\nAssessment A: Drug X B: Placebo C: Combination\n Abnormality (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————\nHeart Rate \n Low 39/128 (30.5%) 42/124 (33.9%) 33/117 (28.2%)\n High 37/127 (29.1%) 43/129 (33.3%) 31/122 (25.4%)\nQT Duration \n Low 29/113 (25.7%) 42/126 (33.3%) 43/124 (34.7%)\n High 30/125 (24%) 40/130 (30.8%) 30/119 (25.2%)\nRR Duration \n Low 45/129 (34.9%) 26/123 (21.1%) 37/126 (29.4%)\n High 27/127 (21.3%) 43/122 (35.2%) 25/125 (20%) \n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADEG\", adeg, code = 'ADEG <- synthetic_cdisc_dataset(\"latest\", \"adeg\")'),\n check = TRUE\n ),\n modules = modules(\n tm_t_abnormality(\n label = \"Abnormality Table\",\n dataname = \"ADEG\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adeg, subset = c(\"EGCAT\", \"PARAM\", \"AVISIT\")),\n selected = c(\"PARAM\"),\n keep_order = TRUE\n ),\n grade = choices_selected(\n choices = variable_choices(adeg, subset = \"ANRIND\"),\n selected = \"ANRIND\",\n fixed = TRUE\n ),\n abnormal = list(Low = \"LOW\", High = \"HIGH\"),\n exclude_base_abn = FALSE\n )\n )\n)\n\n[INFO] 2023-08-04 14:49:53.6027 pid:6745 token:[] teal.modules.clinical Initializing tm_t_abnormality\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] scda_0.1.6.9010 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/egt02.lock'.\n\n\nDownload" + "text": "Data Setup\nECG Abnormalities Regardless of Abnormality at Baseline\nECG Abnormalities Among Subjects Without Abnormality at Baseline\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadeg <- df_explicit_na(adeg)\n\n# Note: We keep only post-baseline for analysis.\nadeg_f <- adeg %>%\n filter(ONTRTFL == \"Y\") %>%\n filter(PARAM %in% c(\"Heart Rate\", \"QT Duration\", \"RR Duration\")) %>%\n filter(ANRIND != \"<Missing>\") %>%\n var_relabel(\n PARAM = \"Assessment\",\n ANRIND = \"Abnormality\"\n )\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adeg_f$PARAM)\n ) %>%\n count_abnormal(\"ANRIND\", abnormal = list(Low = \"LOW\", High = \"HIGH\"), exclude_base_abn = FALSE) %>%\n append_varlabels(adeg_f, \"ANRIND\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = adeg_f, alt_counts_df = adsl)\nresult\n\nAssessment A: Drug X B: Placebo C: Combination\n Abnormality (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————\nHeart Rate \n Low 40/134 (29.9%) 43/134 (32.1%) 37/132 (28%) \n High 39/134 (29.1%) 45/134 (33.6%) 36/132 (27.3%)\nQT Duration \n Low 33/134 (24.6%) 44/134 (32.8%) 47/132 (35.6%)\n High 30/134 (22.4%) 42/134 (31.3%) 34/132 (25.8%)\nRR Duration \n Low 45/134 (33.6%) 26/134 (19.4%) 38/132 (28.8%)\n High 29/134 (21.6%) 49/134 (36.6%) 27/132 (20.5%)\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adeg_f$PARAM)\n ) %>%\n count_abnormal(\"ANRIND\", abnormal = list(Low = \"LOW\", High = \"HIGH\"), exclude_base_abn = TRUE) %>%\n append_varlabels(adeg_f, \"ANRIND\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = adeg_f, alt_counts_df = adsl)\nresult\n\nAssessment A: Drug X B: Placebo C: Combination\n Abnormality (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————\nHeart Rate \n Low 39/128 (30.5%) 42/124 (33.9%) 33/117 (28.2%)\n High 37/127 (29.1%) 43/129 (33.3%) 31/122 (25.4%)\nQT Duration \n Low 29/113 (25.7%) 42/126 (33.3%) 43/124 (34.7%)\n High 30/125 (24%) 40/130 (30.8%) 30/119 (25.2%)\nRR Duration \n Low 45/129 (34.9%) 26/123 (21.1%) 37/126 (29.4%)\n High 27/127 (21.3%) 43/122 (35.2%) 25/125 (20%) \n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADEG\", adeg, code = 'ADEG <- synthetic_cdisc_dataset(\"latest\", \"adeg\")'),\n check = TRUE\n ),\n modules = modules(\n tm_t_abnormality(\n label = \"Abnormality Table\",\n dataname = \"ADEG\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adeg, subset = c(\"EGCAT\", \"PARAM\", \"AVISIT\")),\n selected = c(\"PARAM\"),\n keep_order = TRUE\n ),\n grade = choices_selected(\n choices = variable_choices(adeg, subset = \"ANRIND\"),\n selected = \"ANRIND\",\n fixed = TRUE\n ),\n abnormal = list(Low = \"LOW\", High = \"HIGH\"),\n exclude_base_abn = FALSE\n )\n )\n)\n\n[INFO] 2023-08-04 15:06:29.7814 pid:6749 token:[] teal.modules.clinical Initializing tm_t_abnormality\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] scda_0.1.6.9010 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/egt02.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/pdt02.html", @@ -284,35 +284,35 @@ "href": "tables/efficacy/dort01.html", "title": "DORT01", "section": "", - "text": "Data Setup\nStandard Table\nTable Selecting Sections to Display\nTable Modifying Analysis Details like Conf. Type and Alpha Level\nTable Modifying Time Point for the “XX Months duration” Analysis\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadtte <- df_explicit_na(adtte)\n\nadtte_f <- adtte %>%\n filter(PARAMCD == \"CRSD\" & BMEASIFL == \"Y\") %>%\n dplyr::mutate(\n AVAL = day2month(AVAL),\n is_event = CNSR == 0,\n is_not_event = CNSR == 1,\n EVNT1 = factor(\n case_when(\n is_event == TRUE ~ \"Responders with subsequent event (%)\",\n is_event == FALSE ~ \"Responders without subsequent event (%)\"\n ),\n levels = c(\"Responders with subsequent event (%)\", \"Responders without subsequent event (%)\")\n ),\n EVNTDESC = factor(EVNTDESC)\n )\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n count_values(\n vars = \"USUBJID\",\n values = unique(adtte$USUBJID),\n .labels = \"Responders\",\n .stats = \"count\"\n ) %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Responders with subsequent event (%)\"),\n .indent_mods = c(count_fraction = 1L),\n show_labels = \"hidden\",\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Responders with subsequent event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 2L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Responders without subsequent event (%)\"),\n .indent_mods = c(count_fraction = 1L),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Duration of response (Months)\",\n is_event = \"is_event\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months duration\",\n is_event = \"is_event\",\n time_point = 12\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————\nResponders 68 73 62 \n Responders with subsequent event (%) 46 (67.6%) 39 (53.4%) 32 (51.6%) \n Earliest contributing event \n Death 26 24 16 \n Disease Progression 20 15 16 \n Responders without subsequent event (%) 22 (32.4%) 34 (46.6%) 30 (48.4%) \nDuration of response (Months) \n Median 5.3 6.2 5.3 \n 95% CI (4.6, 5.8) (5.4, 6.3) (4.6, 5.8) \n 25% and 75%-ile 3.8, 6.3 4.6, 6.4 4.0, 6.1 \n Range (censored) 3.6 to 6.3 3.3 to 6.5 3.3 to 6.4 \n Range (event) 0.5 to 6.4 0.9 to 6.5 0.6 to 6.6 \n12 Months duration \n Patients remaining at risk NA NA NA \n Event Free Rate (%) NA NA NA \n 95% CI NA NA NA \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n count_values(\n vars = \"USUBJID\",\n values = unique(adtte$USUBJID),\n .labels = \"Responders\",\n .stats = \"count\"\n ) %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Responders with subsequent event (%)\"),\n .indent_mods = c(count_fraction = 1L),\n show_labels = \"hidden\",\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Responders with subsequent event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 2L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Responders without subsequent event (%)\"),\n .indent_mods = c(count_fraction = 1L),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Duration of response (Months)\",\n is_event = \"is_event\",\n table_names = \"surv_time\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = c(\"Unstratified Analysis\"),\n control = control_coxph(pval_method = \"log-rank\"),\n table_names = \"cox_pair\"\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————\nResponders 68 73 62 \n Responders with subsequent event (%) 46 (67.6%) 39 (53.4%) 32 (51.6%) \n Earliest contributing event \n Death 26 24 16 \n Disease Progression 20 15 16 \n Responders without subsequent event (%) 22 (32.4%) 34 (46.6%) 30 (48.4%) \nDuration of response (Months) \n Median 5.3 6.2 5.3 \n 95% CI (4.6, 5.8) (5.4, 6.3) (4.6, 5.8) \n 25% and 75%-ile 3.8, 6.3 4.6, 6.4 4.0, 6.1 \n Range (censored) 3.6 to 6.3 3.3 to 6.5 3.3 to 6.4 \n Range (event) 0.5 to 6.4 0.9 to 6.5 0.6 to 6.6 \nUnstratified Analysis \n p-value (log-rank) 0.0223 0.6659 \n Hazard Ratio 0.60 0.90 \n 95% CI (0.39, 0.93) (0.57, 1.44) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n count_values(\n vars = \"USUBJID\",\n values = unique(adtte$USUBJID),\n .labels = \"Responders\",\n .stats = \"count\"\n ) %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Responders with subsequent event (%)\"),\n .indent_mods = c(count_fraction = 1L),\n show_labels = \"hidden\",\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Responders with subsequent event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 2L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Responders without subsequent event (%)\"),\n .indent_mods = c(count_fraction = 1L),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Duration of response (Months)\",\n is_event = \"is_event\",\n control = control_surv_time(conf_level = 0.90, conf_type = \"log-log\")\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months duration\",\n is_event = \"is_event\",\n time_point = 12,\n control = control_surv_timepoint(conf_level = 0.975)\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————\nResponders 68 73 62 \n Responders with subsequent event (%) 46 (67.6%) 39 (53.4%) 32 (51.6%) \n Earliest contributing event \n Death 26 24 16 \n Disease Progression 20 15 16 \n Responders without subsequent event (%) 22 (32.4%) 34 (46.6%) 30 (48.4%) \nDuration of response (Months) \n Median 5.3 6.2 5.3 \n 90% CI (4.6, 5.8) (5.5, 6.3) (4.6, 5.7) \n 25% and 75%-ile 3.8, 6.3 4.6, 6.4 4.0, 6.1 \n Range (censored) 3.6 to 6.3 3.3 to 6.5 3.3 to 6.4 \n Range (event) 0.5 to 6.4 0.9 to 6.5 0.6 to 6.6 \n12 Months duration \n Patients remaining at risk NA NA NA \n Event Free Rate (%) NA NA NA \n 97.5% CI NA NA NA \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n count_values(\n vars = \"USUBJID\",\n values = unique(adtte$USUBJID),\n .labels = \"Responders\",\n .stats = \"count\"\n ) %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Responders with subsequent event (%)\"),\n .indent_mods = c(count_fraction = 1L),\n show_labels = \"hidden\",\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Responders with subsequent event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 2L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Responders without subsequent event (%)\"),\n .indent_mods = c(count_fraction = 1L),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Duration of response (Months)\",\n is_event = \"is_event\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months duration\",\n is_event = \"is_event\",\n time_point = 6\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————\nResponders 68 73 62 \n Responders with subsequent event (%) 46 (67.6%) 39 (53.4%) 32 (51.6%) \n Earliest contributing event \n Death 26 24 16 \n Disease Progression 20 15 16 \n Responders without subsequent event (%) 22 (32.4%) 34 (46.6%) 30 (48.4%) \nDuration of response (Months) \n Median 5.3 6.2 5.3 \n 95% CI (4.6, 5.8) (5.4, 6.3) (4.6, 5.8) \n 25% and 75%-ile 3.8, 6.3 4.6, 6.4 4.0, 6.1 \n Range (censored) 3.6 to 6.3 3.3 to 6.5 3.3 to 6.4 \n Range (event) 0.5 to 6.4 0.9 to 6.5 0.6 to 6.6 \n6 Months duration \n Patients remaining at risk 10 18 7 \n Event Free Rate (%) 33.46 50.23 30.56 \n 95% CI (20.88, 46.05) (36.54, 63.92) (13.56, 47.57)\n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(tern)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nADSL <- df_explicit_na(ADSL)\nADTTE <- df_explicit_na(ADTTE)\n\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% df_explicit_na()'),\n cdisc_dataset(\"ADTTE\", ADTTE, code = 'ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\") %>% df_explicit_na()'),\n check = TRUE\n ),\n modules = modules(\n tm_t_tte(\n label = \"Time To Event Table\",\n dataname = \"ADTTE\",\n arm_var = choices_selected(\n variable_choices(ADSL, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")),\n \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(ADTTE, \"PARAMCD\", \"PARAM\"),\n \"CRSD\"\n ),\n strata_var = choices_selected(\n variable_choices(ADSL, c(\"SEX\", \"BMRKR2\")),\n \"SEX\"\n ),\n time_points = choices_selected(c(6, 8), 6),\n event_desc_var = choices_selected(\n variable_choices(ADTTE, \"EVNTDESC\"),\n \"EVNTDESC\",\n fixed = TRUE\n )\n )\n )\n)\n\n[INFO] 2023-08-04 14:48:24.8987 pid:6427 token:[] teal.modules.clinical Initializing tm_t_tte\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/dort01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable Selecting Sections to Display\nTable Modifying Analysis Details like Conf. Type and Alpha Level\nTable Modifying Time Point for the “XX Months duration” Analysis\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadtte <- df_explicit_na(adtte)\n\nadtte_f <- adtte %>%\n filter(PARAMCD == \"CRSD\" & BMEASIFL == \"Y\") %>%\n dplyr::mutate(\n AVAL = day2month(AVAL),\n is_event = CNSR == 0,\n is_not_event = CNSR == 1,\n EVNT1 = factor(\n case_when(\n is_event == TRUE ~ \"Responders with subsequent event (%)\",\n is_event == FALSE ~ \"Responders without subsequent event (%)\"\n ),\n levels = c(\"Responders with subsequent event (%)\", \"Responders without subsequent event (%)\")\n ),\n EVNTDESC = factor(EVNTDESC)\n )\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n count_values(\n vars = \"USUBJID\",\n values = unique(adtte$USUBJID),\n .labels = \"Responders\",\n .stats = \"count\"\n ) %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Responders with subsequent event (%)\"),\n .indent_mods = c(count_fraction = 1L),\n show_labels = \"hidden\",\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Responders with subsequent event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 2L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Responders without subsequent event (%)\"),\n .indent_mods = c(count_fraction = 1L),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Duration of response (Months)\",\n is_event = \"is_event\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months duration\",\n is_event = \"is_event\",\n time_point = 12\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————\nResponders 68 73 62 \n Responders with subsequent event (%) 46 (67.6%) 39 (53.4%) 32 (51.6%) \n Earliest contributing event \n Death 26 24 16 \n Disease Progression 20 15 16 \n Responders without subsequent event (%) 22 (32.4%) 34 (46.6%) 30 (48.4%) \nDuration of response (Months) \n Median 5.3 6.2 5.3 \n 95% CI (4.6, 5.8) (5.4, 6.3) (4.6, 5.8) \n 25% and 75%-ile 3.8, 6.3 4.6, 6.4 4.0, 6.1 \n Range (censored) 3.6 to 6.3 3.3 to 6.5 3.3 to 6.4 \n Range (event) 0.5 to 6.4 0.9 to 6.5 0.6 to 6.6 \n12 Months duration \n Patients remaining at risk NA NA NA \n Event Free Rate (%) NA NA NA \n 95% CI NA NA NA \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n count_values(\n vars = \"USUBJID\",\n values = unique(adtte$USUBJID),\n .labels = \"Responders\",\n .stats = \"count\"\n ) %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Responders with subsequent event (%)\"),\n .indent_mods = c(count_fraction = 1L),\n show_labels = \"hidden\",\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Responders with subsequent event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 2L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Responders without subsequent event (%)\"),\n .indent_mods = c(count_fraction = 1L),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Duration of response (Months)\",\n is_event = \"is_event\",\n table_names = \"surv_time\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = c(\"Unstratified Analysis\"),\n control = control_coxph(pval_method = \"log-rank\"),\n table_names = \"cox_pair\"\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————\nResponders 68 73 62 \n Responders with subsequent event (%) 46 (67.6%) 39 (53.4%) 32 (51.6%) \n Earliest contributing event \n Death 26 24 16 \n Disease Progression 20 15 16 \n Responders without subsequent event (%) 22 (32.4%) 34 (46.6%) 30 (48.4%) \nDuration of response (Months) \n Median 5.3 6.2 5.3 \n 95% CI (4.6, 5.8) (5.4, 6.3) (4.6, 5.8) \n 25% and 75%-ile 3.8, 6.3 4.6, 6.4 4.0, 6.1 \n Range (censored) 3.6 to 6.3 3.3 to 6.5 3.3 to 6.4 \n Range (event) 0.5 to 6.4 0.9 to 6.5 0.6 to 6.6 \nUnstratified Analysis \n p-value (log-rank) 0.0223 0.6659 \n Hazard Ratio 0.60 0.90 \n 95% CI (0.39, 0.93) (0.57, 1.44) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n count_values(\n vars = \"USUBJID\",\n values = unique(adtte$USUBJID),\n .labels = \"Responders\",\n .stats = \"count\"\n ) %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Responders with subsequent event (%)\"),\n .indent_mods = c(count_fraction = 1L),\n show_labels = \"hidden\",\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Responders with subsequent event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 2L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Responders without subsequent event (%)\"),\n .indent_mods = c(count_fraction = 1L),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Duration of response (Months)\",\n is_event = \"is_event\",\n control = control_surv_time(conf_level = 0.90, conf_type = \"log-log\")\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months duration\",\n is_event = \"is_event\",\n time_point = 12,\n control = control_surv_timepoint(conf_level = 0.975)\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————\nResponders 68 73 62 \n Responders with subsequent event (%) 46 (67.6%) 39 (53.4%) 32 (51.6%) \n Earliest contributing event \n Death 26 24 16 \n Disease Progression 20 15 16 \n Responders without subsequent event (%) 22 (32.4%) 34 (46.6%) 30 (48.4%) \nDuration of response (Months) \n Median 5.3 6.2 5.3 \n 90% CI (4.6, 5.8) (5.5, 6.3) (4.6, 5.7) \n 25% and 75%-ile 3.8, 6.3 4.6, 6.4 4.0, 6.1 \n Range (censored) 3.6 to 6.3 3.3 to 6.5 3.3 to 6.4 \n Range (event) 0.5 to 6.4 0.9 to 6.5 0.6 to 6.6 \n12 Months duration \n Patients remaining at risk NA NA NA \n Event Free Rate (%) NA NA NA \n 97.5% CI NA NA NA \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n count_values(\n vars = \"USUBJID\",\n values = unique(adtte$USUBJID),\n .labels = \"Responders\",\n .stats = \"count\"\n ) %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Responders with subsequent event (%)\"),\n .indent_mods = c(count_fraction = 1L),\n show_labels = \"hidden\",\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Responders with subsequent event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 2L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Responders without subsequent event (%)\"),\n .indent_mods = c(count_fraction = 1L),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Duration of response (Months)\",\n is_event = \"is_event\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months duration\",\n is_event = \"is_event\",\n time_point = 6\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————\nResponders 68 73 62 \n Responders with subsequent event (%) 46 (67.6%) 39 (53.4%) 32 (51.6%) \n Earliest contributing event \n Death 26 24 16 \n Disease Progression 20 15 16 \n Responders without subsequent event (%) 22 (32.4%) 34 (46.6%) 30 (48.4%) \nDuration of response (Months) \n Median 5.3 6.2 5.3 \n 95% CI (4.6, 5.8) (5.4, 6.3) (4.6, 5.8) \n 25% and 75%-ile 3.8, 6.3 4.6, 6.4 4.0, 6.1 \n Range (censored) 3.6 to 6.3 3.3 to 6.5 3.3 to 6.4 \n Range (event) 0.5 to 6.4 0.9 to 6.5 0.6 to 6.6 \n6 Months duration \n Patients remaining at risk 10 18 7 \n Event Free Rate (%) 33.46 50.23 30.56 \n 95% CI (20.88, 46.05) (36.54, 63.92) (13.56, 47.57)\n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(tern)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nADSL <- df_explicit_na(ADSL)\nADTTE <- df_explicit_na(ADTTE)\n\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% df_explicit_na()'),\n cdisc_dataset(\"ADTTE\", ADTTE, code = 'ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\") %>% df_explicit_na()'),\n check = TRUE\n ),\n modules = modules(\n tm_t_tte(\n label = \"Time To Event Table\",\n dataname = \"ADTTE\",\n arm_var = choices_selected(\n variable_choices(ADSL, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")),\n \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(ADTTE, \"PARAMCD\", \"PARAM\"),\n \"CRSD\"\n ),\n strata_var = choices_selected(\n variable_choices(ADSL, c(\"SEX\", \"BMRKR2\")),\n \"SEX\"\n ),\n time_points = choices_selected(c(6, 8), 6),\n event_desc_var = choices_selected(\n variable_choices(ADTTE, \"EVNTDESC\"),\n \"EVNTDESC\",\n fixed = TRUE\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:04:52.6958 pid:6431 token:[] teal.modules.clinical Initializing tm_t_tte\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/dort01.lock'.\n\n\nDownload" }, { "objectID": "tables/efficacy/ttet01.html", "href": "tables/efficacy/ttet01.html", "title": "TTET01", "section": "", - "text": "Data Setup\nStandard Table\nTable Selecting Sections to Display\nTable Modifying Analysis Details like Conf. Type, Ties, Alpha Level\nTable with Stratified Analysis\nTable Modifying Time Point for the “XX Months” Analysis\nTable Requesting > 1 p-value\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n# Ensure that character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadtte <- df_explicit_na(adtte)\n\nadtte_f <- adtte %>%\n dplyr::filter(PARAMCD == \"OS\") %>%\n dplyr::mutate(\n AVAL = day2month(AVAL),\n is_event = CNSR == 0,\n is_not_event = CNSR == 1,\n EVNT1 = factor(\n case_when(\n is_event == TRUE ~ \"Patients with event (%)\",\n is_event == FALSE ~ \"Patients without event (%)\"\n ),\n levels = c(\"Patients with event (%)\", \"Patients without event (%)\")\n ),\n EVNTDESC = factor(EVNTDESC)\n )\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n var = \"ARM\", ref_group = \"A: Drug X\"\n ) %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients with event (%)\")\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Patients with event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 1L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients without event (%)\"),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Time to Event (Months)\",\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = c(\"Unstratified Analysis\"),\n control = control_coxph(pval_method = \"log-rank\"),\n table_names = \"coxph_unstratified\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months\",\n time_point = c(6, 12),\n is_event = \"is_event\",\n method = \"both\",\n control = control_surv_timepoint()\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————\nPatients with event (%) 58 (43.3%) 58 (43.3%) 69 (52.3%) \n Earliest contributing event \n Death 58 58 69 \nPatients without event (%) 76 (56.7%) 76 (56.7%) 63 (47.7%) \nTime to Event (Months) \n Median NA NA 9.4 \n 95% CI (9.3, NA) (9.4, NA) (7.6, NA) \n 25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA \n Range (censored) 9.9 to 16.4 9.9 to 16.3 9.9 to 16.3 \n Range (event) 0.5 to 9.6 0.9 to 9.6 0.5 to 9.8 \nUnstratified Analysis \n p-value (log-rank) 0.9998 0.1541 \n Hazard Ratio 1.00 1.29 \n 95% CI (0.69, 1.44) (0.91, 1.83) \n6 Months \n Patients remaining at risk 97 97 90 \n Event Free Rate (%) 72.39 72.39 68.18 \n 95% CI (64.82, 79.96) (64.82, 79.96) (60.24, 76.13)\n Difference in Event Free Rate 0.00 -4.21 \n 95% CI (-10.71, 10.71) (-15.18, 6.77)\n p-value (Z-test) 1.0000 0.4525 \n12 Months \n Patients remaining at risk 49 48 37 \n Event Free Rate (%) 56.72 56.72 47.73 \n 95% CI (48.33, 65.11) (48.33, 65.11) (39.21, 56.25)\n Difference in Event Free Rate 0.00 -8.99 \n 95% CI (-11.86, 11.86) (-20.95, 2.97)\n p-value (Z-test) 1.0000 0.1406 \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients with event (%)\")\n ) %>%\n summarize_vars(\n \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients without event (%)\"),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Time to Event (Months)\",\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = c(\"Unstratified Analysis\"),\n control = control_coxph(pval_method = \"log-rank\"),\n table_names = \"coxph_unstratified\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months\",\n is_event = \"is_event\",\n method = \"surv\",\n time_point = c(6, 12)\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————\nPatients with event (%) 58 (43.3%) 58 (43.3%) 69 (52.3%) \nPatients without event (%) 76 (56.7%) 76 (56.7%) 63 (47.7%) \nTime to Event (Months) \n Median NA NA 9.4 \n 95% CI (9.3, NA) (9.4, NA) (7.6, NA) \n 25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA \n Range (censored) 9.9 to 16.4 9.9 to 16.3 9.9 to 16.3 \n Range (event) 0.5 to 9.6 0.9 to 9.6 0.5 to 9.8 \nUnstratified Analysis \n p-value (log-rank) 0.9998 0.1541 \n Hazard Ratio 1.00 1.29 \n 95% CI (0.69, 1.44) (0.91, 1.83) \n6 Months \n Patients remaining at risk 97 97 90 \n Event Free Rate (%) 72.39 72.39 68.18 \n 95% CI (64.82, 79.96) (64.82, 79.96) (60.24, 76.13)\n12 Months \n Patients remaining at risk 49 48 37 \n Event Free Rate (%) 56.72 56.72 47.73 \n 95% CI (48.33, 65.11) (48.33, 65.11) (39.21, 56.25)\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients with event (%)\")\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Patients with event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 1L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients without event (%)\"),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Time to Event (Months)\",\n is_event = \"is_event\",\n control = control_surv_time(conf_level = 0.9, conf_type = \"log-log\"),\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = c(\"Unstratified Analysis\"),\n control = control_coxph(\n pval_method = \"log-rank\",\n conf_level = 0.95,\n ties = \"efron\"\n ),\n table_names = \"coxph_unstratified\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months\",\n is_event = \"is_event\",\n time_point = 12,\n control = control_surv_timepoint(conf_level = 0.9, conf_type = \"log-log\"),\n table_names_suffix = \"_log_log\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n show_labels = \"hidden\",\n is_event = \"is_event\",\n time_point = 12,\n method = \"surv_diff\",\n control = control_surv_timepoint(conf_level = 0.975),\n table_names_suffix = \"_975_pct\"\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————\nPatients with event (%) 58 (43.3%) 58 (43.3%) 69 (52.3%) \n Earliest contributing event \n Death 58 58 69 \nPatients without event (%) 76 (56.7%) 76 (56.7%) 63 (47.7%) \nTime to Event (Months) \n Median NA NA 9.4 \n 90% CI (9.6, NA) (9.6, NA) (7.7, NA) \n 25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA \n Range (censored) 9.9 to 16.4 9.9 to 16.3 9.9 to 16.3 \n Range (event) 0.5 to 9.6 0.9 to 9.6 0.5 to 9.8 \nUnstratified Analysis \n p-value (log-rank) 0.9998 0.1541 \n Hazard Ratio 1.00 1.29 \n 95% CI (0.69, 1.44) (0.91, 1.83) \n12 Months \n Patients remaining at risk 49 48 37 \n Event Free Rate (%) 56.72 56.72 47.73 \n 90% CI (49.37, 63.41) (49.37, 63.41) (40.42, 54.66)\nDifference in Event Free Rate 0.00 -8.99 \n 97.5% CI (-13.57, 13.57) (-22.66, 4.69)\n p-value (Z-test) 1.0000 0.1406 \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients with event (%)\")\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Patients with event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 1L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients without event (%)\"),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Time to Event (Months)\",\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = \"Unstratified Analysis\",\n table_names = \"coxph_unstratified\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = \"Stratified Analysis\",\n strat = \"SEX\",\n table_names = \"coxph_stratified\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months\",\n is_event = \"is_event\",\n method = \"both\",\n time_point = 12\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————\nPatients with event (%) 58 (43.3%) 58 (43.3%) 69 (52.3%) \n Earliest contributing event \n Death 58 58 69 \nPatients without event (%) 76 (56.7%) 76 (56.7%) 63 (47.7%) \nTime to Event (Months) \n Median NA NA 9.4 \n 95% CI (9.3, NA) (9.4, NA) (7.6, NA) \n 25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA \n Range (censored) 9.9 to 16.4 9.9 to 16.3 9.9 to 16.3 \n Range (event) 0.5 to 9.6 0.9 to 9.6 0.5 to 9.8 \nUnstratified Analysis \n p-value (log-rank) 0.9998 0.1541 \n Hazard Ratio 1.00 1.29 \n 95% CI (0.69, 1.44) (0.91, 1.83) \nStratified Analysis \n p-value (log-rank) 0.9978 0.1733 \n Hazard Ratio 1.00 1.27 \n 95% CI (0.69, 1.44) (0.90, 1.81) \n12 Months \n Patients remaining at risk 49 48 37 \n Event Free Rate (%) 56.72 56.72 47.73 \n 95% CI (48.33, 65.11) (48.33, 65.11) (39.21, 56.25)\n Difference in Event Free Rate 0.00 -8.99 \n 95% CI (-11.86, 11.86) (-20.95, 2.97)\n p-value (Z-test) 1.0000 0.1406 \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients with event (%)\")\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Patients with event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 1L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients without event (%)\"),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Time to Event (Months)\",\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = c(\"Unstratified Analysis\"),\n control = control_coxph(pval_method = \"log-rank\"),\n table_names = \"coxph_unstratified\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months\",\n is_event = \"is_event\",\n time_point = 6,\n method = \"both\"\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————\nPatients with event (%) 58 (43.3%) 58 (43.3%) 69 (52.3%) \n Earliest contributing event \n Death 58 58 69 \nPatients without event (%) 76 (56.7%) 76 (56.7%) 63 (47.7%) \nTime to Event (Months) \n Median NA NA 9.4 \n 95% CI (9.3, NA) (9.4, NA) (7.6, NA) \n 25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA \n Range (censored) 9.9 to 16.4 9.9 to 16.3 9.9 to 16.3 \n Range (event) 0.5 to 9.6 0.9 to 9.6 0.5 to 9.8 \nUnstratified Analysis \n p-value (log-rank) 0.9998 0.1541 \n Hazard Ratio 1.00 1.29 \n 95% CI (0.69, 1.44) (0.91, 1.83) \n6 Months \n Patients remaining at risk 97 97 90 \n Event Free Rate (%) 72.39 72.39 68.18 \n 95% CI (64.82, 79.96) (64.82, 79.96) (60.24, 76.13)\n Difference in Event Free Rate 0.00 -4.21 \n 95% CI (-10.71, 10.71) (-15.18, 6.77)\n p-value (Z-test) 1.0000 0.4525 \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients with event (%)\")\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Patients with event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 1L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients without event (%)\"),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Time to Event (Months)\",\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = c(\"Unstratified Analysis\"),\n control = control_coxph(pval_method = \"log-rank\"),\n .stats = \"pvalue\",\n table_names = \"coxph_unstratified\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n show_labels = \"hidden\",\n control = control_coxph(pval_method = \"wald\"),\n .stats = \"pvalue\",\n .indent_mods = c(pvalue = 1L),\n table_names = \"coxph_wald_pvalue\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n show_labels = \"hidden\",\n control = control_coxph(pval_method = \"likelihood\"),\n .indent_mods = c(pvalue = 1L, hr = 1L, hr_ci = 2L),\n table_names = \"coxph_likelihood_pvalue\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months\",\n is_event = \"is_event\",\n time_point = 12,\n method = \"both\"\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————\nPatients with event (%) 58 (43.3%) 58 (43.3%) 69 (52.3%) \n Earliest contributing event \n Death 58 58 69 \nPatients without event (%) 76 (56.7%) 76 (56.7%) 63 (47.7%) \nTime to Event (Months) \n Median NA NA 9.4 \n 95% CI (9.3, NA) (9.4, NA) (7.6, NA) \n 25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA \n Range (censored) 9.9 to 16.4 9.9 to 16.3 9.9 to 16.3 \n Range (event) 0.5 to 9.6 0.9 to 9.6 0.5 to 9.8 \nUnstratified Analysis \n p-value (log-rank) 0.9998 0.1541 \n p-value (wald) 0.9998 0.1552 \n p-value (likelihood) 0.9998 0.1543 \n Hazard Ratio 1.00 1.29 \n 95% CI (0.69, 1.44) (0.91, 1.83) \n12 Months \n Patients remaining at risk 49 48 37 \n Event Free Rate (%) 56.72 56.72 47.73 \n 95% CI (48.33, 65.11) (48.33, 65.11) (39.21, 56.25)\n Difference in Event Free Rate 0.00 -8.99 \n 95% CI (-11.86, 11.86) (-20.95, 2.97)\n p-value (Z-test) 1.0000 0.1406 \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadtte <- df_explicit_na(adtte)\n\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% df_explicit_na()'),\n cdisc_dataset(\"ADTTE\", adtte, code = 'ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\") %>% df_explicit_na()'),\n check = TRUE\n ),\n modules = modules(\n tm_t_tte(\n label = \"Time To Event Table\",\n dataname = \"ADTTE\",\n arm_var = choices_selected(\n variable_choices(adsl, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")),\n \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(adtte, \"PARAMCD\", \"PARAM\"),\n \"OS\"\n ),\n strata_var = choices_selected(\n variable_choices(adsl, c(\"SEX\", \"BMRKR2\")),\n \"SEX\"\n ),\n time_points = choices_selected(c(6, 8), 6),\n event_desc_var = choices_selected(\n variable_choices(adtte, \"EVNTDESC\"),\n \"EVNTDESC\",\n fixed = TRUE\n )\n )\n )\n)\n\n[INFO] 2023-08-04 14:47:11.9095 pid:6210 token:[] teal.modules.clinical Initializing tm_t_tte\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/ttet01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable Selecting Sections to Display\nTable Modifying Analysis Details like Conf. Type, Ties, Alpha Level\nTable with Stratified Analysis\nTable Modifying Time Point for the “XX Months” Analysis\nTable Requesting > 1 p-value\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n# Ensure that character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadtte <- df_explicit_na(adtte)\n\nadtte_f <- adtte %>%\n dplyr::filter(PARAMCD == \"OS\") %>%\n dplyr::mutate(\n AVAL = day2month(AVAL),\n is_event = CNSR == 0,\n is_not_event = CNSR == 1,\n EVNT1 = factor(\n case_when(\n is_event == TRUE ~ \"Patients with event (%)\",\n is_event == FALSE ~ \"Patients without event (%)\"\n ),\n levels = c(\"Patients with event (%)\", \"Patients without event (%)\")\n ),\n EVNTDESC = factor(EVNTDESC)\n )\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n var = \"ARM\", ref_group = \"A: Drug X\"\n ) %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients with event (%)\")\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Patients with event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 1L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients without event (%)\"),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Time to Event (Months)\",\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = c(\"Unstratified Analysis\"),\n control = control_coxph(pval_method = \"log-rank\"),\n table_names = \"coxph_unstratified\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months\",\n time_point = c(6, 12),\n is_event = \"is_event\",\n method = \"both\",\n control = control_surv_timepoint()\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————\nPatients with event (%) 58 (43.3%) 58 (43.3%) 69 (52.3%) \n Earliest contributing event \n Death 58 58 69 \nPatients without event (%) 76 (56.7%) 76 (56.7%) 63 (47.7%) \nTime to Event (Months) \n Median NA NA 9.4 \n 95% CI (9.3, NA) (9.4, NA) (7.6, NA) \n 25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA \n Range (censored) 9.9 to 16.4 9.9 to 16.3 9.9 to 16.3 \n Range (event) 0.5 to 9.6 0.9 to 9.6 0.5 to 9.8 \nUnstratified Analysis \n p-value (log-rank) 0.9998 0.1541 \n Hazard Ratio 1.00 1.29 \n 95% CI (0.69, 1.44) (0.91, 1.83) \n6 Months \n Patients remaining at risk 97 97 90 \n Event Free Rate (%) 72.39 72.39 68.18 \n 95% CI (64.82, 79.96) (64.82, 79.96) (60.24, 76.13)\n Difference in Event Free Rate 0.00 -4.21 \n 95% CI (-10.71, 10.71) (-15.18, 6.77)\n p-value (Z-test) 1.0000 0.4525 \n12 Months \n Patients remaining at risk 49 48 37 \n Event Free Rate (%) 56.72 56.72 47.73 \n 95% CI (48.33, 65.11) (48.33, 65.11) (39.21, 56.25)\n Difference in Event Free Rate 0.00 -8.99 \n 95% CI (-11.86, 11.86) (-20.95, 2.97)\n p-value (Z-test) 1.0000 0.1406 \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients with event (%)\")\n ) %>%\n summarize_vars(\n \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients without event (%)\"),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Time to Event (Months)\",\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = c(\"Unstratified Analysis\"),\n control = control_coxph(pval_method = \"log-rank\"),\n table_names = \"coxph_unstratified\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months\",\n is_event = \"is_event\",\n method = \"surv\",\n time_point = c(6, 12)\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————\nPatients with event (%) 58 (43.3%) 58 (43.3%) 69 (52.3%) \nPatients without event (%) 76 (56.7%) 76 (56.7%) 63 (47.7%) \nTime to Event (Months) \n Median NA NA 9.4 \n 95% CI (9.3, NA) (9.4, NA) (7.6, NA) \n 25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA \n Range (censored) 9.9 to 16.4 9.9 to 16.3 9.9 to 16.3 \n Range (event) 0.5 to 9.6 0.9 to 9.6 0.5 to 9.8 \nUnstratified Analysis \n p-value (log-rank) 0.9998 0.1541 \n Hazard Ratio 1.00 1.29 \n 95% CI (0.69, 1.44) (0.91, 1.83) \n6 Months \n Patients remaining at risk 97 97 90 \n Event Free Rate (%) 72.39 72.39 68.18 \n 95% CI (64.82, 79.96) (64.82, 79.96) (60.24, 76.13)\n12 Months \n Patients remaining at risk 49 48 37 \n Event Free Rate (%) 56.72 56.72 47.73 \n 95% CI (48.33, 65.11) (48.33, 65.11) (39.21, 56.25)\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients with event (%)\")\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Patients with event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 1L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients without event (%)\"),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Time to Event (Months)\",\n is_event = \"is_event\",\n control = control_surv_time(conf_level = 0.9, conf_type = \"log-log\"),\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = c(\"Unstratified Analysis\"),\n control = control_coxph(\n pval_method = \"log-rank\",\n conf_level = 0.95,\n ties = \"efron\"\n ),\n table_names = \"coxph_unstratified\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months\",\n is_event = \"is_event\",\n time_point = 12,\n control = control_surv_timepoint(conf_level = 0.9, conf_type = \"log-log\"),\n table_names_suffix = \"_log_log\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n show_labels = \"hidden\",\n is_event = \"is_event\",\n time_point = 12,\n method = \"surv_diff\",\n control = control_surv_timepoint(conf_level = 0.975),\n table_names_suffix = \"_975_pct\"\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————\nPatients with event (%) 58 (43.3%) 58 (43.3%) 69 (52.3%) \n Earliest contributing event \n Death 58 58 69 \nPatients without event (%) 76 (56.7%) 76 (56.7%) 63 (47.7%) \nTime to Event (Months) \n Median NA NA 9.4 \n 90% CI (9.6, NA) (9.6, NA) (7.7, NA) \n 25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA \n Range (censored) 9.9 to 16.4 9.9 to 16.3 9.9 to 16.3 \n Range (event) 0.5 to 9.6 0.9 to 9.6 0.5 to 9.8 \nUnstratified Analysis \n p-value (log-rank) 0.9998 0.1541 \n Hazard Ratio 1.00 1.29 \n 95% CI (0.69, 1.44) (0.91, 1.83) \n12 Months \n Patients remaining at risk 49 48 37 \n Event Free Rate (%) 56.72 56.72 47.73 \n 90% CI (49.37, 63.41) (49.37, 63.41) (40.42, 54.66)\nDifference in Event Free Rate 0.00 -8.99 \n 97.5% CI (-13.57, 13.57) (-22.66, 4.69)\n p-value (Z-test) 1.0000 0.1406 \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients with event (%)\")\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Patients with event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 1L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients without event (%)\"),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Time to Event (Months)\",\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = \"Unstratified Analysis\",\n table_names = \"coxph_unstratified\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = \"Stratified Analysis\",\n strat = \"SEX\",\n table_names = \"coxph_stratified\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months\",\n is_event = \"is_event\",\n method = \"both\",\n time_point = 12\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————\nPatients with event (%) 58 (43.3%) 58 (43.3%) 69 (52.3%) \n Earliest contributing event \n Death 58 58 69 \nPatients without event (%) 76 (56.7%) 76 (56.7%) 63 (47.7%) \nTime to Event (Months) \n Median NA NA 9.4 \n 95% CI (9.3, NA) (9.4, NA) (7.6, NA) \n 25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA \n Range (censored) 9.9 to 16.4 9.9 to 16.3 9.9 to 16.3 \n Range (event) 0.5 to 9.6 0.9 to 9.6 0.5 to 9.8 \nUnstratified Analysis \n p-value (log-rank) 0.9998 0.1541 \n Hazard Ratio 1.00 1.29 \n 95% CI (0.69, 1.44) (0.91, 1.83) \nStratified Analysis \n p-value (log-rank) 0.9978 0.1733 \n Hazard Ratio 1.00 1.27 \n 95% CI (0.69, 1.44) (0.90, 1.81) \n12 Months \n Patients remaining at risk 49 48 37 \n Event Free Rate (%) 56.72 56.72 47.73 \n 95% CI (48.33, 65.11) (48.33, 65.11) (39.21, 56.25)\n Difference in Event Free Rate 0.00 -8.99 \n 95% CI (-11.86, 11.86) (-20.95, 2.97)\n p-value (Z-test) 1.0000 0.1406 \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients with event (%)\")\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Patients with event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 1L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients without event (%)\"),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Time to Event (Months)\",\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = c(\"Unstratified Analysis\"),\n control = control_coxph(pval_method = \"log-rank\"),\n table_names = \"coxph_unstratified\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months\",\n is_event = \"is_event\",\n time_point = 6,\n method = \"both\"\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————\nPatients with event (%) 58 (43.3%) 58 (43.3%) 69 (52.3%) \n Earliest contributing event \n Death 58 58 69 \nPatients without event (%) 76 (56.7%) 76 (56.7%) 63 (47.7%) \nTime to Event (Months) \n Median NA NA 9.4 \n 95% CI (9.3, NA) (9.4, NA) (7.6, NA) \n 25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA \n Range (censored) 9.9 to 16.4 9.9 to 16.3 9.9 to 16.3 \n Range (event) 0.5 to 9.6 0.9 to 9.6 0.5 to 9.8 \nUnstratified Analysis \n p-value (log-rank) 0.9998 0.1541 \n Hazard Ratio 1.00 1.29 \n 95% CI (0.69, 1.44) (0.91, 1.83) \n6 Months \n Patients remaining at risk 97 97 90 \n Event Free Rate (%) 72.39 72.39 68.18 \n 95% CI (64.82, 79.96) (64.82, 79.96) (60.24, 76.13)\n Difference in Event Free Rate 0.00 -4.21 \n 95% CI (-10.71, 10.71) (-15.18, 6.77)\n p-value (Z-test) 1.0000 0.4525 \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n summarize_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients with event (%)\")\n ) %>%\n split_rows_by(\n \"EVNT1\",\n split_label = \"Earliest contributing event\",\n split_fun = keep_split_levels(\"Patients with event (%)\"),\n label_pos = \"visible\",\n child_labels = \"hidden\",\n indent_mod = 1L,\n ) %>%\n split_rows_by(\"EVNTDESC\", split_fun = drop_split_levels) %>%\n summarize_row_groups(format = \"xx\") %>%\n summarize_vars(\n vars = \"is_not_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients without event (%)\"),\n nested = FALSE,\n show_labels = \"hidden\"\n ) %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = \"Time to Event (Months)\",\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = c(\"Unstratified Analysis\"),\n control = control_coxph(pval_method = \"log-rank\"),\n .stats = \"pvalue\",\n table_names = \"coxph_unstratified\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n show_labels = \"hidden\",\n control = control_coxph(pval_method = \"wald\"),\n .stats = \"pvalue\",\n .indent_mods = c(pvalue = 1L),\n table_names = \"coxph_wald_pvalue\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n show_labels = \"hidden\",\n control = control_coxph(pval_method = \"likelihood\"),\n .indent_mods = c(pvalue = 1L, hr = 2L, hr_ci = 3L),\n table_names = \"coxph_likelihood_pvalue\"\n ) %>%\n surv_timepoint(\n vars = \"AVAL\",\n var_labels = \"Months\",\n is_event = \"is_event\",\n time_point = 12,\n method = \"both\"\n )\n\nresult <- build_table(lyt, df = adtte_f, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————\nPatients with event (%) 58 (43.3%) 58 (43.3%) 69 (52.3%) \n Earliest contributing event \n Death 58 58 69 \nPatients without event (%) 76 (56.7%) 76 (56.7%) 63 (47.7%) \nTime to Event (Months) \n Median NA NA 9.4 \n 95% CI (9.3, NA) (9.4, NA) (7.6, NA) \n 25% and 75%-ile 5.6, NA 5.6, NA 5.0, NA \n Range (censored) 9.9 to 16.4 9.9 to 16.3 9.9 to 16.3 \n Range (event) 0.5 to 9.6 0.9 to 9.6 0.5 to 9.8 \nUnstratified Analysis \n p-value (log-rank) 0.9998 0.1541 \n p-value (wald) 0.9998 0.1552 \n p-value (likelihood) 0.9998 0.1543 \n Hazard Ratio 1.00 1.29 \n 95% CI (0.69, 1.44) (0.91, 1.83) \n12 Months \n Patients remaining at risk 49 48 37 \n Event Free Rate (%) 56.72 56.72 47.73 \n 95% CI (48.33, 65.11) (48.33, 65.11) (39.21, 56.25)\n Difference in Event Free Rate 0.00 -8.99 \n 95% CI (-11.86, 11.86) (-20.95, 2.97)\n p-value (Z-test) 1.0000 0.1406 \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadtte <- df_explicit_na(adtte)\n\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% df_explicit_na()'),\n cdisc_dataset(\"ADTTE\", adtte, code = 'ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\") %>% df_explicit_na()'),\n check = TRUE\n ),\n modules = modules(\n tm_t_tte(\n label = \"Time To Event Table\",\n dataname = \"ADTTE\",\n arm_var = choices_selected(\n variable_choices(adsl, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")),\n \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(adtte, \"PARAMCD\", \"PARAM\"),\n \"OS\"\n ),\n strata_var = choices_selected(\n variable_choices(adsl, c(\"SEX\", \"BMRKR2\")),\n \"SEX\"\n ),\n time_points = choices_selected(c(6, 8), 6),\n event_desc_var = choices_selected(\n variable_choices(adtte, \"EVNTDESC\"),\n \"EVNTDESC\",\n fixed = TRUE\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:03:34.6412 pid:6215 token:[] teal.modules.clinical Initializing tm_t_tte\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/ttet01.lock'.\n\n\nDownload" }, { "objectID": "tables/efficacy/coxt02.html", "href": "tables/efficacy/coxt02.html", "title": "COXT02", "section": "", - "text": "Analysis based on multivariable Cox models is usually not performed for the Clinical Study Report (CSR) or regulatory documents, serving exploratory purposes only (e.g. for publication). In practice, the model usually includes only the main effects (without interaction terms). It produces the estimates for each of the covariates included in the model. The analysis follows the same principles (i.e. stratified vs. unstratified analysis and tie handling) as the general Cox model analysis also used in COXT01. Since there is usually no pre-specified hypothesis testing for such analysis, the p-values must be interpreted with caution.\n\n\nData Setup\nMultivariable Cox Regression\nMultivariable Cox Regression with Interaction Term\nMultivariable Cox Regression Specifying Covariates\nMultivariable Cox Regression Specifying Covariates from ADSUB\nMultivariable Cox Regression Setting Strata, Ties, Alpha Level, Statistics\nMultivariable Cox Regression with Selection Process for Covariates\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\nlibrary(broom)\n\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadtte <- df_explicit_na(adtte)\n\nanl <- adtte %>%\n filter(\n PARAMCD == \"OS\",\n SEX %in% c(\"F\", \"M\"),\n RACE %in% c(\"ASIAN\", \"BLACK OR AFRICAN AMERICAN\", \"WHITE\")\n ) %>%\n mutate(\n ARM = droplevels(relevel(ARM, \"B: Placebo\")),\n SEX = droplevels(SEX),\n RACE = droplevels(RACE)\n ) %>%\n mutate(EVENT = 1 - CNSR) %>%\n var_relabel(\n ARM = \"Planned Arm\",\n SEX = \"Sex\",\n RACE = \"Race\",\n AGE = \"Age\"\n )\n\n\n\n\nThe summarize_coxreg function fits, tidies and arranges a Cox regression model in a table layout using the rtables framework. For a multivariable Cox regression model, argument multivar must be set to TRUE. Arguments variables and control can be specified to set up the model (see ?summarize_coxreg for more details and customization options). All variables specified within variables must be present in the data used when building the table.\nTo see the same model as a data.frame object, these two arguments (as well as the data) can be passed to the fit_coxreg_multivar function, and the resulting list tidied using broom::tidy().\n\nCodevariables <- list(\n time = \"AVAL\",\n event = \"EVENT\",\n arm = \"ARM\",\n covariates = c(\"SEX\", \"AGE\")\n)\n\nlyt <- basic_table() %>%\n summarize_coxreg(variables = variables, multivar = TRUE) %>%\n append_topleft(\"Effect/Covariate Included in the Model\")\n\nresult <- build_table(lyt = lyt, df = anl)\nresult\n\nEffect/Covariate Included in the Model Hazard Ratio 95% CI p-value\n——————————————————————————————————————————————————————————————————————————————\nTreatment: \n Planned Arm (reference = B: Placebo) 0.2643 \n A: Drug X 0.96 (0.66, 1.42) 0.8536 \n C: Combination 1.27 (0.88, 1.83) 0.2010 \nCovariate: \n Sex (reference = F) \n M 1.09 (0.80, 1.48) 0.5987 \n Age \n All 0.99 (0.97, 1.01) 0.5104 \n\n\n\n\nThe estimation of interaction terms is not supported.\nInteraction terms are not included in the GDSR. For this reason and because we must take precautions when fitting such models, this functionality has not been translated in fit_coxreg_multivar. Please remove interaction terms or, if required by the study, refer to the survival::coxph function. Aside from this, using tern the developer must add the necessary variables to the analysis dataset during pre-processing based on ADVS or ADSUB. An example can be found in DMT01.\n\n\nThis option is not supported.\nSee the Multivariable Cox Regression with Interaction Term tab for more details.\n\n\nThis option is not supported.\nSee the Multivariable Cox Regression with Interaction Term tab for more details.\n\n\nAdditional controls can be customized using control_coxreg (see ?control_coxreg) such as the ties calculation method and the confidence level. Stratification variables can be added via the strata element of the variables list.\n\nCodevariables <- list(\n time = \"AVAL\",\n event = \"EVENT\",\n arm = \"ARMCD\",\n covariates = c(\"SEX\", \"AGE\"),\n strata = \"RACE\"\n)\n\ncontrol <- control_coxreg(\n conf_level = 0.9,\n ties = \"efron\"\n)\n\nlyt <- basic_table() %>%\n summarize_coxreg(\n variables = variables,\n control = control,\n multivar = TRUE,\n .stats = c(\"hr\", \"ci\")\n ) %>%\n append_topleft(\"Effect/Covariate Included in the Model\")\n\nresult <- build_table(lyt = lyt, df = anl)\nresult\n\nEffect/Covariate Included in the Model Hazard Ratio 90% CI \n————————————————————————————————————————————————————————————————————\nTreatment: \n Planned Arm Code (reference = ARM A) \n ARM B 1.03 (0.74, 1.42)\n ARM C 1.30 (0.96, 1.77)\nCovariate: \n Sex (reference = F) \n M 1.08 (0.83, 1.40)\n Age \n All 0.99 (0.98, 1.01)\n\n\n\n\nSee the Multivariable Cox Regression with Interaction Term tab.\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'adsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADTTE\", adtte, code = 'adtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")'),\n check = TRUE\n ),\n modules = modules(\n tm_t_coxreg(\n label = \"Cox Reg.\",\n dataname = \"ADTTE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\", \"ACTARMCD\"), \"ARM\"),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(adtte, \"PARAMCD\", \"PARAM\"), \"OS\"\n ),\n strata_var = choices_selected(\n c(\"SEX\", \"STRATA1\", \"STRATA2\"), NULL\n ),\n cov_var = choices_selected(\n c(\"AGE\", \"SEX\", \"RACE\"), c(\"AGE\", \"SEX\")\n ),\n multivariate = TRUE\n )\n )\n)\n\n[INFO] 2023-08-04 14:45:34.7981 pid:5996 token:[] teal.modules.clinical Initializing tm_t_coxreg\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] broom_1.0.5 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n[13] scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] stringr_1.5.0 pkgconfig_2.0.3 fastmap_1.1.1 \n[13] backports_1.4.1 ellipsis_0.3.2 fontawesome_0.5.1 \n[16] utf8_1.2.3 promises_1.2.0.1 rmarkdown_2.23 \n[19] ps_1.7.5 purrr_1.0.1 xfun_0.39 \n[22] shinyvalidate_0.1.2 cachem_1.0.8 teal.reporter_0.1.1.9020\n[25] jsonlite_1.8.7 later_1.3.1 styler_1.10.1 \n[28] R6_2.5.1 bslib_0.5.0 stringi_1.7.12 \n[31] car_3.1-2 brio_1.1.3 jquerylib_0.1.4 \n[34] estimability_1.4.1 Rcpp_1.0.11 assertthat_0.2.1 \n[37] knitr_1.43 teal.logger_0.1.1.9009 R.utils_2.12.2 \n[40] httpuv_1.6.11 Matrix_1.6-0 splines_4.3.1 \n[43] R.cache_0.16.0 tidyselect_1.2.0 rstudioapi_0.15.0 \n[46] abind_1.4-5 yaml_2.3.7 codetools_0.2-19 \n[49] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[52] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[55] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[58] shinycssloaders_1.0.0 carData_3.0-5 checkmate_2.2.0 \n[61] shinyjs_2.1.0 generics_0.1.3 ggplot2_3.4.2 \n[64] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[67] glue_1.6.2 emmeans_1.8.7 tools_4.3.1 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-2 \n[73] grid_4.3.1 tidyr_1.3.0 rbibutils_2.2.13 \n[76] colorspace_2.1-0 nlme_3.1-162 cli_3.6.1 \n[79] fansi_1.0.4 geepack_1.3.9 gtable_0.3.3 \n[82] R.methodsS3_1.8.2 sass_0.4.7 digest_0.6.33 \n[85] htmlwidgets_1.6.2 memoise_2.0.1 htmltools_0.5.5 \n[88] R.oo_1.25.0 lifecycle_1.0.3 shinyWidgets_0.7.6 \n[91] mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/coxt02.lock'.\n\n\nDownload" + "text": "Analysis based on multivariable Cox models is usually not performed for the Clinical Study Report (CSR) or regulatory documents, serving exploratory purposes only (e.g. for publication). In practice, the model usually includes only the main effects (without interaction terms). It produces the estimates for each of the covariates included in the model. The analysis follows the same principles (i.e. stratified vs. unstratified analysis and tie handling) as the general Cox model analysis also used in COXT01. Since there is usually no pre-specified hypothesis testing for such analysis, the p-values must be interpreted with caution.\n\n\nData Setup\nMultivariable Cox Regression\nMultivariable Cox Regression with Interaction Term\nMultivariable Cox Regression Specifying Covariates\nMultivariable Cox Regression Specifying Covariates from ADSUB\nMultivariable Cox Regression Setting Strata, Ties, Alpha Level, Statistics\nMultivariable Cox Regression with Selection Process for Covariates\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\nlibrary(broom)\n\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadtte <- df_explicit_na(adtte)\n\nanl <- adtte %>%\n filter(\n PARAMCD == \"OS\",\n SEX %in% c(\"F\", \"M\"),\n RACE %in% c(\"ASIAN\", \"BLACK OR AFRICAN AMERICAN\", \"WHITE\")\n ) %>%\n mutate(\n ARM = droplevels(relevel(ARM, \"B: Placebo\")),\n SEX = droplevels(SEX),\n RACE = droplevels(RACE)\n ) %>%\n mutate(EVENT = 1 - CNSR) %>%\n var_relabel(\n ARM = \"Planned Arm\",\n SEX = \"Sex\",\n RACE = \"Race\",\n AGE = \"Age\"\n )\n\n\n\n\nThe summarize_coxreg function fits, tidies and arranges a Cox regression model in a table layout using the rtables framework. For a multivariable Cox regression model, argument multivar must be set to TRUE. Arguments variables and control can be specified to set up the model (see ?summarize_coxreg for more details and customization options). All variables specified within variables must be present in the data used when building the table.\nTo see the same model as a data.frame object, these two arguments (as well as the data) can be passed to the fit_coxreg_multivar function, and the resulting list tidied using broom::tidy().\n\nCodevariables <- list(\n time = \"AVAL\",\n event = \"EVENT\",\n arm = \"ARM\",\n covariates = c(\"SEX\", \"AGE\")\n)\n\nlyt <- basic_table() %>%\n summarize_coxreg(variables = variables, multivar = TRUE) %>%\n append_topleft(\"Effect/Covariate Included in the Model\")\n\nresult <- build_table(lyt = lyt, df = anl)\nresult\n\nEffect/Covariate Included in the Model Hazard Ratio 95% CI p-value\n——————————————————————————————————————————————————————————————————————————————\nTreatment: \n Planned Arm (reference = B: Placebo) 0.2643 \n A: Drug X 0.96 (0.66, 1.42) 0.8536 \n C: Combination 1.27 (0.88, 1.83) 0.2010 \nCovariate: \n Sex (reference = F) \n M 1.09 (0.80, 1.48) 0.5987 \n Age \n All 0.99 (0.97, 1.01) 0.5104 \n\n\n\n\nThe estimation of interaction terms is not supported.\nInteraction terms are not included in the GDSR. For this reason and because we must take precautions when fitting such models, this functionality has not been translated in fit_coxreg_multivar. Please remove interaction terms or, if required by the study, refer to the survival::coxph function. Aside from this, using tern the developer must add the necessary variables to the analysis dataset during pre-processing based on ADVS or ADSUB. An example can be found in DMT01.\n\n\nThis option is not supported.\nSee the Multivariable Cox Regression with Interaction Term tab for more details.\n\n\nThis option is not supported.\nSee the Multivariable Cox Regression with Interaction Term tab for more details.\n\n\nAdditional controls can be customized using control_coxreg (see ?control_coxreg) such as the ties calculation method and the confidence level. Stratification variables can be added via the strata element of the variables list.\n\nCodevariables <- list(\n time = \"AVAL\",\n event = \"EVENT\",\n arm = \"ARMCD\",\n covariates = c(\"SEX\", \"AGE\"),\n strata = \"RACE\"\n)\n\ncontrol <- control_coxreg(\n conf_level = 0.9,\n ties = \"efron\"\n)\n\nlyt <- basic_table() %>%\n summarize_coxreg(\n variables = variables,\n control = control,\n multivar = TRUE,\n .stats = c(\"hr\", \"ci\")\n ) %>%\n append_topleft(\"Effect/Covariate Included in the Model\")\n\nresult <- build_table(lyt = lyt, df = anl)\nresult\n\nEffect/Covariate Included in the Model Hazard Ratio 90% CI \n————————————————————————————————————————————————————————————————————\nTreatment: \n Planned Arm Code (reference = ARM A) \n ARM B 1.03 (0.74, 1.42)\n ARM C 1.30 (0.96, 1.77)\nCovariate: \n Sex (reference = F) \n M 1.08 (0.83, 1.40)\n Age \n All 0.99 (0.98, 1.01)\n\n\n\n\nSee the Multivariable Cox Regression with Interaction Term tab.\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'adsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADTTE\", adtte, code = 'adtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")'),\n check = TRUE\n ),\n modules = modules(\n tm_t_coxreg(\n label = \"Cox Reg.\",\n dataname = \"ADTTE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\", \"ACTARMCD\"), \"ARM\"),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(adtte, \"PARAMCD\", \"PARAM\"), \"OS\"\n ),\n strata_var = choices_selected(\n c(\"SEX\", \"STRATA1\", \"STRATA2\"), NULL\n ),\n cov_var = choices_selected(\n c(\"AGE\", \"SEX\", \"RACE\"), c(\"AGE\", \"SEX\")\n ),\n multivariate = TRUE\n )\n )\n)\n\n[INFO] 2023-08-04 15:01:51.5524 pid:6001 token:[] teal.modules.clinical Initializing tm_t_coxreg\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] broom_1.0.5 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n[13] scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] stringr_1.5.0 pkgconfig_2.0.3 fastmap_1.1.1 \n[13] backports_1.4.1 ellipsis_0.3.2 fontawesome_0.5.1 \n[16] utf8_1.2.3 promises_1.2.0.1 rmarkdown_2.23 \n[19] ps_1.7.5 purrr_1.0.1 xfun_0.39 \n[22] shinyvalidate_0.1.2 cachem_1.0.8 teal.reporter_0.1.1.9020\n[25] jsonlite_1.8.7 later_1.3.1 styler_1.10.1 \n[28] R6_2.5.1 bslib_0.5.0 stringi_1.7.12 \n[31] car_3.1-2 brio_1.1.3 jquerylib_0.1.4 \n[34] estimability_1.4.1 Rcpp_1.0.11 assertthat_0.2.1 \n[37] knitr_1.43 teal.logger_0.1.1.9009 R.utils_2.12.2 \n[40] httpuv_1.6.11 Matrix_1.6-0 splines_4.3.1 \n[43] R.cache_0.16.0 tidyselect_1.2.0 rstudioapi_0.15.0 \n[46] abind_1.4-5 yaml_2.3.7 codetools_0.2-19 \n[49] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[52] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[55] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[58] shinycssloaders_1.0.0 carData_3.0-5 checkmate_2.2.0 \n[61] shinyjs_2.1.0 generics_0.1.3 ggplot2_3.4.2 \n[64] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[67] glue_1.6.2 emmeans_1.8.7 tools_4.3.1 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-2 \n[73] grid_4.3.1 tidyr_1.3.0 rbibutils_2.2.13 \n[76] colorspace_2.1-0 nlme_3.1-162 cli_3.6.1 \n[79] fansi_1.0.4 geepack_1.3.9 gtable_0.3.3 \n[82] R.methodsS3_1.8.2 sass_0.4.7 digest_0.6.33 \n[85] htmlwidgets_1.6.2 memoise_2.0.1 htmltools_0.5.5 \n[88] R.oo_1.25.0 lifecycle_1.0.3 shinyWidgets_0.7.6 \n[91] mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/coxt02.lock'.\n\n\nDownload" }, { "objectID": "tables/efficacy/mmrmt01.html", "href": "tables/efficacy/mmrmt01.html", "title": "MMRMT01", "section": "", - "text": "Data Setup\nLeast Squares Means\nFixed Effects\nCovariance Matrix\nModel Diagnostics\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern.mmrm)\nlibrary(scda)\nlibrary(broom)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadqs <- df_explicit_na(adqs)\n\nadqs_f <- adqs %>%\n dplyr::filter(PARAMCD == \"FKSI-FWB\" & !AVISIT %in% c(\"BASELINE\")) %>%\n droplevels() %>%\n dplyr::mutate(ARMCD = factor(ARMCD, levels = c(\"ARM B\", \"ARM A\", \"ARM C\"))) %>%\n dplyr::mutate(\n AVISITN = rank(AVISITN) %>%\n as.factor() %>%\n as.numeric() %>%\n as.factor()\n )\nadsl_sub <- adqs_f %>%\n dplyr::filter(!is.na(CHG)) %>%\n distinct(USUBJID) %>%\n left_join(adsl, by = \"USUBJID\")\nvar_labels(adqs_f) <- var_labels(adqs)\n\n\n\n\nConsidering the treatment variable in the model\n\nCodemmrm_results <- fit_mmrm(\n vars = list(\n response = \"CHG\",\n covariates = c(\"BASE\", \"STRATA1\", \"BMRKR2\"),\n id = \"USUBJID\",\n arm = \"ARMCD\",\n visit = \"AVISIT\"\n ),\n data = adqs_f,\n weights_emmeans = \"equal\"\n)\n\nIn AVISIT there are dropped visits: SCREENING\n\nCodedf <- tidy(mmrm_results)\nattr(df$AVISIT, \"label\") <- \"Visit\"\n\n# Define the split function\nsplit_fun <- drop_split_levels\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARMCD\", ref_group = mmrm_results$ref_level) %>%\n split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(df$AVISIT)) %>%\n summarize_lsmeans(show_relative = \"increase\") %>%\n append_topleft(\" Statistics\") %>%\n build_table(df, alt_counts_df = adsl_sub)\n\nresult\n\nVisit ARM B ARM A ARM C \n Statistics (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————\nWEEK 1 DAY 8 \n n 134 134 132 \n Adjusted Mean (SE) 3.488 (0.687) 4.246 (0.687) 3.163 (0.692) \n 95% CI (2.136, 4.839) (2.895, 5.598) (1.803, 4.523) \n Difference in Adjusted Means (SE) 0.759 (0.973) -0.325 (0.976) \n 95% CI (-1.155, 2.672) (-2.243, 1.593) \n Relative Increase (%) 21.8% -9.3% \n p-value (MMRM) 0.4362 0.7393 \nWEEK 2 DAY 15 \n n 134 134 132 \n Adjusted Mean (SE) 9.135 (0.768) 9.018 (0.767) 8.509 (0.773) \n 95% CI (7.626, 10.644) (7.510, 10.527) (6.991, 10.028) \n Difference in Adjusted Means (SE) -0.117 (1.087) -0.626 (1.090) \n 95% CI (-2.253, 2.020) (-2.768, 1.517) \n Relative Increase (%) -1.3% -6.8% \n p-value (MMRM) 0.9147 0.5662 \nWEEK 3 DAY 22 \n n 134 134 132 \n Adjusted Mean (SE) 13.547 (0.871) 16.014 (0.871) 15.789 (0.877) \n 95% CI (11.835, 15.259) (14.303, 17.726) (14.066, 17.513)\n Difference in Adjusted Means (SE) 2.467 (1.232) 2.242 (1.236) \n 95% CI (0.044, 4.890) (-0.187, 4.672) \n Relative Increase (%) 18.2% 16.6% \n p-value (MMRM) 0.0460 0.0704 \nWEEK 4 DAY 29 \n n 134 134 132 \n Adjusted Mean (SE) 18.102 (0.995) 19.479 (0.995) 19.511 (1.002) \n 95% CI (16.146, 20.059) (17.523, 21.435) (17.541, 21.481)\n Difference in Adjusted Means (SE) 1.377 (1.408) 1.409 (1.413) \n 95% CI (-1.392, 4.145) (-1.368, 4.186) \n Relative Increase (%) 7.6% 7.8% \n p-value (MMRM) 0.3288 0.3192 \nWEEK 5 DAY 36 \n n 134 134 132 \n Adjusted Mean (SE) 23.503 (1.058) 24.931 (1.058) 23.704 (1.065) \n 95% CI (21.423, 25.583) (22.851, 27.011) (21.610, 25.798)\n Difference in Adjusted Means (SE) 1.428 (1.497) 0.201 (1.502) \n 95% CI (-1.515, 4.371) (-2.752, 3.153) \n Relative Increase (%) 6.1% 0.9% \n p-value (MMRM) 0.3408 0.8937 \n\n\nNot considering the treatment variable in the model\n\nCodemmrm_results_no_arm <- fit_mmrm(\n vars = list(\n response = \"CHG\",\n covariates = c(\"BMRKR2\", \"STRATA1\"),\n id = \"USUBJID\",\n visit = \"AVISIT\"\n ),\n data = adqs_f,\n weights_emmeans = \"equal\",\n parallel = TRUE\n)\n\nIn AVISIT there are dropped visits: SCREENING\n\nCodedf_no_arm <- tidy(mmrm_results_no_arm)\nattr(df_no_arm$AVISIT, \"label\") <- \"Visit\"\n\n# Define the split function\nsplit_fun <- drop_split_levels\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n add_overall_col(\"All Patients\") %>%\n split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(df_no_arm$AVISIT)) %>%\n summarize_lsmeans(arms = FALSE) %>%\n append_topleft(\" Statistics\") %>%\n build_table(df_no_arm, alt_counts_df = adsl_sub)\n\nresult\n\nVisit All Patients \n Statistics (N=400) \n———————————————————————————————————————\nWEEK 1 DAY 8 \n n 400 \n Adjusted Mean (SE) 3.615 (0.620) \n 95% CI (2.396, 4.834) \nWEEK 2 DAY 15 \n n 400 \n Adjusted Mean (SE) 8.870 (0.602) \n 95% CI (7.687, 10.053) \nWEEK 3 DAY 22 \n n 400 \n Adjusted Mean (SE) 15.094 (0.683) \n 95% CI (13.751, 16.437)\nWEEK 4 DAY 29 \n n 400 \n Adjusted Mean (SE) 19.009 (0.717) \n 95% CI (17.599, 20.418)\nWEEK 5 DAY 36 \n n 400 \n Adjusted Mean (SE) 24.028 (0.747) \n 95% CI (22.560, 25.496)\n\n\nAdding baseline rows\nIt may be of interest to summarize some different statistics at the baseline visit or summarize a different variable in the data set not used in the MMRM. For example, the model may use the variable CHG but the baseline visit row may summarize the AVAL variable, thus we would need to create two tables and then combine them to accomplish this.\n\nCode# First have the least-square means table.\na <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARMCD\", ref_group = mmrm_results$ref_level) %>%\n split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(df$AVISIT)) %>%\n summarize_lsmeans(show_relative = \"increase\") %>%\n append_topleft(\" Statistics\") %>%\n build_table(df, alt_counts_df = adsl_sub)\n\n# Second prepare the baseline values summary table.\nbaseline_dat <- adqs %>%\n filter(AVISIT == \"BASELINE\") %>%\n droplevels()\n\nb <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARMCD\") %>%\n split_rows_by(\"AVISIT\") %>%\n summarize_vars(\"AVAL\") %>%\n append_topleft(\" Statistics\") %>%\n build_table(baseline_dat, alt_counts_df = adsl_sub)\n\n# Now we can combine them as follows.\ncol_info(b) <- EmptyColInfo\nrbind(b, a)\n\nVisit ARM B ARM A ARM C \n Statistics (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————\nBASELINE \n n 670 670 660 \n Mean (SD) 49.8 (8.1) 50.4 (8.3) 50.2 (8.4) \n Median 49.6 50.2 50.4 \n Min - Max 24.3 - 72.9 21.7 - 74.5 26.0 - 71.4 \nWEEK 1 DAY 8 \n n 134 134 132 \n Adjusted Mean (SE) 3.488 (0.687) 4.246 (0.687) 3.163 (0.692) \n 95% CI (2.136, 4.839) (2.895, 5.598) (1.803, 4.523) \n Difference in Adjusted Means (SE) 0.759 (0.973) -0.325 (0.976) \n 95% CI (-1.155, 2.672) (-2.243, 1.593) \n Relative Increase (%) 21.8% -9.3% \n p-value (MMRM) 0.4362 0.7393 \nWEEK 2 DAY 15 \n n 134 134 132 \n Adjusted Mean (SE) 9.135 (0.768) 9.018 (0.767) 8.509 (0.773) \n 95% CI (7.626, 10.644) (7.510, 10.527) (6.991, 10.028) \n Difference in Adjusted Means (SE) -0.117 (1.087) -0.626 (1.090) \n 95% CI (-2.253, 2.020) (-2.768, 1.517) \n Relative Increase (%) -1.3% -6.8% \n p-value (MMRM) 0.9147 0.5662 \nWEEK 3 DAY 22 \n n 134 134 132 \n Adjusted Mean (SE) 13.547 (0.871) 16.014 (0.871) 15.789 (0.877) \n 95% CI (11.835, 15.259) (14.303, 17.726) (14.066, 17.513)\n Difference in Adjusted Means (SE) 2.467 (1.232) 2.242 (1.236) \n 95% CI (0.044, 4.890) (-0.187, 4.672) \n Relative Increase (%) 18.2% 16.6% \n p-value (MMRM) 0.0460 0.0704 \nWEEK 4 DAY 29 \n n 134 134 132 \n Adjusted Mean (SE) 18.102 (0.995) 19.479 (0.995) 19.511 (1.002) \n 95% CI (16.146, 20.059) (17.523, 21.435) (17.541, 21.481)\n Difference in Adjusted Means (SE) 1.377 (1.408) 1.409 (1.413) \n 95% CI (-1.392, 4.145) (-1.368, 4.186) \n Relative Increase (%) 7.6% 7.8% \n p-value (MMRM) 0.3288 0.3192 \nWEEK 5 DAY 36 \n n 134 134 132 \n Adjusted Mean (SE) 23.503 (1.058) 24.931 (1.058) 23.704 (1.065) \n 95% CI (21.423, 25.583) (22.851, 27.011) (21.610, 25.798)\n Difference in Adjusted Means (SE) 1.428 (1.497) 0.201 (1.502) \n 95% CI (-1.515, 4.371) (-2.752, 3.153) \n Relative Increase (%) 6.1% 0.9% \n p-value (MMRM) 0.3408 0.8937 \n\n\nConsidering visit averages\nIt may also be of interest to summarize several different statistics for an averaged combination of various visits in the MMRM. For example, you may want to see the statistics for the average of the first 2 visits, or the average statistics of all visits combined. This can be accomplished by specifying the averages_emmeans argument when fitting the MMRM model.\n\nCodemmrm_results_avg_visits <- fit_mmrm(\n vars = list(\n response = \"CHG\",\n covariates = c(\"BASE\", \"STRATA1\", \"BMRKR2\"),\n id = \"USUBJID\",\n arm = \"ARMCD\",\n visit = \"AVISIT\"\n ),\n data = adqs_f,\n weights_emmeans = \"equal\",\n averages_emmeans = list(\n \"WEEKS 1-2\" = c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\"),\n \"WEEKS 3-5\" = c(\"WEEK 3 DAY 22\", \"WEEK 4 DAY 29\", \"WEEK 5 DAY 36\"),\n \"ALL VISITS\" = c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\", \"WEEK 4 DAY 29\", \"WEEK 5 DAY 36\")\n )\n)\n\nIn AVISIT there are dropped visits: SCREENING\n\nCodedf_avgs <- tidy(mmrm_results_avg_visits)\nattr(df_avgs$AVISIT, \"label\") <- \"Visit\"\n\n# Define the split function\nsplit_fun <- drop_split_levels\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARMCD\", ref_group = mmrm_results_avg_visits$ref_level) %>%\n split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(df_avgs$AVISIT)) %>%\n summarize_lsmeans(show_relative = \"increase\") %>%\n append_topleft(\" Statistics\") %>%\n build_table(df_avgs, alt_counts_df = adsl_sub)\n\nresult\n\nVisit ARM B ARM A ARM C \n Statistics (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————\nWEEK 1 DAY 8 \n n 134 134 132 \n Adjusted Mean (SE) 3.488 (0.687) 4.246 (0.687) 3.163 (0.692) \n 95% CI (2.136, 4.839) (2.895, 5.598) (1.803, 4.523) \n Difference in Adjusted Means (SE) 0.759 (0.973) -0.325 (0.976) \n 95% CI (-1.155, 2.672) (-2.243, 1.593) \n Relative Increase (%) 21.8% -9.3% \n p-value (MMRM) 0.4362 0.7393 \nWEEK 2 DAY 15 \n n 134 134 132 \n Adjusted Mean (SE) 9.135 (0.768) 9.018 (0.767) 8.509 (0.773) \n 95% CI (7.626, 10.644) (7.510, 10.527) (6.991, 10.028) \n Difference in Adjusted Means (SE) -0.117 (1.087) -0.626 (1.090) \n 95% CI (-2.253, 2.020) (-2.768, 1.517) \n Relative Increase (%) -1.3% -6.8% \n p-value (MMRM) 0.9147 0.5662 \nWEEK 3 DAY 22 \n n 134 134 132 \n Adjusted Mean (SE) 13.547 (0.871) 16.014 (0.871) 15.789 (0.877) \n 95% CI (11.835, 15.259) (14.303, 17.726) (14.066, 17.513)\n Difference in Adjusted Means (SE) 2.467 (1.232) 2.242 (1.236) \n 95% CI (0.044, 4.890) (-0.187, 4.672) \n Relative Increase (%) 18.2% 16.6% \n p-value (MMRM) 0.0460 0.0704 \nWEEK 4 DAY 29 \n n 134 134 132 \n Adjusted Mean (SE) 18.102 (0.995) 19.479 (0.995) 19.511 (1.002) \n 95% CI (16.146, 20.059) (17.523, 21.435) (17.541, 21.481)\n Difference in Adjusted Means (SE) 1.377 (1.408) 1.409 (1.413) \n 95% CI (-1.392, 4.145) (-1.368, 4.186) \n Relative Increase (%) 7.6% 7.8% \n p-value (MMRM) 0.3288 0.3192 \nWEEK 5 DAY 36 \n n 134 134 132 \n Adjusted Mean (SE) 23.503 (1.058) 24.931 (1.058) 23.704 (1.065) \n 95% CI (21.423, 25.583) (22.851, 27.011) (21.610, 25.798)\n Difference in Adjusted Means (SE) 1.428 (1.497) 0.201 (1.502) \n 95% CI (-1.515, 4.371) (-2.752, 3.153) \n Relative Increase (%) 6.1% 0.9% \n p-value (MMRM) 0.3408 0.8937 \nWEEKS 1-2 \n n 134 134 132 \n Adjusted Mean (SE) 6.311 (0.514) 6.632 (0.514) 5.836 (0.516) \n 95% CI (5.301, 7.322) (5.623, 7.642) (4.821, 6.852) \n Difference in Adjusted Means (SE) 0.321 (0.728) -0.475 (0.729) \n 95% CI (-1.111, 1.753) (-1.909, 0.959) \n Relative Increase (%) 5.1% -7.5% \n p-value (MMRM) 0.6596 0.5151 \nWEEKS 3-5 \n n 134 134 132 \n Adjusted Mean (SE) 18.384 (0.560) 20.141 (0.560) 19.668 (0.563) \n 95% CI (17.284, 19.485) (19.041, 21.241) (18.562, 20.775)\n Difference in Adjusted Means (SE) 1.757 (0.793) 1.284 (0.794) \n 95% CI (0.198, 3.316) (-0.278, 2.846) \n Relative Increase (%) 9.6% 7.0% \n p-value (MMRM) 0.0273 0.1068 \nALL VISITS \n n 134 134 132 \n Adjusted Mean (SE) 13.555 (0.388) 14.738 (0.388) 14.135 (0.389) \n 95% CI (12.792, 14.318) (13.976, 15.500) (13.370, 14.900)\n Difference in Adjusted Means (SE) 1.183 (0.551) 0.580 (0.551) \n 95% CI (0.100, 2.266) (-0.502, 1.663) \n Relative Increase (%) 8.7% 4.3% \n p-value (MMRM) 0.0324 0.2924 \n\n\n\n\n\nConsidering the treatment variable in the model\n\nCodeas.rtable(mmrm_results, type = \"fixed\")\n\n Estimate Std. Error t value df Pr(>|t|)\n——————————————————————————————————————————————————————————————————————————————————\n(Intercept) 55.7483 1.5244 36.5713 510 <0.0001 \nBASE -1.0196 0.0246 -41.4362 392 <0.0001 \nSTRATA1B -0.0369 0.5345 -0.0691 392 0.9450 \nSTRATA1C 0.0205 0.5238 0.0392 392 0.9688 \nBMRKR2MEDIUM -0.3840 0.5198 -0.7386 392 0.4606 \nBMRKR2HIGH -1.0056 0.5259 -1.9123 392 0.0566 \nARMCDARM A 0.7587 0.9733 0.7795 396 0.4362 \nARMCDARM C -0.3248 0.9756 -0.3329 394 0.7393 \nAVISITWEEK 2 DAY 15 5.6472 1.0331 5.4665 397 <0.0001 \nAVISITWEEK 3 DAY 22 10.0591 1.0897 9.2311 397 <0.0001 \nAVISITWEEK 4 DAY 29 14.6145 1.2176 12.0027 397 <0.0001 \nAVISITWEEK 5 DAY 36 20.0154 1.2584 15.9057 397 <0.0001 \nARMCDARM A:AVISITWEEK 2 DAY 15 -0.8752 1.4610 -0.5990 397 0.5495 \nARMCDARM C:AVISITWEEK 2 DAY 15 -0.3007 1.4665 -0.2050 397 0.8376 \nARMCDARM A:AVISITWEEK 3 DAY 22 1.7085 1.5411 1.1087 397 0.2682 \nARMCDARM C:AVISITWEEK 3 DAY 22 2.5673 1.5469 1.6597 397 0.0978 \nARMCDARM A:AVISITWEEK 4 DAY 29 0.6181 1.7220 0.3589 397 0.7198 \nARMCDARM C:AVISITWEEK 4 DAY 29 1.7337 1.7285 1.0030 397 0.3165 \nARMCDARM A:AVISITWEEK 5 DAY 36 0.6690 1.7796 0.3759 397 0.7072 \nARMCDARM C:AVISITWEEK 5 DAY 36 0.5257 1.7863 0.2943 397 0.7687 \n\n\nNot considering the treatment variable in the model\n\nCodeas.rtable(mmrm_results_no_arm, type = \"fixed\")\n\n Estimate Std. Error t value df Pr(>|t|)\n——————————————————————————————————————————————————————————————————————\n(Intercept) 1.5624 1.1751 1.3296 466 0.1843 \nBMRKR2MEDIUM 1.0924 1.1878 0.9196 395 0.3583 \nBMRKR2HIGH 1.4619 1.1971 1.2212 395 0.2227 \nSTRATA1B 2.6321 1.2180 2.1610 395 0.0313 \nSTRATA1C 0.9717 1.2008 0.8092 395 0.4189 \nAVISITWEEK 2 DAY 15 5.2548 0.5967 8.8061 399 <0.0001 \nAVISITWEEK 3 DAY 22 11.4787 0.6314 18.1802 399 <0.0001 \nAVISITWEEK 4 DAY 29 15.3937 0.7039 21.8696 399 <0.0001 \nAVISITWEEK 5 DAY 36 20.4130 0.7266 28.0921 399 <0.0001 \n\n\n\n\n\n\nCodeas.rtable(mmrm_results, type = \"cov\")\n\n WEEK 1 DAY 8 WEEK 2 DAY 15 WEEK 3 DAY 22 WEEK 4 DAY 29 WEEK 5 DAY 36\n————————————————————————————————————————————————————————————————————————————————————————————\nWEEK 1 DAY 8 63.0140 -0.6664 2.5965 -1.6231 0.2589 \nWEEK 2 DAY 15 -0.6664 78.6592 1.7004 -11.8677 -0.4261 \nWEEK 3 DAY 22 2.5965 1.7004 101.2949 -5.8424 7.1145 \nWEEK 4 DAY 29 -1.6231 -11.8677 -5.8424 132.4034 -5.3739 \nWEEK 5 DAY 36 0.2589 -0.4261 7.1145 -5.3739 149.6937 \n\n\n\n\nModel diagnostics are currently available to evaluate choice of covariates for the fixed and random effects. Statistics to evaluate choice of covariance structure are being investigated and will be included in a future release.\n\nCodeas.rtable(mmrm_results, type = \"diagnostic\")\n\n Diagnostic statistic value\n———————————————————————————————————————————\nREML criterion 14835.9968 \nAIC 14865.9968 \nAICc 14866.2412 \nBIC 14925.8688 \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\") %>%\n dplyr::filter(ABLFL != \"Y\" & ABLFL2 != \"Y\") %>%\n dplyr::filter(AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\")) %>%\n dplyr::mutate(\n AVISIT = as.factor(AVISIT),\n AVISITN = rank(AVISITN) %>%\n as.factor() %>%\n as.numeric() %>%\n as.factor() # making consecutive numeric factor\n )\n\narm_ref_comp <- list(\n ARMCD = list(\n ref = \"ARM A\",\n comp = c(\"ARM B\", \"ARM C\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADQS\", adqs,\n code = 'ADQS <- synthetic_cdisc_dataset(\"latest\", \"adqs\") %>%\n dplyr::filter(ABLFL != \"Y\" & ABLFL2 != \"Y\") %>%\n dplyr::filter(AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\")) %>%\n dplyr::mutate(\n AVISIT = as.factor(AVISIT),\n AVISITN = rank(AVISITN) %>%\n as.factor() %>%\n as.numeric() %>%\n as.factor() # making consecutive numeric factor\n )'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_a_mmrm(\n label = \"MMRM\",\n dataname = \"ADQS\",\n aval_var = choices_selected(c(\"AVAL\", \"CHG\"), \"CHG\"),\n id_var = choices_selected(c(\"USUBJID\", \"SUBJID\"), \"USUBJID\"),\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARMCD\"),\n visit_var = choices_selected(c(\"AVISIT\", \"AVISITN\"), \"AVISIT\"),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n choices = value_choices(adqs, \"PARAMCD\", \"PARAM\"),\n selected = \"FKSI-FWB\"\n ),\n cov_var = choices_selected(c(\"BASE\", \"AGE\", \"SEX\", \"BASE:AVISIT\"), NULL),\n conf_level = choices_selected(c(0.95, 0.9, 0.8), 0.95)\n )\n )\n)\n\n[INFO] 2023-08-04 14:44:19.3686 pid:5776 token:[] teal.modules.clinical Initializing tm_a_mmrm\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] broom_1.0.5 scda_0.1.6.9010 \n [9] tern.mmrm_0.2.2.9005 tern_0.8.5.9006 \n[11] rtables_0.6.2.9001 magrittr_2.0.3 \n[13] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 fastmap_1.1.1 promises_1.2.0.1 \n [4] shinyjs_2.1.0 digest_0.6.33 estimability_1.4.1 \n [7] mime_0.12 tern.gee_0.1.0.9006 lifecycle_1.0.3 \n[10] ellipsis_0.3.2 processx_3.8.2 survival_3.5-5 \n[13] compiler_4.3.1 sass_0.4.7 rlang_1.1.1 \n[16] tools_4.3.1 utf8_1.2.3 yaml_2.3.7 \n[19] mmrm_0.2.2 knitr_1.43 htmlwidgets_1.6.2 \n[22] withr_2.5.0 purrr_1.0.1 numDeriv_2016.8-1.1 \n[25] shinyWidgets_0.7.6 geepack_1.3.9 grid_4.3.1 \n[28] fansi_1.0.4 teal.logger_0.1.1.9009 xtable_1.8-4 \n[31] colorspace_2.1-0 ggplot2_3.4.2 emmeans_1.8.7 \n[34] scales_1.2.1 MASS_7.3-60 cli_3.6.1 \n[37] mvtnorm_1.2-2 rmarkdown_2.23 generics_0.1.3 \n[40] rstudioapi_0.15.0 cachem_1.0.8 stringr_1.5.0 \n[43] splines_4.3.1 assertthat_0.2.1 parallel_4.3.1 \n[46] vctrs_0.6.3 webshot_0.5.5 Matrix_1.6-0 \n[49] jsonlite_1.8.7 callr_3.7.3 teal.widgets_0.3.0.9007 \n[52] testthat_3.1.10 fontawesome_0.5.1 jquerylib_0.1.4 \n[55] tidyr_1.3.0 glue_1.6.2 parallelly_1.36.0 \n[58] ps_1.7.5 codetools_0.2-19 cowplot_1.1.1 \n[61] stringi_1.7.12 gtable_0.3.3 later_1.3.1 \n[64] shinycssloaders_1.0.0 munsell_0.5.0 tibble_3.2.1 \n[67] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[70] brio_1.1.3 R6_2.5.1 TMB_1.9.5 \n[73] Rdpack_2.4 evaluate_0.21 lattice_0.21-8 \n[76] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[79] teal.reporter_0.1.1.9020 bslib_0.5.0 httpuv_1.6.11 \n[82] Rcpp_1.0.11 shinyvalidate_0.1.2 coda_0.19-4 \n[85] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[88] forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/mmrmt01.lock'.\n\n\nDownload" + "text": "Data Setup\nLeast Squares Means\nFixed Effects\nCovariance Matrix\nModel Diagnostics\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern.mmrm)\nlibrary(scda)\nlibrary(broom)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadqs <- df_explicit_na(adqs)\n\nadqs_f <- adqs %>%\n dplyr::filter(PARAMCD == \"FKSI-FWB\" & !AVISIT %in% c(\"BASELINE\")) %>%\n droplevels() %>%\n dplyr::mutate(ARMCD = factor(ARMCD, levels = c(\"ARM B\", \"ARM A\", \"ARM C\"))) %>%\n dplyr::mutate(\n AVISITN = rank(AVISITN) %>%\n as.factor() %>%\n as.numeric() %>%\n as.factor()\n )\nadsl_sub <- adqs_f %>%\n dplyr::filter(!is.na(CHG)) %>%\n distinct(USUBJID) %>%\n left_join(adsl, by = \"USUBJID\")\nvar_labels(adqs_f) <- var_labels(adqs)\n\n\n\n\nConsidering the treatment variable in the model\n\nCodemmrm_results <- fit_mmrm(\n vars = list(\n response = \"CHG\",\n covariates = c(\"BASE\", \"STRATA1\", \"BMRKR2\"),\n id = \"USUBJID\",\n arm = \"ARMCD\",\n visit = \"AVISIT\"\n ),\n data = adqs_f,\n weights_emmeans = \"equal\"\n)\n\nIn AVISIT there are dropped visits: SCREENING\n\nCodedf <- tidy(mmrm_results)\nattr(df$AVISIT, \"label\") <- \"Visit\"\n\n# Define the split function\nsplit_fun <- drop_split_levels\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARMCD\", ref_group = mmrm_results$ref_level) %>%\n split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(df$AVISIT)) %>%\n summarize_lsmeans(show_relative = \"increase\") %>%\n append_topleft(\" Statistics\") %>%\n build_table(df, alt_counts_df = adsl_sub)\n\nresult\n\nVisit ARM B ARM A ARM C \n Statistics (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————\nWEEK 1 DAY 8 \n n 134 134 132 \n Adjusted Mean (SE) 3.488 (0.687) 4.246 (0.687) 3.163 (0.692) \n 95% CI (2.136, 4.839) (2.895, 5.598) (1.803, 4.523) \n Difference in Adjusted Means (SE) 0.759 (0.973) -0.325 (0.976) \n 95% CI (-1.155, 2.672) (-2.243, 1.593) \n Relative Increase (%) 21.8% -9.3% \n p-value (MMRM) 0.4362 0.7393 \nWEEK 2 DAY 15 \n n 134 134 132 \n Adjusted Mean (SE) 9.135 (0.768) 9.018 (0.767) 8.509 (0.773) \n 95% CI (7.626, 10.644) (7.510, 10.527) (6.991, 10.028) \n Difference in Adjusted Means (SE) -0.117 (1.087) -0.626 (1.090) \n 95% CI (-2.253, 2.020) (-2.768, 1.517) \n Relative Increase (%) -1.3% -6.8% \n p-value (MMRM) 0.9147 0.5662 \nWEEK 3 DAY 22 \n n 134 134 132 \n Adjusted Mean (SE) 13.547 (0.871) 16.014 (0.871) 15.789 (0.877) \n 95% CI (11.835, 15.259) (14.303, 17.726) (14.066, 17.513)\n Difference in Adjusted Means (SE) 2.467 (1.232) 2.242 (1.236) \n 95% CI (0.044, 4.890) (-0.187, 4.672) \n Relative Increase (%) 18.2% 16.6% \n p-value (MMRM) 0.0460 0.0704 \nWEEK 4 DAY 29 \n n 134 134 132 \n Adjusted Mean (SE) 18.102 (0.995) 19.479 (0.995) 19.511 (1.002) \n 95% CI (16.146, 20.059) (17.523, 21.435) (17.541, 21.481)\n Difference in Adjusted Means (SE) 1.377 (1.408) 1.409 (1.413) \n 95% CI (-1.392, 4.145) (-1.368, 4.186) \n Relative Increase (%) 7.6% 7.8% \n p-value (MMRM) 0.3288 0.3192 \nWEEK 5 DAY 36 \n n 134 134 132 \n Adjusted Mean (SE) 23.503 (1.058) 24.931 (1.058) 23.704 (1.065) \n 95% CI (21.423, 25.583) (22.851, 27.011) (21.610, 25.798)\n Difference in Adjusted Means (SE) 1.428 (1.497) 0.201 (1.502) \n 95% CI (-1.515, 4.371) (-2.752, 3.153) \n Relative Increase (%) 6.1% 0.9% \n p-value (MMRM) 0.3408 0.8937 \n\n\nNot considering the treatment variable in the model\n\nCodemmrm_results_no_arm <- fit_mmrm(\n vars = list(\n response = \"CHG\",\n covariates = c(\"BMRKR2\", \"STRATA1\"),\n id = \"USUBJID\",\n visit = \"AVISIT\"\n ),\n data = adqs_f,\n weights_emmeans = \"equal\",\n parallel = TRUE\n)\n\nIn AVISIT there are dropped visits: SCREENING\n\nCodedf_no_arm <- tidy(mmrm_results_no_arm)\nattr(df_no_arm$AVISIT, \"label\") <- \"Visit\"\n\n# Define the split function\nsplit_fun <- drop_split_levels\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n add_overall_col(\"All Patients\") %>%\n split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(df_no_arm$AVISIT)) %>%\n summarize_lsmeans(arms = FALSE) %>%\n append_topleft(\" Statistics\") %>%\n build_table(df_no_arm, alt_counts_df = adsl_sub)\n\nresult\n\nVisit All Patients \n Statistics (N=400) \n———————————————————————————————————————\nWEEK 1 DAY 8 \n n 400 \n Adjusted Mean (SE) 3.615 (0.620) \n 95% CI (2.396, 4.834) \nWEEK 2 DAY 15 \n n 400 \n Adjusted Mean (SE) 8.870 (0.602) \n 95% CI (7.687, 10.053) \nWEEK 3 DAY 22 \n n 400 \n Adjusted Mean (SE) 15.094 (0.683) \n 95% CI (13.751, 16.437)\nWEEK 4 DAY 29 \n n 400 \n Adjusted Mean (SE) 19.009 (0.717) \n 95% CI (17.599, 20.418)\nWEEK 5 DAY 36 \n n 400 \n Adjusted Mean (SE) 24.028 (0.747) \n 95% CI (22.560, 25.496)\n\n\nAdding baseline rows\nIt may be of interest to summarize some different statistics at the baseline visit or summarize a different variable in the data set not used in the MMRM. For example, the model may use the variable CHG but the baseline visit row may summarize the AVAL variable, thus we would need to create two tables and then combine them to accomplish this.\n\nCode# First have the least-square means table.\na <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARMCD\", ref_group = mmrm_results$ref_level) %>%\n split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(df$AVISIT)) %>%\n summarize_lsmeans(show_relative = \"increase\") %>%\n append_topleft(\" Statistics\") %>%\n build_table(df, alt_counts_df = adsl_sub)\n\n# Second prepare the baseline values summary table.\nbaseline_dat <- adqs %>%\n filter(AVISIT == \"BASELINE\") %>%\n droplevels()\n\nb <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARMCD\") %>%\n split_rows_by(\"AVISIT\") %>%\n summarize_vars(\"AVAL\") %>%\n append_topleft(\" Statistics\") %>%\n build_table(baseline_dat, alt_counts_df = adsl_sub)\n\n# Now we can combine them as follows.\ncol_info(b) <- EmptyColInfo\nrbind(b, a)\n\nVisit ARM B ARM A ARM C \n Statistics (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————\nBASELINE \n n 670 670 660 \n Mean (SD) 49.8 (8.1) 50.4 (8.3) 50.2 (8.4) \n Median 49.6 50.2 50.4 \n Min - Max 24.3 - 72.9 21.7 - 74.5 26.0 - 71.4 \nWEEK 1 DAY 8 \n n 134 134 132 \n Adjusted Mean (SE) 3.488 (0.687) 4.246 (0.687) 3.163 (0.692) \n 95% CI (2.136, 4.839) (2.895, 5.598) (1.803, 4.523) \n Difference in Adjusted Means (SE) 0.759 (0.973) -0.325 (0.976) \n 95% CI (-1.155, 2.672) (-2.243, 1.593) \n Relative Increase (%) 21.8% -9.3% \n p-value (MMRM) 0.4362 0.7393 \nWEEK 2 DAY 15 \n n 134 134 132 \n Adjusted Mean (SE) 9.135 (0.768) 9.018 (0.767) 8.509 (0.773) \n 95% CI (7.626, 10.644) (7.510, 10.527) (6.991, 10.028) \n Difference in Adjusted Means (SE) -0.117 (1.087) -0.626 (1.090) \n 95% CI (-2.253, 2.020) (-2.768, 1.517) \n Relative Increase (%) -1.3% -6.8% \n p-value (MMRM) 0.9147 0.5662 \nWEEK 3 DAY 22 \n n 134 134 132 \n Adjusted Mean (SE) 13.547 (0.871) 16.014 (0.871) 15.789 (0.877) \n 95% CI (11.835, 15.259) (14.303, 17.726) (14.066, 17.513)\n Difference in Adjusted Means (SE) 2.467 (1.232) 2.242 (1.236) \n 95% CI (0.044, 4.890) (-0.187, 4.672) \n Relative Increase (%) 18.2% 16.6% \n p-value (MMRM) 0.0460 0.0704 \nWEEK 4 DAY 29 \n n 134 134 132 \n Adjusted Mean (SE) 18.102 (0.995) 19.479 (0.995) 19.511 (1.002) \n 95% CI (16.146, 20.059) (17.523, 21.435) (17.541, 21.481)\n Difference in Adjusted Means (SE) 1.377 (1.408) 1.409 (1.413) \n 95% CI (-1.392, 4.145) (-1.368, 4.186) \n Relative Increase (%) 7.6% 7.8% \n p-value (MMRM) 0.3288 0.3192 \nWEEK 5 DAY 36 \n n 134 134 132 \n Adjusted Mean (SE) 23.503 (1.058) 24.931 (1.058) 23.704 (1.065) \n 95% CI (21.423, 25.583) (22.851, 27.011) (21.610, 25.798)\n Difference in Adjusted Means (SE) 1.428 (1.497) 0.201 (1.502) \n 95% CI (-1.515, 4.371) (-2.752, 3.153) \n Relative Increase (%) 6.1% 0.9% \n p-value (MMRM) 0.3408 0.8937 \n\n\nConsidering visit averages\nIt may also be of interest to summarize several different statistics for an averaged combination of various visits in the MMRM. For example, you may want to see the statistics for the average of the first 2 visits, or the average statistics of all visits combined. This can be accomplished by specifying the averages_emmeans argument when fitting the MMRM model.\n\nCodemmrm_results_avg_visits <- fit_mmrm(\n vars = list(\n response = \"CHG\",\n covariates = c(\"BASE\", \"STRATA1\", \"BMRKR2\"),\n id = \"USUBJID\",\n arm = \"ARMCD\",\n visit = \"AVISIT\"\n ),\n data = adqs_f,\n weights_emmeans = \"equal\",\n averages_emmeans = list(\n \"WEEKS 1-2\" = c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\"),\n \"WEEKS 3-5\" = c(\"WEEK 3 DAY 22\", \"WEEK 4 DAY 29\", \"WEEK 5 DAY 36\"),\n \"ALL VISITS\" = c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\", \"WEEK 4 DAY 29\", \"WEEK 5 DAY 36\")\n )\n)\n\nIn AVISIT there are dropped visits: SCREENING\n\nCodedf_avgs <- tidy(mmrm_results_avg_visits)\nattr(df_avgs$AVISIT, \"label\") <- \"Visit\"\n\n# Define the split function\nsplit_fun <- drop_split_levels\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARMCD\", ref_group = mmrm_results_avg_visits$ref_level) %>%\n split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(df_avgs$AVISIT)) %>%\n summarize_lsmeans(show_relative = \"increase\") %>%\n append_topleft(\" Statistics\") %>%\n build_table(df_avgs, alt_counts_df = adsl_sub)\n\nresult\n\nVisit ARM B ARM A ARM C \n Statistics (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————\nWEEK 1 DAY 8 \n n 134 134 132 \n Adjusted Mean (SE) 3.488 (0.687) 4.246 (0.687) 3.163 (0.692) \n 95% CI (2.136, 4.839) (2.895, 5.598) (1.803, 4.523) \n Difference in Adjusted Means (SE) 0.759 (0.973) -0.325 (0.976) \n 95% CI (-1.155, 2.672) (-2.243, 1.593) \n Relative Increase (%) 21.8% -9.3% \n p-value (MMRM) 0.4362 0.7393 \nWEEK 2 DAY 15 \n n 134 134 132 \n Adjusted Mean (SE) 9.135 (0.768) 9.018 (0.767) 8.509 (0.773) \n 95% CI (7.626, 10.644) (7.510, 10.527) (6.991, 10.028) \n Difference in Adjusted Means (SE) -0.117 (1.087) -0.626 (1.090) \n 95% CI (-2.253, 2.020) (-2.768, 1.517) \n Relative Increase (%) -1.3% -6.8% \n p-value (MMRM) 0.9147 0.5662 \nWEEK 3 DAY 22 \n n 134 134 132 \n Adjusted Mean (SE) 13.547 (0.871) 16.014 (0.871) 15.789 (0.877) \n 95% CI (11.835, 15.259) (14.303, 17.726) (14.066, 17.513)\n Difference in Adjusted Means (SE) 2.467 (1.232) 2.242 (1.236) \n 95% CI (0.044, 4.890) (-0.187, 4.672) \n Relative Increase (%) 18.2% 16.6% \n p-value (MMRM) 0.0460 0.0704 \nWEEK 4 DAY 29 \n n 134 134 132 \n Adjusted Mean (SE) 18.102 (0.995) 19.479 (0.995) 19.511 (1.002) \n 95% CI (16.146, 20.059) (17.523, 21.435) (17.541, 21.481)\n Difference in Adjusted Means (SE) 1.377 (1.408) 1.409 (1.413) \n 95% CI (-1.392, 4.145) (-1.368, 4.186) \n Relative Increase (%) 7.6% 7.8% \n p-value (MMRM) 0.3288 0.3192 \nWEEK 5 DAY 36 \n n 134 134 132 \n Adjusted Mean (SE) 23.503 (1.058) 24.931 (1.058) 23.704 (1.065) \n 95% CI (21.423, 25.583) (22.851, 27.011) (21.610, 25.798)\n Difference in Adjusted Means (SE) 1.428 (1.497) 0.201 (1.502) \n 95% CI (-1.515, 4.371) (-2.752, 3.153) \n Relative Increase (%) 6.1% 0.9% \n p-value (MMRM) 0.3408 0.8937 \nWEEKS 1-2 \n n 134 134 132 \n Adjusted Mean (SE) 6.311 (0.514) 6.632 (0.514) 5.836 (0.516) \n 95% CI (5.301, 7.322) (5.623, 7.642) (4.821, 6.852) \n Difference in Adjusted Means (SE) 0.321 (0.728) -0.475 (0.729) \n 95% CI (-1.111, 1.753) (-1.909, 0.959) \n Relative Increase (%) 5.1% -7.5% \n p-value (MMRM) 0.6596 0.5151 \nWEEKS 3-5 \n n 134 134 132 \n Adjusted Mean (SE) 18.384 (0.560) 20.141 (0.560) 19.668 (0.563) \n 95% CI (17.284, 19.485) (19.041, 21.241) (18.562, 20.775)\n Difference in Adjusted Means (SE) 1.757 (0.793) 1.284 (0.794) \n 95% CI (0.198, 3.316) (-0.278, 2.846) \n Relative Increase (%) 9.6% 7.0% \n p-value (MMRM) 0.0273 0.1068 \nALL VISITS \n n 134 134 132 \n Adjusted Mean (SE) 13.555 (0.388) 14.738 (0.388) 14.135 (0.389) \n 95% CI (12.792, 14.318) (13.976, 15.500) (13.370, 14.900)\n Difference in Adjusted Means (SE) 1.183 (0.551) 0.580 (0.551) \n 95% CI (0.100, 2.266) (-0.502, 1.663) \n Relative Increase (%) 8.7% 4.3% \n p-value (MMRM) 0.0324 0.2924 \n\n\n\n\n\nConsidering the treatment variable in the model\n\nCodeas.rtable(mmrm_results, type = \"fixed\")\n\n Estimate Std. Error t value df Pr(>|t|)\n——————————————————————————————————————————————————————————————————————————————————\n(Intercept) 55.7483 1.5244 36.5713 510 <0.0001 \nBASE -1.0196 0.0246 -41.4362 392 <0.0001 \nSTRATA1B -0.0369 0.5345 -0.0691 392 0.9450 \nSTRATA1C 0.0205 0.5238 0.0392 392 0.9688 \nBMRKR2MEDIUM -0.3840 0.5198 -0.7386 392 0.4606 \nBMRKR2HIGH -1.0056 0.5259 -1.9123 392 0.0566 \nARMCDARM A 0.7587 0.9733 0.7795 396 0.4362 \nARMCDARM C -0.3248 0.9756 -0.3329 394 0.7393 \nAVISITWEEK 2 DAY 15 5.6472 1.0331 5.4665 397 <0.0001 \nAVISITWEEK 3 DAY 22 10.0591 1.0897 9.2311 397 <0.0001 \nAVISITWEEK 4 DAY 29 14.6145 1.2176 12.0027 397 <0.0001 \nAVISITWEEK 5 DAY 36 20.0154 1.2584 15.9057 397 <0.0001 \nARMCDARM A:AVISITWEEK 2 DAY 15 -0.8752 1.4610 -0.5990 397 0.5495 \nARMCDARM C:AVISITWEEK 2 DAY 15 -0.3007 1.4665 -0.2050 397 0.8376 \nARMCDARM A:AVISITWEEK 3 DAY 22 1.7085 1.5411 1.1087 397 0.2682 \nARMCDARM C:AVISITWEEK 3 DAY 22 2.5673 1.5469 1.6597 397 0.0978 \nARMCDARM A:AVISITWEEK 4 DAY 29 0.6181 1.7220 0.3589 397 0.7198 \nARMCDARM C:AVISITWEEK 4 DAY 29 1.7337 1.7285 1.0030 397 0.3165 \nARMCDARM A:AVISITWEEK 5 DAY 36 0.6690 1.7796 0.3759 397 0.7072 \nARMCDARM C:AVISITWEEK 5 DAY 36 0.5257 1.7863 0.2943 397 0.7687 \n\n\nNot considering the treatment variable in the model\n\nCodeas.rtable(mmrm_results_no_arm, type = \"fixed\")\n\n Estimate Std. Error t value df Pr(>|t|)\n——————————————————————————————————————————————————————————————————————\n(Intercept) 1.5624 1.1751 1.3296 466 0.1843 \nBMRKR2MEDIUM 1.0924 1.1878 0.9196 395 0.3583 \nBMRKR2HIGH 1.4619 1.1971 1.2212 395 0.2227 \nSTRATA1B 2.6321 1.2180 2.1610 395 0.0313 \nSTRATA1C 0.9717 1.2008 0.8092 395 0.4189 \nAVISITWEEK 2 DAY 15 5.2548 0.5967 8.8061 399 <0.0001 \nAVISITWEEK 3 DAY 22 11.4787 0.6314 18.1802 399 <0.0001 \nAVISITWEEK 4 DAY 29 15.3937 0.7039 21.8696 399 <0.0001 \nAVISITWEEK 5 DAY 36 20.4130 0.7266 28.0921 399 <0.0001 \n\n\n\n\n\n\nCodeas.rtable(mmrm_results, type = \"cov\")\n\n WEEK 1 DAY 8 WEEK 2 DAY 15 WEEK 3 DAY 22 WEEK 4 DAY 29 WEEK 5 DAY 36\n————————————————————————————————————————————————————————————————————————————————————————————\nWEEK 1 DAY 8 63.0140 -0.6664 2.5965 -1.6231 0.2589 \nWEEK 2 DAY 15 -0.6664 78.6592 1.7004 -11.8677 -0.4261 \nWEEK 3 DAY 22 2.5965 1.7004 101.2949 -5.8424 7.1145 \nWEEK 4 DAY 29 -1.6231 -11.8677 -5.8424 132.4034 -5.3739 \nWEEK 5 DAY 36 0.2589 -0.4261 7.1145 -5.3739 149.6937 \n\n\n\n\nModel diagnostics are currently available to evaluate choice of covariates for the fixed and random effects. Statistics to evaluate choice of covariance structure are being investigated and will be included in a future release.\n\nCodeas.rtable(mmrm_results, type = \"diagnostic\")\n\n Diagnostic statistic value\n———————————————————————————————————————————\nREML criterion 14835.9968 \nAIC 14865.9968 \nAICc 14866.2412 \nBIC 14925.8688 \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\") %>%\n dplyr::filter(ABLFL != \"Y\" & ABLFL2 != \"Y\") %>%\n dplyr::filter(AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\")) %>%\n dplyr::mutate(\n AVISIT = as.factor(AVISIT),\n AVISITN = rank(AVISITN) %>%\n as.factor() %>%\n as.numeric() %>%\n as.factor() # making consecutive numeric factor\n )\n\narm_ref_comp <- list(\n ARMCD = list(\n ref = \"ARM A\",\n comp = c(\"ARM B\", \"ARM C\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADQS\", adqs,\n code = 'ADQS <- synthetic_cdisc_dataset(\"latest\", \"adqs\") %>%\n dplyr::filter(ABLFL != \"Y\" & ABLFL2 != \"Y\") %>%\n dplyr::filter(AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\")) %>%\n dplyr::mutate(\n AVISIT = as.factor(AVISIT),\n AVISITN = rank(AVISITN) %>%\n as.factor() %>%\n as.numeric() %>%\n as.factor() # making consecutive numeric factor\n )'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_a_mmrm(\n label = \"MMRM\",\n dataname = \"ADQS\",\n aval_var = choices_selected(c(\"AVAL\", \"CHG\"), \"CHG\"),\n id_var = choices_selected(c(\"USUBJID\", \"SUBJID\"), \"USUBJID\"),\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARMCD\"),\n visit_var = choices_selected(c(\"AVISIT\", \"AVISITN\"), \"AVISIT\"),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n choices = value_choices(adqs, \"PARAMCD\", \"PARAM\"),\n selected = \"FKSI-FWB\"\n ),\n cov_var = choices_selected(c(\"BASE\", \"AGE\", \"SEX\", \"BASE:AVISIT\"), NULL),\n conf_level = choices_selected(c(0.95, 0.9, 0.8), 0.95)\n )\n )\n)\n\n[INFO] 2023-08-04 15:00:33.1806 pid:5781 token:[] teal.modules.clinical Initializing tm_a_mmrm\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] broom_1.0.5 scda_0.1.6.9010 \n [9] tern.mmrm_0.2.2.9005 tern_0.8.5.9006 \n[11] rtables_0.6.2.9001 magrittr_2.0.3 \n[13] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 fastmap_1.1.1 promises_1.2.0.1 \n [4] shinyjs_2.1.0 digest_0.6.33 estimability_1.4.1 \n [7] mime_0.12 tern.gee_0.1.0.9006 lifecycle_1.0.3 \n[10] ellipsis_0.3.2 processx_3.8.2 survival_3.5-5 \n[13] compiler_4.3.1 sass_0.4.7 rlang_1.1.1 \n[16] tools_4.3.1 utf8_1.2.3 yaml_2.3.7 \n[19] mmrm_0.2.2 knitr_1.43 htmlwidgets_1.6.2 \n[22] withr_2.5.0 purrr_1.0.1 numDeriv_2016.8-1.1 \n[25] shinyWidgets_0.7.6 geepack_1.3.9 grid_4.3.1 \n[28] fansi_1.0.4 teal.logger_0.1.1.9009 xtable_1.8-4 \n[31] colorspace_2.1-0 ggplot2_3.4.2 emmeans_1.8.7 \n[34] scales_1.2.1 MASS_7.3-60 cli_3.6.1 \n[37] mvtnorm_1.2-2 rmarkdown_2.23 generics_0.1.3 \n[40] rstudioapi_0.15.0 cachem_1.0.8 stringr_1.5.0 \n[43] splines_4.3.1 assertthat_0.2.1 parallel_4.3.1 \n[46] vctrs_0.6.3 webshot_0.5.5 Matrix_1.6-0 \n[49] jsonlite_1.8.7 callr_3.7.3 teal.widgets_0.3.0.9007 \n[52] testthat_3.1.10 fontawesome_0.5.1 jquerylib_0.1.4 \n[55] tidyr_1.3.0 glue_1.6.2 parallelly_1.36.0 \n[58] ps_1.7.5 codetools_0.2-19 cowplot_1.1.1 \n[61] stringi_1.7.12 gtable_0.3.3 later_1.3.1 \n[64] shinycssloaders_1.0.0 munsell_0.5.0 tibble_3.2.1 \n[67] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[70] brio_1.1.3 R6_2.5.1 TMB_1.9.5 \n[73] Rdpack_2.4 evaluate_0.21 lattice_0.21-8 \n[76] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[79] teal.reporter_0.1.1.9020 bslib_0.5.0 httpuv_1.6.11 \n[82] Rcpp_1.0.11 shinyvalidate_0.1.2 coda_0.19-4 \n[85] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[88] forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/mmrmt01.lock'.\n\n\nDownload" }, { "objectID": "tables/efficacy/lgrt02.html", "href": "tables/efficacy/lgrt02.html", "title": "LGRT02", "section": "", - "text": "Data Setup\nMulti-Variable Logistic Regression\nMulti-Variable Logistic Regression with Interaction Term\nMulti-Variable Logistic Regression Specifying Covariates\nMulti-Variable Logistic Regression Setting an Event, Alpha Level, and Level for Interaction\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadrs <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadrs <- df_explicit_na(adrs)\n\nadsl <- adsl %>%\n dplyr::filter(SEX %in% c(\"F\", \"M\"))\n\nadrs <- adrs %>%\n dplyr::filter(PARAMCD == \"BESRSPI\") %>%\n dplyr::mutate(\n Response = case_when(AVALC %in% c(\"PR\", \"CR\") ~ 1, TRUE ~ 0),\n SEX = factor(SEX, c(\"M\", \"F\")),\n RACE = factor(\n RACE,\n levels = c(\n \"AMERICAN INDIAN OR ALASKA NATIVE\", \"ASIAN\", \"BLACK OR AFRICAN AMERICAN\",\n \"WHITE\", \"MULTIPLE\", \"NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER\"\n )\n )\n ) %>%\n var_relabel(Response = \"Response\", SEX = \"Sex\", RACE = \"Race\")\n\n\n\n\n\nCodemodel <- fit_logistic(\n adrs,\n variables = list(response = \"Response\", arm = \"ARMCD\", covariates = c(\"SEX\", \"AGE\"))\n)\nconf_level <- 0.95\ndf <- broom::tidy(model, conf_level = conf_level)\n\n# empty string flag\ndf <- df_explicit_na(df, na_level = \"_NA_\")\n\nresult <- basic_table() %>%\n summarize_logistic(\n conf_level = conf_level,\n drop_and_remove_str = \"_NA_\"\n ) %>%\n append_topleft(\"Logistic regression\") %>%\n build_table(df = df)\nresult\n\nLogistic regression Degrees of Freedom Parameter Estimate Standard Error Odds Ratio Wald 95% CI p-value\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nPlanned Arm Code 2 0.0408 \n Reference ARM A, n = 134 \n ARM B, n = 134 1 -2.094 1.080 0.12 (0.01, 1.02) 0.0524 \n ARM C, n = 132 1 -0.074 1.423 0.93 (0.06, 15.09) 0.9584 \nSex \n Reference M, n = 169 \n F, n = 231 1 0.331 0.695 1.39 (0.36, 5.44) 0.6339 \nAge \n Age 1 0.070 0.054 1.07 (0.97, 1.19) 0.1945 \n\n\n\n\n\nCodemodel <- fit_logistic(\n adrs,\n variables = list(\n response = \"Response\",\n arm = \"ARMCD\",\n covariates = c(\"SEX\", \"AGE\"),\n interaction = \"SEX\"\n )\n)\nconf_level <- 0.95\ndf <- broom::tidy(model, conf_level = conf_level)\n\n# empty string flag\ndf <- df_explicit_na(df, na_level = \"_NA_\")\n\nresult <- basic_table() %>%\n summarize_logistic(\n conf_level = conf_level,\n drop_and_remove_str = \"_NA_\"\n ) %>%\n append_topleft(\"Logistic regression with interaction\") %>%\n build_table(df = df)\nresult\n\nLogistic regression with interaction Degrees of Freedom Parameter Estimate Standard Error Odds Ratio Wald 95% CI p-value\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAge \n Age 1 0.067 0.054 1.07 (0.96, 1.19) 0.2084 \nPlanned Arm Code 2 0.4882 \n Reference ARM A, n = 134 \n ARM B, n = 134 1 -17.850 2362.767 0.9940 \n Sex \n F 0.23 (0.02, 2.11) \n M 0.00 (0.00, >999.99) \n ARM C, n = 132 1 -16.442 2362.767 0.9944 \n Sex \n F >999.99 (0.00, >999.99) \n M 0.00 (0.00, >999.99) \nSex \n Reference M, n = 169 \n F, n = 231 1 -16.044 2362.767 0.9946 \n Planned Arm Code \n ARM A 0.00 (0.00, >999.99) \n ARM B 1.39 (0.29, 6.59) \n ARM C >999.99 (0.00, >999.99) \nInteraction of Planned Arm Code * Sex 2 0.9999 \n Reference ARM A or M, n = 248 \n ARM B * F, n = 82 1 16.373 2362.767 0.9945 \n ARM C * F, n = 70 1 32.492 3156.732 0.9918 \n\n\n\n\n\nCodemodel <- fit_logistic(\n adrs,\n variables = list(\n response = \"Response\",\n arm = \"ARMCD\",\n covariates = c(\"SEX\", \"AGE\", \"RACE\")\n )\n)\nconf_level <- 0.95\ndf <- broom::tidy(model, conf_level = conf_level)\n\n# empty string flag\ndf <- df_explicit_na(df, na_level = \"_NA_\")\n\nresult <- basic_table() %>%\n summarize_logistic(\n conf_level = conf_level,\n drop_and_remove_str = \"_NA_\"\n ) %>%\n append_topleft(\"y ~ ARM + SEX + AGE + RACE\") %>%\n build_table(df = df)\nresult\n\ny ~ ARM + SEX + AGE + RACE Degrees of Freedom Parameter Estimate Standard Error Odds Ratio Wald 95% CI p-value\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nPlanned Arm Code 2 0.0346 \n Reference ARM A, n = 134 \n ARM B, n = 134 1 -2.162 1.084 0.12 (0.01, 0.96) 0.0461 \n ARM C, n = 132 1 -0.090 1.426 0.91 (0.06, 14.97) 0.9499 \nSex \n Reference M, n = 169 \n F, n = 231 1 0.364 0.701 1.44 (0.36, 5.69) 0.6032 \nAge \n Age 1 0.071 0.053 1.07 (0.97, 1.19) 0.1866 \nRace 5 0.9685 \n Reference AMERICAN INDIAN OR ALASKA NATIVE, n = 25 \n ASIAN, n = 208 1 -16.246 2017.122 0.00 (0.00, >999.99) 0.9936 \n BLACK OR AFRICAN AMERICAN, n = 91 1 -15.205 2017.122 0.00 (0.00, >999.99) 0.9940 \n WHITE, n = 74 1 -15.955 2017.122 0.00 (0.00, >999.99) 0.9937 \n MULTIPLE, n = 1 1 -0.363 10941.553 0.70 (0.00, >999.99) 1.0000 \n NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER, n = 1 1 1.036 10941.553 2.82 (0.00, >999.99) 0.9999 \n\n\n\n\n\nCodemodel <- fit_logistic(\n adrs,\n variables = list(\n response = \"Response\",\n arm = \"ARMCD\",\n covariates = c(\"SEX\", \"AGE\"),\n interaction = \"AGE\"\n ),\n response_definition = \"1 - response\"\n)\nconf_level <- 0.9\ndf <- broom::tidy(model, conf_level = conf_level, at = c(30, 50))\n\n# empty string flag\ndf <- df_explicit_na(df, na_level = \"_NA_\")\n\nresult <- basic_table() %>%\n summarize_logistic(\n conf_level = conf_level,\n drop_and_remove_str = \"_NA_\"\n ) %>%\n append_topleft(\"Estimations at age 30 and 50\") %>%\n build_table(df = df)\nresult\n\nEstimations at age 30 and 50 Degrees of Freedom Parameter Estimate Standard Error Odds Ratio Wald 90% CI p-value\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nSex \n Reference M, n = 169 \n F, n = 231 1 -0.381 0.710 0.68 (0.21, 2.20) 0.5915 \nPlanned Arm Code 2 0.2768 \n Reference ARM A, n = 134 \n ARM B, n = 134 1 -20.020 13.714 0.1443 \n Age \n 30 234.91 (0.30, >999.99) \n 50 >999.99 (0.04, >999.99) \n ARM C, n = 132 1 -15.622 14.810 0.2915 \n Age \n 30 31.95 (0.03, >999.99) \n 50 >999.99 (<0.01, >999.99) \nAge \n Age 1 -0.877 0.581 0.1309 \n Planned Arm Code \n ARM A 0.42 (0.16, 1.08) \n ARM B 0.97 (0.89, 1.06) \n ARM C 0.79 (0.55, 1.11) \nInteraction of Planned Arm Code * Age 2 0.2213 \n Reference ARM A, n = 134 \n ARM B, n = 134 1 0.849 0.583 0.1449 \n ARM C, n = 132 1 0.636 0.618 0.3034 \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\") %>%\n filter(PARAMCD %in% c(\"BESRSPI\", \"INVET\"))\n\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\n \"ADRS\", ADRS,\n code = 'ADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\") %>% filter(PARAMCD %in% c(\"BESRSPI\", \"INVET\"))'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_logistic(\n label = \"Logistic Regression\",\n dataname = \"ADRS\",\n arm_var = choices_selected(\n choices = variable_choices(ADRS, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n choices = value_choices(ADRS, \"PARAMCD\", \"PARAM\"),\n selected = \"BESRSPI\"\n ),\n cov_var = choices_selected(\n choices = c(\"SEX\", \"AGE\", \"BMRKR1\", \"BMRKR2\"),\n selected = \"SEX\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 14:42:59.7870 pid:5560 token:[] teal.modules.clinical Initializing tm_t_logistic\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] dplyr_1.1.2 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] abind_1.4-5 R.cache_0.16.0 withr_2.5.0 \n[25] purrr_1.0.1 R.oo_1.25.0 shinyWidgets_0.7.6 \n[28] geepack_1.3.9 grid_4.3.1 fansi_1.0.4 \n[31] teal.logger_0.1.1.9009 xtable_1.8-4 colorspace_2.1-0 \n[34] ggplot2_3.4.2 emmeans_1.8.7 scales_1.2.1 \n[37] MASS_7.3-60 cli_3.6.1 mvtnorm_1.2-2 \n[40] rmarkdown_2.23 generics_0.1.3 rstudioapi_0.15.0 \n[43] cachem_1.0.8 splines_4.3.1 assertthat_0.2.1 \n[46] vctrs_0.6.3 webshot_0.5.5 Matrix_1.6-0 \n[49] jsonlite_1.8.7 carData_3.0-5 callr_3.7.3 \n[52] car_3.1-2 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[55] fontawesome_0.5.1 jquerylib_0.1.4 tidyr_1.3.0 \n[58] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[61] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[64] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[67] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[70] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[73] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[76] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[79] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[82] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[85] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[88] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[91] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/lgrt02.lock'.\n\n\nDownload" + "text": "Data Setup\nMulti-Variable Logistic Regression\nMulti-Variable Logistic Regression with Interaction Term\nMulti-Variable Logistic Regression Specifying Covariates\nMulti-Variable Logistic Regression Setting an Event, Alpha Level, and Level for Interaction\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadrs <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadrs <- df_explicit_na(adrs)\n\nadsl <- adsl %>%\n dplyr::filter(SEX %in% c(\"F\", \"M\"))\n\nadrs <- adrs %>%\n dplyr::filter(PARAMCD == \"BESRSPI\") %>%\n dplyr::mutate(\n Response = case_when(AVALC %in% c(\"PR\", \"CR\") ~ 1, TRUE ~ 0),\n SEX = factor(SEX, c(\"M\", \"F\")),\n RACE = factor(\n RACE,\n levels = c(\n \"AMERICAN INDIAN OR ALASKA NATIVE\", \"ASIAN\", \"BLACK OR AFRICAN AMERICAN\",\n \"WHITE\", \"MULTIPLE\", \"NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER\"\n )\n )\n ) %>%\n var_relabel(Response = \"Response\", SEX = \"Sex\", RACE = \"Race\")\n\n\n\n\n\nCodemodel <- fit_logistic(\n adrs,\n variables = list(response = \"Response\", arm = \"ARMCD\", covariates = c(\"SEX\", \"AGE\"))\n)\nconf_level <- 0.95\ndf <- broom::tidy(model, conf_level = conf_level)\n\n# empty string flag\ndf <- df_explicit_na(df, na_level = \"_NA_\")\n\nresult <- basic_table() %>%\n summarize_logistic(\n conf_level = conf_level,\n drop_and_remove_str = \"_NA_\"\n ) %>%\n append_topleft(\"Logistic regression\") %>%\n build_table(df = df)\nresult\n\nLogistic regression Degrees of Freedom Parameter Estimate Standard Error Odds Ratio Wald 95% CI p-value\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nPlanned Arm Code 2 0.0408 \n Reference ARM A, n = 134 \n ARM B, n = 134 1 -2.094 1.080 0.12 (0.01, 1.02) 0.0524 \n ARM C, n = 132 1 -0.074 1.423 0.93 (0.06, 15.09) 0.9584 \nSex \n Reference M, n = 169 \n F, n = 231 1 0.331 0.695 1.39 (0.36, 5.44) 0.6339 \nAge \n Age 1 0.070 0.054 1.07 (0.97, 1.19) 0.1945 \n\n\n\n\n\nCodemodel <- fit_logistic(\n adrs,\n variables = list(\n response = \"Response\",\n arm = \"ARMCD\",\n covariates = c(\"SEX\", \"AGE\"),\n interaction = \"SEX\"\n )\n)\nconf_level <- 0.95\ndf <- broom::tidy(model, conf_level = conf_level)\n\n# empty string flag\ndf <- df_explicit_na(df, na_level = \"_NA_\")\n\nresult <- basic_table() %>%\n summarize_logistic(\n conf_level = conf_level,\n drop_and_remove_str = \"_NA_\"\n ) %>%\n append_topleft(\"Logistic regression with interaction\") %>%\n build_table(df = df)\nresult\n\nLogistic regression with interaction Degrees of Freedom Parameter Estimate Standard Error Odds Ratio Wald 95% CI p-value\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAge \n Age 1 0.067 0.054 1.07 (0.96, 1.19) 0.2084 \nPlanned Arm Code 2 0.4882 \n Reference ARM A, n = 134 \n ARM B, n = 134 1 -17.850 2362.767 0.9940 \n Sex \n F 0.23 (0.02, 2.11) \n M 0.00 (0.00, >999.99) \n ARM C, n = 132 1 -16.442 2362.767 0.9944 \n Sex \n F >999.99 (0.00, >999.99) \n M 0.00 (0.00, >999.99) \nSex \n Reference M, n = 169 \n F, n = 231 1 -16.044 2362.767 0.9946 \n Planned Arm Code \n ARM A 0.00 (0.00, >999.99) \n ARM B 1.39 (0.29, 6.59) \n ARM C >999.99 (0.00, >999.99) \nInteraction of Planned Arm Code * Sex 2 0.9999 \n Reference ARM A or M, n = 248 \n ARM B * F, n = 82 1 16.373 2362.767 0.9945 \n ARM C * F, n = 70 1 32.492 3156.732 0.9918 \n\n\n\n\n\nCodemodel <- fit_logistic(\n adrs,\n variables = list(\n response = \"Response\",\n arm = \"ARMCD\",\n covariates = c(\"SEX\", \"AGE\", \"RACE\")\n )\n)\nconf_level <- 0.95\ndf <- broom::tidy(model, conf_level = conf_level)\n\n# empty string flag\ndf <- df_explicit_na(df, na_level = \"_NA_\")\n\nresult <- basic_table() %>%\n summarize_logistic(\n conf_level = conf_level,\n drop_and_remove_str = \"_NA_\"\n ) %>%\n append_topleft(\"y ~ ARM + SEX + AGE + RACE\") %>%\n build_table(df = df)\nresult\n\ny ~ ARM + SEX + AGE + RACE Degrees of Freedom Parameter Estimate Standard Error Odds Ratio Wald 95% CI p-value\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nPlanned Arm Code 2 0.0346 \n Reference ARM A, n = 134 \n ARM B, n = 134 1 -2.162 1.084 0.12 (0.01, 0.96) 0.0461 \n ARM C, n = 132 1 -0.090 1.426 0.91 (0.06, 14.97) 0.9499 \nSex \n Reference M, n = 169 \n F, n = 231 1 0.364 0.701 1.44 (0.36, 5.69) 0.6032 \nAge \n Age 1 0.071 0.053 1.07 (0.97, 1.19) 0.1866 \nRace 5 0.9685 \n Reference AMERICAN INDIAN OR ALASKA NATIVE, n = 25 \n ASIAN, n = 208 1 -16.246 2017.122 0.00 (0.00, >999.99) 0.9936 \n BLACK OR AFRICAN AMERICAN, n = 91 1 -15.205 2017.122 0.00 (0.00, >999.99) 0.9940 \n WHITE, n = 74 1 -15.955 2017.122 0.00 (0.00, >999.99) 0.9937 \n MULTIPLE, n = 1 1 -0.363 10941.553 0.70 (0.00, >999.99) 1.0000 \n NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER, n = 1 1 1.036 10941.553 2.82 (0.00, >999.99) 0.9999 \n\n\n\n\n\nCodemodel <- fit_logistic(\n adrs,\n variables = list(\n response = \"Response\",\n arm = \"ARMCD\",\n covariates = c(\"SEX\", \"AGE\"),\n interaction = \"AGE\"\n ),\n response_definition = \"1 - response\"\n)\nconf_level <- 0.9\ndf <- broom::tidy(model, conf_level = conf_level, at = c(30, 50))\n\n# empty string flag\ndf <- df_explicit_na(df, na_level = \"_NA_\")\n\nresult <- basic_table() %>%\n summarize_logistic(\n conf_level = conf_level,\n drop_and_remove_str = \"_NA_\"\n ) %>%\n append_topleft(\"Estimations at age 30 and 50\") %>%\n build_table(df = df)\nresult\n\nEstimations at age 30 and 50 Degrees of Freedom Parameter Estimate Standard Error Odds Ratio Wald 90% CI p-value\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nSex \n Reference M, n = 169 \n F, n = 231 1 -0.381 0.710 0.68 (0.21, 2.20) 0.5915 \nPlanned Arm Code 2 0.2768 \n Reference ARM A, n = 134 \n ARM B, n = 134 1 -20.020 13.714 0.1443 \n Age \n 30 234.91 (0.30, >999.99) \n 50 >999.99 (0.04, >999.99) \n ARM C, n = 132 1 -15.622 14.810 0.2915 \n Age \n 30 31.95 (0.03, >999.99) \n 50 >999.99 (<0.01, >999.99) \nAge \n Age 1 -0.877 0.581 0.1309 \n Planned Arm Code \n ARM A 0.42 (0.16, 1.08) \n ARM B 0.97 (0.89, 1.06) \n ARM C 0.79 (0.55, 1.11) \nInteraction of Planned Arm Code * Age 2 0.2213 \n Reference ARM A, n = 134 \n ARM B, n = 134 1 0.849 0.583 0.1449 \n ARM C, n = 132 1 0.636 0.618 0.3034 \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\") %>%\n filter(PARAMCD %in% c(\"BESRSPI\", \"INVET\"))\n\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\n \"ADRS\", ADRS,\n code = 'ADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\") %>% filter(PARAMCD %in% c(\"BESRSPI\", \"INVET\"))'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_logistic(\n label = \"Logistic Regression\",\n dataname = \"ADRS\",\n arm_var = choices_selected(\n choices = variable_choices(ADRS, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n choices = value_choices(ADRS, \"PARAMCD\", \"PARAM\"),\n selected = \"BESRSPI\"\n ),\n cov_var = choices_selected(\n choices = c(\"SEX\", \"AGE\", \"BMRKR1\", \"BMRKR2\"),\n selected = \"SEX\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 14:59:09.1909 pid:5565 token:[] teal.modules.clinical Initializing tm_t_logistic\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] dplyr_1.1.2 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] abind_1.4-5 R.cache_0.16.0 withr_2.5.0 \n[25] purrr_1.0.1 R.oo_1.25.0 shinyWidgets_0.7.6 \n[28] geepack_1.3.9 grid_4.3.1 fansi_1.0.4 \n[31] teal.logger_0.1.1.9009 xtable_1.8-4 colorspace_2.1-0 \n[34] ggplot2_3.4.2 emmeans_1.8.7 scales_1.2.1 \n[37] MASS_7.3-60 cli_3.6.1 mvtnorm_1.2-2 \n[40] rmarkdown_2.23 generics_0.1.3 rstudioapi_0.15.0 \n[43] cachem_1.0.8 splines_4.3.1 assertthat_0.2.1 \n[46] vctrs_0.6.3 webshot_0.5.5 Matrix_1.6-0 \n[49] jsonlite_1.8.7 carData_3.0-5 callr_3.7.3 \n[52] car_3.1-2 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[55] fontawesome_0.5.1 jquerylib_0.1.4 tidyr_1.3.0 \n[58] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[61] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[64] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[67] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[70] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[73] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[76] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[79] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[82] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[85] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[88] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[91] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/lgrt02.lock'.\n\n\nDownload" }, { "objectID": "graphs/other/mmrmg02.html", @@ -326,7 +326,7 @@ "href": "graphs/other/mng01.html", "title": "MNG01", "section": "", - "text": "Data Setup\nPlot of Mean and CI\nPlot of Mean and CIs of Change from Baseline (Changing the Input Analysis Data Set and Analysis Variable)\nPlot of Mean (+/-SD) (Changing the Statistics)\nPlot of Mean and CI (Modify Alpha Level)\nPlot of Mean and CI (with Number of Patients only in Table Section)\nPlot of Mean and CI (with Table Section)\nPlot of Median and CI (Visits Condensed in Table Section)\nPlot of Mean and Upper Confidence Limit\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\nlibrary(nestcolor)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\nadvs <- synthetic_cdisc_dataset(\"latest\", \"advs\")\n\nadsl_f <- adsl %>%\n filter(SAFFL == \"Y\") %>%\n df_explicit_na()\n\nadlb_f <- adlb %>%\n mutate(AVISIT = forcats::fct_reorder(AVISIT, AVISITN, min)) %>%\n dplyr::filter(\n SAFFL == \"Y\",\n ANL01FL == \"Y\",\n ONTRTFL == \"Y\",\n PARAMCD == \"ALT\",\n AVISIT != \"SCREENING\"\n ) %>%\n droplevels() %>%\n df_explicit_na()\n\nadvs_f <- advs %>%\n mutate(AVISIT = forcats::fct_reorder(AVISIT, AVISITN, min)) %>%\n dplyr::filter(\n SAFFL == \"Y\",\n ONTRTFL == \"Y\",\n PARAMCD == \"DIABP\",\n AVISIT != \"SCREENING\"\n ) %>%\n droplevels() %>%\n df_explicit_na()\n\n\n\n\n\nCodeplot <- g_lineplot(\n df = adlb_f,\n alt_counts_df = adsl_f,\n subtitle = \"Laboratory Test:\"\n)\nplot\n\n\n\n\n\n\n\nCodeplot <- g_lineplot(\n df = advs_f,\n alt_counts_df = adsl_f,\n variables = control_lineplot_vars(y = \"CHG\"),\n title = \"Plot of Mean and 95% Confidence Intervals of Change from Baseline by Visit\",\n subtitle = \"Assessment:\"\n)\nplot\n\n\n\n\n\n\n\nCodeplot <- g_lineplot(\n df = adlb_f,\n alt_counts_df = adsl_f,\n interval = \"mean_sdi\",\n whiskers = c(\"mean_sdi_lwr\", \"mean_sdi_upr\"),\n title = \"Plot of Mean (+/-SD)\",\n subtitle = \"Laboratory Test:\"\n)\nplot\n\n\n\n\n\n\n\nCodeplot <- g_lineplot(\n df = adlb_f,\n alt_counts_df = adsl_f,\n control = control_summarize_vars(conf_level = 0.80),\n title = \"Plot of Mean and 80% Confidence Limits by Visit\",\n subtitle = \"Laboratory Test:\"\n)\nplot\n\n\n\n\n\n\n\nCodeplot <- g_lineplot(\n df = adlb_f,\n alt_counts_df = adsl_f,\n table = \"n\",\n subtitle = \"Laboratory Test:\"\n)\nplot\n\n\n\n\n\n\n\nCodeplot <- g_lineplot(\n df = adlb_f,\n alt_counts_df = adsl_f,\n table = c(\"n\", \"mean\", \"mean_ci\"),\n subtitle = \"Laboratory Test:\"\n)\nplot\n\n\n\n\n\n\nThis option is not supported.\n\n\n\nCodeplot <- g_lineplot(\n df = adlb_f,\n alt_counts_df = adsl_f,\n whiskers = \"mean_ci_upr\",\n subtitle = \"Laboratory Test:\"\n)\nplot\n\n\n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(teal.modules.clinical)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n mutate(AVISIT = forcats::fct_reorder(AVISIT, AVISITN, min))\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADLB\", ADLB, code = 'ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n mutate(AVISIT = forcats::fct_reorder(AVISIT, AVISITN, min))'),\n check = TRUE\n ),\n modules = modules(\n tm_g_lineplot(\n label = \"LINE PLOT\",\n dataname = \"ADLB\",\n strata = choices_selected(\n variable_choices(ADSL, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")),\n \"ARM\"\n ),\n y = choices_selected(\n variable_choices(ADLB, c(\"AVAL\", \"BASE\", \"CHG\", \"PCHG\")),\n \"AVAL\"\n ),\n param = choices_selected(\n value_choices(ADLB, \"PARAMCD\", \"PARAM\"),\n \"ALT\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 14:40:30.3625 pid:5112 token:[] teal.modules.clinical Initializing tm_g_lineplot\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] nestcolor_0.1.2.9001 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n[13] dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 systemfonts_1.0.4 callr_3.7.3 \n[10] vctrs_0.6.3 pkgconfig_2.0.3 fastmap_1.1.1 \n[13] backports_1.4.1 ellipsis_0.3.2 fontawesome_0.5.1 \n[16] labeling_0.4.2 utf8_1.2.3 promises_1.2.0.1 \n[19] rmarkdown_2.23 ps_1.7.5 ragg_1.2.5 \n[22] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[25] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[28] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[31] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[34] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[37] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[40] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[43] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[46] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[49] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[52] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[55] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[58] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[61] generics_0.1.3 ggplot2_3.4.2 munsell_0.5.0 \n[64] scales_1.2.1 xtable_1.8-4 glue_1.6.2 \n[67] emmeans_1.8.7 tools_4.3.1 webshot_0.5.5 \n[70] forcats_1.0.0 mvtnorm_1.2-2 cowplot_1.1.1 \n[73] grid_4.3.1 tidyr_1.3.0 rbibutils_2.2.13 \n[76] colorspace_2.1-0 nlme_3.1-162 cli_3.6.1 \n[79] textshaping_0.3.6 fansi_1.0.4 geepack_1.3.9 \n[82] gtable_0.3.3 R.methodsS3_1.8.2 sass_0.4.7 \n[85] digest_0.6.33 htmlwidgets_1.6.2 farver_2.1.1 \n[88] memoise_2.0.1 htmltools_0.5.5 R.oo_1.25.0 \n[91] lifecycle_1.0.3 shinyWidgets_0.7.6 mime_0.12 \n[94] MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/graphs/other/mng01.lock'.\n\n\nDownload" + "text": "Data Setup\nPlot of Mean and CI\nPlot of Mean and CIs of Change from Baseline (Changing the Input Analysis Data Set and Analysis Variable)\nPlot of Mean (+/-SD) (Changing the Statistics)\nPlot of Mean and CI (Modify Alpha Level)\nPlot of Mean and CI (with Number of Patients only in Table Section)\nPlot of Mean and CI (with Table Section)\nPlot of Median and CI (Visits Condensed in Table Section)\nPlot of Mean and Upper Confidence Limit\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\nlibrary(nestcolor)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\nadvs <- synthetic_cdisc_dataset(\"latest\", \"advs\")\n\nadsl_f <- adsl %>%\n filter(SAFFL == \"Y\") %>%\n df_explicit_na()\n\nadlb_f <- adlb %>%\n mutate(AVISIT = forcats::fct_reorder(AVISIT, AVISITN, min)) %>%\n dplyr::filter(\n SAFFL == \"Y\",\n ANL01FL == \"Y\",\n ONTRTFL == \"Y\",\n PARAMCD == \"ALT\",\n AVISIT != \"SCREENING\"\n ) %>%\n droplevels() %>%\n df_explicit_na()\n\nadvs_f <- advs %>%\n mutate(AVISIT = forcats::fct_reorder(AVISIT, AVISITN, min)) %>%\n dplyr::filter(\n SAFFL == \"Y\",\n ONTRTFL == \"Y\",\n PARAMCD == \"DIABP\",\n AVISIT != \"SCREENING\"\n ) %>%\n droplevels() %>%\n df_explicit_na()\n\n\n\n\n\nCodeplot <- g_lineplot(\n df = adlb_f,\n alt_counts_df = adsl_f,\n subtitle = \"Laboratory Test:\"\n)\nplot\n\n\n\n\n\n\n\nCodeplot <- g_lineplot(\n df = advs_f,\n alt_counts_df = adsl_f,\n variables = control_lineplot_vars(y = \"CHG\"),\n title = \"Plot of Mean and 95% Confidence Intervals of Change from Baseline by Visit\",\n subtitle = \"Assessment:\"\n)\nplot\n\n\n\n\n\n\n\nCodeplot <- g_lineplot(\n df = adlb_f,\n alt_counts_df = adsl_f,\n interval = \"mean_sdi\",\n whiskers = c(\"mean_sdi_lwr\", \"mean_sdi_upr\"),\n title = \"Plot of Mean (+/-SD)\",\n subtitle = \"Laboratory Test:\"\n)\nplot\n\n\n\n\n\n\n\nCodeplot <- g_lineplot(\n df = adlb_f,\n alt_counts_df = adsl_f,\n control = control_summarize_vars(conf_level = 0.80),\n title = \"Plot of Mean and 80% Confidence Limits by Visit\",\n subtitle = \"Laboratory Test:\"\n)\nplot\n\n\n\n\n\n\n\nCodeplot <- g_lineplot(\n df = adlb_f,\n alt_counts_df = adsl_f,\n table = \"n\",\n subtitle = \"Laboratory Test:\"\n)\nplot\n\n\n\n\n\n\n\nCodeplot <- g_lineplot(\n df = adlb_f,\n alt_counts_df = adsl_f,\n table = c(\"n\", \"mean\", \"mean_ci\"),\n subtitle = \"Laboratory Test:\"\n)\nplot\n\n\n\n\n\n\nThis option is not supported.\n\n\n\nCodeplot <- g_lineplot(\n df = adlb_f,\n alt_counts_df = adsl_f,\n whiskers = \"mean_ci_upr\",\n subtitle = \"Laboratory Test:\"\n)\nplot\n\n\n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(teal.modules.clinical)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n mutate(AVISIT = forcats::fct_reorder(AVISIT, AVISITN, min))\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADLB\", ADLB, code = 'ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n mutate(AVISIT = forcats::fct_reorder(AVISIT, AVISITN, min))'),\n check = TRUE\n ),\n modules = modules(\n tm_g_lineplot(\n label = \"LINE PLOT\",\n dataname = \"ADLB\",\n strata = choices_selected(\n variable_choices(ADSL, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")),\n \"ARM\"\n ),\n y = choices_selected(\n variable_choices(ADLB, c(\"AVAL\", \"BASE\", \"CHG\", \"PCHG\")),\n \"AVAL\"\n ),\n param = choices_selected(\n value_choices(ADLB, \"PARAMCD\", \"PARAM\"),\n \"ALT\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 14:56:29.5742 pid:5116 token:[] teal.modules.clinical Initializing tm_g_lineplot\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] nestcolor_0.1.2.9001 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n[13] dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 systemfonts_1.0.4 callr_3.7.3 \n[10] vctrs_0.6.3 pkgconfig_2.0.3 fastmap_1.1.1 \n[13] backports_1.4.1 ellipsis_0.3.2 fontawesome_0.5.1 \n[16] labeling_0.4.2 utf8_1.2.3 promises_1.2.0.1 \n[19] rmarkdown_2.23 ps_1.7.5 ragg_1.2.5 \n[22] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[25] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[28] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[31] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[34] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[37] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[40] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[43] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[46] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[49] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[52] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[55] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[58] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[61] generics_0.1.3 ggplot2_3.4.2 munsell_0.5.0 \n[64] scales_1.2.1 xtable_1.8-4 glue_1.6.2 \n[67] emmeans_1.8.7 tools_4.3.1 webshot_0.5.5 \n[70] forcats_1.0.0 mvtnorm_1.2-2 cowplot_1.1.1 \n[73] grid_4.3.1 tidyr_1.3.0 rbibutils_2.2.13 \n[76] colorspace_2.1-0 nlme_3.1-162 cli_3.6.1 \n[79] textshaping_0.3.6 fansi_1.0.4 geepack_1.3.9 \n[82] gtable_0.3.3 R.methodsS3_1.8.2 sass_0.4.7 \n[85] digest_0.6.33 htmlwidgets_1.6.2 farver_2.1.1 \n[88] memoise_2.0.1 htmltools_0.5.5 R.oo_1.25.0 \n[91] lifecycle_1.0.3 shinyWidgets_0.7.6 mime_0.12 \n[94] MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/graphs/other/mng01.lock'.\n\n\nDownload" }, { "objectID": "graphs/other/ltg01.html", @@ -340,21 +340,21 @@ "href": "graphs/other/fstg02.html", "title": "FSTG02", "section": "", - "text": "Data Setup\nStandard Plot\nPlot Specifying Class Variables and Options for the Treatment Variable\nPlot Selecting Columns and Changing the Alpha Level)\nPlot with Fixed Symbol Size\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(forcats)\nlibrary(nestcolor)\nlibrary(scda)\n\npreprocess_adtte <- function(adtte) {\n # Save variable labels before data processing steps.\n adtte_labels <- var_labels(adtte)\n\n adtte <- adtte %>%\n df_explicit_na() %>%\n dplyr::filter(\n PARAMCD == \"OS\",\n ARM %in% c(\"B: Placebo\", \"A: Drug X\"),\n SEX %in% c(\"M\", \"F\")\n ) %>%\n dplyr::mutate(\n # Reorder levels of ARM to display reference arm before treatment arm.\n ARM = droplevels(forcats::fct_relevel(ARM, \"B: Placebo\")),\n SEX = droplevels(SEX),\n is_event = CNSR == 0,\n # Convert time to MONTH\n AVAL = day2month(AVAL),\n AVALU = \"Months\"\n ) %>%\n var_relabel(\n ARM = adtte_labels[\"ARM\"],\n SEX = adtte_labels[\"SEX\"],\n is_event = \"Event Flag\",\n AVAL = adtte_labels[\"AVAL\"],\n AVALU = adtte_labels[\"AVALU\"]\n )\n\n adtte\n}\n\nanl <- synthetic_cdisc_dataset(\"latest\", \"adtte\") %>%\n preprocess_adtte()\n\n\n\n\n\nCodeanl1 <- anl\n\ndf <- extract_survival_subgroups(\n variables = list(tte = \"AVAL\", is_event = \"is_event\", arm = \"ARM\", subgroups = c(\"SEX\", \"BMRKR2\")),\n data = anl1\n)\n\nresult <- basic_table() %>%\n tabulate_survival_subgroups(\n df = df,\n vars = c(\"n_tot\", \"n\", \"median\", \"hr\", \"ci\"),\n time_unit = anl1$AVALU[1]\n )\nresult\n\nBaseline Risk Factors B: Placebo A: Drug X \n Total n n Median (Months) n Median (Months) Hazard Ratio 95% Wald CI \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAll Patients 268 134 NA 134 NA 1.00 (0.69, 1.44)\nSex \n F 161 82 NA 79 NA 0.79 (0.49, 1.28)\n M 107 52 NA 55 9.6 1.39 (0.78, 2.47)\nCategorical Level Biomarker 2 \n LOW 95 45 NA 50 9.3 1.14 (0.64, 2.02)\n MEDIUM 93 56 NA 37 NA 0.97 (0.52, 1.82)\n HIGH 80 33 NA 47 NA 0.97 (0.45, 2.12)\n\nCode# Add plot.\np <- g_forest(\n tbl = result\n)\n\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodeanl2 <- anl %>%\n mutate(\n # Recode levels of arm.\n ARM = forcats::fct_recode(\n ARM,\n \"Placebo\" = \"B: Placebo\",\n \"Drug X\" = \"A: Drug X\"\n ),\n # Reorder levels of `SEX`.\n SEX = forcats::fct_relevel(SEX, \"M\", \"F\"),\n # Reorder levels of `STRATA1`` by frequency.\n STRATA1 = forcats::fct_infreq(STRATA1)\n )\n\ndf <- extract_survival_subgroups(\n variables = list(tte = \"AVAL\", is_event = \"is_event\", arm = \"ARM\", subgroups = c(\"SEX\", \"STRATA1\")),\n data = anl2\n)\n\nresult <- basic_table() %>%\n tabulate_survival_subgroups(\n df = df,\n vars = c(\"n_tot\", \"n\", \"median\", \"hr\", \"ci\"),\n time_unit = anl2$AVALU[1]\n )\nresult\n\nBaseline Risk Factors Placebo Drug X \n Total n n Median (Months) n Median (Months) Hazard Ratio 95% Wald CI \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAll Patients 268 134 NA 134 NA 1.00 (0.69, 1.44)\nSex \n M 107 52 NA 55 9.6 1.39 (0.78, 2.47)\n F 161 82 NA 79 NA 0.79 (0.49, 1.28)\nStratification Factor 1 \n C 94 45 NA 49 NA 0.75 (0.41, 1.38)\n B 92 45 NA 47 NA 1.34 (0.71, 2.54)\n A 82 44 NA 38 NA 1.02 (0.53, 1.97)\n\nCodep <- g_forest(\n tbl = result\n)\n\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodeanl3 <- anl\n\ndf <- extract_survival_subgroups(\n variables = list(tte = \"AVAL\", is_event = \"is_event\", arm = \"ARM\", subgroups = c(\"SEX\", \"BMRKR2\")),\n control = control_coxph(conf_level = 0.9),\n data = anl3\n)\n\nresult <- basic_table() %>%\n tabulate_survival_subgroups(\n df = df,\n vars = c(\"n_tot\", \"hr\", \"ci\")\n )\nresult\n\nBaseline Risk Factors \n Total n Hazard Ratio 90% Wald CI \n—————————————————————————————————————————————————————————————————————\nAll Patients 268 1.00 (0.74, 1.36)\nSex \n F 161 0.79 (0.53, 1.19)\n M 107 1.39 (0.86, 2.25)\nCategorical Level Biomarker 2 \n LOW 95 1.14 (0.71, 1.84)\n MEDIUM 93 0.97 (0.58, 1.64)\n HIGH 80 0.97 (0.51, 1.87)\n\nCode# Add plot.\np <- g_forest(\n tbl = result\n)\n\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodeanl4 <- anl\n\ndf <- extract_survival_subgroups(\n variables = list(tte = \"AVAL\", is_event = \"is_event\", arm = \"ARM\", subgroups = c(\"SEX\", \"BMRKR2\")),\n data = anl4\n)\n\nresult <- basic_table() %>%\n tabulate_survival_subgroups(\n df = df,\n vars = c(\"n_tot\", \"n\", \"median\", \"hr\", \"ci\"),\n time_unit = anl4$AVALU[1]\n )\nresult\n\nBaseline Risk Factors B: Placebo A: Drug X \n Total n n Median (Months) n Median (Months) Hazard Ratio 95% Wald CI \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAll Patients 268 134 NA 134 NA 1.00 (0.69, 1.44)\nSex \n F 161 82 NA 79 NA 0.79 (0.49, 1.28)\n M 107 52 NA 55 9.6 1.39 (0.78, 2.47)\nCategorical Level Biomarker 2 \n LOW 95 45 NA 50 9.3 1.14 (0.64, 2.02)\n MEDIUM 93 56 NA 37 NA 0.97 (0.52, 1.82)\n HIGH 80 33 NA 47 NA 0.97 (0.45, 2.12)\n\nCode# Add plot.\np <- g_forest(\n tbl = result,\n col_symbol_size = NULL\n)\n\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADSL <- ADSL %>%\n dplyr::filter(ARM %in% c(\"B: Placebo\", \"A: Drug X\")) %>%\n dplyr::mutate(ARM = droplevels(forcats::fct_relevel(ARM, \"B: Placebo\"))) %>%\n dplyr::mutate(ARMCD = droplevels(forcats::fct_relevel(ARMCD, \"ARM B\")))\nADSL$RACE <- droplevels(ADSL$RACE)\n\nADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\nadtte_labels <- var_labels(ADTTE)\n\nADTTE <- ADTTE %>%\n dplyr::filter(\n PARAMCD == \"OS\",\n ARM %in% c(\"B: Placebo\", \"A: Drug X\"),\n SEX %in% c(\"M\", \"F\")\n ) %>%\n dplyr::mutate(\n # Reorder levels of ARM to display reference arm before treatment arm.\n ARM = droplevels(forcats::fct_relevel(ARM, \"B: Placebo\")),\n SEX = droplevels(SEX),\n is_event = CNSR == 0,\n # Convert time to MONTH\n AVAL = day2month(AVAL),\n AVALU = \"Months\"\n ) %>%\n var_relabel(\n ARM = adtte_labels[\"ARM\"],\n SEX = adtte_labels[\"SEX\"],\n is_event = \"Event Flag\",\n AVAL = adtte_labels[\"AVAL\"],\n AVALU = adtte_labels[\"AVALU\"]\n )\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- ADSL %>%\n dplyr::filter(ARM %in% c(\"B: Placebo\", \"A: Drug X\")) %>%\n dplyr::mutate(ARM = droplevels(forcats::fct_relevel(ARM, \"B: Placebo\"))) %>%\n dplyr::mutate(ARMCD = droplevels(forcats::fct_relevel(ARMCD, \"ARM B\")))\n ADSL$RACE <- droplevels(ADSL$RACE)\n '\n ),\n cdisc_dataset(\"ADTTE\", ADTTE, code = '\n ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n adtte_labels <- var_labels(ADTTE)\n ADTTE <- ADTTE %>%\n dplyr::filter(\n PARAMCD == \"OS\",\n ARM %in% c(\"B: Placebo\", \"A: Drug X\"),\n SEX %in% c(\"M\", \"F\")\n ) %>%\n dplyr::mutate(\n # Reorder levels of ARM to display reference arm before treatment arm.\n ARM = droplevels(forcats::fct_relevel(ARM, \"B: Placebo\")),\n SEX = droplevels(SEX),\n is_event = CNSR == 0,\n # Convert time to MONTH\n AVAL = day2month(AVAL),\n AVALU = \"Months\"\n ) %>%\n var_relabel(\n ARM = adtte_labels[\"ARM\"],\n SEX = adtte_labels[\"SEX\"],\n is_event = \"Event Flag\",\n AVAL = adtte_labels[\"AVAL\"],\n AVALU = adtte_labels[\"AVALU\"]\n )\n '),\n check = TRUE\n ),\n modules = modules(\n tm_g_forest_tte(\n label = \"Forest Survival\",\n dataname = \"ADTTE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n subgroup_var = choices_selected(names(ADSL), c(\"SEX\", \"BMRKR2\")),\n paramcd = choices_selected(value_choices(ADTTE, \"PARAMCD\", \"PARAM\"), \"OS\"),\n strata_var = choices_selected(c(\"STRATA1\", \"STRATA2\"), \"STRATA2\"),\n plot_height = c(600, 200, 2000),\n plot_width = c(1500, 200, 5000)\n )\n )\n)\n\n[INFO] 2023-08-04 14:38:31.4997 pid:4691 token:[] teal.modules.clinical Initializing tm_g_forest_tte\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 nestcolor_0.1.2.9001 \n [9] forcats_1.0.0 dplyr_1.1.2 \n[11] tern_0.8.5.9006 rtables_0.6.2.9001 \n[13] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] ragg_1.2.5 generics_0.1.3 rstudioapi_0.15.0 \n[43] cachem_1.0.8 splines_4.3.1 assertthat_0.2.1 \n[46] vctrs_0.6.3 webshot_0.5.5 Matrix_1.6-0 \n[49] jsonlite_1.8.7 callr_3.7.3 systemfonts_1.0.4 \n[52] teal.widgets_0.3.0.9007 fontawesome_0.5.1 tidyr_1.3.0 \n[55] jquerylib_0.1.4 glue_1.6.2 ps_1.7.5 \n[58] codetools_0.2-19 gtable_0.3.3 later_1.3.1 \n[61] shinycssloaders_1.0.0 munsell_0.5.0 tibble_3.2.1 \n[64] styler_1.10.1 logger_0.2.2 pillar_1.9.0 \n[67] htmltools_0.5.5 R6_2.5.1 textshaping_0.3.6 \n[70] Rdpack_2.4 evaluate_0.21 lattice_0.21-8 \n[73] R.methodsS3_1.8.2 rbibutils_2.2.13 backports_1.4.1 \n[76] memoise_2.0.1 broom_1.0.5 teal.reporter_0.1.1.9020\n[79] httpuv_1.6.11 bslib_0.5.0 Rcpp_1.0.11 \n[82] teal.code_0.3.0.9009 shinyvalidate_0.1.2 coda_0.19-4 \n[85] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/graphs/other/fstg02.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Plot\nPlot Specifying Class Variables and Options for the Treatment Variable\nPlot Selecting Columns and Changing the Alpha Level)\nPlot with Fixed Symbol Size\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(forcats)\nlibrary(nestcolor)\nlibrary(scda)\n\npreprocess_adtte <- function(adtte) {\n # Save variable labels before data processing steps.\n adtte_labels <- var_labels(adtte)\n\n adtte <- adtte %>%\n df_explicit_na() %>%\n dplyr::filter(\n PARAMCD == \"OS\",\n ARM %in% c(\"B: Placebo\", \"A: Drug X\"),\n SEX %in% c(\"M\", \"F\")\n ) %>%\n dplyr::mutate(\n # Reorder levels of ARM to display reference arm before treatment arm.\n ARM = droplevels(forcats::fct_relevel(ARM, \"B: Placebo\")),\n SEX = droplevels(SEX),\n is_event = CNSR == 0,\n # Convert time to MONTH\n AVAL = day2month(AVAL),\n AVALU = \"Months\"\n ) %>%\n var_relabel(\n ARM = adtte_labels[\"ARM\"],\n SEX = adtte_labels[\"SEX\"],\n is_event = \"Event Flag\",\n AVAL = adtte_labels[\"AVAL\"],\n AVALU = adtte_labels[\"AVALU\"]\n )\n\n adtte\n}\n\nanl <- synthetic_cdisc_dataset(\"latest\", \"adtte\") %>%\n preprocess_adtte()\n\n\n\n\n\nCodeanl1 <- anl\n\ndf <- extract_survival_subgroups(\n variables = list(tte = \"AVAL\", is_event = \"is_event\", arm = \"ARM\", subgroups = c(\"SEX\", \"BMRKR2\")),\n data = anl1\n)\n\nresult <- basic_table() %>%\n tabulate_survival_subgroups(\n df = df,\n vars = c(\"n_tot\", \"n\", \"median\", \"hr\", \"ci\"),\n time_unit = anl1$AVALU[1]\n )\nresult\n\nBaseline Risk Factors B: Placebo A: Drug X \n Total n n Median (Months) n Median (Months) Hazard Ratio 95% Wald CI \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAll Patients 268 134 NA 134 NA 1.00 (0.69, 1.44)\nSex \n F 161 82 NA 79 NA 0.79 (0.49, 1.28)\n M 107 52 NA 55 9.6 1.39 (0.78, 2.47)\nCategorical Level Biomarker 2 \n LOW 95 45 NA 50 9.3 1.14 (0.64, 2.02)\n MEDIUM 93 56 NA 37 NA 0.97 (0.52, 1.82)\n HIGH 80 33 NA 47 NA 0.97 (0.45, 2.12)\n\nCode# Add plot.\np <- g_forest(\n tbl = result\n)\n\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodeanl2 <- anl %>%\n mutate(\n # Recode levels of arm.\n ARM = forcats::fct_recode(\n ARM,\n \"Placebo\" = \"B: Placebo\",\n \"Drug X\" = \"A: Drug X\"\n ),\n # Reorder levels of `SEX`.\n SEX = forcats::fct_relevel(SEX, \"M\", \"F\"),\n # Reorder levels of `STRATA1`` by frequency.\n STRATA1 = forcats::fct_infreq(STRATA1)\n )\n\ndf <- extract_survival_subgroups(\n variables = list(tte = \"AVAL\", is_event = \"is_event\", arm = \"ARM\", subgroups = c(\"SEX\", \"STRATA1\")),\n data = anl2\n)\n\nresult <- basic_table() %>%\n tabulate_survival_subgroups(\n df = df,\n vars = c(\"n_tot\", \"n\", \"median\", \"hr\", \"ci\"),\n time_unit = anl2$AVALU[1]\n )\nresult\n\nBaseline Risk Factors Placebo Drug X \n Total n n Median (Months) n Median (Months) Hazard Ratio 95% Wald CI \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAll Patients 268 134 NA 134 NA 1.00 (0.69, 1.44)\nSex \n M 107 52 NA 55 9.6 1.39 (0.78, 2.47)\n F 161 82 NA 79 NA 0.79 (0.49, 1.28)\nStratification Factor 1 \n C 94 45 NA 49 NA 0.75 (0.41, 1.38)\n B 92 45 NA 47 NA 1.34 (0.71, 2.54)\n A 82 44 NA 38 NA 1.02 (0.53, 1.97)\n\nCodep <- g_forest(\n tbl = result\n)\n\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodeanl3 <- anl\n\ndf <- extract_survival_subgroups(\n variables = list(tte = \"AVAL\", is_event = \"is_event\", arm = \"ARM\", subgroups = c(\"SEX\", \"BMRKR2\")),\n control = control_coxph(conf_level = 0.9),\n data = anl3\n)\n\nresult <- basic_table() %>%\n tabulate_survival_subgroups(\n df = df,\n vars = c(\"n_tot\", \"hr\", \"ci\")\n )\nresult\n\nBaseline Risk Factors \n Total n Hazard Ratio 90% Wald CI \n—————————————————————————————————————————————————————————————————————\nAll Patients 268 1.00 (0.74, 1.36)\nSex \n F 161 0.79 (0.53, 1.19)\n M 107 1.39 (0.86, 2.25)\nCategorical Level Biomarker 2 \n LOW 95 1.14 (0.71, 1.84)\n MEDIUM 93 0.97 (0.58, 1.64)\n HIGH 80 0.97 (0.51, 1.87)\n\nCode# Add plot.\np <- g_forest(\n tbl = result\n)\n\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodeanl4 <- anl\n\ndf <- extract_survival_subgroups(\n variables = list(tte = \"AVAL\", is_event = \"is_event\", arm = \"ARM\", subgroups = c(\"SEX\", \"BMRKR2\")),\n data = anl4\n)\n\nresult <- basic_table() %>%\n tabulate_survival_subgroups(\n df = df,\n vars = c(\"n_tot\", \"n\", \"median\", \"hr\", \"ci\"),\n time_unit = anl4$AVALU[1]\n )\nresult\n\nBaseline Risk Factors B: Placebo A: Drug X \n Total n n Median (Months) n Median (Months) Hazard Ratio 95% Wald CI \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAll Patients 268 134 NA 134 NA 1.00 (0.69, 1.44)\nSex \n F 161 82 NA 79 NA 0.79 (0.49, 1.28)\n M 107 52 NA 55 9.6 1.39 (0.78, 2.47)\nCategorical Level Biomarker 2 \n LOW 95 45 NA 50 9.3 1.14 (0.64, 2.02)\n MEDIUM 93 56 NA 37 NA 0.97 (0.52, 1.82)\n HIGH 80 33 NA 47 NA 0.97 (0.45, 2.12)\n\nCode# Add plot.\np <- g_forest(\n tbl = result,\n col_symbol_size = NULL\n)\n\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADSL <- ADSL %>%\n dplyr::filter(ARM %in% c(\"B: Placebo\", \"A: Drug X\")) %>%\n dplyr::mutate(ARM = droplevels(forcats::fct_relevel(ARM, \"B: Placebo\"))) %>%\n dplyr::mutate(ARMCD = droplevels(forcats::fct_relevel(ARMCD, \"ARM B\")))\nADSL$RACE <- droplevels(ADSL$RACE)\n\nADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\nadtte_labels <- var_labels(ADTTE)\n\nADTTE <- ADTTE %>%\n dplyr::filter(\n PARAMCD == \"OS\",\n ARM %in% c(\"B: Placebo\", \"A: Drug X\"),\n SEX %in% c(\"M\", \"F\")\n ) %>%\n dplyr::mutate(\n # Reorder levels of ARM to display reference arm before treatment arm.\n ARM = droplevels(forcats::fct_relevel(ARM, \"B: Placebo\")),\n SEX = droplevels(SEX),\n is_event = CNSR == 0,\n # Convert time to MONTH\n AVAL = day2month(AVAL),\n AVALU = \"Months\"\n ) %>%\n var_relabel(\n ARM = adtte_labels[\"ARM\"],\n SEX = adtte_labels[\"SEX\"],\n is_event = \"Event Flag\",\n AVAL = adtte_labels[\"AVAL\"],\n AVALU = adtte_labels[\"AVALU\"]\n )\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- ADSL %>%\n dplyr::filter(ARM %in% c(\"B: Placebo\", \"A: Drug X\")) %>%\n dplyr::mutate(ARM = droplevels(forcats::fct_relevel(ARM, \"B: Placebo\"))) %>%\n dplyr::mutate(ARMCD = droplevels(forcats::fct_relevel(ARMCD, \"ARM B\")))\n ADSL$RACE <- droplevels(ADSL$RACE)\n '\n ),\n cdisc_dataset(\"ADTTE\", ADTTE, code = '\n ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n adtte_labels <- var_labels(ADTTE)\n ADTTE <- ADTTE %>%\n dplyr::filter(\n PARAMCD == \"OS\",\n ARM %in% c(\"B: Placebo\", \"A: Drug X\"),\n SEX %in% c(\"M\", \"F\")\n ) %>%\n dplyr::mutate(\n # Reorder levels of ARM to display reference arm before treatment arm.\n ARM = droplevels(forcats::fct_relevel(ARM, \"B: Placebo\")),\n SEX = droplevels(SEX),\n is_event = CNSR == 0,\n # Convert time to MONTH\n AVAL = day2month(AVAL),\n AVALU = \"Months\"\n ) %>%\n var_relabel(\n ARM = adtte_labels[\"ARM\"],\n SEX = adtte_labels[\"SEX\"],\n is_event = \"Event Flag\",\n AVAL = adtte_labels[\"AVAL\"],\n AVALU = adtte_labels[\"AVALU\"]\n )\n '),\n check = TRUE\n ),\n modules = modules(\n tm_g_forest_tte(\n label = \"Forest Survival\",\n dataname = \"ADTTE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n subgroup_var = choices_selected(names(ADSL), c(\"SEX\", \"BMRKR2\")),\n paramcd = choices_selected(value_choices(ADTTE, \"PARAMCD\", \"PARAM\"), \"OS\"),\n strata_var = choices_selected(c(\"STRATA1\", \"STRATA2\"), \"STRATA2\"),\n plot_height = c(600, 200, 2000),\n plot_width = c(1500, 200, 5000)\n )\n )\n)\n\n[INFO] 2023-08-04 14:54:21.1487 pid:4696 token:[] teal.modules.clinical Initializing tm_g_forest_tte\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 nestcolor_0.1.2.9001 \n [9] forcats_1.0.0 dplyr_1.1.2 \n[11] tern_0.8.5.9006 rtables_0.6.2.9001 \n[13] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] ragg_1.2.5 generics_0.1.3 rstudioapi_0.15.0 \n[43] cachem_1.0.8 splines_4.3.1 assertthat_0.2.1 \n[46] vctrs_0.6.3 webshot_0.5.5 Matrix_1.6-0 \n[49] jsonlite_1.8.7 callr_3.7.3 systemfonts_1.0.4 \n[52] teal.widgets_0.3.0.9007 fontawesome_0.5.1 tidyr_1.3.0 \n[55] jquerylib_0.1.4 glue_1.6.2 ps_1.7.5 \n[58] codetools_0.2-19 gtable_0.3.3 later_1.3.1 \n[61] shinycssloaders_1.0.0 munsell_0.5.0 tibble_3.2.1 \n[64] styler_1.10.1 logger_0.2.2 pillar_1.9.0 \n[67] htmltools_0.5.5 R6_2.5.1 textshaping_0.3.6 \n[70] Rdpack_2.4 evaluate_0.21 lattice_0.21-8 \n[73] R.methodsS3_1.8.2 rbibutils_2.2.13 backports_1.4.1 \n[76] memoise_2.0.1 broom_1.0.5 teal.reporter_0.1.1.9020\n[79] httpuv_1.6.11 bslib_0.5.0 Rcpp_1.0.11 \n[82] teal.code_0.3.0.9009 shinyvalidate_0.1.2 coda_0.19-4 \n[85] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/graphs/other/fstg02.lock'.\n\n\nDownload" }, { "objectID": "graphs/other/kmg01.html", "href": "graphs/other/kmg01.html", "title": "KMG01", "section": "", - "text": "Data Setup\nStandard Plot\nPlot of Failures\nPlot Without Comparative Statistics\nPlot Without Censoring Marks\nPlot Modifying Censoring Marks\nPlot Modifying Options for Statistics, Tie Handling, Stratification, etc.\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(nestcolor)\n\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\nanl <- adtte %>%\n dplyr::filter(PARAMCD == \"OS\") %>%\n dplyr::mutate(is_event = CNSR == 0)\nvariables <- list(tte = \"AVAL\", is_event = \"is_event\", arm = \"ARMCD\")\n\n\n\n\n\nCodeplot <- g_km(\n df = anl,\n variables = variables,\n xlab = \"Time (Days)\",\n ylim = c(0, 1),\n annot_coxph = TRUE\n)\n\n\n\nCodeplot\n\ngTree[GRID.gTree.162] \n\n\n\n\n\nCodeplot <- g_km(\n df = anl,\n variables = variables,\n xlab = \"Time (Days)\",\n yval = \"Failure\",\n ylim = c(0, 1),\n annot_surv_med = TRUE,\n annot_coxph = TRUE,\n font_size = 7.5,\n position_coxph = c(0.3, 0),\n position_surv_med = c(0.9, 0.3)\n)\n\n\n\nCodeplot\n\ngTree[GRID.gTree.312] \n\n\n\n\n\nCodeplot <- g_km(\n df = anl,\n variables = variables,\n xlab = \"Time (Days)\",\n ylim = c(0, 1),\n annot_surv_med = TRUE\n)\n\n\n\nCodeplot\n\ngTree[GRID.gTree.436] \n\n\n\n\n\nCodeplot <- g_km(\n df = anl,\n variables = variables,\n censor_show = FALSE,\n xlab = \"Time (Days)\",\n ylim = c(0, 1),\n annot_coxph = TRUE\n)\n\n\n\nCodeplot\n\ngTree[GRID.gTree.572] \n\n\n\n\n\nCodeplot <- g_km(\n df = anl,\n variables = variables,\n pch = 1,\n size = 2,\n xlab = \"Time (Days)\",\n ylim = c(0, 1),\n annot_coxph = TRUE\n)\n\n\n\nCodeplot\n\ngTree[GRID.gTree.722] \n\n\n\n\n\nCodevariables$strat <- c(\"STRATA1\", \"STRATA2\")\nplot <- g_km(\n df = anl,\n variables = variables,\n control_surv = control_surv_timepoint(conf_level = 0.8),\n xlab = \"Time (Days)\",\n ylim = c(0, 1),\n annot_coxph = TRUE,\n control_coxph_pw = control_coxph(\n pval_method = \"wald\",\n ties = \"breslow\",\n conf_level = 0.8\n )\n)\n\n\n\nCodeplot\n\ngTree[GRID.gTree.872] \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADTTE\", ADTTE, code = 'ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")'),\n check = TRUE\n ),\n modules = modules(\n tm_g_km(\n label = \"KM PLOT\",\n plot_height = c(600, 100, 2000),\n dataname = \"ADTTE\",\n arm_var = choices_selected(\n variable_choices(ADSL, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")),\n \"ARM\"\n ),\n paramcd = choices_selected(\n value_choices(ADTTE, \"PARAMCD\", \"PARAM\"),\n \"OS\"\n ),\n arm_ref_comp = arm_ref_comp,\n strata_var = choices_selected(\n variable_choices(ADSL, c(\"SEX\", \"BMRKR2\")),\n \"SEX\"\n ),\n facet_var = choices_selected(\n variable_choices(ADSL, c(\"SEX\", \"BMRKR2\")),\n NULL\n )\n )\n )\n)\n\n[INFO] 2023-08-04 14:36:52.1543 pid:4161 token:[] teal.modules.clinical Initializing tm_g_km\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] nestcolor_0.1.2.9001 dplyr_1.1.2 \n [9] scda_0.1.6.9010 tern_0.8.5.9006 \n[11] rtables_0.6.2.9001 magrittr_2.0.3 \n[13] formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 gridExtra_2.3 tern.gee_0.1.0.9006 \n [4] logger_0.2.2 testthat_3.1.10 rlang_1.1.1 \n [7] teal.code_0.3.0.9009 compiler_4.3.1 systemfonts_1.0.4 \n[10] callr_3.7.3 vctrs_0.6.3 pkgconfig_2.0.3 \n[13] fastmap_1.1.1 backports_1.4.1 ellipsis_0.3.2 \n[16] fontawesome_0.5.1 labeling_0.4.2 utf8_1.2.3 \n[19] promises_1.2.0.1 rmarkdown_2.23 ps_1.7.5 \n[22] ragg_1.2.5 purrr_1.0.1 xfun_0.39 \n[25] shinyvalidate_0.1.2 cachem_1.0.8 teal.reporter_0.1.1.9020\n[28] jsonlite_1.8.7 later_1.3.1 styler_1.10.1 \n[31] broom_1.0.5 R6_2.5.1 bslib_0.5.0 \n[34] brio_1.1.3 jquerylib_0.1.4 estimability_1.4.1 \n[37] Rcpp_1.0.11 assertthat_0.2.1 knitr_1.43 \n[40] teal.logger_0.1.1.9009 R.utils_2.12.2 httpuv_1.6.11 \n[43] Matrix_1.6-0 splines_4.3.1 R.cache_0.16.0 \n[46] tidyselect_1.2.0 rstudioapi_0.15.0 yaml_2.3.7 \n[49] codetools_0.2-19 processx_3.8.2 teal.widgets_0.3.0.9007 \n[52] lattice_0.21-8 tibble_3.2.1 withr_2.5.0 \n[55] coda_0.19-4 evaluate_0.21 survival_3.5-5 \n[58] pillar_1.9.0 shinycssloaders_1.0.0 checkmate_2.2.0 \n[61] shinyjs_2.1.0 generics_0.1.3 ggplot2_3.4.2 \n[64] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[67] glue_1.6.2 emmeans_1.8.7 tools_4.3.1 \n[70] webshot_0.5.5 mvtnorm_1.2-2 grid_4.3.1 \n[73] tidyr_1.3.0 rbibutils_2.2.13 colorspace_2.1-0 \n[76] nlme_3.1-162 cli_3.6.1 textshaping_0.3.6 \n[79] fansi_1.0.4 geepack_1.3.9 gtable_0.3.3 \n[82] R.methodsS3_1.8.2 sass_0.4.7 digest_0.6.33 \n[85] htmlwidgets_1.6.2 farver_2.1.1 memoise_2.0.1 \n[88] htmltools_0.5.5 R.oo_1.25.0 lifecycle_1.0.3 \n[91] shinyWidgets_0.7.6 mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/graphs/other/kmg01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Plot\nPlot of Failures\nPlot Without Comparative Statistics\nPlot Without Censoring Marks\nPlot Modifying Censoring Marks\nPlot Modifying Options for Statistics, Tie Handling, Stratification, etc.\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(nestcolor)\n\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\nanl <- adtte %>%\n dplyr::filter(PARAMCD == \"OS\") %>%\n dplyr::mutate(is_event = CNSR == 0)\nvariables <- list(tte = \"AVAL\", is_event = \"is_event\", arm = \"ARMCD\")\n\n\n\n\n\nCodeplot <- g_km(\n df = anl,\n variables = variables,\n xlab = \"Time (Days)\",\n ylim = c(0, 1),\n annot_coxph = TRUE\n)\n\n\n\nCodeplot\n\ngTree[GRID.gTree.162] \n\n\n\n\n\nCodeplot <- g_km(\n df = anl,\n variables = variables,\n xlab = \"Time (Days)\",\n yval = \"Failure\",\n ylim = c(0, 1),\n annot_surv_med = TRUE,\n annot_coxph = TRUE,\n font_size = 7.5,\n position_coxph = c(0.3, 0),\n position_surv_med = c(0.9, 0.3)\n)\n\n\n\nCodeplot\n\ngTree[GRID.gTree.312] \n\n\n\n\n\nCodeplot <- g_km(\n df = anl,\n variables = variables,\n xlab = \"Time (Days)\",\n ylim = c(0, 1),\n annot_surv_med = TRUE\n)\n\n\n\nCodeplot\n\ngTree[GRID.gTree.436] \n\n\n\n\n\nCodeplot <- g_km(\n df = anl,\n variables = variables,\n censor_show = FALSE,\n xlab = \"Time (Days)\",\n ylim = c(0, 1),\n annot_coxph = TRUE\n)\n\n\n\nCodeplot\n\ngTree[GRID.gTree.572] \n\n\n\n\n\nCodeplot <- g_km(\n df = anl,\n variables = variables,\n pch = 1,\n size = 2,\n xlab = \"Time (Days)\",\n ylim = c(0, 1),\n annot_coxph = TRUE\n)\n\n\n\nCodeplot\n\ngTree[GRID.gTree.722] \n\n\n\n\n\nCodevariables$strat <- c(\"STRATA1\", \"STRATA2\")\nplot <- g_km(\n df = anl,\n variables = variables,\n control_surv = control_surv_timepoint(conf_level = 0.8),\n xlab = \"Time (Days)\",\n ylim = c(0, 1),\n annot_coxph = TRUE,\n control_coxph_pw = control_coxph(\n pval_method = \"wald\",\n ties = \"breslow\",\n conf_level = 0.8\n )\n)\n\n\n\nCodeplot\n\ngTree[GRID.gTree.872] \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADTTE\", ADTTE, code = 'ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")'),\n check = TRUE\n ),\n modules = modules(\n tm_g_km(\n label = \"KM PLOT\",\n plot_height = c(600, 100, 2000),\n dataname = \"ADTTE\",\n arm_var = choices_selected(\n variable_choices(ADSL, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")),\n \"ARM\"\n ),\n paramcd = choices_selected(\n value_choices(ADTTE, \"PARAMCD\", \"PARAM\"),\n \"OS\"\n ),\n arm_ref_comp = arm_ref_comp,\n strata_var = choices_selected(\n variable_choices(ADSL, c(\"SEX\", \"BMRKR2\")),\n \"SEX\"\n ),\n facet_var = choices_selected(\n variable_choices(ADSL, c(\"SEX\", \"BMRKR2\")),\n NULL\n )\n )\n )\n)\n\n[INFO] 2023-08-04 14:52:35.1202 pid:4166 token:[] teal.modules.clinical Initializing tm_g_km\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] nestcolor_0.1.2.9001 dplyr_1.1.2 \n [9] scda_0.1.6.9010 tern_0.8.5.9006 \n[11] rtables_0.6.2.9001 magrittr_2.0.3 \n[13] formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 gridExtra_2.3 tern.gee_0.1.0.9006 \n [4] logger_0.2.2 testthat_3.1.10 rlang_1.1.1 \n [7] teal.code_0.3.0.9009 compiler_4.3.1 systemfonts_1.0.4 \n[10] callr_3.7.3 vctrs_0.6.3 pkgconfig_2.0.3 \n[13] fastmap_1.1.1 backports_1.4.1 ellipsis_0.3.2 \n[16] fontawesome_0.5.1 labeling_0.4.2 utf8_1.2.3 \n[19] promises_1.2.0.1 rmarkdown_2.23 ps_1.7.5 \n[22] ragg_1.2.5 purrr_1.0.1 xfun_0.39 \n[25] shinyvalidate_0.1.2 cachem_1.0.8 teal.reporter_0.1.1.9020\n[28] jsonlite_1.8.7 later_1.3.1 styler_1.10.1 \n[31] broom_1.0.5 R6_2.5.1 bslib_0.5.0 \n[34] brio_1.1.3 jquerylib_0.1.4 estimability_1.4.1 \n[37] Rcpp_1.0.11 assertthat_0.2.1 knitr_1.43 \n[40] teal.logger_0.1.1.9009 R.utils_2.12.2 httpuv_1.6.11 \n[43] Matrix_1.6-0 splines_4.3.1 R.cache_0.16.0 \n[46] tidyselect_1.2.0 rstudioapi_0.15.0 yaml_2.3.7 \n[49] codetools_0.2-19 processx_3.8.2 teal.widgets_0.3.0.9007 \n[52] lattice_0.21-8 tibble_3.2.1 withr_2.5.0 \n[55] coda_0.19-4 evaluate_0.21 survival_3.5-5 \n[58] pillar_1.9.0 shinycssloaders_1.0.0 checkmate_2.2.0 \n[61] shinyjs_2.1.0 generics_0.1.3 ggplot2_3.4.2 \n[64] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[67] glue_1.6.2 emmeans_1.8.7 tools_4.3.1 \n[70] webshot_0.5.5 mvtnorm_1.2-2 grid_4.3.1 \n[73] tidyr_1.3.0 rbibutils_2.2.13 colorspace_2.1-0 \n[76] nlme_3.1-162 cli_3.6.1 textshaping_0.3.6 \n[79] fansi_1.0.4 geepack_1.3.9 gtable_0.3.3 \n[82] R.methodsS3_1.8.2 sass_0.4.7 digest_0.6.33 \n[85] htmlwidgets_1.6.2 farver_2.1.1 memoise_2.0.1 \n[88] htmltools_0.5.5 R.oo_1.25.0 lifecycle_1.0.3 \n[91] shinyWidgets_0.7.6 mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/graphs/other/kmg01.lock'.\n\n\nDownload" }, { "objectID": "graphs/other/cig01.html", "href": "graphs/other/cig01.html", "title": "CIG01", "section": "", - "text": "Data Setup\nPlot of Mean and 95% CIs for Mean\nPlot of Confidence Interval Using a Different Stratification Variable\nPlot of Median and 95% CIs for Median\nPlot of Median and 95% CIs for Median Using Different Alpha Level\nTable of Mean and Median\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(ggplot2)\nlibrary(dplyr)\nlibrary(scda)\nlibrary(nestcolor)\n\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n filter(PARAMCD == \"ALT\", AVISIT == \"BASELINE\")\n\n\n\n\nThe function stat_mean_ci from the tern package can be used with default values to draw the 95% confidence interval around the mean.\n\nCodeplot <- ggplot(\n data = adlb,\n mapping = aes(\n x = ARMCD, y = AVAL, color = SEX,\n lty = SEX, shape = SEX\n )\n) +\n stat_summary(\n fun.data = tern::stat_mean_ci,\n geom = \"errorbar\",\n width = 0.1,\n position = position_dodge(width = 0.5)\n ) +\n stat_summary(\n fun = mean,\n geom = \"point\",\n position = position_dodge(width = 0.5)\n ) +\n labs(\n title = \"Confidence Interval Plot by Treatment Group\",\n caption = \"Mean and 95% CIs for mean are displayed.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n )\nplot\n\n\n\n\n\n\n\nCodeplot <- ggplot(\n data = adlb,\n mapping = aes(\n x = ARMCD, y = AVAL, color = STRATA2,\n lty = STRATA2, shape = STRATA2\n )\n) +\n stat_summary(\n fun.data = tern::stat_mean_ci,\n geom = \"errorbar\",\n width = 0.1,\n position = position_dodge(width = 0.5)\n ) +\n stat_summary(\n fun = mean,\n geom = \"point\",\n position = position_dodge(width = 0.5)\n ) +\n labs(\n title = \"Confidence Interval Plot by Treatment Group\",\n caption = \"Mean and 95% CIs for mean are displayed.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n )\nplot\n\n\n\n\n\n\nThe function stat_median_ci from the tern package works similarly to stat_mean_ci.\n\nCodeplot <- ggplot(\n data = adlb,\n mapping = aes(\n x = ARMCD, y = AVAL, color = STRATA1,\n lty = STRATA1, shape = STRATA1\n )\n) +\n stat_summary(\n fun.data = stat_median_ci,\n geom = \"errorbar\",\n width = 0.1,\n position = position_dodge(width = 0.5)\n ) +\n stat_summary(\n fun = median,\n geom = \"point\",\n position = position_dodge(width = 0.5)\n ) +\n labs(\n title = \"Confidence Interval Plot by Treatment Group\",\n caption = \"Median and 95% CIs for median are displayed.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n )\n\n\n\n\nTo modify the confidence level for the estimation of the confidence interval, the call to stat_mean_ci (or stat_median_ci) can be slightly modified.\n\nCodeplot <- ggplot(\n data = adlb,\n mapping = aes(\n x = ARMCD, y = AVAL, color = SEX,\n lty = SEX, shape = SEX\n )\n) +\n stat_summary(\n fun.data = function(x) tern::stat_mean_ci(x, conf_level = 0.9),\n geom = \"errorbar\",\n width = 0.1,\n position = position_dodge(width = 0.5)\n ) +\n stat_summary(\n fun = mean,\n geom = \"point\",\n position = position_dodge(width = 0.5)\n ) +\n labs(\n title = \"Confidence Interval Plot by Treatment Group\",\n caption = \"Mean and 90% CIs for mean are displayed.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n )\n\n\n\n\nThe corresponding table is simply obtained using the rtables framework:\n\nCodelyt <- basic_table() %>%\n split_cols_by(var = \"ARMCD\") %>%\n summarize_vars(vars = \"AVAL\", .stats = c(\"mean_sd\", \"median\"))\ntable <- build_table(lyt = lyt, df = adlb)\ntable\n\n ARM A ARM B ARM C \n————————————————————————————————————————————————\nMean (SD) 17.7 (9.9) 18.7 (9.8) 19.5 (9.1)\nMedian 17.5 18.2 19.0 \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL),\n cdisc_dataset(\"ADLB\", ADLB),\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")'\n ),\n modules = modules(\n tm_g_ci(\n label = \"Confidence Interval Plot\",\n x_var = data_extract_spec(\n dataname = \"ADSL\",\n select = select_spec(\n choices = c(\"ARMCD\", \"BMRKR2\"),\n selected = c(\"ARMCD\"),\n multiple = FALSE,\n fixed = FALSE\n )\n ),\n y_var = data_extract_spec(\n dataname = \"ADLB\",\n filter = list(\n filter_spec(\n vars = \"PARAMCD\",\n choices = levels(ADLB$PARAMCD),\n selected = levels(ADLB$PARAMCD)[1],\n multiple = FALSE,\n label = \"Select lab:\"\n ),\n filter_spec(\n vars = \"AVISIT\",\n choices = levels(ADLB$AVISIT),\n selected = levels(ADLB$AVISIT)[1],\n multiple = FALSE,\n label = \"Select visit:\"\n )\n ),\n select = select_spec(\n label = \"Analyzed Value\",\n choices = c(\"AVAL\", \"CHG\"),\n selected = \"AVAL\",\n multiple = FALSE,\n fixed = FALSE\n )\n ),\n color = data_extract_spec(\n dataname = \"ADSL\",\n select = select_spec(\n label = \"Color by variable\",\n choices = c(\"SEX\", \"STRATA1\", \"STRATA2\"),\n selected = c(\"STRATA1\"),\n multiple = FALSE,\n fixed = FALSE\n )\n )\n )\n ),\n header = \"Example of Confidence Interval Plot\",\n footer = tags$p(\n class = \"text-muted\", \"Source: `teal.modules.clinical::tm_g_ci`\"\n )\n)\n\n[INFO] 2023-08-04 14:35:48.6119 pid:3915 token:[] teal.modules.clinical Initializing tm_g_ci\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] nestcolor_0.1.2.9001 scda_0.1.6.9010 \n [9] dplyr_1.1.2 ggplot2_3.4.2 \n[11] tern_0.8.5.9006 rtables_0.6.2.9001 \n[13] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 farver_2.1.1 R.utils_2.12.2 \n [4] fastmap_1.1.1 promises_1.2.0.1 shinyjs_2.1.0 \n [7] digest_0.6.33 estimability_1.4.1 mime_0.12 \n[10] tern.gee_0.1.0.9006 lifecycle_1.0.3 ellipsis_0.3.2 \n[13] processx_3.8.2 survival_3.5-5 compiler_4.3.1 \n[16] rlang_1.1.1 sass_0.4.7 tools_4.3.1 \n[19] utf8_1.2.3 yaml_2.3.7 knitr_1.43 \n[22] labeling_0.4.2 htmlwidgets_1.6.2 R.cache_0.16.0 \n[25] withr_2.5.0 purrr_1.0.1 R.oo_1.25.0 \n[28] shinyWidgets_0.7.6 geepack_1.3.9 grid_4.3.1 \n[31] fansi_1.0.4 teal.logger_0.1.1.9009 xtable_1.8-4 \n[34] colorspace_2.1-0 emmeans_1.8.7 scales_1.2.1 \n[37] MASS_7.3-60 cli_3.6.1 mvtnorm_1.2-2 \n[40] rmarkdown_2.23 ragg_1.2.5 generics_0.1.3 \n[43] rstudioapi_0.15.0 cachem_1.0.8 splines_4.3.1 \n[46] assertthat_0.2.1 vctrs_0.6.3 webshot_0.5.5 \n[49] Matrix_1.6-0 jsonlite_1.8.7 callr_3.7.3 \n[52] systemfonts_1.0.4 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[55] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[58] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[61] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[64] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[67] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[70] brio_1.1.3 R6_2.5.1 textshaping_0.3.6 \n[73] Rdpack_2.4 evaluate_0.21 lattice_0.21-8 \n[76] R.methodsS3_1.8.2 rbibutils_2.2.13 backports_1.4.1 \n[79] memoise_2.0.1 broom_1.0.5 teal.reporter_0.1.1.9020\n[82] httpuv_1.6.11 bslib_0.5.0 Rcpp_1.0.11 \n[85] teal.code_0.3.0.9009 shinyvalidate_0.1.2 coda_0.19-4 \n[88] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[91] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/graphs/other/cig01.lock'.\n\n\nDownload" + "text": "Data Setup\nPlot of Mean and 95% CIs for Mean\nPlot of Confidence Interval Using a Different Stratification Variable\nPlot of Median and 95% CIs for Median\nPlot of Median and 95% CIs for Median Using Different Alpha Level\nTable of Mean and Median\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(ggplot2)\nlibrary(dplyr)\nlibrary(scda)\nlibrary(nestcolor)\n\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n filter(PARAMCD == \"ALT\", AVISIT == \"BASELINE\")\n\n\n\n\nThe function stat_mean_ci from the tern package can be used with default values to draw the 95% confidence interval around the mean.\n\nCodeplot <- ggplot(\n data = adlb,\n mapping = aes(\n x = ARMCD, y = AVAL, color = SEX,\n lty = SEX, shape = SEX\n )\n) +\n stat_summary(\n fun.data = tern::stat_mean_ci,\n geom = \"errorbar\",\n width = 0.1,\n position = position_dodge(width = 0.5)\n ) +\n stat_summary(\n fun = mean,\n geom = \"point\",\n position = position_dodge(width = 0.5)\n ) +\n labs(\n title = \"Confidence Interval Plot by Treatment Group\",\n caption = \"Mean and 95% CIs for mean are displayed.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n )\nplot\n\n\n\n\n\n\n\nCodeplot <- ggplot(\n data = adlb,\n mapping = aes(\n x = ARMCD, y = AVAL, color = STRATA2,\n lty = STRATA2, shape = STRATA2\n )\n) +\n stat_summary(\n fun.data = tern::stat_mean_ci,\n geom = \"errorbar\",\n width = 0.1,\n position = position_dodge(width = 0.5)\n ) +\n stat_summary(\n fun = mean,\n geom = \"point\",\n position = position_dodge(width = 0.5)\n ) +\n labs(\n title = \"Confidence Interval Plot by Treatment Group\",\n caption = \"Mean and 95% CIs for mean are displayed.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n )\nplot\n\n\n\n\n\n\nThe function stat_median_ci from the tern package works similarly to stat_mean_ci.\n\nCodeplot <- ggplot(\n data = adlb,\n mapping = aes(\n x = ARMCD, y = AVAL, color = STRATA1,\n lty = STRATA1, shape = STRATA1\n )\n) +\n stat_summary(\n fun.data = stat_median_ci,\n geom = \"errorbar\",\n width = 0.1,\n position = position_dodge(width = 0.5)\n ) +\n stat_summary(\n fun = median,\n geom = \"point\",\n position = position_dodge(width = 0.5)\n ) +\n labs(\n title = \"Confidence Interval Plot by Treatment Group\",\n caption = \"Median and 95% CIs for median are displayed.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n )\n\n\n\n\nTo modify the confidence level for the estimation of the confidence interval, the call to stat_mean_ci (or stat_median_ci) can be slightly modified.\n\nCodeplot <- ggplot(\n data = adlb,\n mapping = aes(\n x = ARMCD, y = AVAL, color = SEX,\n lty = SEX, shape = SEX\n )\n) +\n stat_summary(\n fun.data = function(x) tern::stat_mean_ci(x, conf_level = 0.9),\n geom = \"errorbar\",\n width = 0.1,\n position = position_dodge(width = 0.5)\n ) +\n stat_summary(\n fun = mean,\n geom = \"point\",\n position = position_dodge(width = 0.5)\n ) +\n labs(\n title = \"Confidence Interval Plot by Treatment Group\",\n caption = \"Mean and 90% CIs for mean are displayed.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n )\n\n\n\n\nThe corresponding table is simply obtained using the rtables framework:\n\nCodelyt <- basic_table() %>%\n split_cols_by(var = \"ARMCD\") %>%\n summarize_vars(vars = \"AVAL\", .stats = c(\"mean_sd\", \"median\"))\ntable <- build_table(lyt = lyt, df = adlb)\ntable\n\n ARM A ARM B ARM C \n————————————————————————————————————————————————\nMean (SD) 17.7 (9.9) 18.7 (9.8) 19.5 (9.1)\nMedian 17.5 18.2 19.0 \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL),\n cdisc_dataset(\"ADLB\", ADLB),\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")'\n ),\n modules = modules(\n tm_g_ci(\n label = \"Confidence Interval Plot\",\n x_var = data_extract_spec(\n dataname = \"ADSL\",\n select = select_spec(\n choices = c(\"ARMCD\", \"BMRKR2\"),\n selected = c(\"ARMCD\"),\n multiple = FALSE,\n fixed = FALSE\n )\n ),\n y_var = data_extract_spec(\n dataname = \"ADLB\",\n filter = list(\n filter_spec(\n vars = \"PARAMCD\",\n choices = levels(ADLB$PARAMCD),\n selected = levels(ADLB$PARAMCD)[1],\n multiple = FALSE,\n label = \"Select lab:\"\n ),\n filter_spec(\n vars = \"AVISIT\",\n choices = levels(ADLB$AVISIT),\n selected = levels(ADLB$AVISIT)[1],\n multiple = FALSE,\n label = \"Select visit:\"\n )\n ),\n select = select_spec(\n label = \"Analyzed Value\",\n choices = c(\"AVAL\", \"CHG\"),\n selected = \"AVAL\",\n multiple = FALSE,\n fixed = FALSE\n )\n ),\n color = data_extract_spec(\n dataname = \"ADSL\",\n select = select_spec(\n label = \"Color by variable\",\n choices = c(\"SEX\", \"STRATA1\", \"STRATA2\"),\n selected = c(\"STRATA1\"),\n multiple = FALSE,\n fixed = FALSE\n )\n )\n )\n ),\n header = \"Example of Confidence Interval Plot\",\n footer = tags$p(\n class = \"text-muted\", \"Source: `teal.modules.clinical::tm_g_ci`\"\n )\n)\n\n[INFO] 2023-08-04 14:51:25.7112 pid:3920 token:[] teal.modules.clinical Initializing tm_g_ci\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] nestcolor_0.1.2.9001 scda_0.1.6.9010 \n [9] dplyr_1.1.2 ggplot2_3.4.2 \n[11] tern_0.8.5.9006 rtables_0.6.2.9001 \n[13] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 farver_2.1.1 R.utils_2.12.2 \n [4] fastmap_1.1.1 promises_1.2.0.1 shinyjs_2.1.0 \n [7] digest_0.6.33 estimability_1.4.1 mime_0.12 \n[10] tern.gee_0.1.0.9006 lifecycle_1.0.3 ellipsis_0.3.2 \n[13] processx_3.8.2 survival_3.5-5 compiler_4.3.1 \n[16] rlang_1.1.1 sass_0.4.7 tools_4.3.1 \n[19] utf8_1.2.3 yaml_2.3.7 knitr_1.43 \n[22] labeling_0.4.2 htmlwidgets_1.6.2 R.cache_0.16.0 \n[25] withr_2.5.0 purrr_1.0.1 R.oo_1.25.0 \n[28] shinyWidgets_0.7.6 geepack_1.3.9 grid_4.3.1 \n[31] fansi_1.0.4 teal.logger_0.1.1.9009 xtable_1.8-4 \n[34] colorspace_2.1-0 emmeans_1.8.7 scales_1.2.1 \n[37] MASS_7.3-60 cli_3.6.1 mvtnorm_1.2-2 \n[40] rmarkdown_2.23 ragg_1.2.5 generics_0.1.3 \n[43] rstudioapi_0.15.0 cachem_1.0.8 splines_4.3.1 \n[46] assertthat_0.2.1 vctrs_0.6.3 webshot_0.5.5 \n[49] Matrix_1.6-0 jsonlite_1.8.7 callr_3.7.3 \n[52] systemfonts_1.0.4 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[55] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[58] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[61] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[64] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[67] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[70] brio_1.1.3 R6_2.5.1 textshaping_0.3.6 \n[73] Rdpack_2.4 evaluate_0.21 lattice_0.21-8 \n[76] R.methodsS3_1.8.2 rbibutils_2.2.13 backports_1.4.1 \n[79] memoise_2.0.1 broom_1.0.5 teal.reporter_0.1.1.9020\n[82] httpuv_1.6.11 bslib_0.5.0 Rcpp_1.0.11 \n[85] teal.code_0.3.0.9009 shinyvalidate_0.1.2 coda_0.19-4 \n[88] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[91] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/graphs/other/cig01.lock'.\n\n\nDownload" }, { "objectID": "graphs/pharmacokinetic/pkcg01.html", @@ -613,7 +613,7 @@ "href": "appendix/session.html#renv.lock-file", "title": "Session Info", "section": "\nrenv.lock file", - "text": "renv.lock file\n\nCoderenv::snapshot(\"..\", lockfile = \"../assets/www/renv.lock\", prompt = FALSE, force = TRUE)\n\n\nNOTE: Dependency discovery took 13 seconds during snapshot.\nConsider using .renvignore to ignore files, or switching to explicit snapshots.\nSee `?renv::dependencies` for more information.\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- binom [* -> 1.1-1.1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- cellranger [* -> 1.1.0]\n- checkmate [* -> 2.2.0]\n- class [* -> 7.3-22]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- corrplot [* -> 0.92]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- DescTools [* -> 0.99.49]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- e1071 [* -> 1.7-13]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- Exact [* -> 3.2]\n- expm [* -> 0.999-7]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggmosaic [* -> 0.3.3]\n- ggplot2 [* -> 3.4.2]\n- ggpubr [* -> 0.6.0]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggsci [* -> 3.0.0]\n- ggsignif [* -> 0.6.4]\n- ggstance [* -> 0.3.6]\n- gld [* -> 2.6.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- inline [* -> 0.3.19]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- lmom [* -> 2.9]\n- logger [* -> 0.2.2]\n- loo [* -> 2.6.0]\n- lubridate [* -> 1.9.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- matrixStats [* -> 1.0.0]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgbuild [* -> 1.4.2]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- polynom [* -> 1.4-1]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- productplots [* -> 0.1.1]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- proxy [* -> 0.4-27]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- rbmi [* -> 1.2.3]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- RcppParallel [* -> 5.1.7]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- readxl [* -> 1.4.3]\n- rematch [* -> 1.0.1]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rootSolve [* -> 1.8.2.3]\n- rprojroot [* -> 2.0.3]\n- rstan [* -> 2.21.8]\n- rstantools [* -> 2.3.1.1]\n- rstatix [* -> 0.7.2]\n- rstudioapi [* -> 0.15.0]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyTree [* -> 0.2.7]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- StanHeaders [* -> 2.26.27]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- timechange [* -> 0.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rlistings [* -> 0.2.3.9000]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.modules.general [* -> 0.2.15.9034]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n- tern.rbmi [* -> 0.1.2.9007]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../assets/www/renv.lock'.\n\n\nDownload" + "text": "renv.lock file\n\nCoderenv::snapshot(\"..\", lockfile = \"../assets/www/renv.lock\", prompt = FALSE, force = TRUE)\n\n\nNOTE: Dependency discovery took 15 seconds during snapshot.\nConsider using .renvignore to ignore files, or switching to explicit snapshots.\nSee `?renv::dependencies` for more information.\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- binom [* -> 1.1-1.1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- cellranger [* -> 1.1.0]\n- checkmate [* -> 2.2.0]\n- class [* -> 7.3-22]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- corrplot [* -> 0.92]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- DescTools [* -> 0.99.49]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- e1071 [* -> 1.7-13]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- Exact [* -> 3.2]\n- expm [* -> 0.999-7]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggmosaic [* -> 0.3.3]\n- ggplot2 [* -> 3.4.2]\n- ggpubr [* -> 0.6.0]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggsci [* -> 3.0.0]\n- ggsignif [* -> 0.6.4]\n- ggstance [* -> 0.3.6]\n- gld [* -> 2.6.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- inline [* -> 0.3.19]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- lmom [* -> 2.9]\n- logger [* -> 0.2.2]\n- loo [* -> 2.6.0]\n- lubridate [* -> 1.9.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- matrixStats [* -> 1.0.0]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgbuild [* -> 1.4.2]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- polynom [* -> 1.4-1]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- productplots [* -> 0.1.1]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- proxy [* -> 0.4-27]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- rbmi [* -> 1.2.3]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- RcppParallel [* -> 5.1.7]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- readxl [* -> 1.4.3]\n- rematch [* -> 1.0.1]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rootSolve [* -> 1.8.2.3]\n- rprojroot [* -> 2.0.3]\n- rstan [* -> 2.21.8]\n- rstantools [* -> 2.3.1.1]\n- rstatix [* -> 0.7.2]\n- rstudioapi [* -> 0.15.0]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyTree [* -> 0.2.7]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- StanHeaders [* -> 2.26.27]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- timechange [* -> 0.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rlistings [* -> 0.2.3.9000]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.modules.general [* -> 0.2.15.9034]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n- tern.rbmi [* -> 0.1.2.9007]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../assets/www/renv.lock'.\n\n\nDownload" }, { "objectID": "graphs/pharmacokinetic/pkpg04.html", @@ -648,14 +648,14 @@ "href": "graphs/other/bwg01.html", "title": "BWG01", "section": "", - "text": "Data Setup\nStandard Plot\nPlot Changing Whiskers\nPlot Adding Outliers\nPlot Specifying Marker for Outliers and Adding Patient ID\nPlot Specifying Marker for Mean\nPlot by Treatment and Timepoint\nPlot by Timepoint and Treatment\nPlot with Table Section\nPlot with Number of Patients only in Table Section\nTeal\nSession Info\n\n\n\n\nCode# generic code for all plots\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(nestcolor)\n\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\nadlb <- adlb %>% filter(PARAMCD == \"ALT\" & AVISIT == \"WEEK 2 DAY 15\")\n\n# Definition of boxplot boundaries and whiskers\nfive_num <- function(x, probs = c(0, 0.25, 0.5, 0.75, 1)) {\n r <- quantile(x, probs)\n names(r) <- c(\"ymin\", \"lower\", \"middle\", \"upper\", \"ymax\")\n r\n}\n\n# get outliers based on quantile\n# for outliers based on IQR see coef in geom_boxplot\nget_outliers <- function(x, probs = c(0.05, 0.95)) {\n r <- subset(x, x < quantile(x, probs[1]) | quantile(x, probs[2]) < x)\n if (!is.null(x)) {\n x_names <- subset(names(x), x < quantile(x, probs[1]) | quantile(x, probs[2]) < x)\n names(r) <- x_names\n }\n r\n}\n\n# create theme used for all plots\ntheme_bp <- theme(\n plot.title = element_text(hjust = 0),\n plot.subtitle = element_text(hjust = 0),\n plot.caption = element_text(hjust = 0),\n panel.background = element_rect(fill = \"white\", color = \"grey50\")\n)\n\n# assign fill color and outline color\nfc <- \"#eaeef5\"\noc <- getOption(\"ggplot2.discrete.fill\")[1]\n\n# get plot metadata data to derive coordinates for adding annotations\nbp_annos <- function(bp, color, annos = 1) {\n bp_mdat <- ggplot_build(bp)$data[[1]]\n # bp_metadata <<- bp_mdat\n if (annos == 1) {\n bp <- bp +\n geom_segment(data = bp_mdat, aes(\n x = xmin + (xmax - xmin) / 4, xend = xmax - (xmax - xmin) / 4,\n y = ymax, yend = ymax\n ), size = .5, color = color) +\n geom_segment(data = bp_mdat, aes(\n x = xmin + (xmax - xmin) / 4, xend = xmax - (xmax - xmin) / 4,\n y = ymin, yend = ymin\n ), size = .5, color = color)\n } else {\n bp <- bp +\n geom_segment(data = bp_mdat, aes(\n x = xmin + (xmax - xmin) / 4, xend = xmax - (xmax - xmin) / 4,\n y = ymax, yend = ymax\n ), size = .5, color = color) +\n geom_segment(data = bp_mdat, aes(\n x = xmin + (xmax - xmin) / 4, xend = xmax - (xmax - xmin) / 4,\n y = ymin, yend = ymin\n ), size = .5, color = color) +\n geom_segment(data = bp_mdat, aes(\n x = xmin, xend = xmax,\n y = middle, yend = middle\n ), colour = color, size = .5)\n }\n return(bp)\n}\n\n\n\n\n\nCodebp_1 <- ggplot(adlb, aes(x = ARMCD, y = AVAL)) +\n stat_summary(geom = \"boxplot\", fun.data = five_num, fill = fc, color = oc) +\n stat_summary(geom = \"point\", fun = mean, size = 3, shape = 8) +\n labs(\n title = \"Box Plot of Laboratory Test Results\",\n subtitle = paste(\"Visit:\", adlb$AVISIT[1]),\n caption = \"The whiskers extend to the minimum and maximum values.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n ) +\n theme_bp\n\nplot <- bp_annos(bp_1, oc)\n\nWarning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.\nℹ Please use `linewidth` instead.\n\nCodeplot\n\n\n\n\n\n\n\nCodebp_3 <- ggplot(adlb, aes(x = ARMCD, y = AVAL)) +\n stat_summary(\n geom = \"boxplot\", fun.data = five_num,\n fun.args = list(probs = c(0.05, 0.25, 0.5, 0.75, 0.95)), fill = fc, color = oc\n ) +\n stat_summary(geom = \"point\", fun = mean, size = 3, shape = 8) +\n labs(\n title = \"Box Plot of Laboratory Test Results\",\n subtitle = paste(\"Visit:\", adlb$AVISIT[1]),\n caption = \"The whiskers extend to the 5th and 95th percentile. Values outside the whiskers have not been plotted.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n ) +\n theme_bp\n\nplot <- bp_annos(bp_3, oc)\nplot\n\n\n\n\n\n\n\nCodebp_4 <- ggplot(adlb, aes(x = ARMCD, y = AVAL)) +\n stat_summary(\n geom = \"boxplot\", fun.data = five_num,\n fun.args = list(probs = c(0.05, 0.25, 0.5, 0.75, 0.95)), fill = fc, color = oc\n ) +\n stat_summary(geom = \"point\", fun = get_outliers, shape = 1) +\n stat_summary(geom = \"point\", fun = mean, size = 3, shape = 8) +\n labs(\n title = \"Box Plot of Laboratory Test Results\",\n subtitle = paste(\"Visit:\", adlb$AVISIT[1]),\n caption = \"The whiskers extend to the 5th and 95th percentile.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n ) +\n theme_bp\n\nplot <- bp_annos(bp_4, oc)\nplot\n\n\n\n\n\n\n\nCodeadlb_o <- adlb %>%\n group_by(ARMCD) %>%\n mutate(OUTLIER = AVAL < quantile(AVAL, 0.01) | AVAL > quantile(AVAL, 0.99)) %>%\n filter(OUTLIER == TRUE) %>%\n select(ARMCD, AVAL, USUBJID)\n# Next step may be study-specific: shorten USUBJID to make annotation labels\n# next 2 lines of code split USUBJID by \"-\" and take the last syllable as ID\nn_split <- max(vapply(strsplit(adlb_o$USUBJID, \"-\"), length, numeric(1)))\nadlb_o$ID <- vapply(strsplit(adlb_o$USUBJID, \"-\"), `[[`, n_split, FUN.VALUE = \"a\")\n\nbp_5 <- ggplot(adlb, aes(x = ARMCD, y = AVAL)) +\n stat_summary(\n geom = \"boxplot\", fun.data = five_num,\n fun.args = list(probs = c(0.01, 0.25, 0.5, 0.75, 0.99)), fill = fc, color = oc\n ) +\n stat_summary(geom = \"point\", fun = mean, size = 3, shape = 8) +\n geom_point(data = adlb_o, aes(x = ARMCD, y = AVAL), shape = 1) +\n geom_text(data = adlb_o, aes(x = ARMCD, y = AVAL, label = ID), size = 3, hjust = -0.2) +\n labs(\n title = \"Box Plot of Laboratory Test Results\",\n subtitle = paste(\"Visit:\", adlb$AVISIT[1]),\n caption = \"The whiskers extend to the largest and smallest observed value within 1.5*IQR.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n ) +\n theme_bp\n\nplot <- bp_annos(bp_5, oc)\nplot\n\n\n\n\n\n\n\nCodebp_6 <- ggplot(adlb, aes(x = ARMCD, y = AVAL)) +\n geom_boxplot(fill = fc, color = oc) +\n stat_summary(geom = \"point\", fun = mean, size = 3, shape = 5) +\n labs(\n title = \"Box Plot of Laboratory Test Results\",\n subtitle = paste(\"Visit:\", adlb$AVISIT[1]),\n caption = \"The whiskers extend to the minimum and maximum values.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n ) +\n theme_bp\n\nplot <- bp_annos(bp_6, oc)\nplot\n\n\n\n\n\n\n\nCodeadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb_v <- adlb %>%\n filter(PARAMCD == \"ALT\" &\n AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\", \"WEEK 4 DAY 29\"))\n\nbp_7 <- ggplot(adlb_v, aes(x = AVISIT, y = AVAL)) +\n stat_summary(geom = \"boxplot\", fun.data = five_num, position = position_dodge2(.5), aes(fill = ARMCD, color = ARMCD)) +\n stat_summary(geom = \"point\", fun = mean, aes(group = ARMCD), size = 3, shape = 8, position = position_dodge2(1)) +\n labs(\n title = \"Box Plot of Laboratory Test Results\",\n caption = \"The whiskers extend to the minimum and maximum values.\",\n x = \"Visit\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n ) +\n theme_bp\n\nplot <- bp_annos(bp_7, oc, 2)\nplot\n\n\n\n\n\n\n\nCodebp_8 <- ggplot(adlb_v, aes(x = ARMCD, y = AVAL)) +\n stat_summary(geom = \"boxplot\", fun.data = five_num, position = position_dodge2(width = .5), aes(fill = AVISIT, color = AVISIT)) +\n stat_summary(geom = \"point\", fun = mean, aes(group = AVISIT), size = 3, shape = 8, position = position_dodge2(1)) +\n labs(\n title = \"Box Plot of Laboratory Test Results\",\n caption = \"The whiskers extend to the minimum and maximum values.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n ) +\n theme_bp\n\nplot <- bp_annos(bp_8, oc, 2)\nplot\n\n\n\n\n\n\n\nCode# Make wide dataset with summary statistics\nadlb_wide <- adlb %>%\n group_by(ARMCD) %>%\n summarise(\n n = n(),\n mean = round(mean(AVAL), 1),\n median = round(median(AVAL), 1),\n median_ci = paste(round(DescTools::MedianCI(AVAL)[1:2], 1), collapse = \" - \"),\n q1_q3 = paste(round(quantile(AVAL, c(0.25, 0.75)), 1), collapse = \" - \"),\n min_max = paste0(round(min(AVAL), 1), \"-\", max(round(AVAL, 2)))\n )\n\n# Make long dataset\nadlb_long <- tidyr::gather(adlb_wide, key = type, value = stat, n:min_max)\nadlb_long <- adlb_long %>% mutate(\n type_lbl = case_when(\n type == \"n\" ~ \"n\",\n type == \"mean\" ~ \"Mean\",\n type == \"median\" ~ \"Median\",\n type == \"median_ci\" ~ \"95% CI for Median\",\n type == \"q1_q3\" ~ \"25% and 75%-ile\",\n type == \"min_max\" ~ \"Min - Max\"\n )\n)\nadlb_long$type_lbl <- factor(adlb_long$type_lbl,\n levels = c(\"Min - Max\", \"25% and 75%-ile\", \"95% CI for Median\", \"Median\", \"Mean\", \"n\")\n)\n\nbp_9 <- ggplot(adlb, aes(x = ARMCD, y = AVAL)) +\n stat_summary(geom = \"boxplot\", fun.data = five_num, fill = fc, color = oc) +\n stat_summary(geom = \"point\", fun = mean, size = 3, shape = 8) +\n labs(\n title = \"Box Plot of Laboratory Test Results\",\n subtitle = paste(\"Visit:\", adlb$AVISIT[1]),\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n ) +\n theme_bp\n\ntbl_theme <- theme(\n panel.border = element_blank(),\n panel.grid.major = element_blank(),\n panel.grid.minor = element_blank(),\n axis.ticks = element_blank(),\n axis.title = element_blank(),\n axis.text.y = element_text(face = \"plain\"),\n axis.text.x = element_blank()\n)\n\ntbl_1 <- ggplot(adlb_long, aes(x = ARMCD, y = type_lbl, label = stat), vjust = 10) +\n geom_text(size = 3) +\n scale_y_discrete(labels = levels(adlb_long$type_lbl)) +\n theme_bw() +\n tbl_theme +\n labs(caption = \"The whiskers extend to the minimum and maximum values.\") +\n theme_bp\n\nplot <- ggpubr::ggarrange(bp_annos(bp_9, oc), tbl_1,\n heights = c(4, 2),\n ncol = 1, nrow = 2, align = \"v\"\n)\nplot\n\n\n\n\n\n\n\nCodetbl_2 <- adlb_long %>%\n filter(type == \"n\") %>%\n ggplot(aes(x = ARMCD, y = type_lbl, label = stat)) +\n geom_text(size = 3) +\n scale_y_discrete(labels = \"n\") +\n theme_bw() +\n tbl_theme +\n labs(caption = \"The whiskers extend to the minimum and maximum values.\") +\n theme_bp\n\nplot <- ggpubr::ggarrange(bp_annos(bp_9, oc), tbl_2,\n heights = c(6, 1),\n ncol = 1, nrow = 2, align = \"v\"\n)\nplot\n\n\n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.general)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\n# If PARAMCD and AVISIT are not factors, convert to factors\n# Also fill in missing values with \"<Missing>\"\nADLB <- ADLB %>%\n tern::df_explicit_na(\n omit_columns = setdiff(names(ADLB), c(\"PARAMCD\", \"AVISIT\")),\n char_as_factor = TRUE\n )\n\n# If statment below fails, pre-process ADLB to be one record per\n# study, subject, param and visit eg. filter with ANLFL = 'Y'\nstopifnot(nrow(ADLB) == nrow(unique(ADLB[, c(\"STUDYID\", \"USUBJID\", \"PARAMCD\", \"AVISIT\")])))\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL),\n cdisc_dataset(\"ADLB\", ADLB, keys = c(\"STUDYID\", \"USUBJID\", \"PARAMCD\", \"AVISIT\")), # do not modify\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n ADLB <- ADLB %>%\n tern::df_explicit_na(\n omit_columns = setdiff(names(ADLB), c(\"PARAMCD\", \"AVISIT\")),\n char_as_factor = TRUE)'\n ),\n modules = modules(\n tm_g_bivariate(\n x = data_extract_spec(\n dataname = \"ADSL\",\n select = select_spec(\n label = \"Select variable:\",\n choices = names(ADSL),\n selected = \"ARMCD\",\n fixed = FALSE\n )\n ),\n y = data_extract_spec(\n dataname = \"ADLB\",\n filter = list(\n filter_spec(\n vars = c(\"PARAMCD\"),\n choices = levels(ADLB$PARAMCD),\n selected = levels(ADLB$PARAMCD)[1],\n multiple = FALSE,\n label = \"Choose lab parameter\"\n ),\n filter_spec(\n vars = c(\"AVISIT\"),\n choices = levels(ADLB$AVISIT),\n selected = levels(ADLB$AVISIT)[1],\n multiple = FALSE,\n label = \"Choose visit\"\n )\n ),\n select = select_spec(\n label = \"Select variable:\",\n choices = names(ADLB),\n selected = \"AVAL\",\n multiple = FALSE,\n fixed = TRUE\n )\n ),\n row_facet = data_extract_spec(\n dataname = \"ADLB\",\n select = select_spec(\n label = \"Select variables:\",\n choices = names(ADLB),\n selected = NULL,\n multiple = FALSE,\n fixed = FALSE\n )\n ),\n col_facet = data_extract_spec(\n dataname = \"ADLB\",\n select = select_spec(\n label = \"Select variables:\",\n choices = names(ADLB),\n selected = NULL,\n multiple = FALSE,\n fixed = FALSE\n )\n )\n )\n )\n)\n\n[INFO] 2023-08-04 14:36:21.1140 pid:4033 token:[] teal.modules.general Initializing tm_g_bivariate\n\nCodeshinyApp(app$ui, app$server)\n\nWarning: Removed 8000 rows containing non-finite values (`stat_boxplot()`).\n\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.general_0.2.15.9034 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 magrittr_2.0.3 \n [5] teal.slice_0.3.0.9028 teal.data_0.2.0.9007 \n [7] shinyTree_0.2.7 shiny_1.7.4.1 \n [9] ggmosaic_0.3.3 nestcolor_0.1.2.9001 \n[11] ggplot2_3.4.2 dplyr_1.1.2 \n[13] scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] rstudioapi_0.15.0 jsonlite_1.8.7 farver_2.1.1 \n [4] rmarkdown_2.23 ragg_1.2.5 vctrs_0.6.3 \n [7] memoise_2.0.1 rstatix_0.7.2 webshot_0.5.5 \n [10] htmltools_0.5.5 forcats_1.0.0 broom_1.0.5 \n [13] cellranger_1.1.0 sass_0.4.7 bslib_0.5.0 \n [16] htmlwidgets_1.6.2 fontawesome_0.5.1 testthat_3.1.10 \n [19] rootSolve_1.8.2.3 plotly_4.10.2 cachem_1.0.8 \n [22] tern_0.8.5.9006 mime_0.12 lifecycle_1.0.3 \n [25] teal.widgets_0.3.0.9007 pkgconfig_2.0.3 Matrix_1.6-0 \n [28] R6_2.5.1 fastmap_1.1.1 rbibutils_2.2.13 \n [31] digest_0.6.33 Exact_3.2 colorspace_2.1-0 \n [34] shinycssloaders_1.0.0 ps_1.7.5 textshaping_0.3.6 \n [37] teal.code_0.3.0.9009 ggpubr_0.6.0 labeling_0.4.2 \n [40] fansi_1.0.4 httr_1.4.6 abind_1.4-5 \n [43] compiler_4.3.1 proxy_0.4-27 withr_2.5.0 \n [46] backports_1.4.1 carData_3.0-5 logger_0.2.2 \n [49] R.utils_2.12.2 ggsignif_0.6.4 MASS_7.3-60 \n [52] gld_2.6.6 tools_4.3.1 httpuv_1.6.11 \n [55] shinyvalidate_0.1.2 R.oo_1.25.0 glue_1.6.2 \n [58] callr_3.7.3 R.cache_0.16.0 promises_1.2.0.1 \n [61] grid_4.3.1 checkmate_2.2.0 generics_0.1.3 \n [64] gtable_0.3.3 R.methodsS3_1.8.2 class_7.3-22 \n [67] tidyr_1.3.0 data.table_1.14.8 lmom_2.9 \n [70] car_3.1-2 utf8_1.2.3 ggrepel_0.9.3 \n [73] pillar_1.9.0 stringr_1.5.0 later_1.3.1 \n [76] splines_4.3.1 lattice_0.21-8 survival_3.5-5 \n [79] tidyselect_1.2.0 rtables_0.6.2.9001 knitr_1.43 \n [82] teal.logger_0.1.1.9009 xfun_0.39 expm_0.999-7 \n [85] brio_1.1.3 stringi_1.7.12 lazyeval_0.2.2 \n [88] yaml_2.3.7 boot_1.3-28.1 shinyWidgets_0.7.6 \n [91] evaluate_0.21 codetools_0.2-19 tibble_3.2.1 \n [94] cli_3.6.1 systemfonts_1.0.4 xtable_1.8-4 \n [97] DescTools_0.99.49 Rdpack_2.4 munsell_0.5.0 \n[100] processx_3.8.2 jquerylib_0.1.4 styler_1.10.1 \n[103] Rcpp_1.0.11 teal.reporter_0.1.1.9020 readxl_1.4.3 \n[106] ellipsis_0.3.2 formatters_0.5.1.9001 viridisLite_0.4.2 \n[109] mvtnorm_1.2-2 scales_1.2.1 e1071_1.7-13 \n[112] purrr_1.0.1 rlang_1.1.1 cowplot_1.1.1 \n[115] shinyjs_2.1.0 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- cellranger [* -> 1.1.0]\n- checkmate [* -> 2.2.0]\n- class [* -> 7.3-22]\n- cli [* -> 3.6.1]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- corrplot [* -> 0.92]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- DescTools [* -> 0.99.49]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- e1071 [* -> 1.7-13]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- Exact [* -> 3.2]\n- expm [* -> 0.999-7]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- fs [* -> 1.6.3]\n- generics [* -> 0.1.3]\n- ggmosaic [* -> 0.3.3]\n- ggplot2 [* -> 3.4.2]\n- ggpubr [* -> 0.6.0]\n- ggrepel [* -> 0.9.3]\n- ggsci [* -> 3.0.0]\n- ggsignif [* -> 0.6.4]\n- gld [* -> 2.6.6]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- lmom [* -> 2.9]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polynom [* -> 1.4-1]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- productplots [* -> 0.1.1]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- proxy [* -> 0.4-27]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readxl [* -> 1.4.3]\n- rematch [* -> 1.0.1]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rootSolve [* -> 1.8.2.3]\n- rprojroot [* -> 2.0.3]\n- rstatix [* -> 0.7.2]\n- rstudioapi [* -> 0.15.0]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyTree [* -> 0.2.7]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.general [* -> 0.2.15.9034]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/graphs/other/bwg01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Plot\nPlot Changing Whiskers\nPlot Adding Outliers\nPlot Specifying Marker for Outliers and Adding Patient ID\nPlot Specifying Marker for Mean\nPlot by Treatment and Timepoint\nPlot by Timepoint and Treatment\nPlot with Table Section\nPlot with Number of Patients only in Table Section\nTeal\nSession Info\n\n\n\n\nCode# generic code for all plots\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(nestcolor)\n\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\nadlb <- adlb %>% filter(PARAMCD == \"ALT\" & AVISIT == \"WEEK 2 DAY 15\")\n\n# Definition of boxplot boundaries and whiskers\nfive_num <- function(x, probs = c(0, 0.25, 0.5, 0.75, 1)) {\n r <- quantile(x, probs)\n names(r) <- c(\"ymin\", \"lower\", \"middle\", \"upper\", \"ymax\")\n r\n}\n\n# get outliers based on quantile\n# for outliers based on IQR see coef in geom_boxplot\nget_outliers <- function(x, probs = c(0.05, 0.95)) {\n r <- subset(x, x < quantile(x, probs[1]) | quantile(x, probs[2]) < x)\n if (!is.null(x)) {\n x_names <- subset(names(x), x < quantile(x, probs[1]) | quantile(x, probs[2]) < x)\n names(r) <- x_names\n }\n r\n}\n\n# create theme used for all plots\ntheme_bp <- theme(\n plot.title = element_text(hjust = 0),\n plot.subtitle = element_text(hjust = 0),\n plot.caption = element_text(hjust = 0),\n panel.background = element_rect(fill = \"white\", color = \"grey50\")\n)\n\n# assign fill color and outline color\nfc <- \"#eaeef5\"\noc <- getOption(\"ggplot2.discrete.fill\")[1]\n\n# get plot metadata data to derive coordinates for adding annotations\nbp_annos <- function(bp, color, annos = 1) {\n bp_mdat <- ggplot_build(bp)$data[[1]]\n # bp_metadata <<- bp_mdat\n if (annos == 1) {\n bp <- bp +\n geom_segment(data = bp_mdat, aes(\n x = xmin + (xmax - xmin) / 4, xend = xmax - (xmax - xmin) / 4,\n y = ymax, yend = ymax\n ), size = .5, color = color) +\n geom_segment(data = bp_mdat, aes(\n x = xmin + (xmax - xmin) / 4, xend = xmax - (xmax - xmin) / 4,\n y = ymin, yend = ymin\n ), size = .5, color = color)\n } else {\n bp <- bp +\n geom_segment(data = bp_mdat, aes(\n x = xmin + (xmax - xmin) / 4, xend = xmax - (xmax - xmin) / 4,\n y = ymax, yend = ymax\n ), size = .5, color = color) +\n geom_segment(data = bp_mdat, aes(\n x = xmin + (xmax - xmin) / 4, xend = xmax - (xmax - xmin) / 4,\n y = ymin, yend = ymin\n ), size = .5, color = color) +\n geom_segment(data = bp_mdat, aes(\n x = xmin, xend = xmax,\n y = middle, yend = middle\n ), colour = color, size = .5)\n }\n return(bp)\n}\n\n\n\n\n\nCodebp_1 <- ggplot(adlb, aes(x = ARMCD, y = AVAL)) +\n stat_summary(geom = \"boxplot\", fun.data = five_num, fill = fc, color = oc) +\n stat_summary(geom = \"point\", fun = mean, size = 3, shape = 8) +\n labs(\n title = \"Box Plot of Laboratory Test Results\",\n subtitle = paste(\"Visit:\", adlb$AVISIT[1]),\n caption = \"The whiskers extend to the minimum and maximum values.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n ) +\n theme_bp\n\nplot <- bp_annos(bp_1, oc)\n\nWarning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.\nℹ Please use `linewidth` instead.\n\nCodeplot\n\n\n\n\n\n\n\nCodebp_3 <- ggplot(adlb, aes(x = ARMCD, y = AVAL)) +\n stat_summary(\n geom = \"boxplot\", fun.data = five_num,\n fun.args = list(probs = c(0.05, 0.25, 0.5, 0.75, 0.95)), fill = fc, color = oc\n ) +\n stat_summary(geom = \"point\", fun = mean, size = 3, shape = 8) +\n labs(\n title = \"Box Plot of Laboratory Test Results\",\n subtitle = paste(\"Visit:\", adlb$AVISIT[1]),\n caption = \"The whiskers extend to the 5th and 95th percentile. Values outside the whiskers have not been plotted.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n ) +\n theme_bp\n\nplot <- bp_annos(bp_3, oc)\nplot\n\n\n\n\n\n\n\nCodebp_4 <- ggplot(adlb, aes(x = ARMCD, y = AVAL)) +\n stat_summary(\n geom = \"boxplot\", fun.data = five_num,\n fun.args = list(probs = c(0.05, 0.25, 0.5, 0.75, 0.95)), fill = fc, color = oc\n ) +\n stat_summary(geom = \"point\", fun = get_outliers, shape = 1) +\n stat_summary(geom = \"point\", fun = mean, size = 3, shape = 8) +\n labs(\n title = \"Box Plot of Laboratory Test Results\",\n subtitle = paste(\"Visit:\", adlb$AVISIT[1]),\n caption = \"The whiskers extend to the 5th and 95th percentile.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n ) +\n theme_bp\n\nplot <- bp_annos(bp_4, oc)\nplot\n\n\n\n\n\n\n\nCodeadlb_o <- adlb %>%\n group_by(ARMCD) %>%\n mutate(OUTLIER = AVAL < quantile(AVAL, 0.01) | AVAL > quantile(AVAL, 0.99)) %>%\n filter(OUTLIER == TRUE) %>%\n select(ARMCD, AVAL, USUBJID)\n# Next step may be study-specific: shorten USUBJID to make annotation labels\n# next 2 lines of code split USUBJID by \"-\" and take the last syllable as ID\nn_split <- max(vapply(strsplit(adlb_o$USUBJID, \"-\"), length, numeric(1)))\nadlb_o$ID <- vapply(strsplit(adlb_o$USUBJID, \"-\"), `[[`, n_split, FUN.VALUE = \"a\")\n\nbp_5 <- ggplot(adlb, aes(x = ARMCD, y = AVAL)) +\n stat_summary(\n geom = \"boxplot\", fun.data = five_num,\n fun.args = list(probs = c(0.01, 0.25, 0.5, 0.75, 0.99)), fill = fc, color = oc\n ) +\n stat_summary(geom = \"point\", fun = mean, size = 3, shape = 8) +\n geom_point(data = adlb_o, aes(x = ARMCD, y = AVAL), shape = 1) +\n geom_text(data = adlb_o, aes(x = ARMCD, y = AVAL, label = ID), size = 3, hjust = -0.2) +\n labs(\n title = \"Box Plot of Laboratory Test Results\",\n subtitle = paste(\"Visit:\", adlb$AVISIT[1]),\n caption = \"The whiskers extend to the largest and smallest observed value within 1.5*IQR.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n ) +\n theme_bp\n\nplot <- bp_annos(bp_5, oc)\nplot\n\n\n\n\n\n\n\nCodebp_6 <- ggplot(adlb, aes(x = ARMCD, y = AVAL)) +\n geom_boxplot(fill = fc, color = oc) +\n stat_summary(geom = \"point\", fun = mean, size = 3, shape = 5) +\n labs(\n title = \"Box Plot of Laboratory Test Results\",\n subtitle = paste(\"Visit:\", adlb$AVISIT[1]),\n caption = \"The whiskers extend to the minimum and maximum values.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n ) +\n theme_bp\n\nplot <- bp_annos(bp_6, oc)\nplot\n\n\n\n\n\n\n\nCodeadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb_v <- adlb %>%\n filter(PARAMCD == \"ALT\" &\n AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\", \"WEEK 4 DAY 29\"))\n\nbp_7 <- ggplot(adlb_v, aes(x = AVISIT, y = AVAL)) +\n stat_summary(geom = \"boxplot\", fun.data = five_num, position = position_dodge2(.5), aes(fill = ARMCD, color = ARMCD)) +\n stat_summary(geom = \"point\", fun = mean, aes(group = ARMCD), size = 3, shape = 8, position = position_dodge2(1)) +\n labs(\n title = \"Box Plot of Laboratory Test Results\",\n caption = \"The whiskers extend to the minimum and maximum values.\",\n x = \"Visit\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n ) +\n theme_bp\n\nplot <- bp_annos(bp_7, oc, 2)\nplot\n\n\n\n\n\n\n\nCodebp_8 <- ggplot(adlb_v, aes(x = ARMCD, y = AVAL)) +\n stat_summary(geom = \"boxplot\", fun.data = five_num, position = position_dodge2(width = .5), aes(fill = AVISIT, color = AVISIT)) +\n stat_summary(geom = \"point\", fun = mean, aes(group = AVISIT), size = 3, shape = 8, position = position_dodge2(1)) +\n labs(\n title = \"Box Plot of Laboratory Test Results\",\n caption = \"The whiskers extend to the minimum and maximum values.\",\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n ) +\n theme_bp\n\nplot <- bp_annos(bp_8, oc, 2)\nplot\n\n\n\n\n\n\n\nCode# Make wide dataset with summary statistics\nadlb_wide <- adlb %>%\n group_by(ARMCD) %>%\n summarise(\n n = n(),\n mean = round(mean(AVAL), 1),\n median = round(median(AVAL), 1),\n median_ci = paste(round(DescTools::MedianCI(AVAL)[1:2], 1), collapse = \" - \"),\n q1_q3 = paste(round(quantile(AVAL, c(0.25, 0.75)), 1), collapse = \" - \"),\n min_max = paste0(round(min(AVAL), 1), \"-\", max(round(AVAL, 2)))\n )\n\n# Make long dataset\nadlb_long <- tidyr::gather(adlb_wide, key = type, value = stat, n:min_max)\nadlb_long <- adlb_long %>% mutate(\n type_lbl = case_when(\n type == \"n\" ~ \"n\",\n type == \"mean\" ~ \"Mean\",\n type == \"median\" ~ \"Median\",\n type == \"median_ci\" ~ \"95% CI for Median\",\n type == \"q1_q3\" ~ \"25% and 75%-ile\",\n type == \"min_max\" ~ \"Min - Max\"\n )\n)\nadlb_long$type_lbl <- factor(adlb_long$type_lbl,\n levels = c(\"Min - Max\", \"25% and 75%-ile\", \"95% CI for Median\", \"Median\", \"Mean\", \"n\")\n)\n\nbp_9 <- ggplot(adlb, aes(x = ARMCD, y = AVAL)) +\n stat_summary(geom = \"boxplot\", fun.data = five_num, fill = fc, color = oc) +\n stat_summary(geom = \"point\", fun = mean, size = 3, shape = 8) +\n labs(\n title = \"Box Plot of Laboratory Test Results\",\n subtitle = paste(\"Visit:\", adlb$AVISIT[1]),\n x = \"Treatment Group\",\n y = paste0(adlb$PARAMCD[1], \" (\", adlb$AVALU[1], \")\")\n ) +\n theme_bp\n\ntbl_theme <- theme(\n panel.border = element_blank(),\n panel.grid.major = element_blank(),\n panel.grid.minor = element_blank(),\n axis.ticks = element_blank(),\n axis.title = element_blank(),\n axis.text.y = element_text(face = \"plain\"),\n axis.text.x = element_blank()\n)\n\ntbl_1 <- ggplot(adlb_long, aes(x = ARMCD, y = type_lbl, label = stat), vjust = 10) +\n geom_text(size = 3) +\n scale_y_discrete(labels = levels(adlb_long$type_lbl)) +\n theme_bw() +\n tbl_theme +\n labs(caption = \"The whiskers extend to the minimum and maximum values.\") +\n theme_bp\n\nplot <- ggpubr::ggarrange(bp_annos(bp_9, oc), tbl_1,\n heights = c(4, 2),\n ncol = 1, nrow = 2, align = \"v\"\n)\nplot\n\n\n\n\n\n\n\nCodetbl_2 <- adlb_long %>%\n filter(type == \"n\") %>%\n ggplot(aes(x = ARMCD, y = type_lbl, label = stat)) +\n geom_text(size = 3) +\n scale_y_discrete(labels = \"n\") +\n theme_bw() +\n tbl_theme +\n labs(caption = \"The whiskers extend to the minimum and maximum values.\") +\n theme_bp\n\nplot <- ggpubr::ggarrange(bp_annos(bp_9, oc), tbl_2,\n heights = c(6, 1),\n ncol = 1, nrow = 2, align = \"v\"\n)\nplot\n\n\n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.general)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\n# If PARAMCD and AVISIT are not factors, convert to factors\n# Also fill in missing values with \"<Missing>\"\nADLB <- ADLB %>%\n tern::df_explicit_na(\n omit_columns = setdiff(names(ADLB), c(\"PARAMCD\", \"AVISIT\")),\n char_as_factor = TRUE\n )\n\n# If statment below fails, pre-process ADLB to be one record per\n# study, subject, param and visit eg. filter with ANLFL = 'Y'\nstopifnot(nrow(ADLB) == nrow(unique(ADLB[, c(\"STUDYID\", \"USUBJID\", \"PARAMCD\", \"AVISIT\")])))\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL),\n cdisc_dataset(\"ADLB\", ADLB, keys = c(\"STUDYID\", \"USUBJID\", \"PARAMCD\", \"AVISIT\")), # do not modify\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n ADLB <- ADLB %>%\n tern::df_explicit_na(\n omit_columns = setdiff(names(ADLB), c(\"PARAMCD\", \"AVISIT\")),\n char_as_factor = TRUE)'\n ),\n modules = modules(\n tm_g_bivariate(\n x = data_extract_spec(\n dataname = \"ADSL\",\n select = select_spec(\n label = \"Select variable:\",\n choices = names(ADSL),\n selected = \"ARMCD\",\n fixed = FALSE\n )\n ),\n y = data_extract_spec(\n dataname = \"ADLB\",\n filter = list(\n filter_spec(\n vars = c(\"PARAMCD\"),\n choices = levels(ADLB$PARAMCD),\n selected = levels(ADLB$PARAMCD)[1],\n multiple = FALSE,\n label = \"Choose lab parameter\"\n ),\n filter_spec(\n vars = c(\"AVISIT\"),\n choices = levels(ADLB$AVISIT),\n selected = levels(ADLB$AVISIT)[1],\n multiple = FALSE,\n label = \"Choose visit\"\n )\n ),\n select = select_spec(\n label = \"Select variable:\",\n choices = names(ADLB),\n selected = \"AVAL\",\n multiple = FALSE,\n fixed = TRUE\n )\n ),\n row_facet = data_extract_spec(\n dataname = \"ADLB\",\n select = select_spec(\n label = \"Select variables:\",\n choices = names(ADLB),\n selected = NULL,\n multiple = FALSE,\n fixed = FALSE\n )\n ),\n col_facet = data_extract_spec(\n dataname = \"ADLB\",\n select = select_spec(\n label = \"Select variables:\",\n choices = names(ADLB),\n selected = NULL,\n multiple = FALSE,\n fixed = FALSE\n )\n )\n )\n )\n)\n\n[INFO] 2023-08-04 14:51:59.7668 pid:4038 token:[] teal.modules.general Initializing tm_g_bivariate\n\nCodeshinyApp(app$ui, app$server)\n\nWarning: Removed 8000 rows containing non-finite values (`stat_boxplot()`).\n\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.general_0.2.15.9034 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 magrittr_2.0.3 \n [5] teal.slice_0.3.0.9028 teal.data_0.2.0.9007 \n [7] shinyTree_0.2.7 shiny_1.7.4.1 \n [9] ggmosaic_0.3.3 nestcolor_0.1.2.9001 \n[11] ggplot2_3.4.2 dplyr_1.1.2 \n[13] scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] rstudioapi_0.15.0 jsonlite_1.8.7 farver_2.1.1 \n [4] rmarkdown_2.23 ragg_1.2.5 vctrs_0.6.3 \n [7] memoise_2.0.1 rstatix_0.7.2 webshot_0.5.5 \n [10] htmltools_0.5.5 forcats_1.0.0 broom_1.0.5 \n [13] cellranger_1.1.0 sass_0.4.7 bslib_0.5.0 \n [16] htmlwidgets_1.6.2 fontawesome_0.5.1 testthat_3.1.10 \n [19] rootSolve_1.8.2.3 plotly_4.10.2 cachem_1.0.8 \n [22] tern_0.8.5.9006 mime_0.12 lifecycle_1.0.3 \n [25] teal.widgets_0.3.0.9007 pkgconfig_2.0.3 Matrix_1.6-0 \n [28] R6_2.5.1 fastmap_1.1.1 rbibutils_2.2.13 \n [31] digest_0.6.33 Exact_3.2 colorspace_2.1-0 \n [34] shinycssloaders_1.0.0 ps_1.7.5 textshaping_0.3.6 \n [37] teal.code_0.3.0.9009 ggpubr_0.6.0 labeling_0.4.2 \n [40] fansi_1.0.4 httr_1.4.6 abind_1.4-5 \n [43] compiler_4.3.1 proxy_0.4-27 withr_2.5.0 \n [46] backports_1.4.1 carData_3.0-5 logger_0.2.2 \n [49] R.utils_2.12.2 ggsignif_0.6.4 MASS_7.3-60 \n [52] gld_2.6.6 tools_4.3.1 httpuv_1.6.11 \n [55] shinyvalidate_0.1.2 R.oo_1.25.0 glue_1.6.2 \n [58] callr_3.7.3 R.cache_0.16.0 promises_1.2.0.1 \n [61] grid_4.3.1 checkmate_2.2.0 generics_0.1.3 \n [64] gtable_0.3.3 R.methodsS3_1.8.2 class_7.3-22 \n [67] tidyr_1.3.0 data.table_1.14.8 lmom_2.9 \n [70] car_3.1-2 utf8_1.2.3 ggrepel_0.9.3 \n [73] pillar_1.9.0 stringr_1.5.0 later_1.3.1 \n [76] splines_4.3.1 lattice_0.21-8 survival_3.5-5 \n [79] tidyselect_1.2.0 rtables_0.6.2.9001 knitr_1.43 \n [82] teal.logger_0.1.1.9009 xfun_0.39 expm_0.999-7 \n [85] brio_1.1.3 stringi_1.7.12 lazyeval_0.2.2 \n [88] yaml_2.3.7 boot_1.3-28.1 shinyWidgets_0.7.6 \n [91] evaluate_0.21 codetools_0.2-19 tibble_3.2.1 \n [94] cli_3.6.1 systemfonts_1.0.4 xtable_1.8-4 \n [97] DescTools_0.99.49 Rdpack_2.4 munsell_0.5.0 \n[100] processx_3.8.2 jquerylib_0.1.4 styler_1.10.1 \n[103] Rcpp_1.0.11 teal.reporter_0.1.1.9020 readxl_1.4.3 \n[106] ellipsis_0.3.2 formatters_0.5.1.9001 viridisLite_0.4.2 \n[109] mvtnorm_1.2-2 scales_1.2.1 e1071_1.7-13 \n[112] purrr_1.0.1 rlang_1.1.1 cowplot_1.1.1 \n[115] shinyjs_2.1.0 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- cellranger [* -> 1.1.0]\n- checkmate [* -> 2.2.0]\n- class [* -> 7.3-22]\n- cli [* -> 3.6.1]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- corrplot [* -> 0.92]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- DescTools [* -> 0.99.49]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- e1071 [* -> 1.7-13]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- Exact [* -> 3.2]\n- expm [* -> 0.999-7]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- fs [* -> 1.6.3]\n- generics [* -> 0.1.3]\n- ggmosaic [* -> 0.3.3]\n- ggplot2 [* -> 3.4.2]\n- ggpubr [* -> 0.6.0]\n- ggrepel [* -> 0.9.3]\n- ggsci [* -> 3.0.0]\n- ggsignif [* -> 0.6.4]\n- gld [* -> 2.6.6]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- lmom [* -> 2.9]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polynom [* -> 1.4-1]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- productplots [* -> 0.1.1]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- proxy [* -> 0.4-27]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readxl [* -> 1.4.3]\n- rematch [* -> 1.0.1]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rootSolve [* -> 1.8.2.3]\n- rprojroot [* -> 2.0.3]\n- rstatix [* -> 0.7.2]\n- rstudioapi [* -> 0.15.0]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyTree [* -> 0.2.7]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.general [* -> 0.2.15.9034]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/graphs/other/bwg01.lock'.\n\n\nDownload" }, { "objectID": "graphs/other/mmrmg01.html", "href": "graphs/other/mmrmg01.html", "title": "MMRMG01", "section": "", - "text": "Given an MMRM fitted with s_mmrm, g_mmrm_lsmeans displays for each visit the adjusted means within group and/or difference in adjusted means between groups. g_mmrm_diagnostic displays marginal residual plots for evaluating model fit.\n\n\nData Setup and Model Fitting\nLeast Squares Means: Estimates Within Groups\nLeast Squares Means: Contrasts Between Groups\nModel Diagnostics: Marginal Fitted Values vs. Residuals\nModel Diagnostics: Normality of Marginal Residuals\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern.mmrm)\nlibrary(scda)\nlibrary(nestcolor)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\nadqs_f <- adqs %>%\n dplyr::filter(PARAMCD == \"FKSI-FWB\" & !AVISIT %in% c(\"BASELINE\")) %>%\n droplevels() %>%\n dplyr::mutate(ARM = factor(ARM, levels = c(\"B: Placebo\", \"A: Drug X\", \"C: Combination\"))) %>%\n dplyr::mutate(AVISITN = rank(AVISITN) %>% as.factor() %>% as.numeric() %>% as.factor())\n\nmmrm_results <- fit_mmrm(\n vars = list(\n response = \"AVAL\",\n covariates = c(\"STRATA2\"),\n id = \"USUBJID\",\n arm = \"ARM\",\n visit = \"AVISIT\"\n ),\n data = adqs_f\n)\n\n\n\n\nConsidering the treatment variable in the model\n\nCodeplot <- g_mmrm_lsmeans(\n mmrm_results,\n select = \"estimates\",\n xlab = \"Visit\"\n)\nplot\n\n\n\n\nConsidering the treatment variable in the model, with lines\n\nCodeplot <- g_mmrm_lsmeans(\n mmrm_results,\n select = \"estimates\",\n xlab = \"Visit\",\n show_lines = TRUE\n)\nplot\n\n\n\n\nConsidering the treatment variable in the model, with statistics table\n\nCodeplot <- g_mmrm_lsmeans(\n mmrm_results,\n select = \"estimates\",\n xlab = \"Visit\",\n table_stats = c(\"n\", \"estimate\", \"se\", \"ci\"),\n table_font_size = 4,\n table_rel_height = 0.6\n)\nplot\n\n\n\n\n\n\n\nUsers can choose to display both estimates and contrasts together by running g_mmrm_lsmeans(mmrm_results).\n\nCodeplot <- g_mmrm_lsmeans(\n mmrm_results,\n select = \"contrasts\",\n titles = c(contrasts = \"Contrasts of FKSI-FWB means\"),\n xlab = \"Visit\"\n)\nplot\n\n\n\n\n\n\n\nCodeplot <- g_mmrm_diagnostic(mmrm_results)\nplot\n\n\n\n\n\n\n\nCodeplot <- g_mmrm_diagnostic(mmrm_results, type = \"q-q-residual\")\nplot\n\n\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\") %>%\n dplyr::filter(ABLFL != \"Y\" & ABLFL2 != \"Y\") %>%\n dplyr::filter(AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\")) %>%\n dplyr::mutate(\n AVISIT = as.factor(AVISIT),\n AVISITN = rank(AVISITN) %>%\n as.factor() %>%\n as.numeric() %>%\n as.factor() # making consecutive numeric factor\n )\n\narm_ref_comp <- list(\n ARMCD = list(\n ref = \"ARM A\",\n comp = c(\"ARM B\", \"ARM C\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n cdisc_dataset(\"ADQS\", adqs),\n code = '\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADQS <- synthetic_cdisc_dataset(\"latest\", \"adqs\") %>%\n dplyr::filter(ABLFL != \"Y\" & ABLFL2 != \"Y\") %>%\n dplyr::filter(AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\")) %>%\n dplyr::mutate(\n AVISIT = as.factor(AVISIT),\n AVISITN = rank(AVISITN) %>%\n as.factor() %>%\n as.numeric() %>%\n as.factor() # making consecutive numeric factor\n )\n ',\n check = TRUE\n ),\n modules = modules(\n tm_a_mmrm(\n label = \"MMRM\",\n dataname = \"ADQS\",\n aval_var = choices_selected(c(\"AVAL\", \"CHG\"), \"AVAL\"),\n id_var = choices_selected(c(\"USUBJID\", \"SUBJID\"), \"USUBJID\"),\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARMCD\"),\n visit_var = choices_selected(c(\"AVISIT\", \"AVISITN\"), \"AVISIT\"),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n choices = value_choices(adqs, \"PARAMCD\", \"PARAM\"),\n selected = \"FKSI-FWB\"\n ),\n cov_var = choices_selected(c(\"BASE\", \"AGE\", \"SEX\", \"BASE:AVISIT\"), NULL),\n conf_level = choices_selected(c(0.95, 0.9, 0.8), 0.95)\n )\n )\n)\n\n[INFO] 2023-08-04 14:37:50.7510 pid:4565 token:[] teal.modules.clinical Initializing tm_a_mmrm\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] nestcolor_0.1.2.9001 scda_0.1.6.9010 \n [9] tern.mmrm_0.2.2.9005 tern_0.8.5.9006 \n[11] rtables_0.6.2.9001 magrittr_2.0.3 \n[13] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 farver_2.1.1 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 sass_0.4.7 \n[16] rlang_1.1.1 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 mmrm_0.2.2 knitr_1.43 \n[22] labeling_0.4.2 htmlwidgets_1.6.2 withr_2.5.0 \n[25] purrr_1.0.1 numDeriv_2016.8-1.1 shinyWidgets_0.7.6 \n[28] geepack_1.3.9 grid_4.3.1 fansi_1.0.4 \n[31] teal.logger_0.1.1.9009 xtable_1.8-4 colorspace_2.1-0 \n[34] ggplot2_3.4.2 MASS_7.3-60 emmeans_1.8.7 \n[37] scales_1.2.1 cli_3.6.1 mvtnorm_1.2-2 \n[40] rmarkdown_2.23 generics_0.1.3 rstudioapi_0.15.0 \n[43] cachem_1.0.8 stringr_1.5.0 splines_4.3.1 \n[46] assertthat_0.2.1 parallel_4.3.1 vctrs_0.6.3 \n[49] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[52] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[55] fontawesome_0.5.1 jquerylib_0.1.4 tidyr_1.3.0 \n[58] glue_1.6.2 parallelly_1.36.0 ps_1.7.5 \n[61] codetools_0.2-19 cowplot_1.1.1 stringi_1.7.12 \n[64] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[67] munsell_0.5.0 tibble_3.2.1 logger_0.2.2 \n[70] pillar_1.9.0 htmltools_0.5.5 brio_1.1.3 \n[73] R6_2.5.1 TMB_1.9.5 Rdpack_2.4 \n[76] evaluate_0.21 lattice_0.21-8 rbibutils_2.2.13 \n[79] backports_1.4.1 memoise_2.0.1 broom_1.0.5 \n[82] teal.reporter_0.1.1.9020 bslib_0.5.0 httpuv_1.6.11 \n[85] Rcpp_1.0.11 shinyvalidate_0.1.2 coda_0.19-4 \n[88] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[91] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/graphs/other/mmrmg01.lock'.\n\n\nDownload" + "text": "Given an MMRM fitted with s_mmrm, g_mmrm_lsmeans displays for each visit the adjusted means within group and/or difference in adjusted means between groups. g_mmrm_diagnostic displays marginal residual plots for evaluating model fit.\n\n\nData Setup and Model Fitting\nLeast Squares Means: Estimates Within Groups\nLeast Squares Means: Contrasts Between Groups\nModel Diagnostics: Marginal Fitted Values vs. Residuals\nModel Diagnostics: Normality of Marginal Residuals\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern.mmrm)\nlibrary(scda)\nlibrary(nestcolor)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\nadqs_f <- adqs %>%\n dplyr::filter(PARAMCD == \"FKSI-FWB\" & !AVISIT %in% c(\"BASELINE\")) %>%\n droplevels() %>%\n dplyr::mutate(ARM = factor(ARM, levels = c(\"B: Placebo\", \"A: Drug X\", \"C: Combination\"))) %>%\n dplyr::mutate(AVISITN = rank(AVISITN) %>% as.factor() %>% as.numeric() %>% as.factor())\n\nmmrm_results <- fit_mmrm(\n vars = list(\n response = \"AVAL\",\n covariates = c(\"STRATA2\"),\n id = \"USUBJID\",\n arm = \"ARM\",\n visit = \"AVISIT\"\n ),\n data = adqs_f\n)\n\n\n\n\nConsidering the treatment variable in the model\n\nCodeplot <- g_mmrm_lsmeans(\n mmrm_results,\n select = \"estimates\",\n xlab = \"Visit\"\n)\nplot\n\n\n\n\nConsidering the treatment variable in the model, with lines\n\nCodeplot <- g_mmrm_lsmeans(\n mmrm_results,\n select = \"estimates\",\n xlab = \"Visit\",\n show_lines = TRUE\n)\nplot\n\n\n\n\nConsidering the treatment variable in the model, with statistics table\n\nCodeplot <- g_mmrm_lsmeans(\n mmrm_results,\n select = \"estimates\",\n xlab = \"Visit\",\n table_stats = c(\"n\", \"estimate\", \"se\", \"ci\"),\n table_font_size = 4,\n table_rel_height = 0.6\n)\nplot\n\n\n\n\n\n\n\nUsers can choose to display both estimates and contrasts together by running g_mmrm_lsmeans(mmrm_results).\n\nCodeplot <- g_mmrm_lsmeans(\n mmrm_results,\n select = \"contrasts\",\n titles = c(contrasts = \"Contrasts of FKSI-FWB means\"),\n xlab = \"Visit\"\n)\nplot\n\n\n\n\n\n\n\nCodeplot <- g_mmrm_diagnostic(mmrm_results)\nplot\n\n\n\n\n\n\n\nCodeplot <- g_mmrm_diagnostic(mmrm_results, type = \"q-q-residual\")\nplot\n\n\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\") %>%\n dplyr::filter(ABLFL != \"Y\" & ABLFL2 != \"Y\") %>%\n dplyr::filter(AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\")) %>%\n dplyr::mutate(\n AVISIT = as.factor(AVISIT),\n AVISITN = rank(AVISITN) %>%\n as.factor() %>%\n as.numeric() %>%\n as.factor() # making consecutive numeric factor\n )\n\narm_ref_comp <- list(\n ARMCD = list(\n ref = \"ARM A\",\n comp = c(\"ARM B\", \"ARM C\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n cdisc_dataset(\"ADQS\", adqs),\n code = '\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADQS <- synthetic_cdisc_dataset(\"latest\", \"adqs\") %>%\n dplyr::filter(ABLFL != \"Y\" & ABLFL2 != \"Y\") %>%\n dplyr::filter(AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\")) %>%\n dplyr::mutate(\n AVISIT = as.factor(AVISIT),\n AVISITN = rank(AVISITN) %>%\n as.factor() %>%\n as.numeric() %>%\n as.factor() # making consecutive numeric factor\n )\n ',\n check = TRUE\n ),\n modules = modules(\n tm_a_mmrm(\n label = \"MMRM\",\n dataname = \"ADQS\",\n aval_var = choices_selected(c(\"AVAL\", \"CHG\"), \"AVAL\"),\n id_var = choices_selected(c(\"USUBJID\", \"SUBJID\"), \"USUBJID\"),\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARMCD\"),\n visit_var = choices_selected(c(\"AVISIT\", \"AVISITN\"), \"AVISIT\"),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n choices = value_choices(adqs, \"PARAMCD\", \"PARAM\"),\n selected = \"FKSI-FWB\"\n ),\n cov_var = choices_selected(c(\"BASE\", \"AGE\", \"SEX\", \"BASE:AVISIT\"), NULL),\n conf_level = choices_selected(c(0.95, 0.9, 0.8), 0.95)\n )\n )\n)\n\n[INFO] 2023-08-04 14:53:37.7847 pid:4570 token:[] teal.modules.clinical Initializing tm_a_mmrm\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] nestcolor_0.1.2.9001 scda_0.1.6.9010 \n [9] tern.mmrm_0.2.2.9005 tern_0.8.5.9006 \n[11] rtables_0.6.2.9001 magrittr_2.0.3 \n[13] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 farver_2.1.1 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 sass_0.4.7 \n[16] rlang_1.1.1 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 mmrm_0.2.2 knitr_1.43 \n[22] labeling_0.4.2 htmlwidgets_1.6.2 withr_2.5.0 \n[25] purrr_1.0.1 numDeriv_2016.8-1.1 shinyWidgets_0.7.6 \n[28] geepack_1.3.9 grid_4.3.1 fansi_1.0.4 \n[31] teal.logger_0.1.1.9009 xtable_1.8-4 colorspace_2.1-0 \n[34] ggplot2_3.4.2 MASS_7.3-60 emmeans_1.8.7 \n[37] scales_1.2.1 cli_3.6.1 mvtnorm_1.2-2 \n[40] rmarkdown_2.23 generics_0.1.3 rstudioapi_0.15.0 \n[43] cachem_1.0.8 stringr_1.5.0 splines_4.3.1 \n[46] assertthat_0.2.1 parallel_4.3.1 vctrs_0.6.3 \n[49] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[52] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[55] fontawesome_0.5.1 jquerylib_0.1.4 tidyr_1.3.0 \n[58] glue_1.6.2 parallelly_1.36.0 ps_1.7.5 \n[61] codetools_0.2-19 cowplot_1.1.1 stringi_1.7.12 \n[64] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[67] munsell_0.5.0 tibble_3.2.1 logger_0.2.2 \n[70] pillar_1.9.0 htmltools_0.5.5 brio_1.1.3 \n[73] R6_2.5.1 TMB_1.9.5 Rdpack_2.4 \n[76] evaluate_0.21 lattice_0.21-8 rbibutils_2.2.13 \n[79] backports_1.4.1 memoise_2.0.1 broom_1.0.5 \n[82] teal.reporter_0.1.1.9020 bslib_0.5.0 httpuv_1.6.11 \n[85] Rcpp_1.0.11 shinyvalidate_0.1.2 coda_0.19-4 \n[88] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[91] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/graphs/other/mmrmg01.lock'.\n\n\nDownload" }, { "objectID": "graphs/other/brg01.html", @@ -669,49 +669,49 @@ "href": "graphs/other/ippg01.html", "title": "IPPG01", "section": "", - "text": "For illustration purposes, we will subset the adlb dataset for safety population in treatment arm A and a specific lab parameter (ALT).\n\n\nData Setup\nStandard Plot\nPlot with Patient Baselines as Reference\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(nestcolor)\n\n# use small sample size\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% slice(1:15)\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>% filter(USUBJID %in% adsl$USUBJID)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadlb <- df_explicit_na(adlb)\n\nadlb_f <- adlb %>%\n filter(\n SAFFL == \"Y\",\n PARAMCD == \"ALT\",\n AVISIT != \"SCREENING\",\n ARMCD == \"ARM A\"\n ) %>%\n mutate(Patient_ID = sub(\".*id-\", \"\", USUBJID))\n\n\n\n\nThe user can select different plotting_choices depending on their preference. To demonstrate, separate plots are produced with a maximum of 3 observations each.\n\nCodeplots <- g_ipp(\n df = adlb_f,\n xvar = \"AVISIT\",\n yvar = \"AVAL\",\n xlab = \"Visit\",\n ylab = \"SGOT/ALT (U/L)\",\n id_var = \"Patient_ID\",\n title = \"Individual Patient Plots\",\n subtitle = \"Treatment Arm A\",\n plotting_choices = \"split_by_max_obs\",\n max_obs_per_plot = 3\n)\nplots\n\n[[1]]\n\n\n\n\n\n\n[[2]]\n\n\n\n\n\n\n\nHere, patients’ individual baseline values will be shown for reference. Note that users can provide their own custom theme to the function via the ggtheme argument.\n\nCodeplots <- g_ipp(\n df = adlb_f,\n xvar = \"AVISIT\",\n yvar = \"AVAL\",\n xlab = \"Visit\",\n ylab = \"SGOT/ALT (U/L)\",\n id_var = \"Patient_ID\",\n title = \"Individual Patient Plots\",\n subtitle = \"Treatment Arm A\",\n add_baseline_hline = TRUE,\n yvar_baseline = \"BASE\",\n ggtheme = theme_minimal(),\n plotting_choices = \"split_by_max_obs\",\n max_obs_per_plot = 3\n)\nplots\n\n[[1]]\n\n\n\n\n\n\n[[2]]\n\n\n\n\n\n\n\n\nCodelibrary(teal)\nlibrary(teal.modules.clinical)\nlibrary(tern)\nlibrary(scda)\n\n# use small sample size\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% slice(1:15)\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>% filter(USUBJID %in% adsl$USUBJID)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb) %>%\n dplyr::filter(AVISIT != \"SCREENING\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\n \"ADSL\",\n adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% slice(1:15)\n ADSL <- df_explicit_na(ADSL)'\n ),\n cdisc_dataset(\n \"ADLB\",\n adlb,\n code = 'ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>% filter(USUBJID %in% adsl$USUBJID)\n ADLB <- df_explicit_na(ADLB) %>%\n dplyr::filter(USUBJID %in% ADSL$USUBJID,\n AVISIT != \"SCREENING\")'\n )\n ),\n modules = modules(\n tm_g_ipp(\n label = \"Individual Patient Plot\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n value_choices(adlb, c(\"ARMCD\")),\n \"ARM A\"\n ),\n paramcd = choices_selected(\n value_choices(adlb, \"PARAMCD\"),\n \"ALT\"\n ),\n aval_var = choices_selected(\n variable_choices(adlb, c(\"AVAL\")),\n \"AVAL\"\n ),\n avalu_var = choices_selected(\n variable_choices(adlb, c(\"AVALU\")),\n \"AVALU\",\n fixed = TRUE\n ),\n id_var = choices_selected(\n variable_choices(adlb, c(\"USUBJID\")),\n \"USUBJID\",\n fixed = TRUE\n ),\n visit_var = choices_selected(\n variable_choices(adlb, c(\"AVISIT\")),\n \"AVISIT\"\n ),\n base_var = choices_selected(\n variable_choices(adlb, c(\"BASE\")),\n \"BASE\",\n fixed = TRUE\n ),\n add_baseline_hline = FALSE,\n separate_by_obs = FALSE\n )\n )\n)\n\n[INFO] 2023-08-04 14:39:53.0868 pid:4973 token:[] teal.modules.clinical Initializing tm_g_ipp\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] nestcolor_0.1.2.9001 ggplot2_3.4.2 \n [9] dplyr_1.1.2 scda_0.1.6.9010 \n[11] tern_0.8.5.9006 rtables_0.6.2.9001 \n[13] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 systemfonts_1.0.4 callr_3.7.3 \n[10] vctrs_0.6.3 pkgconfig_2.0.3 fastmap_1.1.1 \n[13] backports_1.4.1 ellipsis_0.3.2 fontawesome_0.5.1 \n[16] labeling_0.4.2 utf8_1.2.3 promises_1.2.0.1 \n[19] rmarkdown_2.23 ps_1.7.5 ragg_1.2.5 \n[22] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[25] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[28] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[31] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[34] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[37] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[40] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[43] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[46] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[49] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[52] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[55] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[58] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[61] generics_0.1.3 munsell_0.5.0 scales_1.2.1 \n[64] xtable_1.8-4 glue_1.6.2 emmeans_1.8.7 \n[67] tools_4.3.1 webshot_0.5.5 forcats_1.0.0 \n[70] mvtnorm_1.2-2 grid_4.3.1 tidyr_1.3.0 \n[73] rbibutils_2.2.13 colorspace_2.1-0 nlme_3.1-162 \n[76] cli_3.6.1 textshaping_0.3.6 fansi_1.0.4 \n[79] geepack_1.3.9 gtable_0.3.3 R.methodsS3_1.8.2 \n[82] sass_0.4.7 digest_0.6.33 htmlwidgets_1.6.2 \n[85] farver_2.1.1 memoise_2.0.1 htmltools_0.5.5 \n[88] R.oo_1.25.0 lifecycle_1.0.3 shinyWidgets_0.7.6 \n[91] mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/graphs/other/ippg01.lock'.\n\n\nDownload" + "text": "For illustration purposes, we will subset the adlb dataset for safety population in treatment arm A and a specific lab parameter (ALT).\n\n\nData Setup\nStandard Plot\nPlot with Patient Baselines as Reference\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(nestcolor)\n\n# use small sample size\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% slice(1:15)\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>% filter(USUBJID %in% adsl$USUBJID)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadlb <- df_explicit_na(adlb)\n\nadlb_f <- adlb %>%\n filter(\n SAFFL == \"Y\",\n PARAMCD == \"ALT\",\n AVISIT != \"SCREENING\",\n ARMCD == \"ARM A\"\n ) %>%\n mutate(Patient_ID = sub(\".*id-\", \"\", USUBJID))\n\n\n\n\nThe user can select different plotting_choices depending on their preference. To demonstrate, separate plots are produced with a maximum of 3 observations each.\n\nCodeplots <- g_ipp(\n df = adlb_f,\n xvar = \"AVISIT\",\n yvar = \"AVAL\",\n xlab = \"Visit\",\n ylab = \"SGOT/ALT (U/L)\",\n id_var = \"Patient_ID\",\n title = \"Individual Patient Plots\",\n subtitle = \"Treatment Arm A\",\n plotting_choices = \"split_by_max_obs\",\n max_obs_per_plot = 3\n)\nplots\n\n[[1]]\n\n\n\n\n\n\n[[2]]\n\n\n\n\n\n\n\nHere, patients’ individual baseline values will be shown for reference. Note that users can provide their own custom theme to the function via the ggtheme argument.\n\nCodeplots <- g_ipp(\n df = adlb_f,\n xvar = \"AVISIT\",\n yvar = \"AVAL\",\n xlab = \"Visit\",\n ylab = \"SGOT/ALT (U/L)\",\n id_var = \"Patient_ID\",\n title = \"Individual Patient Plots\",\n subtitle = \"Treatment Arm A\",\n add_baseline_hline = TRUE,\n yvar_baseline = \"BASE\",\n ggtheme = theme_minimal(),\n plotting_choices = \"split_by_max_obs\",\n max_obs_per_plot = 3\n)\nplots\n\n[[1]]\n\n\n\n\n\n\n[[2]]\n\n\n\n\n\n\n\n\nCodelibrary(teal)\nlibrary(teal.modules.clinical)\nlibrary(tern)\nlibrary(scda)\n\n# use small sample size\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% slice(1:15)\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>% filter(USUBJID %in% adsl$USUBJID)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb) %>%\n dplyr::filter(AVISIT != \"SCREENING\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\n \"ADSL\",\n adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% slice(1:15)\n ADSL <- df_explicit_na(ADSL)'\n ),\n cdisc_dataset(\n \"ADLB\",\n adlb,\n code = 'ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>% filter(USUBJID %in% adsl$USUBJID)\n ADLB <- df_explicit_na(ADLB) %>%\n dplyr::filter(USUBJID %in% ADSL$USUBJID,\n AVISIT != \"SCREENING\")'\n )\n ),\n modules = modules(\n tm_g_ipp(\n label = \"Individual Patient Plot\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n value_choices(adlb, c(\"ARMCD\")),\n \"ARM A\"\n ),\n paramcd = choices_selected(\n value_choices(adlb, \"PARAMCD\"),\n \"ALT\"\n ),\n aval_var = choices_selected(\n variable_choices(adlb, c(\"AVAL\")),\n \"AVAL\"\n ),\n avalu_var = choices_selected(\n variable_choices(adlb, c(\"AVALU\")),\n \"AVALU\",\n fixed = TRUE\n ),\n id_var = choices_selected(\n variable_choices(adlb, c(\"USUBJID\")),\n \"USUBJID\",\n fixed = TRUE\n ),\n visit_var = choices_selected(\n variable_choices(adlb, c(\"AVISIT\")),\n \"AVISIT\"\n ),\n base_var = choices_selected(\n variable_choices(adlb, c(\"BASE\")),\n \"BASE\",\n fixed = TRUE\n ),\n add_baseline_hline = FALSE,\n separate_by_obs = FALSE\n )\n )\n)\n\n[INFO] 2023-08-04 14:55:49.9678 pid:4978 token:[] teal.modules.clinical Initializing tm_g_ipp\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] nestcolor_0.1.2.9001 ggplot2_3.4.2 \n [9] dplyr_1.1.2 scda_0.1.6.9010 \n[11] tern_0.8.5.9006 rtables_0.6.2.9001 \n[13] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 systemfonts_1.0.4 callr_3.7.3 \n[10] vctrs_0.6.3 pkgconfig_2.0.3 fastmap_1.1.1 \n[13] backports_1.4.1 ellipsis_0.3.2 fontawesome_0.5.1 \n[16] labeling_0.4.2 utf8_1.2.3 promises_1.2.0.1 \n[19] rmarkdown_2.23 ps_1.7.5 ragg_1.2.5 \n[22] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[25] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[28] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[31] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[34] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[37] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[40] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[43] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[46] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[49] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[52] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[55] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[58] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[61] generics_0.1.3 munsell_0.5.0 scales_1.2.1 \n[64] xtable_1.8-4 glue_1.6.2 emmeans_1.8.7 \n[67] tools_4.3.1 webshot_0.5.5 forcats_1.0.0 \n[70] mvtnorm_1.2-2 grid_4.3.1 tidyr_1.3.0 \n[73] rbibutils_2.2.13 colorspace_2.1-0 nlme_3.1-162 \n[76] cli_3.6.1 textshaping_0.3.6 fansi_1.0.4 \n[79] geepack_1.3.9 gtable_0.3.3 R.methodsS3_1.8.2 \n[82] sass_0.4.7 digest_0.6.33 htmlwidgets_1.6.2 \n[85] farver_2.1.1 memoise_2.0.1 htmltools_0.5.5 \n[88] R.oo_1.25.0 lifecycle_1.0.3 shinyWidgets_0.7.6 \n[91] mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/graphs/other/ippg01.lock'.\n\n\nDownload" }, { "objectID": "graphs/other/fstg01.html", "href": "graphs/other/fstg01.html", "title": "FSTG01", "section": "", - "text": "Data Setup\nStandard Plot\nPlot Specifying Class Variables and Options for the Treatment Variable\nPlot Selecting Columns and Changing the Alpha Level\nPlot with Fixed Symbol Size\nPlot of CR Only, Setting Values Indicating Response\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\nlibrary(nestcolor)\n\nadsl_f <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n select(STUDYID, USUBJID, ARMCD, ARM, SEX, BMRKR2, STRATA1, STRATA2)\n\nadrs_f <- synthetic_cdisc_dataset(\"latest\", \"adrs\") %>%\n filter(PARAMCD == \"INVET\") %>%\n select(STUDYID, USUBJID, PARAMCD, AVISIT, AVALC)\n\nanl <- inner_join(adsl_f, adrs_f, by = c(\"STUDYID\", \"USUBJID\"))\nanl <- df_explicit_na(anl)\nanl_labels <- var_labels(anl)\n\nanl_rsp_arms_ab <- anl %>%\n mutate(is_rsp = AVALC %in% c(\"CR\", \"PR\")) %>%\n filter(ARMCD %in% c(\"ARM B\", \"ARM A\")) %>%\n mutate(\n ARMCD = relevel(ARMCD, ref = \"ARM B\") %>%\n droplevels(),\n ARM = relevel(ARM, ref = \"B: Placebo\") %>%\n droplevels()\n ) %>%\n droplevels()\nvar_labels(anl_rsp_arms_ab) <- c(anl_labels, is_rsp = \"Is Responder\")\n\n\n\n\n\nCodedf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"is_rsp\",\n arm = \"ARM\",\n subgroups = c(\"SEX\", \"BMRKR2\"),\n strata_var = \"STRATA2\"\n ),\n data = anl_rsp_arms_ab,\n conf_level = 0.95\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"))\n\np <- g_forest(\n tbl = result\n)\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodeanl_rsp_comb_arms_ac <- anl %>%\n mutate(is_rsp = AVALC %in% c(\"CR\", \"PR\")) %>%\n filter(ARMCD %in% c(\"ARM B\", \"ARM A\", \"ARM C\")) %>%\n mutate(\n ARMCD = relevel(ARMCD, ref = \"ARM B\") %>%\n droplevels() %>%\n combine_levels(levels = c(\"ARM A\", \"ARM C\")),\n ARM = relevel(ARM, ref = \"B: Placebo\") %>%\n droplevels() %>%\n combine_levels(levels = c(\"A: Drug X\", \"C: Combination\")),\n # reorder levels of SEX\n SEX = forcats::fct_relevel(SEX, \"M\", \"F\"),\n # reorder levels of STRATA1 by frequency\n STRATA1 = forcats::fct_infreq(STRATA1)\n ) %>%\n droplevels()\nvar_labels(anl_rsp_comb_arms_ac) <- c(anl_labels, is_rsp = \"Is Responder\")\n\ndf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"is_rsp\",\n arm = \"ARMCD\",\n subgroups = c(\"SEX\", \"BMRKR2\"),\n strata_var = \"STRATA2\"\n ),\n data = anl_rsp_comb_arms_ac,\n conf_level = 0.95\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"))\n\np <- g_forest(\n tbl = result\n)\n\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodedf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"is_rsp\",\n arm = \"ARM\",\n subgroups = c(\"SEX\", \"BMRKR2\"),\n strata_var = \"STRATA2\"\n ),\n data = anl_rsp_arms_ab,\n conf_level = 0.90\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"or\", \"ci\"))\n\np <- g_forest(\n tbl = result\n)\n\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodedf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"is_rsp\",\n arm = \"ARM\",\n subgroups = c(\"SEX\", \"BMRKR2\"),\n strata_var = \"STRATA2\"\n ),\n data = anl_rsp_arms_ab,\n conf_level = 0.95\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"))\n\np <- g_forest(\n tbl = result,\n col_symbol_size = NULL\n)\n\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodeanl_cr_arms_ab <- anl %>%\n mutate(is_rsp = AVALC == \"CR\") %>%\n filter(ARMCD %in% c(\"ARM B\", \"ARM A\")) %>%\n mutate(\n ARMCD = relevel(ARMCD, ref = \"ARM B\") %>%\n droplevels(),\n ARM = relevel(ARM, ref = \"B: Placebo\") %>%\n droplevels()\n ) %>%\n droplevels()\nvar_labels(anl_cr_arms_ab) <- c(anl_labels, is_rsp = \"Is CR\")\n\ndf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"is_rsp\",\n arm = \"ARM\",\n subgroups = c(\"SEX\", \"BMRKR2\"),\n strata_var = \"STRATA2\"\n ),\n data = anl_cr_arms_ab,\n conf_level = 0.95\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"))\n\np <- g_forest(\n tbl = result\n)\n\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\narm_ref_comp <- list(\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n ),\n ARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADRS\", ADRS, code = 'ADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")'),\n check = TRUE\n ),\n modules = modules(\n tm_g_forest_rsp(\n label = \"Forest Response\",\n dataname = \"ADRS\",\n arm_var = choices_selected(\n variable_choices(ADSL, c(\"ARM\", \"ARMCD\")),\n \"ARMCD\"\n ),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(ADRS, \"PARAMCD\", \"PARAM\"),\n \"BESRSPI\"\n ),\n subgroup_var = choices_selected(\n variable_choices(ADSL, names(ADSL)),\n c(\"BMRKR2\", \"SEX\")\n ),\n strata_var = choices_selected(\n variable_choices(ADSL, c(\"STRATA1\", \"STRATA2\")),\n \"STRATA2\"\n ),\n plot_height = c(600L, 200L, 2000L),\n plot_width = c(1100L, 200L, 2000L)\n )\n )\n)\n\n[INFO] 2023-08-04 14:41:01.5000 pid:5242 token:[] teal.modules.clinical Initializing tm_g_forest_rsp\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] nestcolor_0.1.2.9001 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n[13] scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] ragg_1.2.5 generics_0.1.3 rstudioapi_0.15.0 \n[43] cachem_1.0.8 splines_4.3.1 assertthat_0.2.1 \n[46] vctrs_0.6.3 webshot_0.5.5 Matrix_1.6-0 \n[49] jsonlite_1.8.7 callr_3.7.3 systemfonts_1.0.4 \n[52] teal.widgets_0.3.0.9007 fontawesome_0.5.1 tidyr_1.3.0 \n[55] jquerylib_0.1.4 glue_1.6.2 ps_1.7.5 \n[58] codetools_0.2-19 gtable_0.3.3 later_1.3.1 \n[61] shinycssloaders_1.0.0 munsell_0.5.0 tibble_3.2.1 \n[64] styler_1.10.1 logger_0.2.2 pillar_1.9.0 \n[67] htmltools_0.5.5 R6_2.5.1 textshaping_0.3.6 \n[70] Rdpack_2.4 evaluate_0.21 lattice_0.21-8 \n[73] R.methodsS3_1.8.2 rbibutils_2.2.13 backports_1.4.1 \n[76] memoise_2.0.1 broom_1.0.5 teal.reporter_0.1.1.9020\n[79] httpuv_1.6.11 bslib_0.5.0 Rcpp_1.0.11 \n[82] teal.code_0.3.0.9009 shinyvalidate_0.1.2 coda_0.19-4 \n[85] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[88] forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/graphs/other/fstg01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Plot\nPlot Specifying Class Variables and Options for the Treatment Variable\nPlot Selecting Columns and Changing the Alpha Level\nPlot with Fixed Symbol Size\nPlot of CR Only, Setting Values Indicating Response\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\nlibrary(nestcolor)\n\nadsl_f <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n select(STUDYID, USUBJID, ARMCD, ARM, SEX, BMRKR2, STRATA1, STRATA2)\n\nadrs_f <- synthetic_cdisc_dataset(\"latest\", \"adrs\") %>%\n filter(PARAMCD == \"INVET\") %>%\n select(STUDYID, USUBJID, PARAMCD, AVISIT, AVALC)\n\nanl <- inner_join(adsl_f, adrs_f, by = c(\"STUDYID\", \"USUBJID\"))\nanl <- df_explicit_na(anl)\nanl_labels <- var_labels(anl)\n\nanl_rsp_arms_ab <- anl %>%\n mutate(is_rsp = AVALC %in% c(\"CR\", \"PR\")) %>%\n filter(ARMCD %in% c(\"ARM B\", \"ARM A\")) %>%\n mutate(\n ARMCD = relevel(ARMCD, ref = \"ARM B\") %>%\n droplevels(),\n ARM = relevel(ARM, ref = \"B: Placebo\") %>%\n droplevels()\n ) %>%\n droplevels()\nvar_labels(anl_rsp_arms_ab) <- c(anl_labels, is_rsp = \"Is Responder\")\n\n\n\n\n\nCodedf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"is_rsp\",\n arm = \"ARM\",\n subgroups = c(\"SEX\", \"BMRKR2\"),\n strata_var = \"STRATA2\"\n ),\n data = anl_rsp_arms_ab,\n conf_level = 0.95\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"))\n\np <- g_forest(\n tbl = result\n)\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodeanl_rsp_comb_arms_ac <- anl %>%\n mutate(is_rsp = AVALC %in% c(\"CR\", \"PR\")) %>%\n filter(ARMCD %in% c(\"ARM B\", \"ARM A\", \"ARM C\")) %>%\n mutate(\n ARMCD = relevel(ARMCD, ref = \"ARM B\") %>%\n droplevels() %>%\n combine_levels(levels = c(\"ARM A\", \"ARM C\")),\n ARM = relevel(ARM, ref = \"B: Placebo\") %>%\n droplevels() %>%\n combine_levels(levels = c(\"A: Drug X\", \"C: Combination\")),\n # reorder levels of SEX\n SEX = forcats::fct_relevel(SEX, \"M\", \"F\"),\n # reorder levels of STRATA1 by frequency\n STRATA1 = forcats::fct_infreq(STRATA1)\n ) %>%\n droplevels()\nvar_labels(anl_rsp_comb_arms_ac) <- c(anl_labels, is_rsp = \"Is Responder\")\n\ndf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"is_rsp\",\n arm = \"ARMCD\",\n subgroups = c(\"SEX\", \"BMRKR2\"),\n strata_var = \"STRATA2\"\n ),\n data = anl_rsp_comb_arms_ac,\n conf_level = 0.95\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"))\n\np <- g_forest(\n tbl = result\n)\n\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodedf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"is_rsp\",\n arm = \"ARM\",\n subgroups = c(\"SEX\", \"BMRKR2\"),\n strata_var = \"STRATA2\"\n ),\n data = anl_rsp_arms_ab,\n conf_level = 0.90\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"or\", \"ci\"))\n\np <- g_forest(\n tbl = result\n)\n\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodedf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"is_rsp\",\n arm = \"ARM\",\n subgroups = c(\"SEX\", \"BMRKR2\"),\n strata_var = \"STRATA2\"\n ),\n data = anl_rsp_arms_ab,\n conf_level = 0.95\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"))\n\np <- g_forest(\n tbl = result,\n col_symbol_size = NULL\n)\n\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodeanl_cr_arms_ab <- anl %>%\n mutate(is_rsp = AVALC == \"CR\") %>%\n filter(ARMCD %in% c(\"ARM B\", \"ARM A\")) %>%\n mutate(\n ARMCD = relevel(ARMCD, ref = \"ARM B\") %>%\n droplevels(),\n ARM = relevel(ARM, ref = \"B: Placebo\") %>%\n droplevels()\n ) %>%\n droplevels()\nvar_labels(anl_cr_arms_ab) <- c(anl_labels, is_rsp = \"Is CR\")\n\ndf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"is_rsp\",\n arm = \"ARM\",\n subgroups = c(\"SEX\", \"BMRKR2\"),\n strata_var = \"STRATA2\"\n ),\n data = anl_cr_arms_ab,\n conf_level = 0.95\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"))\n\np <- g_forest(\n tbl = result\n)\n\ngrid::grid.draw(p)\n\n\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\narm_ref_comp <- list(\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n ),\n ARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", ADSL, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADRS\", ADRS, code = 'ADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")'),\n check = TRUE\n ),\n modules = modules(\n tm_g_forest_rsp(\n label = \"Forest Response\",\n dataname = \"ADRS\",\n arm_var = choices_selected(\n variable_choices(ADSL, c(\"ARM\", \"ARMCD\")),\n \"ARMCD\"\n ),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(ADRS, \"PARAMCD\", \"PARAM\"),\n \"BESRSPI\"\n ),\n subgroup_var = choices_selected(\n variable_choices(ADSL, names(ADSL)),\n c(\"BMRKR2\", \"SEX\")\n ),\n strata_var = choices_selected(\n variable_choices(ADSL, c(\"STRATA1\", \"STRATA2\")),\n \"STRATA2\"\n ),\n plot_height = c(600L, 200L, 2000L),\n plot_width = c(1100L, 200L, 2000L)\n )\n )\n)\n\n[INFO] 2023-08-04 14:57:02.4890 pid:5247 token:[] teal.modules.clinical Initializing tm_g_forest_rsp\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] nestcolor_0.1.2.9001 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n[13] scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] ragg_1.2.5 generics_0.1.3 rstudioapi_0.15.0 \n[43] cachem_1.0.8 splines_4.3.1 assertthat_0.2.1 \n[46] vctrs_0.6.3 webshot_0.5.5 Matrix_1.6-0 \n[49] jsonlite_1.8.7 callr_3.7.3 systemfonts_1.0.4 \n[52] teal.widgets_0.3.0.9007 fontawesome_0.5.1 tidyr_1.3.0 \n[55] jquerylib_0.1.4 glue_1.6.2 ps_1.7.5 \n[58] codetools_0.2-19 gtable_0.3.3 later_1.3.1 \n[61] shinycssloaders_1.0.0 munsell_0.5.0 tibble_3.2.1 \n[64] styler_1.10.1 logger_0.2.2 pillar_1.9.0 \n[67] htmltools_0.5.5 R6_2.5.1 textshaping_0.3.6 \n[70] Rdpack_2.4 evaluate_0.21 lattice_0.21-8 \n[73] R.methodsS3_1.8.2 rbibutils_2.2.13 backports_1.4.1 \n[76] memoise_2.0.1 broom_1.0.5 teal.reporter_0.1.1.9020\n[79] httpuv_1.6.11 bslib_0.5.0 Rcpp_1.0.11 \n[82] teal.code_0.3.0.9009 shinyvalidate_0.1.2 coda_0.19-4 \n[85] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[88] forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- nestcolor [* -> 0.1.2.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/graphs/other/fstg01.lock'.\n\n\nDownload" }, { "objectID": "tables/efficacy/onct05.html", "href": "tables/efficacy/onct05.html", "title": "ONCT05", "section": "", - "text": "Data Setup\nStandard Table\nTable Specifying Class Variables\nTable Selecting Columns and Changing the Alpha Level\nTable Setting Values Indicating Response\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadrs <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadrs <- df_explicit_na(adrs)\n\nadsl <- adsl %>%\n select(STUDYID, USUBJID, ARM, SEX, RACE, STRATA1, STRATA2)\n\nadrs <- adrs %>%\n filter(PARAMCD == \"INVET\") %>%\n select(STUDYID, USUBJID, PARAMCD, AVALC)\n\nanl <- inner_join(adsl, adrs, by = c(\"STUDYID\", \"USUBJID\"))\nanl_labels <- var_labels(anl)\n\nanl <- anl %>%\n filter(ARM %in% c(\"A: Drug X\", \"B: Placebo\")) %>%\n mutate(\n # Reorder levels of factor to make the placebo group the reference arm.\n ARM = relevel(ARM, ref = \"B: Placebo\") %>%\n droplevels()\n ) %>%\n droplevels() %>%\n mutate(rsp = AVALC %in% c(\"CR\", \"PR\"))\n\nvar_labels(anl) <- c(anl_labels, rsp = \"Is Response\")\n\n\n\n\n\nCodedf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"rsp\",\n arm = \"ARM\",\n subgroups = c(\"SEX\", \"STRATA2\")\n ),\n data = anl\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"))\n\nresult\n\nBaseline Risk Factors B: Placebo A: Drug X \n Total n n Responders Response (%) n Responders Response (%) Odds Ratio 95% CI \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAll Patients 268 134 84 62.7% 134 100 74.6% 1.75 (1.04, 2.95)\nSex \n F 161 82 48 58.5% 79 61 77.2% 2.40 (1.21, 4.76)\n M 107 52 36 69.2% 55 39 70.9% 1.08 (0.47, 2.48)\nStratification Factor 2 \n S1 140 67 38 56.7% 73 56 76.7% 2.51 (1.22, 5.20)\n S2 128 67 46 68.7% 61 44 72.1% 1.18 (0.55, 2.53)\n\n\n\n\nHere, the levels of subgroup variables SEX and STRATA1 are reordered. STRATA1 is reordered by frequency.\n\nCodeanl_reorder <- anl %>%\n mutate(\n SEX = forcats::fct_relevel(SEX, \"M\", \"F\"),\n STRATA1 = forcats::fct_infreq(STRATA1)\n )\n\ndf <- extract_rsp_subgroups(\n variables = list(rsp = \"rsp\", arm = \"ARM\", subgroups = c(\"SEX\", \"STRATA1\")),\n data = anl_reorder\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"))\n\nresult\n\nBaseline Risk Factors B: Placebo A: Drug X \n Total n n Responders Response (%) n Responders Response (%) Odds Ratio 95% CI \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAll Patients 268 134 84 62.7% 134 100 74.6% 1.75 (1.04, 2.95)\nSex \n M 107 52 36 69.2% 55 39 70.9% 1.08 (0.47, 2.48)\n F 161 82 48 58.5% 79 61 77.2% 2.40 (1.21, 4.76)\nStratification Factor 1 \n C 94 45 33 73.3% 49 37 75.5% 1.12 (0.44, 2.83)\n B 92 45 26 57.8% 47 32 68.1% 1.56 (0.66, 3.66)\n A 82 44 25 56.8% 38 31 81.6% 3.37 (1.22, 9.28)\n\n\n\n\n\nCodedf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"rsp\",\n arm = \"ARM\",\n subgroups = c(\"SEX\", \"STRATA2\")\n ),\n data = anl,\n conf_level = 0.9,\n method = \"chisq\"\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\", \"pval\"))\n\nresult\n\nBaseline Risk Factors B: Placebo A: Drug X \n Total n n Responders Response (%) n Responders Response (%) Odds Ratio 90% CI p-value (Chi-Squared Test)\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAll Patients 268 134 84 62.7% 134 100 74.6% 1.75 (1.13, 2.72) 0.0351 \nSex \n F 161 82 48 58.5% 79 61 77.2% 2.40 (1.35, 4.27) 0.0113 \n M 107 52 36 69.2% 55 39 70.9% 1.08 (0.54, 2.17) 0.8497 \nStratification Factor 2 \n S1 140 67 38 56.7% 73 56 76.7% 2.51 (1.37, 4.63) 0.0119 \n S2 128 67 46 68.7% 61 44 72.1% 1.18 (0.62, 2.24) 0.6674 \n\n\n\n\nCreate a new variable new_rsp in anl data that uses new criteria for responder.\n\nCodeanl_new <- anl %>%\n mutate(new_rsp = AVALC == \"CR\")\n\ndf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"new_rsp\",\n arm = \"ARM\",\n subgroups = c(\"SEX\", \"STRATA2\")\n ),\n data = anl_new\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"))\n\nresult\n\nBaseline Risk Factors B: Placebo A: Drug X \n Total n n Responders Response (%) n Responders Response (%) Odds Ratio 95% CI \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAll Patients 268 134 47 35.1% 134 60 44.8% 1.50 (0.92, 2.45)\nSex \n F 161 82 25 30.5% 79 39 49.4% 2.22 (1.17, 4.24)\n M 107 52 22 42.3% 55 21 38.2% 0.84 (0.39, 1.83)\nStratification Factor 2 \n S1 140 67 21 31.3% 73 31 42.5% 1.62 (0.81, 3.24)\n S2 128 67 26 38.8% 61 29 47.5% 1.43 (0.71, 2.89)\n\n\n\n\n\nCode# Use table, embedded in response forest plot module.\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\nlibrary(forcats)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadrs <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadrs <- df_explicit_na(adrs)\n\narm_ref_comp <- list(\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n ),\n ARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'),\n cdisc_dataset(\"ADRS\", adrs, code = 'ADRS <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adrs\"))'),\n check = TRUE\n ),\n modules = modules(\n tm_g_forest_rsp(\n label = \"Forest Response\",\n dataname = \"ADRS\",\n arm_var = choices_selected(\n variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n \"ARMCD\"\n ),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(adrs, \"PARAMCD\", \"PARAM\"),\n \"BESRSPI\"\n ),\n subgroup_var = choices_selected(\n variable_choices(adsl, names(adsl)),\n c(\"SEX\")\n ),\n strata_var = choices_selected(\n variable_choices(adsl, c(\"STRATA1\", \"STRATA2\")),\n \"STRATA2\"\n ),\n plot_height = c(600L, 200L, 2000L)\n )\n )\n)\n\n[INFO] 2023-08-04 14:42:19.0751 pid:5453 token:[] teal.modules.clinical Initializing tm_g_forest_rsp\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] forcats_1.0.0 teal.modules.clinical_0.8.15.9013\n [3] teal_0.13.0.9024 teal.transform_0.3.0.9009 \n [5] teal.slice_0.3.0.9028 teal.data_0.2.0.9007 \n [7] shiny_1.7.4.1 scda_0.1.6.9010 \n [9] dplyr_1.1.2 tern_0.8.5.9006 \n[11] rtables_0.6.2.9001 magrittr_2.0.3 \n[13] formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] ragg_1.2.5 generics_0.1.3 rstudioapi_0.15.0 \n[43] cachem_1.0.8 splines_4.3.1 assertthat_0.2.1 \n[46] vctrs_0.6.3 webshot_0.5.5 Matrix_1.6-0 \n[49] jsonlite_1.8.7 callr_3.7.3 systemfonts_1.0.4 \n[52] teal.widgets_0.3.0.9007 testthat_3.1.10 fontawesome_0.5.1 \n[55] tidyr_1.3.0 jquerylib_0.1.4 glue_1.6.2 \n[58] ps_1.7.5 codetools_0.2-19 gtable_0.3.3 \n[61] later_1.3.1 shinycssloaders_1.0.0 munsell_0.5.0 \n[64] tibble_3.2.1 styler_1.10.1 logger_0.2.2 \n[67] pillar_1.9.0 htmltools_0.5.5 brio_1.1.3 \n[70] R6_2.5.1 textshaping_0.3.6 Rdpack_2.4 \n[73] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[76] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[79] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[82] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[85] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[88] checkmate_2.2.0 xfun_0.39 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/onct05.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable Specifying Class Variables\nTable Selecting Columns and Changing the Alpha Level\nTable Setting Values Indicating Response\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadrs <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadrs <- df_explicit_na(adrs)\n\nadsl <- adsl %>%\n select(STUDYID, USUBJID, ARM, SEX, RACE, STRATA1, STRATA2)\n\nadrs <- adrs %>%\n filter(PARAMCD == \"INVET\") %>%\n select(STUDYID, USUBJID, PARAMCD, AVALC)\n\nanl <- inner_join(adsl, adrs, by = c(\"STUDYID\", \"USUBJID\"))\nanl_labels <- var_labels(anl)\n\nanl <- anl %>%\n filter(ARM %in% c(\"A: Drug X\", \"B: Placebo\")) %>%\n mutate(\n # Reorder levels of factor to make the placebo group the reference arm.\n ARM = relevel(ARM, ref = \"B: Placebo\") %>%\n droplevels()\n ) %>%\n droplevels() %>%\n mutate(rsp = AVALC %in% c(\"CR\", \"PR\"))\n\nvar_labels(anl) <- c(anl_labels, rsp = \"Is Response\")\n\n\n\n\n\nCodedf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"rsp\",\n arm = \"ARM\",\n subgroups = c(\"SEX\", \"STRATA2\")\n ),\n data = anl\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"))\n\nresult\n\nBaseline Risk Factors B: Placebo A: Drug X \n Total n n Responders Response (%) n Responders Response (%) Odds Ratio 95% CI \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAll Patients 268 134 84 62.7% 134 100 74.6% 1.75 (1.04, 2.95)\nSex \n F 161 82 48 58.5% 79 61 77.2% 2.40 (1.21, 4.76)\n M 107 52 36 69.2% 55 39 70.9% 1.08 (0.47, 2.48)\nStratification Factor 2 \n S1 140 67 38 56.7% 73 56 76.7% 2.51 (1.22, 5.20)\n S2 128 67 46 68.7% 61 44 72.1% 1.18 (0.55, 2.53)\n\n\n\n\nHere, the levels of subgroup variables SEX and STRATA1 are reordered. STRATA1 is reordered by frequency.\n\nCodeanl_reorder <- anl %>%\n mutate(\n SEX = forcats::fct_relevel(SEX, \"M\", \"F\"),\n STRATA1 = forcats::fct_infreq(STRATA1)\n )\n\ndf <- extract_rsp_subgroups(\n variables = list(rsp = \"rsp\", arm = \"ARM\", subgroups = c(\"SEX\", \"STRATA1\")),\n data = anl_reorder\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"))\n\nresult\n\nBaseline Risk Factors B: Placebo A: Drug X \n Total n n Responders Response (%) n Responders Response (%) Odds Ratio 95% CI \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAll Patients 268 134 84 62.7% 134 100 74.6% 1.75 (1.04, 2.95)\nSex \n M 107 52 36 69.2% 55 39 70.9% 1.08 (0.47, 2.48)\n F 161 82 48 58.5% 79 61 77.2% 2.40 (1.21, 4.76)\nStratification Factor 1 \n C 94 45 33 73.3% 49 37 75.5% 1.12 (0.44, 2.83)\n B 92 45 26 57.8% 47 32 68.1% 1.56 (0.66, 3.66)\n A 82 44 25 56.8% 38 31 81.6% 3.37 (1.22, 9.28)\n\n\n\n\n\nCodedf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"rsp\",\n arm = \"ARM\",\n subgroups = c(\"SEX\", \"STRATA2\")\n ),\n data = anl,\n conf_level = 0.9,\n method = \"chisq\"\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\", \"pval\"))\n\nresult\n\nBaseline Risk Factors B: Placebo A: Drug X \n Total n n Responders Response (%) n Responders Response (%) Odds Ratio 90% CI p-value (Chi-Squared Test)\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAll Patients 268 134 84 62.7% 134 100 74.6% 1.75 (1.13, 2.72) 0.0351 \nSex \n F 161 82 48 58.5% 79 61 77.2% 2.40 (1.35, 4.27) 0.0113 \n M 107 52 36 69.2% 55 39 70.9% 1.08 (0.54, 2.17) 0.8497 \nStratification Factor 2 \n S1 140 67 38 56.7% 73 56 76.7% 2.51 (1.37, 4.63) 0.0119 \n S2 128 67 46 68.7% 61 44 72.1% 1.18 (0.62, 2.24) 0.6674 \n\n\n\n\nCreate a new variable new_rsp in anl data that uses new criteria for responder.\n\nCodeanl_new <- anl %>%\n mutate(new_rsp = AVALC == \"CR\")\n\ndf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"new_rsp\",\n arm = \"ARM\",\n subgroups = c(\"SEX\", \"STRATA2\")\n ),\n data = anl_new\n)\n\nresult <- basic_table() %>%\n tabulate_rsp_subgroups(df, vars = c(\"n_tot\", \"n\", \"n_rsp\", \"prop\", \"or\", \"ci\"))\n\nresult\n\nBaseline Risk Factors B: Placebo A: Drug X \n Total n n Responders Response (%) n Responders Response (%) Odds Ratio 95% CI \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAll Patients 268 134 47 35.1% 134 60 44.8% 1.50 (0.92, 2.45)\nSex \n F 161 82 25 30.5% 79 39 49.4% 2.22 (1.17, 4.24)\n M 107 52 22 42.3% 55 21 38.2% 0.84 (0.39, 1.83)\nStratification Factor 2 \n S1 140 67 21 31.3% 73 31 42.5% 1.62 (0.81, 3.24)\n S2 128 67 26 38.8% 61 29 47.5% 1.43 (0.71, 2.89)\n\n\n\n\n\nCode# Use table, embedded in response forest plot module.\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\nlibrary(forcats)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadrs <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadrs <- df_explicit_na(adrs)\n\narm_ref_comp <- list(\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n ),\n ARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'),\n cdisc_dataset(\"ADRS\", adrs, code = 'ADRS <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adrs\"))'),\n check = TRUE\n ),\n modules = modules(\n tm_g_forest_rsp(\n label = \"Forest Response\",\n dataname = \"ADRS\",\n arm_var = choices_selected(\n variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n \"ARMCD\"\n ),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(adrs, \"PARAMCD\", \"PARAM\"),\n \"BESRSPI\"\n ),\n subgroup_var = choices_selected(\n variable_choices(adsl, names(adsl)),\n c(\"SEX\")\n ),\n strata_var = choices_selected(\n variable_choices(adsl, c(\"STRATA1\", \"STRATA2\")),\n \"STRATA2\"\n ),\n plot_height = c(600L, 200L, 2000L)\n )\n )\n)\n\n[INFO] 2023-08-04 14:58:26.7296 pid:5458 token:[] teal.modules.clinical Initializing tm_g_forest_rsp\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] forcats_1.0.0 teal.modules.clinical_0.8.15.9013\n [3] teal_0.13.0.9024 teal.transform_0.3.0.9009 \n [5] teal.slice_0.3.0.9028 teal.data_0.2.0.9007 \n [7] shiny_1.7.4.1 scda_0.1.6.9010 \n [9] dplyr_1.1.2 tern_0.8.5.9006 \n[11] rtables_0.6.2.9001 magrittr_2.0.3 \n[13] formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] ragg_1.2.5 generics_0.1.3 rstudioapi_0.15.0 \n[43] cachem_1.0.8 splines_4.3.1 assertthat_0.2.1 \n[46] vctrs_0.6.3 webshot_0.5.5 Matrix_1.6-0 \n[49] jsonlite_1.8.7 callr_3.7.3 systemfonts_1.0.4 \n[52] teal.widgets_0.3.0.9007 testthat_3.1.10 fontawesome_0.5.1 \n[55] tidyr_1.3.0 jquerylib_0.1.4 glue_1.6.2 \n[58] ps_1.7.5 codetools_0.2-19 gtable_0.3.3 \n[61] later_1.3.1 shinycssloaders_1.0.0 munsell_0.5.0 \n[64] tibble_3.2.1 styler_1.10.1 logger_0.2.2 \n[67] pillar_1.9.0 htmltools_0.5.5 brio_1.1.3 \n[70] R6_2.5.1 textshaping_0.3.6 Rdpack_2.4 \n[73] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[76] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[79] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[82] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[85] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[88] checkmate_2.2.0 xfun_0.39 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/onct05.lock'.\n\n\nDownload" }, { "objectID": "tables/efficacy/rspt01.html", "href": "tables/efficacy/rspt01.html", "title": "RSPT01", "section": "", - "text": "Data Setup\nStandard Table\nTable Selecting Sections to Display\nTable Modifying Analysis Details like Type of Confidence Interval, Alpha Level, Test Statistic\nTable with Stratified Analysis\nTable Modifying the Definition of Overall Response\nTable Defining New Sections to Display\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadrs <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadrs <- df_explicit_na(adrs)\n\nanl_adrs <- adrs %>%\n filter(PARAMCD == \"INVET\") %>%\n select(STUDYID, USUBJID, PARAMCD, AVISIT, AVALC)\nanl_adsl <- adsl %>%\n select(STUDYID, USUBJID, ARM, STRATA1)\n\n\nData pre-processing is done to label the analysis value (AVALC) so as to improve the readability of the output table. In addition, the response is binary defined (is_rsp, responder yes/no) depending on the analysis value. Finally, for comparison purposes, the reference arm is specified.\n\nCode# Pre-Processing\n\nanl <- anl_adsl %>%\n left_join(anl_adrs, by = c(\"STUDYID\", \"USUBJID\")) %>%\n mutate(rsp_lab = d_onco_rsp_label(AVALC)) %>%\n mutate(is_rsp = AVALC %in% c(\"CR\", \"PR\")) %>%\n mutate(ARM = relevel(ARM, ref = \"A: Drug X\")) %>%\n var_relabel(ARM = \"Description of Planned Arm\")\n\n\n\n\nThe tabulation layout is built in layers for the analysis of overall response and applied to the pre-processed dataset.\n\nCodelyt_01 <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n estimate_proportion(\n vars = \"is_rsp\",\n table_names = \"est_prop\"\n ) %>%\n estimate_proportion_diff(\n vars = \"is_rsp\",\n show_labels = \"visible\",\n var_labels = \"Unstratified Analysis\",\n table_names = \"est_prop_diff\"\n ) %>%\n test_proportion_diff(\n vars = \"is_rsp\",\n table_names = \"test_prop_diff\"\n ) %>%\n estimate_odds_ratio(\n vars = \"is_rsp\",\n table_names = \"est_or\"\n ) %>%\n estimate_multinomial_response(var = \"rsp_lab\")\n\nresult <- build_table(lyt = lyt_01, df = anl)\nresult\n\n A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————\nResponders 100 (74.6%) 84 (62.7%) 81 (61.4%) \n95% CI (Wald, with correction) (66.9, 82.4) (54.1, 71.2) (52.7, 70.0) \nUnstratified Analysis \n Difference in Response rate (%) -11.9 -13.3 \n 95% CI (Wald, with correction) (-23.7, -0.2) (-25.1, -1.4) \n p-value (Chi-Squared Test) 0.0351 0.0204 \nOdds Ratio (95% CI) 0.57 (0.34 - 0.96) 0.54 (0.32 - 0.91)\nComplete Response (CR) 60 (44.8%) 47 (35.1%) 57 (43.2%) \n 95% CI (Wald, with correction) (35.98, 53.57) (26.62, 43.53) (34.35, 52.01) \nPartial Response (PR) 40 (29.9%) 37 (27.6%) 24 (18.2%) \n 95% CI (Wald, with correction) (21.73, 37.97) (19.67, 35.55) (11.22, 25.14) \nStable Disease (SD) 9 (6.7%) 22 (16.4%) 13 (9.8%) \n 95% CI (Wald, with correction) (2.11, 11.33) (9.77, 23.06) (4.39, 15.31) \nProgressive Disease (PD) 24 (17.9%) 16 (11.9%) 33 (25.0%) \n 95% CI (Wald, with correction) (11.05, 24.78) (6.08, 17.80) (17.23, 32.77) \nNot Evaluable (NE) 1 (0.7%) 12 (9.0%) 5 (3.8%) \n 95% CI (Wald, with correction) (0.00, 2.58) (3.75, 14.16) (0.15, 7.42) \n\n\n\n\nRemove (or add) rows of results by removing/adding the corresponding layers from the layout. For instance, the odds-ratio row is removed by simply removing the estimate_odds_ratio call:\n\nCodelyt_02 <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n estimate_proportion(\n vars = \"is_rsp\",\n table_names = \"est_prop\"\n ) %>%\n estimate_proportion_diff(\n vars = \"is_rsp\",\n show_labels = \"visible\",\n var_labels = \"Unstratified Analysis\",\n table_names = \"est_prop_diff\"\n ) %>%\n test_proportion_diff(\n vars = \"is_rsp\",\n table_names = \"test_prop\"\n ) %>%\n estimate_multinomial_response(var = \"rsp_lab\")\n\nresult <- build_table(lyt = lyt_02, df = anl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————\nResponders 100 (74.6%) 84 (62.7%) 81 (61.4%) \n95% CI (Wald, with correction) (66.9, 82.4) (54.1, 71.2) (52.7, 70.0) \nUnstratified Analysis \n Difference in Response rate (%) -11.9 -13.3 \n 95% CI (Wald, with correction) (-23.7, -0.2) (-25.1, -1.4) \n p-value (Chi-Squared Test) 0.0351 0.0204 \nComplete Response (CR) 60 (44.8%) 47 (35.1%) 57 (43.2%) \n 95% CI (Wald, with correction) (35.98, 53.57) (26.62, 43.53) (34.35, 52.01)\nPartial Response (PR) 40 (29.9%) 37 (27.6%) 24 (18.2%) \n 95% CI (Wald, with correction) (21.73, 37.97) (19.67, 35.55) (11.22, 25.14)\nStable Disease (SD) 9 (6.7%) 22 (16.4%) 13 (9.8%) \n 95% CI (Wald, with correction) (2.11, 11.33) (9.77, 23.06) (4.39, 15.31) \nProgressive Disease (PD) 24 (17.9%) 16 (11.9%) 33 (25.0%) \n 95% CI (Wald, with correction) (11.05, 24.78) (6.08, 17.80) (17.23, 32.77)\nNot Evaluable (NE) 1 (0.7%) 12 (9.0%) 5 (3.8%) \n 95% CI (Wald, with correction) (0.00, 2.58) (3.75, 14.16) (0.15, 7.42) \n\n\n\n\nThe confidence level is controlled by the conf_level parameter to the estimation functions. Similarly, the methods for tests and confidence interval can be modified (see ?estimate_proportion_diff).\n\nCodeconf_level <- 0.90\nlyt_03 <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n estimate_proportion(\n vars = \"is_rsp\",\n conf_level = conf_level,\n method = \"clopper-pearson\",\n table_names = \"est_prop\"\n ) %>%\n estimate_proportion_diff(\n vars = \"is_rsp\",\n show_labels = \"visible\",\n var_labels = \"Unstratified Analysis\",\n conf_level = conf_level,\n method = \"ha\",\n table_names = \"est_prop_diff\"\n ) %>%\n test_proportion_diff(\n vars = \"is_rsp\",\n method = \"fisher\",\n table_names = \"test_prop\"\n ) %>%\n estimate_odds_ratio(\n vars = \"is_rsp\",\n conf_level = conf_level,\n table_names = \"est_or\"\n ) %>%\n estimate_multinomial_response(\n var = \"rsp_lab\",\n conf_level = conf_level,\n method = \"clopper-pearson\"\n )\n\nresult <- build_table(lyt = lyt_03, df = anl)\nresult\n\n A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————\nResponders 100 (74.6%) 84 (62.7%) 81 (61.4%) \n90% CI (Clopper-Pearson) (67.7, 80.7) (55.3, 69.7) (53.9, 68.5) \nUnstratified Analysis \n Difference in Response rate (%) -11.9 -13.3 \n 90% CI (Anderson-Hauck) (-21.6, -2.3) (-23.0, -3.5) \n p-value (Fisher's Exact Test) 0.0479 0.0253 \nOdds Ratio (90% CI) 0.57 (0.37 - 0.89) 0.54 (0.35 - 0.84)\nComplete Response (CR) 60 (44.8%) 47 (35.1%) 57 (43.2%) \n 90% CI (Clopper-Pearson) (37.48, 52.25) (28.22, 42.43) (35.88, 50.71) \nPartial Response (PR) 40 (29.9%) 37 (27.6%) 24 (18.2%) \n 90% CI (Clopper-Pearson) (23.36, 37.02) (21.31, 34.67) (12.87, 24.61) \nStable Disease (SD) 9 (6.7%) 22 (16.4%) 13 (9.8%) \n 90% CI (Clopper-Pearson) (3.55, 11.43) (11.38, 22.61) (5.92, 15.20) \nProgressive Disease (PD) 24 (17.9%) 16 (11.9%) 33 (25.0%) \n 90% CI (Clopper-Pearson) (12.67, 24.25) (7.63, 17.57) (18.90, 31.97) \nNot Evaluable (NE) 1 (0.7%) 12 (9.0%) 5 (3.8%) \n 90% CI (Clopper-Pearson) (0.04, 3.49) (5.25, 14.11) (1.50, 7.80) \n\n\n\n\nThe stratified analysis section can be added by defining the analyses needed with control_binary_comparison for the argument strat_analysis and identifying the stratification variables to use.\n\nCodestrata <- \"STRATA1\"\nlyt_04 <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n estimate_proportion(\n vars = \"is_rsp\",\n table_names = \"est_prop\"\n ) %>%\n estimate_proportion_diff(\n vars = \"is_rsp\",\n show_labels = \"visible\",\n var_labels = \"Unstratified Analysis\",\n table_names = \"est_prop_diff\"\n ) %>%\n test_proportion_diff(\n vars = \"is_rsp\",\n table_names = \"test_prop\"\n ) %>%\n estimate_odds_ratio(\n vars = \"is_rsp\",\n table_names = \"est_or\"\n ) %>%\n estimate_proportion_diff(\n vars = \"is_rsp\",\n show_labels = \"visible\",\n var_labels = \"Stratified Analysis\",\n method = \"cmh\",\n variables = list(strata = strata),\n table_names = \"est_prop_diff_strat\"\n ) %>%\n test_proportion_diff(\n vars = \"is_rsp\",\n method = \"cmh\",\n variables = list(strata = strata),\n table_names = \"test_prop_strat\"\n ) %>%\n estimate_odds_ratio(\n vars = \"is_rsp\",\n variables = list(strata = strata, arm = \"ARM\"),\n table_names = \"est_or_strat\"\n ) %>%\n estimate_multinomial_response(var = \"rsp_lab\")\n\nresult <- build_table(lyt = lyt_04, df = anl)\nresult\n\n A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nResponders 100 (74.6%) 84 (62.7%) 81 (61.4%) \n95% CI (Wald, with correction) (66.9, 82.4) (54.1, 71.2) (52.7, 70.0) \nUnstratified Analysis \n Difference in Response rate (%) -11.9 -13.3 \n 95% CI (Wald, with correction) (-23.7, -0.2) (-25.1, -1.4) \n p-value (Chi-Squared Test) 0.0351 0.0204 \nOdds Ratio (95% CI) 0.57 (0.34 - 0.96) 0.54 (0.32 - 0.91)\nStratified Analysis \n Difference in Response rate (%) -11.9 -13.5 \n 95% CI (CMH, without correction) (-22.7, -1.0) (-24.5, -2.5) \n p-value (Cochran-Mantel-Haenszel Test) 0.0366 0.0180 \nOdds Ratio (95% CI) 0.57 (0.34 - 0.96) 0.54 (0.32 - 0.90)\nComplete Response (CR) 60 (44.8%) 47 (35.1%) 57 (43.2%) \n 95% CI (Wald, with correction) (35.98, 53.57) (26.62, 43.53) (34.35, 52.01) \nPartial Response (PR) 40 (29.9%) 37 (27.6%) 24 (18.2%) \n 95% CI (Wald, with correction) (21.73, 37.97) (19.67, 35.55) (11.22, 25.14) \nStable Disease (SD) 9 (6.7%) 22 (16.4%) 13 (9.8%) \n 95% CI (Wald, with correction) (2.11, 11.33) (9.77, 23.06) (4.39, 15.31) \nProgressive Disease (PD) 24 (17.9%) 16 (11.9%) 33 (25.0%) \n 95% CI (Wald, with correction) (11.05, 24.78) (6.08, 17.80) (17.23, 32.77) \nNot Evaluable (NE) 1 (0.7%) 12 (9.0%) 5 (3.8%) \n 95% CI (Wald, with correction) (0.00, 2.58) (3.75, 14.16) (0.15, 7.42) \n\n\n\n\nThe definition of responders is realized during the pre-processing step. The layout does not need to be modified and can be reused.\n\nCodeanl <- anl_adsl %>%\n left_join(anl_adrs, by = c(\"STUDYID\", \"USUBJID\")) %>%\n mutate(rsp_lab = d_onco_rsp_label(AVALC)) %>%\n mutate(is_rsp = AVALC == \"CR\") %>%\n mutate(ARM = relevel(ARM, ref = \"A: Drug X\")) %>%\n var_relabel(ARM = \"Description of Planned Arm\")\n\nresult <- build_table(lyt = lyt_01, df = anl)\nresult\n\n A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————\nResponders 60 (44.8%) 47 (35.1%) 57 (43.2%) \n95% CI (Wald, with correction) (36.0, 53.6) (26.6, 43.5) (34.4, 52.0) \nUnstratified Analysis \n Difference in Response rate (%) -9.7 -1.6 \n 95% CI (Wald, with correction) (-22.1, 2.7) (-14.3, 11.1) \n p-value (Chi-Squared Test) 0.1049 0.7934 \nOdds Ratio (95% CI) 0.67 (0.41 - 1.09) 0.94 (0.58 - 1.52)\nComplete Response (CR) 60 (44.8%) 47 (35.1%) 57 (43.2%) \n 95% CI (Wald, with correction) (35.98, 53.57) (26.62, 43.53) (34.35, 52.01) \nPartial Response (PR) 40 (29.9%) 37 (27.6%) 24 (18.2%) \n 95% CI (Wald, with correction) (21.73, 37.97) (19.67, 35.55) (11.22, 25.14) \nStable Disease (SD) 9 (6.7%) 22 (16.4%) 13 (9.8%) \n 95% CI (Wald, with correction) (2.11, 11.33) (9.77, 23.06) (4.39, 15.31) \nProgressive Disease (PD) 24 (17.9%) 16 (11.9%) 33 (25.0%) \n 95% CI (Wald, with correction) (11.05, 24.78) (6.08, 17.80) (17.23, 32.77) \nNot Evaluable (NE) 1 (0.7%) 12 (9.0%) 5 (3.8%) \n 95% CI (Wald, with correction) (0.00, 2.58) (3.75, 14.16) (0.15, 7.42) \n\n\n\n\nSimilarly to in the previous tab, redefinition or relabeling of the result is a pre-processing step and the original table layout can be reused.\n\nCodeanl <- anl_adsl %>%\n left_join(anl_adrs, by = c(\"STUDYID\", \"USUBJID\")) %>%\n mutate(rsp_lab = as.character(d_onco_rsp_label(AVALC))) %>%\n mutate(\n rsp_lab = case_when(\n rsp_lab == \"Complete Response (CR)\" ~ \"No Progression\",\n rsp_lab == \"Partial Response (PR)\" ~ \"No Progression\",\n rsp_lab == \"Stable Disease (SD)\" ~ \"No Progression\",\n TRUE ~ rsp_lab\n )\n ) %>%\n mutate(is_rsp = rsp_lab %in% \"No Progression\") %>%\n mutate(ARM = relevel(ARM, ref = \"A: Drug X\")) %>%\n var_relabel(ARM = \"Description of Planned Arm\")\n\nresult <- build_table(lyt = lyt_01, df = anl)\nresult\n\n A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————\nResponders 109 (81.3%) 106 (79.1%) 94 (71.2%) \n95% CI (Wald, with correction) (74.4, 88.3) (71.8, 86.4) (63.1, 79.3) \nUnstratified Analysis \n Difference in Response rate (%) -2.2 -10.1 \n 95% CI (Wald, with correction) (-12.5, 8.0) (-21.0, 0.8) \n p-value (Chi-Squared Test) 0.6455 0.0520 \nOdds Ratio (95% CI) 0.87 (0.48 - 1.59) 0.57 (0.32 - 1.01)\nProgressive Disease (PD) 24 (17.9%) 16 (11.9%) 33 (25.0%) \n 95% CI (Wald, with correction) (11.05, 24.78) (6.08, 17.80) (17.23, 32.77) \nNo Progression 109 (81.3%) 106 (79.1%) 94 (71.2%) \n 95% CI (Wald, with correction) (74.37, 88.31) (71.85, 86.36) (63.11, 79.31) \nNot Evaluable (NE) 1 (0.7%) 12 (9.0%) 5 (3.8%) \n 95% CI (Wald, with correction) (0.00, 2.58) (3.75, 14.16) (0.15, 7.42) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nADSL <- df_explicit_na(ADSL)\nADRS <- df_explicit_na(ADRS)\n\nADSL <- ADSL %>%\n mutate(Dum_ARM = factor(rep(\"Single ARM\", nrow(.))))\nADRS <- ADRS %>%\n mutate(Dum_ARM = factor(rep(\"Single ARM\", nrow(.))))\n\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\n dataname = \"ADSL\",\n x = ADSL,\n code =\n 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\")) %>%\n mutate(Dum_ARM = factor(rep(\"Single ARM\", nrow(.))))'\n ),\n cdisc_dataset(\n dataname = \"ADRS\",\n x = ADRS,\n code =\n 'ADRS <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adrs\")) %>%\n mutate(Dum_ARM = factor(rep(\"Single ARM\", nrow(.))))'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_binary_outcome(\n label = \"Responders\",\n dataname = \"ADRS\",\n paramcd = choices_selected(\n choices = value_choices(ADRS, \"PARAMCD\", \"PARAM\"),\n selected = \"BESRSPI\"\n ),\n arm_var = choices_selected(\n choices = variable_choices(ADRS, c(\"ARM\", \"ARMCD\", \"ACTARMCD\", \"Dum_ARM\")),\n selected = \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n strata_var = choices_selected(\n choices = variable_choices(ADRS, c(\"SEX\", \"BMRKR2\")),\n select = NULL\n ),\n rsp_table = TRUE\n )\n )\n)\n\n[INFO] 2023-08-04 14:43:33.6968 pid:5667 token:[] teal.modules.clinical Initializing tm_t_binary_outcome\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/rspt01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable Selecting Sections to Display\nTable Modifying Analysis Details like Type of Confidence Interval, Alpha Level, Test Statistic\nTable with Stratified Analysis\nTable Modifying the Definition of Overall Response\nTable Defining New Sections to Display\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadrs <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadrs <- df_explicit_na(adrs)\n\nanl_adrs <- adrs %>%\n filter(PARAMCD == \"INVET\") %>%\n select(STUDYID, USUBJID, PARAMCD, AVISIT, AVALC)\nanl_adsl <- adsl %>%\n select(STUDYID, USUBJID, ARM, STRATA1)\n\n\nData pre-processing is done to label the analysis value (AVALC) so as to improve the readability of the output table. In addition, the response is binary defined (is_rsp, responder yes/no) depending on the analysis value. Finally, for comparison purposes, the reference arm is specified.\n\nCode# Pre-Processing\n\nanl <- anl_adsl %>%\n left_join(anl_adrs, by = c(\"STUDYID\", \"USUBJID\")) %>%\n mutate(rsp_lab = d_onco_rsp_label(AVALC)) %>%\n mutate(is_rsp = AVALC %in% c(\"CR\", \"PR\")) %>%\n mutate(ARM = relevel(ARM, ref = \"A: Drug X\")) %>%\n var_relabel(ARM = \"Description of Planned Arm\")\n\n\n\n\nThe tabulation layout is built in layers for the analysis of overall response and applied to the pre-processed dataset.\n\nCodelyt_01 <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n estimate_proportion(\n vars = \"is_rsp\",\n table_names = \"est_prop\"\n ) %>%\n estimate_proportion_diff(\n vars = \"is_rsp\",\n show_labels = \"visible\",\n var_labels = \"Unstratified Analysis\",\n table_names = \"est_prop_diff\"\n ) %>%\n test_proportion_diff(\n vars = \"is_rsp\",\n table_names = \"test_prop_diff\"\n ) %>%\n estimate_odds_ratio(\n vars = \"is_rsp\",\n table_names = \"est_or\"\n ) %>%\n estimate_multinomial_response(var = \"rsp_lab\")\n\nresult <- build_table(lyt = lyt_01, df = anl)\nresult\n\n A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————\nResponders 100 (74.6%) 84 (62.7%) 81 (61.4%) \n95% CI (Wald, with correction) (66.9, 82.4) (54.1, 71.2) (52.7, 70.0) \nUnstratified Analysis \n Difference in Response rate (%) -11.9 -13.3 \n 95% CI (Wald, with correction) (-23.7, -0.2) (-25.1, -1.4) \n p-value (Chi-Squared Test) 0.0351 0.0204 \nOdds Ratio (95% CI) 0.57 (0.34 - 0.96) 0.54 (0.32 - 0.91)\nComplete Response (CR) 60 (44.8%) 47 (35.1%) 57 (43.2%) \n 95% CI (Wald, with correction) (35.98, 53.57) (26.62, 43.53) (34.35, 52.01) \nPartial Response (PR) 40 (29.9%) 37 (27.6%) 24 (18.2%) \n 95% CI (Wald, with correction) (21.73, 37.97) (19.67, 35.55) (11.22, 25.14) \nStable Disease (SD) 9 (6.7%) 22 (16.4%) 13 (9.8%) \n 95% CI (Wald, with correction) (2.11, 11.33) (9.77, 23.06) (4.39, 15.31) \nProgressive Disease (PD) 24 (17.9%) 16 (11.9%) 33 (25.0%) \n 95% CI (Wald, with correction) (11.05, 24.78) (6.08, 17.80) (17.23, 32.77) \nNot Evaluable (NE) 1 (0.7%) 12 (9.0%) 5 (3.8%) \n 95% CI (Wald, with correction) (0.00, 2.58) (3.75, 14.16) (0.15, 7.42) \n\n\n\n\nRemove (or add) rows of results by removing/adding the corresponding layers from the layout. For instance, the odds-ratio row is removed by simply removing the estimate_odds_ratio call:\n\nCodelyt_02 <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n estimate_proportion(\n vars = \"is_rsp\",\n table_names = \"est_prop\"\n ) %>%\n estimate_proportion_diff(\n vars = \"is_rsp\",\n show_labels = \"visible\",\n var_labels = \"Unstratified Analysis\",\n table_names = \"est_prop_diff\"\n ) %>%\n test_proportion_diff(\n vars = \"is_rsp\",\n table_names = \"test_prop\"\n ) %>%\n estimate_multinomial_response(var = \"rsp_lab\")\n\nresult <- build_table(lyt = lyt_02, df = anl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————\nResponders 100 (74.6%) 84 (62.7%) 81 (61.4%) \n95% CI (Wald, with correction) (66.9, 82.4) (54.1, 71.2) (52.7, 70.0) \nUnstratified Analysis \n Difference in Response rate (%) -11.9 -13.3 \n 95% CI (Wald, with correction) (-23.7, -0.2) (-25.1, -1.4) \n p-value (Chi-Squared Test) 0.0351 0.0204 \nComplete Response (CR) 60 (44.8%) 47 (35.1%) 57 (43.2%) \n 95% CI (Wald, with correction) (35.98, 53.57) (26.62, 43.53) (34.35, 52.01)\nPartial Response (PR) 40 (29.9%) 37 (27.6%) 24 (18.2%) \n 95% CI (Wald, with correction) (21.73, 37.97) (19.67, 35.55) (11.22, 25.14)\nStable Disease (SD) 9 (6.7%) 22 (16.4%) 13 (9.8%) \n 95% CI (Wald, with correction) (2.11, 11.33) (9.77, 23.06) (4.39, 15.31) \nProgressive Disease (PD) 24 (17.9%) 16 (11.9%) 33 (25.0%) \n 95% CI (Wald, with correction) (11.05, 24.78) (6.08, 17.80) (17.23, 32.77)\nNot Evaluable (NE) 1 (0.7%) 12 (9.0%) 5 (3.8%) \n 95% CI (Wald, with correction) (0.00, 2.58) (3.75, 14.16) (0.15, 7.42) \n\n\n\n\nThe confidence level is controlled by the conf_level parameter to the estimation functions. Similarly, the methods for tests and confidence interval can be modified (see ?estimate_proportion_diff).\n\nCodeconf_level <- 0.90\nlyt_03 <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n estimate_proportion(\n vars = \"is_rsp\",\n conf_level = conf_level,\n method = \"clopper-pearson\",\n table_names = \"est_prop\"\n ) %>%\n estimate_proportion_diff(\n vars = \"is_rsp\",\n show_labels = \"visible\",\n var_labels = \"Unstratified Analysis\",\n conf_level = conf_level,\n method = \"ha\",\n table_names = \"est_prop_diff\"\n ) %>%\n test_proportion_diff(\n vars = \"is_rsp\",\n method = \"fisher\",\n table_names = \"test_prop\"\n ) %>%\n estimate_odds_ratio(\n vars = \"is_rsp\",\n conf_level = conf_level,\n table_names = \"est_or\"\n ) %>%\n estimate_multinomial_response(\n var = \"rsp_lab\",\n conf_level = conf_level,\n method = \"clopper-pearson\"\n )\n\nresult <- build_table(lyt = lyt_03, df = anl)\nresult\n\n A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————\nResponders 100 (74.6%) 84 (62.7%) 81 (61.4%) \n90% CI (Clopper-Pearson) (67.7, 80.7) (55.3, 69.7) (53.9, 68.5) \nUnstratified Analysis \n Difference in Response rate (%) -11.9 -13.3 \n 90% CI (Anderson-Hauck) (-21.6, -2.3) (-23.0, -3.5) \n p-value (Fisher's Exact Test) 0.0479 0.0253 \nOdds Ratio (90% CI) 0.57 (0.37 - 0.89) 0.54 (0.35 - 0.84)\nComplete Response (CR) 60 (44.8%) 47 (35.1%) 57 (43.2%) \n 90% CI (Clopper-Pearson) (37.48, 52.25) (28.22, 42.43) (35.88, 50.71) \nPartial Response (PR) 40 (29.9%) 37 (27.6%) 24 (18.2%) \n 90% CI (Clopper-Pearson) (23.36, 37.02) (21.31, 34.67) (12.87, 24.61) \nStable Disease (SD) 9 (6.7%) 22 (16.4%) 13 (9.8%) \n 90% CI (Clopper-Pearson) (3.55, 11.43) (11.38, 22.61) (5.92, 15.20) \nProgressive Disease (PD) 24 (17.9%) 16 (11.9%) 33 (25.0%) \n 90% CI (Clopper-Pearson) (12.67, 24.25) (7.63, 17.57) (18.90, 31.97) \nNot Evaluable (NE) 1 (0.7%) 12 (9.0%) 5 (3.8%) \n 90% CI (Clopper-Pearson) (0.04, 3.49) (5.25, 14.11) (1.50, 7.80) \n\n\n\n\nThe stratified analysis section can be added by defining the analyses needed with control_binary_comparison for the argument strat_analysis and identifying the stratification variables to use.\n\nCodestrata <- \"STRATA1\"\nlyt_04 <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\", ref_group = \"A: Drug X\") %>%\n estimate_proportion(\n vars = \"is_rsp\",\n table_names = \"est_prop\"\n ) %>%\n estimate_proportion_diff(\n vars = \"is_rsp\",\n show_labels = \"visible\",\n var_labels = \"Unstratified Analysis\",\n table_names = \"est_prop_diff\"\n ) %>%\n test_proportion_diff(\n vars = \"is_rsp\",\n table_names = \"test_prop\"\n ) %>%\n estimate_odds_ratio(\n vars = \"is_rsp\",\n table_names = \"est_or\"\n ) %>%\n estimate_proportion_diff(\n vars = \"is_rsp\",\n show_labels = \"visible\",\n var_labels = \"Stratified Analysis\",\n method = \"cmh\",\n variables = list(strata = strata),\n table_names = \"est_prop_diff_strat\"\n ) %>%\n test_proportion_diff(\n vars = \"is_rsp\",\n method = \"cmh\",\n variables = list(strata = strata),\n table_names = \"test_prop_strat\"\n ) %>%\n estimate_odds_ratio(\n vars = \"is_rsp\",\n variables = list(strata = strata, arm = \"ARM\"),\n table_names = \"est_or_strat\"\n ) %>%\n estimate_multinomial_response(var = \"rsp_lab\")\n\nresult <- build_table(lyt = lyt_04, df = anl)\nresult\n\n A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nResponders 100 (74.6%) 84 (62.7%) 81 (61.4%) \n95% CI (Wald, with correction) (66.9, 82.4) (54.1, 71.2) (52.7, 70.0) \nUnstratified Analysis \n Difference in Response rate (%) -11.9 -13.3 \n 95% CI (Wald, with correction) (-23.7, -0.2) (-25.1, -1.4) \n p-value (Chi-Squared Test) 0.0351 0.0204 \nOdds Ratio (95% CI) 0.57 (0.34 - 0.96) 0.54 (0.32 - 0.91)\nStratified Analysis \n Difference in Response rate (%) -11.9 -13.5 \n 95% CI (CMH, without correction) (-22.7, -1.0) (-24.5, -2.5) \n p-value (Cochran-Mantel-Haenszel Test) 0.0366 0.0180 \nOdds Ratio (95% CI) 0.57 (0.34 - 0.96) 0.54 (0.32 - 0.90)\nComplete Response (CR) 60 (44.8%) 47 (35.1%) 57 (43.2%) \n 95% CI (Wald, with correction) (35.98, 53.57) (26.62, 43.53) (34.35, 52.01) \nPartial Response (PR) 40 (29.9%) 37 (27.6%) 24 (18.2%) \n 95% CI (Wald, with correction) (21.73, 37.97) (19.67, 35.55) (11.22, 25.14) \nStable Disease (SD) 9 (6.7%) 22 (16.4%) 13 (9.8%) \n 95% CI (Wald, with correction) (2.11, 11.33) (9.77, 23.06) (4.39, 15.31) \nProgressive Disease (PD) 24 (17.9%) 16 (11.9%) 33 (25.0%) \n 95% CI (Wald, with correction) (11.05, 24.78) (6.08, 17.80) (17.23, 32.77) \nNot Evaluable (NE) 1 (0.7%) 12 (9.0%) 5 (3.8%) \n 95% CI (Wald, with correction) (0.00, 2.58) (3.75, 14.16) (0.15, 7.42) \n\n\n\n\nThe definition of responders is realized during the pre-processing step. The layout does not need to be modified and can be reused.\n\nCodeanl <- anl_adsl %>%\n left_join(anl_adrs, by = c(\"STUDYID\", \"USUBJID\")) %>%\n mutate(rsp_lab = d_onco_rsp_label(AVALC)) %>%\n mutate(is_rsp = AVALC == \"CR\") %>%\n mutate(ARM = relevel(ARM, ref = \"A: Drug X\")) %>%\n var_relabel(ARM = \"Description of Planned Arm\")\n\nresult <- build_table(lyt = lyt_01, df = anl)\nresult\n\n A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————\nResponders 60 (44.8%) 47 (35.1%) 57 (43.2%) \n95% CI (Wald, with correction) (36.0, 53.6) (26.6, 43.5) (34.4, 52.0) \nUnstratified Analysis \n Difference in Response rate (%) -9.7 -1.6 \n 95% CI (Wald, with correction) (-22.1, 2.7) (-14.3, 11.1) \n p-value (Chi-Squared Test) 0.1049 0.7934 \nOdds Ratio (95% CI) 0.67 (0.41 - 1.09) 0.94 (0.58 - 1.52)\nComplete Response (CR) 60 (44.8%) 47 (35.1%) 57 (43.2%) \n 95% CI (Wald, with correction) (35.98, 53.57) (26.62, 43.53) (34.35, 52.01) \nPartial Response (PR) 40 (29.9%) 37 (27.6%) 24 (18.2%) \n 95% CI (Wald, with correction) (21.73, 37.97) (19.67, 35.55) (11.22, 25.14) \nStable Disease (SD) 9 (6.7%) 22 (16.4%) 13 (9.8%) \n 95% CI (Wald, with correction) (2.11, 11.33) (9.77, 23.06) (4.39, 15.31) \nProgressive Disease (PD) 24 (17.9%) 16 (11.9%) 33 (25.0%) \n 95% CI (Wald, with correction) (11.05, 24.78) (6.08, 17.80) (17.23, 32.77) \nNot Evaluable (NE) 1 (0.7%) 12 (9.0%) 5 (3.8%) \n 95% CI (Wald, with correction) (0.00, 2.58) (3.75, 14.16) (0.15, 7.42) \n\n\n\n\nSimilarly to in the previous tab, redefinition or relabeling of the result is a pre-processing step and the original table layout can be reused.\n\nCodeanl <- anl_adsl %>%\n left_join(anl_adrs, by = c(\"STUDYID\", \"USUBJID\")) %>%\n mutate(rsp_lab = as.character(d_onco_rsp_label(AVALC))) %>%\n mutate(\n rsp_lab = case_when(\n rsp_lab == \"Complete Response (CR)\" ~ \"No Progression\",\n rsp_lab == \"Partial Response (PR)\" ~ \"No Progression\",\n rsp_lab == \"Stable Disease (SD)\" ~ \"No Progression\",\n TRUE ~ rsp_lab\n )\n ) %>%\n mutate(is_rsp = rsp_lab %in% \"No Progression\") %>%\n mutate(ARM = relevel(ARM, ref = \"A: Drug X\")) %>%\n var_relabel(ARM = \"Description of Planned Arm\")\n\nresult <- build_table(lyt = lyt_01, df = anl)\nresult\n\n A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————\nResponders 109 (81.3%) 106 (79.1%) 94 (71.2%) \n95% CI (Wald, with correction) (74.4, 88.3) (71.8, 86.4) (63.1, 79.3) \nUnstratified Analysis \n Difference in Response rate (%) -2.2 -10.1 \n 95% CI (Wald, with correction) (-12.5, 8.0) (-21.0, 0.8) \n p-value (Chi-Squared Test) 0.6455 0.0520 \nOdds Ratio (95% CI) 0.87 (0.48 - 1.59) 0.57 (0.32 - 1.01)\nProgressive Disease (PD) 24 (17.9%) 16 (11.9%) 33 (25.0%) \n 95% CI (Wald, with correction) (11.05, 24.78) (6.08, 17.80) (17.23, 32.77) \nNo Progression 109 (81.3%) 106 (79.1%) 94 (71.2%) \n 95% CI (Wald, with correction) (74.37, 88.31) (71.85, 86.36) (63.11, 79.31) \nNot Evaluable (NE) 1 (0.7%) 12 (9.0%) 5 (3.8%) \n 95% CI (Wald, with correction) (0.00, 2.58) (3.75, 14.16) (0.15, 7.42) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nADSL <- df_explicit_na(ADSL)\nADRS <- df_explicit_na(ADRS)\n\nADSL <- ADSL %>%\n mutate(Dum_ARM = factor(rep(\"Single ARM\", nrow(.))))\nADRS <- ADRS %>%\n mutate(Dum_ARM = factor(rep(\"Single ARM\", nrow(.))))\n\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\n dataname = \"ADSL\",\n x = ADSL,\n code =\n 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\")) %>%\n mutate(Dum_ARM = factor(rep(\"Single ARM\", nrow(.))))'\n ),\n cdisc_dataset(\n dataname = \"ADRS\",\n x = ADRS,\n code =\n 'ADRS <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adrs\")) %>%\n mutate(Dum_ARM = factor(rep(\"Single ARM\", nrow(.))))'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_binary_outcome(\n label = \"Responders\",\n dataname = \"ADRS\",\n paramcd = choices_selected(\n choices = value_choices(ADRS, \"PARAMCD\", \"PARAM\"),\n selected = \"BESRSPI\"\n ),\n arm_var = choices_selected(\n choices = variable_choices(ADRS, c(\"ARM\", \"ARMCD\", \"ACTARMCD\", \"Dum_ARM\")),\n selected = \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n strata_var = choices_selected(\n choices = variable_choices(ADRS, c(\"SEX\", \"BMRKR2\")),\n select = NULL\n ),\n rsp_table = TRUE\n )\n )\n)\n\n[INFO] 2023-08-04 14:59:45.2150 pid:5672 token:[] teal.modules.clinical Initializing tm_t_binary_outcome\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/rspt01.lock'.\n\n\nDownload" }, { "objectID": "tables/efficacy/coxt01.html", "href": "tables/efficacy/coxt01.html", "title": "COXT01", "section": "", - "text": "Cox models are the most commonly used methods to estimate the magnitude of the effect in survival analyses. It assumes proportional hazards; that is, it assumes that the ratio of the hazards of the two groups (e.g. two arms) is constant over time. This ratio is referred to as the “hazard ratio” and is one of the most commonly reported metrics to describe the effect size in survival analysis.\n\n\nData Setup\nCox Regression\nCox Regression with Interaction Term\nCox Regression Specifying Covariates\nCox Regression Setting Strata, Ties, Alpha Level\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadtte <- df_explicit_na(adtte)\n\nadsl_filtered <- adsl %>% dplyr::filter(\n RACE %in% c(\"ASIAN\", \"BLACK OR AFRICAN AMERICAN\", \"WHITE\")\n)\nadtte_filtered <- dplyr::inner_join(\n x = adsl_filtered[, c(\"STUDYID\", \"USUBJID\")],\n y = adtte,\n by = c(\"STUDYID\", \"USUBJID\")\n)\n\nanl <- adtte_filtered %>%\n filter(PARAMCD == \"OS\") %>%\n mutate(EVENT = 1 - CNSR) %>%\n filter(ARM %in% c(\"B: Placebo\", \"A: Drug X\")) %>%\n mutate(ARM = droplevels(relevel(ARM, \"B: Placebo\"))) %>%\n mutate(RACE = droplevels(RACE) %>% formatters::with_label(\"Race\"))\n\n# Add variable for column split label\nanl <- anl %>% mutate(col_label = \"Treatment Effect Adjusted for Covariate\")\n\n\n\n\nThe summarize_coxreg function fits, tidies and arranges a Cox regression model in a table layout using the rtables framework. For a Cox regression model, arguments variables, control, and at can be specified (see ?summarize_coxreg for more details and customization options). All variables specified within variables must be present in the data used when building the table.\nTo see the same model as a data.frame object, these three arguments (as well as the data) can be passed to the fit_coxreg_univar function, and the resulting list tidied using broom::tidy().\n\nCodevariables <- list(\n time = \"AVAL\",\n event = \"EVENT\",\n arm = \"ARM\",\n covariates = c(\"AGE\", \"SEX\", \"RACE\")\n)\n\nlyt <- basic_table() %>%\n split_cols_by(\"col_label\") %>%\n summarize_coxreg(variables = variables) %>%\n append_topleft(\"Effect/Covariate Included in the Model\")\n\nresult <- build_table(lyt = lyt, df = anl)\nresult\n\nEffect/Covariate Included in the Model Treatment Effect Adjusted for Covariate \n n Hazard Ratio 95% CI p-value \n—————————————————————————————————————————————————————————————————————————————————————————\nTreatment: \n A: Drug X vs control (B: Placebo) 247 0.97 (0.66, 1.43) 0.8934 \nCovariate: \n Age 247 0.95 (0.65, 1.40) 0.7948 \n Sex 247 0.98 (0.67, 1.43) 0.8970 \n Race 247 0.98 (0.67, 1.44) 0.9239 \n\n\n\n\nThe argument control can be used to modify standard outputs; control_coxreg() helps in adopting the right settings (see ?control_coxreg). For instance, control is used to include the interaction terms.\n\nCodevariables <- list(\n time = \"AVAL\",\n event = \"EVENT\",\n arm = \"ARM\",\n covariates = c(\"AGE\", \"RACE\")\n)\n\nlyt <- basic_table() %>%\n split_cols_by(\"col_label\") %>%\n summarize_coxreg(\n variables = variables,\n control = control_coxreg(interaction = TRUE),\n .stats = c(\"n\", \"hr\", \"ci\", \"pval\", \"pval_inter\")\n ) %>%\n append_topleft(\"Effect/Covariate Included in the Model\")\n\nresult <- build_table(lyt = lyt, df = anl)\nresult\n\nEffect/Covariate Included in the Model Treatment Effect Adjusted for Covariate \n n Hazard Ratio 95% CI p-value Interaction p-value\n——————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment: \n A: Drug X vs control (B: Placebo) 247 0.97 (0.66, 1.43) 0.8934 \nCovariate: \n Age 247 0.7878 \n 34 0.95 (0.65, 1.40) \n Race 247 0.6850 \n ASIAN 1.05 (0.63, 1.75) \n BLACK OR AFRICAN AMERICAN 1.08 (0.51, 2.29) \n WHITE 0.67 (0.27, 1.71) \n\n\n\n\nThe optional argument at allows the user to provide the expected level of estimation for the interaction when the predictor is a quantitative variable. For instance, it might be relevant to choose the age at which the hazard ratio should be estimated. If no input is provided to at, the median value is used in the row name (as in the previous tab).\n\nCodevariables <- list(\n time = \"AVAL\",\n event = \"EVENT\",\n arm = \"ARM\",\n covariates = c(\"AGE\", \"SEX\")\n)\n\nlyt <- basic_table() %>%\n split_cols_by(\"col_label\") %>%\n summarize_coxreg(\n variables = variables,\n control = control_coxreg(interaction = TRUE),\n at = list(AGE = c(30, 40, 50)),\n .stats = c(\"n\", \"hr\", \"ci\", \"pval\", \"pval_inter\")\n ) %>%\n append_topleft(\"Effect/Covariate Included in the Model\")\n\nresult <- build_table(lyt = lyt, df = anl)\nresult\n\nEffect/Covariate Included in the Model Treatment Effect Adjusted for Covariate \n n Hazard Ratio 95% CI p-value Interaction p-value\n——————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment: \n A: Drug X vs control (B: Placebo) 247 0.97 (0.66, 1.43) 0.8934 \nCovariate: \n Age 247 0.7878 \n 30 0.98 (0.63, 1.51) \n 40 0.91 (0.54, 1.51) \n 50 0.84 (0.32, 2.20) \n Sex 247 0.1455 \n F 0.77 (0.47, 1.27) \n M 1.38 (0.75, 2.52) \n\n\n\n\nAdditional controls can be customized using control_coxreg (see ?control_coxreg) such as the ties calculation method and the confidence level. Stratification variables can be added via the strata element of the variables list.\n\nCodevariables <- list(\n time = \"AVAL\",\n event = \"EVENT\",\n arm = \"ARM\",\n covariates = c(\"AGE\", \"RACE\"),\n strata = \"SEX\"\n)\n\ncontrol <- control_coxreg(\n ties = \"breslow\",\n interaction = TRUE,\n conf_level = 0.90\n)\n\nlyt <- basic_table() %>%\n split_cols_by(\"col_label\") %>%\n summarize_coxreg(\n variables = variables,\n control = control,\n at = list(AGE = c(30, 40, 50)),\n .stats = c(\"n\", \"hr\", \"ci\", \"pval\", \"pval_inter\")\n ) %>%\n append_topleft(\"Effect/Covariate Included in the Model\")\n\nresult <- build_table(lyt = lyt, df = anl)\nresult\n\nEffect/Covariate Included in the Model Treatment Effect Adjusted for Covariate \n n Hazard Ratio 90% CI p-value Interaction p-value\n——————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment: \n A: Drug X vs control (B: Placebo) 247 0.98 (0.71, 1.35) 0.9063 \nCovariate: \n Age 247 0.7733 \n 30 0.98 (0.68, 1.42) \n 40 0.91 (0.59, 1.39) \n 50 0.84 (0.38, 1.87) \n Race 247 0.6501 \n ASIAN 1.07 (0.64, 1.77) \n BLACK OR AFRICAN AMERICAN 1.08 (0.51, 2.29) \n WHITE 0.66 (0.26, 1.67) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadtte <- df_explicit_na(adtte)\n\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'adsl <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'),\n cdisc_dataset(\"ADTTE\", adtte, code = 'adtte <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adtte\"))'),\n check = TRUE\n ),\n modules = modules(\n tm_t_coxreg(\n label = \"Cox Reg.\",\n dataname = \"ADTTE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\", \"ACTARMCD\"), \"ARM\"),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(adtte, \"PARAMCD\", \"PARAM\"), \"OS\"\n ),\n strata_var = choices_selected(\n c(\"SEX\", \"STRATA1\", \"STRATA2\"), NULL\n ),\n cov_var = choices_selected(\n c(\"AGE\", \"SEX\", \"RACE\"), \"AGE\"\n ),\n multivariate = FALSE\n )\n )\n)\n\n[INFO] 2023-08-04 14:44:59.4498 pid:5890 token:[] teal.modules.clinical Initializing tm_t_coxreg\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] dplyr_1.1.2 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] stringr_1.5.0 pkgconfig_2.0.3 fastmap_1.1.1 \n[13] backports_1.4.1 ellipsis_0.3.2 fontawesome_0.5.1 \n[16] utf8_1.2.3 promises_1.2.0.1 rmarkdown_2.23 \n[19] ps_1.7.5 purrr_1.0.1 xfun_0.39 \n[22] shinyvalidate_0.1.2 cachem_1.0.8 teal.reporter_0.1.1.9020\n[25] jsonlite_1.8.7 later_1.3.1 styler_1.10.1 \n[28] broom_1.0.5 R6_2.5.1 bslib_0.5.0 \n[31] stringi_1.7.12 car_3.1-2 brio_1.1.3 \n[34] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[37] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[40] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[43] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[46] rstudioapi_0.15.0 abind_1.4-5 yaml_2.3.7 \n[49] codetools_0.2-19 processx_3.8.2 teal.widgets_0.3.0.9007 \n[52] lattice_0.21-8 tibble_3.2.1 withr_2.5.0 \n[55] coda_0.19-4 evaluate_0.21 survival_3.5-5 \n[58] pillar_1.9.0 shinycssloaders_1.0.0 carData_3.0-5 \n[61] checkmate_2.2.0 shinyjs_2.1.0 generics_0.1.3 \n[64] ggplot2_3.4.2 munsell_0.5.0 scales_1.2.1 \n[67] xtable_1.8-4 glue_1.6.2 emmeans_1.8.7 \n[70] tools_4.3.1 webshot_0.5.5 forcats_1.0.0 \n[73] mvtnorm_1.2-2 grid_4.3.1 tidyr_1.3.0 \n[76] rbibutils_2.2.13 colorspace_2.1-0 nlme_3.1-162 \n[79] cli_3.6.1 fansi_1.0.4 geepack_1.3.9 \n[82] gtable_0.3.3 R.methodsS3_1.8.2 sass_0.4.7 \n[85] digest_0.6.33 htmlwidgets_1.6.2 memoise_2.0.1 \n[88] htmltools_0.5.5 R.oo_1.25.0 lifecycle_1.0.3 \n[91] shinyWidgets_0.7.6 mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/coxt01.lock'.\n\n\nDownload" + "text": "Cox models are the most commonly used methods to estimate the magnitude of the effect in survival analyses. It assumes proportional hazards; that is, it assumes that the ratio of the hazards of the two groups (e.g. two arms) is constant over time. This ratio is referred to as the “hazard ratio” and is one of the most commonly reported metrics to describe the effect size in survival analysis.\n\n\nData Setup\nCox Regression\nCox Regression with Interaction Term\nCox Regression Specifying Covariates\nCox Regression Setting Strata, Ties, Alpha Level\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadtte <- df_explicit_na(adtte)\n\nadsl_filtered <- adsl %>% dplyr::filter(\n RACE %in% c(\"ASIAN\", \"BLACK OR AFRICAN AMERICAN\", \"WHITE\")\n)\nadtte_filtered <- dplyr::inner_join(\n x = adsl_filtered[, c(\"STUDYID\", \"USUBJID\")],\n y = adtte,\n by = c(\"STUDYID\", \"USUBJID\")\n)\n\nanl <- adtte_filtered %>%\n filter(PARAMCD == \"OS\") %>%\n mutate(EVENT = 1 - CNSR) %>%\n filter(ARM %in% c(\"B: Placebo\", \"A: Drug X\")) %>%\n mutate(ARM = droplevels(relevel(ARM, \"B: Placebo\"))) %>%\n mutate(RACE = droplevels(RACE) %>% formatters::with_label(\"Race\"))\n\n# Add variable for column split label\nanl <- anl %>% mutate(col_label = \"Treatment Effect Adjusted for Covariate\")\n\n\n\n\nThe summarize_coxreg function fits, tidies and arranges a Cox regression model in a table layout using the rtables framework. For a Cox regression model, arguments variables, control, and at can be specified (see ?summarize_coxreg for more details and customization options). All variables specified within variables must be present in the data used when building the table.\nTo see the same model as a data.frame object, these three arguments (as well as the data) can be passed to the fit_coxreg_univar function, and the resulting list tidied using broom::tidy().\n\nCodevariables <- list(\n time = \"AVAL\",\n event = \"EVENT\",\n arm = \"ARM\",\n covariates = c(\"AGE\", \"SEX\", \"RACE\")\n)\n\nlyt <- basic_table() %>%\n split_cols_by(\"col_label\") %>%\n summarize_coxreg(variables = variables) %>%\n append_topleft(\"Effect/Covariate Included in the Model\")\n\nresult <- build_table(lyt = lyt, df = anl)\nresult\n\nEffect/Covariate Included in the Model Treatment Effect Adjusted for Covariate \n n Hazard Ratio 95% CI p-value \n—————————————————————————————————————————————————————————————————————————————————————————\nTreatment: \n A: Drug X vs control (B: Placebo) 247 0.97 (0.66, 1.43) 0.8934 \nCovariate: \n Age 247 0.95 (0.65, 1.40) 0.7948 \n Sex 247 0.98 (0.67, 1.43) 0.8970 \n Race 247 0.98 (0.67, 1.44) 0.9239 \n\n\n\n\nThe argument control can be used to modify standard outputs; control_coxreg() helps in adopting the right settings (see ?control_coxreg). For instance, control is used to include the interaction terms.\n\nCodevariables <- list(\n time = \"AVAL\",\n event = \"EVENT\",\n arm = \"ARM\",\n covariates = c(\"AGE\", \"RACE\")\n)\n\nlyt <- basic_table() %>%\n split_cols_by(\"col_label\") %>%\n summarize_coxreg(\n variables = variables,\n control = control_coxreg(interaction = TRUE),\n .stats = c(\"n\", \"hr\", \"ci\", \"pval\", \"pval_inter\")\n ) %>%\n append_topleft(\"Effect/Covariate Included in the Model\")\n\nresult <- build_table(lyt = lyt, df = anl)\nresult\n\nEffect/Covariate Included in the Model Treatment Effect Adjusted for Covariate \n n Hazard Ratio 95% CI p-value Interaction p-value\n——————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment: \n A: Drug X vs control (B: Placebo) 247 0.97 (0.66, 1.43) 0.8934 \nCovariate: \n Age 247 0.7878 \n 34 0.95 (0.65, 1.40) \n Race 247 0.6850 \n ASIAN 1.05 (0.63, 1.75) \n BLACK OR AFRICAN AMERICAN 1.08 (0.51, 2.29) \n WHITE 0.67 (0.27, 1.71) \n\n\n\n\nThe optional argument at allows the user to provide the expected level of estimation for the interaction when the predictor is a quantitative variable. For instance, it might be relevant to choose the age at which the hazard ratio should be estimated. If no input is provided to at, the median value is used in the row name (as in the previous tab).\n\nCodevariables <- list(\n time = \"AVAL\",\n event = \"EVENT\",\n arm = \"ARM\",\n covariates = c(\"AGE\", \"SEX\")\n)\n\nlyt <- basic_table() %>%\n split_cols_by(\"col_label\") %>%\n summarize_coxreg(\n variables = variables,\n control = control_coxreg(interaction = TRUE),\n at = list(AGE = c(30, 40, 50)),\n .stats = c(\"n\", \"hr\", \"ci\", \"pval\", \"pval_inter\")\n ) %>%\n append_topleft(\"Effect/Covariate Included in the Model\")\n\nresult <- build_table(lyt = lyt, df = anl)\nresult\n\nEffect/Covariate Included in the Model Treatment Effect Adjusted for Covariate \n n Hazard Ratio 95% CI p-value Interaction p-value\n——————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment: \n A: Drug X vs control (B: Placebo) 247 0.97 (0.66, 1.43) 0.8934 \nCovariate: \n Age 247 0.7878 \n 30 0.98 (0.63, 1.51) \n 40 0.91 (0.54, 1.51) \n 50 0.84 (0.32, 2.20) \n Sex 247 0.1455 \n F 0.77 (0.47, 1.27) \n M 1.38 (0.75, 2.52) \n\n\n\n\nAdditional controls can be customized using control_coxreg (see ?control_coxreg) such as the ties calculation method and the confidence level. Stratification variables can be added via the strata element of the variables list.\n\nCodevariables <- list(\n time = \"AVAL\",\n event = \"EVENT\",\n arm = \"ARM\",\n covariates = c(\"AGE\", \"RACE\"),\n strata = \"SEX\"\n)\n\ncontrol <- control_coxreg(\n ties = \"breslow\",\n interaction = TRUE,\n conf_level = 0.90\n)\n\nlyt <- basic_table() %>%\n split_cols_by(\"col_label\") %>%\n summarize_coxreg(\n variables = variables,\n control = control,\n at = list(AGE = c(30, 40, 50)),\n .stats = c(\"n\", \"hr\", \"ci\", \"pval\", \"pval_inter\")\n ) %>%\n append_topleft(\"Effect/Covariate Included in the Model\")\n\nresult <- build_table(lyt = lyt, df = anl)\nresult\n\nEffect/Covariate Included in the Model Treatment Effect Adjusted for Covariate \n n Hazard Ratio 90% CI p-value Interaction p-value\n——————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment: \n A: Drug X vs control (B: Placebo) 247 0.98 (0.71, 1.35) 0.9063 \nCovariate: \n Age 247 0.7733 \n 30 0.98 (0.68, 1.42) \n 40 0.91 (0.59, 1.39) \n 50 0.84 (0.38, 1.87) \n Race 247 0.6501 \n ASIAN 1.07 (0.64, 1.77) \n BLACK OR AFRICAN AMERICAN 1.08 (0.51, 2.29) \n WHITE 0.66 (0.26, 1.67) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadtte <- df_explicit_na(adtte)\n\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'adsl <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'),\n cdisc_dataset(\"ADTTE\", adtte, code = 'adtte <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adtte\"))'),\n check = TRUE\n ),\n modules = modules(\n tm_t_coxreg(\n label = \"Cox Reg.\",\n dataname = \"ADTTE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\", \"ACTARMCD\"), \"ARM\"),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(adtte, \"PARAMCD\", \"PARAM\"), \"OS\"\n ),\n strata_var = choices_selected(\n c(\"SEX\", \"STRATA1\", \"STRATA2\"), NULL\n ),\n cov_var = choices_selected(\n c(\"AGE\", \"SEX\", \"RACE\"), \"AGE\"\n ),\n multivariate = FALSE\n )\n )\n)\n\n[INFO] 2023-08-04 15:01:15.3499 pid:5895 token:[] teal.modules.clinical Initializing tm_t_coxreg\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] dplyr_1.1.2 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] stringr_1.5.0 pkgconfig_2.0.3 fastmap_1.1.1 \n[13] backports_1.4.1 ellipsis_0.3.2 fontawesome_0.5.1 \n[16] utf8_1.2.3 promises_1.2.0.1 rmarkdown_2.23 \n[19] ps_1.7.5 purrr_1.0.1 xfun_0.39 \n[22] shinyvalidate_0.1.2 cachem_1.0.8 teal.reporter_0.1.1.9020\n[25] jsonlite_1.8.7 later_1.3.1 styler_1.10.1 \n[28] broom_1.0.5 R6_2.5.1 bslib_0.5.0 \n[31] stringi_1.7.12 car_3.1-2 brio_1.1.3 \n[34] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[37] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[40] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[43] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[46] rstudioapi_0.15.0 abind_1.4-5 yaml_2.3.7 \n[49] codetools_0.2-19 processx_3.8.2 teal.widgets_0.3.0.9007 \n[52] lattice_0.21-8 tibble_3.2.1 withr_2.5.0 \n[55] coda_0.19-4 evaluate_0.21 survival_3.5-5 \n[58] pillar_1.9.0 shinycssloaders_1.0.0 carData_3.0-5 \n[61] checkmate_2.2.0 shinyjs_2.1.0 generics_0.1.3 \n[64] ggplot2_3.4.2 munsell_0.5.0 scales_1.2.1 \n[67] xtable_1.8-4 glue_1.6.2 emmeans_1.8.7 \n[70] tools_4.3.1 webshot_0.5.5 forcats_1.0.0 \n[73] mvtnorm_1.2-2 grid_4.3.1 tidyr_1.3.0 \n[76] rbibutils_2.2.13 colorspace_2.1-0 nlme_3.1-162 \n[79] cli_3.6.1 fansi_1.0.4 geepack_1.3.9 \n[82] gtable_0.3.3 R.methodsS3_1.8.2 sass_0.4.7 \n[85] digest_0.6.33 htmlwidgets_1.6.2 memoise_2.0.1 \n[88] htmltools_0.5.5 R.oo_1.25.0 lifecycle_1.0.3 \n[91] shinyWidgets_0.7.6 mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/coxt01.lock'.\n\n\nDownload" }, { "objectID": "tables/efficacy/aovt01.html", "href": "tables/efficacy/aovt01.html", "title": "AOVT01", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadqs <- df_explicit_na(adqs)\n\nadqs_multi <- filter(adqs, AVISIT == \"WEEK 1 DAY 8\")\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nl <- basic_table() %>%\n split_cols_by(\"ARMCD\", ref_group = \"ARM A\") %>%\n split_rows_by(\"PARAMCD\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adqs_multi$PARAMCD)\n ) %>%\n summarize_ancova(\n vars = \"CHG\",\n variables = list(\n arm = \"ARMCD\",\n covariates = c(\"BASE\", \"STRATA1\")\n ),\n conf_level = 0.95,\n var_labels = \"Adjusted mean\"\n )\n\nresult <- build_table(\n lyt = l,\n df = adqs_multi,\n alt_counts_df = adsl\n)\n\nresult\n\nParameter Code ARM A ARM B ARM C \n————————————————————————————————————————————————————————————————————————\nBFIALL \n Adjusted mean \n n 134 134 132 \n Adjusted Mean 4.47 6.33 4.02 \n Difference in Adjusted Means 1.85 -0.46 \n 95% CI (-0.14, 3.85) (-2.45, 1.54)\n p-value 0.0679 0.6539 \nFATIGI \n Adjusted mean \n n 134 134 132 \n Adjusted Mean 5.42 4.83 4.56 \n Difference in Adjusted Means -0.59 -0.86 \n 95% CI (-2.58, 1.41) (-2.87, 1.15)\n p-value 0.5644 0.4026 \nFKSI-FWB \n Adjusted mean \n n 134 134 132 \n Adjusted Mean 4.29 3.51 3.06 \n Difference in Adjusted Means -0.79 -1.24 \n 95% CI (-2.71, 1.14) (-3.17, 0.69)\n p-value 0.4221 0.2088 \nFKSI-TSE \n Adjusted mean \n n 134 134 132 \n Adjusted Mean 4.70 3.84 4.45 \n Difference in Adjusted Means -0.86 -0.25 \n 95% CI (-2.80, 1.09) (-2.20, 1.70)\n p-value 0.3858 0.8007 \nFKSIALL \n Adjusted mean \n n 134 134 132 \n Adjusted Mean 5.03 5.82 6.44 \n Difference in Adjusted Means 0.79 1.42 \n 95% CI (-1.17, 2.76) (-0.56, 3.39)\n p-value 0.4288 0.1591 \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadqs <- df_explicit_na(adqs)\n\narm_ref_comp <- list(\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n ),\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n cdisc_dataset(\"ADQS\", adqs),\n code =\n 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))\n ADQS <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adqs\"))',\n check = TRUE\n ),\n modules = modules(\n tm_t_ancova(\n label = \"ANCOVA table\",\n dataname = \"ADQS\",\n avisit = choices_selected(\n choices = value_choices(adqs, \"AVISIT\"),\n selected = \"WEEK 1 DAY 8\"\n ),\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ACTARMCD\")),\n selected = \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n aval_var = choices_selected(\n choices = variable_choices(adqs, c(\"CHG\", \"AVAL\")),\n selected = \"CHG\"\n ),\n cov_var = choices_selected(\n choices = variable_choices(adqs, c(\"BASE\", \"STRATA1\", \"SEX\")),\n selected = \"STRATA1\"\n ),\n paramcd = choices_selected(\n choices = value_choices(adqs, \"PARAMCD\", \"PARAM\"),\n selected = c(\"FKSI-FWB\", \"BFIALL\")\n )\n )\n )\n)\n\n[INFO] 2023-08-04 14:46:27.1765 pid:6103 token:[] teal.modules.clinical Initializing tm_t_ancova\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 survival_3.5-5 \n[13] processx_3.8.2 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/aovt01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadqs <- df_explicit_na(adqs)\n\nadqs_multi <- filter(adqs, AVISIT == \"WEEK 1 DAY 8\")\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nl <- basic_table() %>%\n split_cols_by(\"ARMCD\", ref_group = \"ARM A\") %>%\n split_rows_by(\"PARAMCD\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adqs_multi$PARAMCD)\n ) %>%\n summarize_ancova(\n vars = \"CHG\",\n variables = list(\n arm = \"ARMCD\",\n covariates = c(\"BASE\", \"STRATA1\")\n ),\n conf_level = 0.95,\n var_labels = \"Adjusted mean\"\n )\n\nresult <- build_table(\n lyt = l,\n df = adqs_multi,\n alt_counts_df = adsl\n)\n\nresult\n\nParameter Code ARM A ARM B ARM C \n————————————————————————————————————————————————————————————————————————\nBFIALL \n Adjusted mean \n n 134 134 132 \n Adjusted Mean 4.47 6.33 4.02 \n Difference in Adjusted Means 1.85 -0.46 \n 95% CI (-0.14, 3.85) (-2.45, 1.54)\n p-value 0.0679 0.6539 \nFATIGI \n Adjusted mean \n n 134 134 132 \n Adjusted Mean 5.42 4.83 4.56 \n Difference in Adjusted Means -0.59 -0.86 \n 95% CI (-2.58, 1.41) (-2.87, 1.15)\n p-value 0.5644 0.4026 \nFKSI-FWB \n Adjusted mean \n n 134 134 132 \n Adjusted Mean 4.29 3.51 3.06 \n Difference in Adjusted Means -0.79 -1.24 \n 95% CI (-2.71, 1.14) (-3.17, 0.69)\n p-value 0.4221 0.2088 \nFKSI-TSE \n Adjusted mean \n n 134 134 132 \n Adjusted Mean 4.70 3.84 4.45 \n Difference in Adjusted Means -0.86 -0.25 \n 95% CI (-2.80, 1.09) (-2.20, 1.70)\n p-value 0.3858 0.8007 \nFKSIALL \n Adjusted mean \n n 134 134 132 \n Adjusted Mean 5.03 5.82 6.44 \n Difference in Adjusted Means 0.79 1.42 \n 95% CI (-1.17, 2.76) (-0.56, 3.39)\n p-value 0.4288 0.1591 \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadqs <- df_explicit_na(adqs)\n\narm_ref_comp <- list(\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n ),\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n cdisc_dataset(\"ADQS\", adqs),\n code =\n 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))\n ADQS <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adqs\"))',\n check = TRUE\n ),\n modules = modules(\n tm_t_ancova(\n label = \"ANCOVA table\",\n dataname = \"ADQS\",\n avisit = choices_selected(\n choices = value_choices(adqs, \"AVISIT\"),\n selected = \"WEEK 1 DAY 8\"\n ),\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ACTARMCD\")),\n selected = \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n aval_var = choices_selected(\n choices = variable_choices(adqs, c(\"CHG\", \"AVAL\")),\n selected = \"CHG\"\n ),\n cov_var = choices_selected(\n choices = variable_choices(adqs, c(\"BASE\", \"STRATA1\", \"SEX\")),\n selected = \"STRATA1\"\n ),\n paramcd = choices_selected(\n choices = value_choices(adqs, \"PARAMCD\", \"PARAM\"),\n selected = c(\"FKSI-FWB\", \"BFIALL\")\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:02:47.1477 pid:6108 token:[] teal.modules.clinical Initializing tm_t_ancova\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 survival_3.5-5 \n[13] processx_3.8.2 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/aovt01.lock'.\n\n\nDownload" }, { "objectID": "tables/efficacy/cfbt01.html", "href": "tables/efficacy/cfbt01.html", "title": "CFBT01", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadqs <- df_explicit_na(adqs)\n\n# This example focuses on \"BFI All Questions\" starting from baseline.\nadqs <- adqs %>%\n dplyr::filter(\n PARAM == \"BFI All Questions\",\n AVISIT != \"SCREENING\"\n )\n\n# Define the split function for AVISIT\nsplit_fun <- drop_split_levels\n\n\n\n\n\nCodeafun <- function(x, .var, .spl_context, ...) {\n n_fun <- sum(!is.na(x), na.rm = TRUE)\n if (n_fun == 0) {\n mean_sd_fun <- c(NA, NA)\n median_fun <- NA\n min_max_fun <- c(NA, NA)\n } else {\n mean_sd_fun <- c(mean(x, na.rm = TRUE), sd(x, na.rm = TRUE))\n median_fun <- median(x, na.rm = TRUE)\n min_max_fun <- c(min(x), max(x))\n }\n is_chg <- .var == \"CHG\"\n is_baseline <- .spl_context$value[which(.spl_context$split == \"AVISIT\")] == \"BASELINE\"\n if (is_baseline && is_chg) n_fun <- mean_sd_fun <- median_fun <- min_max_fun <- NULL\n\n in_rows(\n \"n\" = n_fun,\n \"Mean (SD)\" = mean_sd_fun,\n \"Median\" = median_fun,\n \"Min - Max\" = min_max_fun,\n .formats = list(\"n\" = \"xx\", \"Mean (SD)\" = \"xx.xx (xx.xx)\", \"Median\" = \"xx.xx\", \"Min - Max\" = \"xx.xx - xx.xx\"),\n .format_na_strs = list(\"n\" = \"NE\", \"Mean (SD)\" = \"NE (NE)\", \"Median\" = \"NE\", \"Min - Max\" = \"NE - NE\")\n )\n}\n\nlyt <- basic_table() %>%\n split_cols_by(\"ARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adqs$PARAM)\n ) %>%\n split_rows_by(\n \"AVISIT\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adqs$AVISIT)\n ) %>%\n split_cols_by_multivar(\n vars = c(\"AVAL\", \"CHG\"),\n varlabels = c(\"Value at Visit\", \"Change from\\nBaseline\")\n ) %>%\n analyze_colvars(afun = afun)\n\nresult <- build_table(lyt, adqs)\nresult\n\nParameter A: Drug X B: Placebo C: Combination \n Analysis Visit Change from Change from Change from \n Value at Visit Baseline Value at Visit Baseline Value at Visit Baseline \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nBFI All Questions \n BASELINE \n n 134 134 132 \n Mean (SD) 49.93 (7.44) 49.74 (8.29) 50.30 (9.06) \n Median 48.69 49.28 49.74 \n Min - Max 33.72 - 65.91 25.82 - 71.47 26.04 - 69.99 \n WEEK 1 DAY 8 \n n 134 134 134 134 132 132 \n Mean (SD) 54.51 (8.61) 4.58 (11.23) 56.33 (7.86) 6.59 (11.81) 54.03 (8.31) 3.72 (12.66) \n Median 55.15 5.47 56.39 6.96 53.76 3.71 \n Min - Max 34.26 - 75.42 -25.52 - 29.68 36.82 - 74.45 -25.10 - 31.05 26.89 - 75.95 -26.81 - 33.75\n WEEK 2 DAY 15 \n n 134 134 134 134 132 132 \n Mean (SD) 60.98 (10.31) 11.05 (12.46) 59.68 (9.59) 9.94 (12.84) 60.11 (8.76) 9.80 (12.59) \n Median 60.60 10.45 58.18 8.95 61.08 10.04 \n Min - Max 35.94 - 96.53 -14.02 - 45.01 40.44 - 84.70 -17.59 - 40.52 32.76 - 78.25 -26.57 - 39.56\n WEEK 3 DAY 22 \n n 134 134 134 134 132 132 \n Mean (SD) 64.64 (9.88) 14.72 (11.99) 65.78 (10.17) 16.04 (13.80) 63.65 (10.50) 13.35 (13.39) \n Median 65.21 15.10 66.28 15.49 63.79 12.24 \n Min - Max 40.49 - 95.35 -16.76 - 43.40 42.16 - 92.32 -17.70 - 46.85 29.29 - 88.41 -22.40 - 39.94\n WEEK 4 DAY 29 \n n 134 134 134 134 132 132 \n Mean (SD) 69.43 (11.12) 19.51 (13.83) 69.79 (11.46) 20.05 (14.38) 70.68 (10.23) 20.37 (12.99) \n Median 69.22 19.90 70.37 20.99 70.85 20.94 \n Min - Max 38.38 - 95.48 -17.34 - 49.18 45.79 - 93.33 -19.66 - 58.05 30.53 - 90.61 -14.01 - 60.23\n WEEK 5 DAY 36 \n n 134 134 134 134 132 132 \n Mean (SD) 74.31 (12.44) 24.38 (14.75) 74.73 (12.96) 24.99 (14.67) 75.89 (13.54) 25.59 (17.18) \n Median 76.12 25.20 74.13 22.81 76.70 25.32 \n Min - Max 39.45 - 103.92 -7.53 - 56.23 38.19 - 109.61 -18.42 - 64.15 43.79 - 102.40 -16.11 - 67.78\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadqs <- df_explicit_na(adqs)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\",\n adsl,\n code = 'adsl <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'\n ),\n cdisc_dataset(\"ADQS\",\n adqs,\n code = 'adqs <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adqs\"))'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"Efficacy Data and Change from Baseline by Visit\",\n dataname = \"ADQS\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adqs, c(\"PARAM\", \"AVISIT\")),\n selected = c(\"AVISIT\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(adqs, c(\"AVAL\", \"CHG\")),\n selected = c(\"AVAL\", \"CHG\")\n ),\n useNA = \"ifany\",\n paramcd = choices_selected(\n choices = value_choices(adqs, \"PARAMCD\", \"PARAM\"),\n selected = \"BFIALL\"\n ),\n add_total = FALSE,\n parallel_vars = TRUE\n )\n ),\n filter = list(ADQS = list(AVISIT = list(), AVAL = list()))\n)\n\n[INFO] 2023-08-04 14:47:47.5702 pid:6319 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\nWarning: The 'plotly_relayout' event tied a source ID of\n'teal-main_ui-filter_panel-active-ADQS-filter-ADQS_AVAL-inputs-histogram_plot'\nis not registered. In order to obtain this event data, please add\n`event_register(p, 'plotly_relayout')` to the plot (`p`) that you wish to\nobtain event data from.\n\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[13] ellipsis_0.3.2 fontawesome_0.5.1 utf8_1.2.3 \n[16] promises_1.2.0.1 rmarkdown_2.23 ps_1.7.5 \n[19] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[22] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[25] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[31] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[34] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[37] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[40] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[43] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[46] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[49] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[52] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[55] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[58] plotly_4.10.2 generics_0.1.3 ggplot2_3.4.2 \n[61] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[64] glue_1.6.2 emmeans_1.8.7 lazyeval_0.2.2 \n[67] tools_4.3.1 data.table_1.14.8 webshot_0.5.5 \n[70] forcats_1.0.0 mvtnorm_1.2-2 grid_4.3.1 \n[73] tidyr_1.3.0 rbibutils_2.2.13 colorspace_2.1-0 \n[76] nlme_3.1-162 cli_3.6.1 fansi_1.0.4 \n[79] viridisLite_0.4.2 geepack_1.3.9 gtable_0.3.3 \n[82] R.methodsS3_1.8.2 sass_0.4.7 digest_0.6.33 \n[85] htmlwidgets_1.6.2 memoise_2.0.1 htmltools_0.5.5 \n[88] R.oo_1.25.0 lifecycle_1.0.3 httr_1.4.6 \n[91] shinyWidgets_0.7.6 mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/cfbt01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadqs <- df_explicit_na(adqs)\n\n# This example focuses on \"BFI All Questions\" starting from baseline.\nadqs <- adqs %>%\n dplyr::filter(\n PARAM == \"BFI All Questions\",\n AVISIT != \"SCREENING\"\n )\n\n# Define the split function for AVISIT\nsplit_fun <- drop_split_levels\n\n\n\n\n\nCodeafun <- function(x, .var, .spl_context, ...) {\n n_fun <- sum(!is.na(x), na.rm = TRUE)\n if (n_fun == 0) {\n mean_sd_fun <- c(NA, NA)\n median_fun <- NA\n min_max_fun <- c(NA, NA)\n } else {\n mean_sd_fun <- c(mean(x, na.rm = TRUE), sd(x, na.rm = TRUE))\n median_fun <- median(x, na.rm = TRUE)\n min_max_fun <- c(min(x), max(x))\n }\n is_chg <- .var == \"CHG\"\n is_baseline <- .spl_context$value[which(.spl_context$split == \"AVISIT\")] == \"BASELINE\"\n if (is_baseline && is_chg) n_fun <- mean_sd_fun <- median_fun <- min_max_fun <- NULL\n\n in_rows(\n \"n\" = n_fun,\n \"Mean (SD)\" = mean_sd_fun,\n \"Median\" = median_fun,\n \"Min - Max\" = min_max_fun,\n .formats = list(\"n\" = \"xx\", \"Mean (SD)\" = \"xx.xx (xx.xx)\", \"Median\" = \"xx.xx\", \"Min - Max\" = \"xx.xx - xx.xx\"),\n .format_na_strs = list(\"n\" = \"NE\", \"Mean (SD)\" = \"NE (NE)\", \"Median\" = \"NE\", \"Min - Max\" = \"NE - NE\")\n )\n}\n\nlyt <- basic_table() %>%\n split_cols_by(\"ARM\") %>%\n split_rows_by(\n \"PARAM\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adqs$PARAM)\n ) %>%\n split_rows_by(\n \"AVISIT\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adqs$AVISIT)\n ) %>%\n split_cols_by_multivar(\n vars = c(\"AVAL\", \"CHG\"),\n varlabels = c(\"Value at Visit\", \"Change from\\nBaseline\")\n ) %>%\n analyze_colvars(afun = afun)\n\nresult <- build_table(lyt, adqs)\nresult\n\nParameter A: Drug X B: Placebo C: Combination \n Analysis Visit Change from Change from Change from \n Value at Visit Baseline Value at Visit Baseline Value at Visit Baseline \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nBFI All Questions \n BASELINE \n n 134 134 132 \n Mean (SD) 49.93 (7.44) 49.74 (8.29) 50.30 (9.06) \n Median 48.69 49.28 49.74 \n Min - Max 33.72 - 65.91 25.82 - 71.47 26.04 - 69.99 \n WEEK 1 DAY 8 \n n 134 134 134 134 132 132 \n Mean (SD) 54.51 (8.61) 4.58 (11.23) 56.33 (7.86) 6.59 (11.81) 54.03 (8.31) 3.72 (12.66) \n Median 55.15 5.47 56.39 6.96 53.76 3.71 \n Min - Max 34.26 - 75.42 -25.52 - 29.68 36.82 - 74.45 -25.10 - 31.05 26.89 - 75.95 -26.81 - 33.75\n WEEK 2 DAY 15 \n n 134 134 134 134 132 132 \n Mean (SD) 60.98 (10.31) 11.05 (12.46) 59.68 (9.59) 9.94 (12.84) 60.11 (8.76) 9.80 (12.59) \n Median 60.60 10.45 58.18 8.95 61.08 10.04 \n Min - Max 35.94 - 96.53 -14.02 - 45.01 40.44 - 84.70 -17.59 - 40.52 32.76 - 78.25 -26.57 - 39.56\n WEEK 3 DAY 22 \n n 134 134 134 134 132 132 \n Mean (SD) 64.64 (9.88) 14.72 (11.99) 65.78 (10.17) 16.04 (13.80) 63.65 (10.50) 13.35 (13.39) \n Median 65.21 15.10 66.28 15.49 63.79 12.24 \n Min - Max 40.49 - 95.35 -16.76 - 43.40 42.16 - 92.32 -17.70 - 46.85 29.29 - 88.41 -22.40 - 39.94\n WEEK 4 DAY 29 \n n 134 134 134 134 132 132 \n Mean (SD) 69.43 (11.12) 19.51 (13.83) 69.79 (11.46) 20.05 (14.38) 70.68 (10.23) 20.37 (12.99) \n Median 69.22 19.90 70.37 20.99 70.85 20.94 \n Min - Max 38.38 - 95.48 -17.34 - 49.18 45.79 - 93.33 -19.66 - 58.05 30.53 - 90.61 -14.01 - 60.23\n WEEK 5 DAY 36 \n n 134 134 134 134 132 132 \n Mean (SD) 74.31 (12.44) 24.38 (14.75) 74.73 (12.96) 24.99 (14.67) 75.89 (13.54) 25.59 (17.18) \n Median 76.12 25.20 74.13 22.81 76.70 25.32 \n Min - Max 39.45 - 103.92 -7.53 - 56.23 38.19 - 109.61 -18.42 - 64.15 43.79 - 102.40 -16.11 - 67.78\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadqs <- df_explicit_na(adqs)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\",\n adsl,\n code = 'adsl <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'\n ),\n cdisc_dataset(\"ADQS\",\n adqs,\n code = 'adqs <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adqs\"))'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"Efficacy Data and Change from Baseline by Visit\",\n dataname = \"ADQS\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adqs, c(\"PARAM\", \"AVISIT\")),\n selected = c(\"AVISIT\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(adqs, c(\"AVAL\", \"CHG\")),\n selected = c(\"AVAL\", \"CHG\")\n ),\n useNA = \"ifany\",\n paramcd = choices_selected(\n choices = value_choices(adqs, \"PARAMCD\", \"PARAM\"),\n selected = \"BFIALL\"\n ),\n add_total = FALSE,\n parallel_vars = TRUE\n )\n ),\n filter = list(ADQS = list(AVISIT = list(), AVAL = list()))\n)\n\n[INFO] 2023-08-04 15:04:12.4183 pid:6324 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\nWarning: The 'plotly_relayout' event tied a source ID of\n'teal-main_ui-filter_panel-active-ADQS-filter-ADQS_AVAL-inputs-histogram_plot'\nis not registered. In order to obtain this event data, please add\n`event_register(p, 'plotly_relayout')` to the plot (`p`) that you wish to\nobtain event data from.\n\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[13] ellipsis_0.3.2 fontawesome_0.5.1 utf8_1.2.3 \n[16] promises_1.2.0.1 rmarkdown_2.23 ps_1.7.5 \n[19] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[22] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[25] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[31] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[34] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[37] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[40] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[43] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[46] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[49] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[52] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[55] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[58] plotly_4.10.2 generics_0.1.3 ggplot2_3.4.2 \n[61] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[64] glue_1.6.2 emmeans_1.8.7 lazyeval_0.2.2 \n[67] tools_4.3.1 data.table_1.14.8 webshot_0.5.5 \n[70] forcats_1.0.0 mvtnorm_1.2-2 grid_4.3.1 \n[73] tidyr_1.3.0 rbibutils_2.2.13 colorspace_2.1-0 \n[76] nlme_3.1-162 cli_3.6.1 fansi_1.0.4 \n[79] viridisLite_0.4.2 geepack_1.3.9 gtable_0.3.3 \n[82] R.methodsS3_1.8.2 sass_0.4.7 digest_0.6.33 \n[85] htmlwidgets_1.6.2 memoise_2.0.1 htmltools_0.5.5 \n[88] R.oo_1.25.0 lifecycle_1.0.3 httr_1.4.6 \n[91] shinyWidgets_0.7.6 mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/efficacy/cfbt01.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/dtht01.html", @@ -725,21 +725,21 @@ "href": "tables/safety/cmt01.html", "title": "CMT01", "section": "", - "text": "Data Setup\nStandard Table\nTable Showing Medications Prior to the Start of the Study\nTable Sorted by Total Column Showing Additional “All Patients” Column\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\n# The following tables require ADCM data structure that follows the legacy concomitant medication coding. WHO coding is not used.\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\n# Below step is to set up example data based on legacy standard.\nadcm <- adcm %>%\n select(-starts_with(\"ATC\")) %>%\n unique()\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadcm <- df_explicit_na(adcm)\n\nadcm_con <- adcm %>%\n filter(ATIREL == \"CONCOMITANT\")\n\nadcm_prior <- adcm %>%\n filter(ATIREL == \"PRIOR\")\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\"CMCLAS\",\n split_fun = split_fun,\n child_labels = \"visible\",\n nested = FALSE,\n indent_mod = 1L,\n label_pos = \"topleft\",\n split_label = obj_label(adcm_con$CMCLAS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adcm_con, \"CMDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adcm_con,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"CMCLAS\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nMedication Class A: Drug X B: Placebo C: Combination\n Standardized Medication Name (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) \nTotal number of treatments 415 414 460 \n medcl A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n Total number of treatments 134 137 143 \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \n medcl B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n Total number of treatments 141 137 162 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \n medcl C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\"CMCLAS\",\n split_fun = split_fun,\n child_labels = \"visible\",\n nested = FALSE,\n label_pos = \"topleft\",\n split_label = obj_label(adcm_con$CMCLAS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adcm_prior, \"CMDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adcm_prior,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"CMCLAS\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nMedication Class A: Drug X B: Placebo C: Combination\n Standardized Medication Name (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 89 (66.4%) 95 (70.9%) 106 (80.3%) \nTotal number of treatments 194 208 243 \nmedcl A \n Total number of patients with at least one treatment 54 (40.3%) 49 (36.6%) 69 (52.3%) \n Total number of treatments 71 70 99 \n medname A_1/3 54 (40.3%) 49 (36.6%) 69 (52.3%) \nmedcl B \n Total number of patients with at least one treatment 76 (56.7%) 80 (59.7%) 81 (61.4%) \n Total number of treatments 123 138 144 \n medname B_2/4 52 (38.8%) 55 (41.0%) 56 (42.4%) \n medname B_3/4 47 (35.1%) 47 (35.1%) 52 (39.4%) \n\n\nTable with Subtotal Per Medication Class Suppressed\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n analyze_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\"CMCLAS\",\n split_fun = split_fun, child_labels = \"visible\",\n nested = FALSE,\n label_pos = \"topleft\",\n split_label = obj_label(adcm_con$CMCLAS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .labels = c(unique = \"Total number of patients with at least one treatment\"),\n .stats = \"unique\"\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adcm_con, \"CMDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adcm_con,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"CMCLAS\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nMedication Class A: Drug X B: Placebo C: Combination\n Standardized Medication Name (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) \nTotal number of treatments 415 414 460 \nmedcl A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nmedcl B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \nmedcl C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n add_overall_col(\"All Patients\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n \"Total number of patients with at least one treatment (%)\",\n \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\n \"CMCLAS\",\n split_fun = split_fun,\n child_labels = \"visible\",\n nested = FALSE,\n label_pos = \"topleft\",\n split_label = obj_label(adcm_con$CMCLAS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n \"Total number of patients with at least one treatment (%)\",\n \"Total number of treatments\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adcm_con, \"CMDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adcm_con,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"CMCLAS\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"CMCLAS\"),\n scorefun = cont_n_allcols,\n decreasing = TRUE\n )\n\nresult\n\nMedication Class A: Drug X B: Placebo C: Combination All Patients\n Standardized Medication Name (N=134) (N=134) (N=132) (N=400) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment (%) 117 (87.3%) 116 (86.6%) 116 (87.9%) 349 (87.2%) \nTotal number of treatments 415 414 460 1289 \nmedcl C \n Total number of patients with at least one treatment (%) 82 (61.2%) 84 (62.7%) 89 (67.4%) 255 (63.7%) \n Total number of treatments 140 140 155 435 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) 170 (42.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) 157 (39.2%) \nmedcl B \n Total number of patients with at least one treatment (%) 83 (61.9%) 74 (55.2%) 88 (66.7%) 245 (61.3%) \n Total number of treatments 141 137 162 440 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) 168 (42.0%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) 150 (37.5%) \nmedcl A \n Total number of patients with at least one treatment (%) 75 (56.0%) 79 (59.0%) 81 (61.4%) 235 (58.8%) \n Total number of treatments 134 137 143 414 \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) 159 (39.8%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) 147 (36.8%) \n\n\n\n\nHere, adcm is processed to keep only one path per treatment.\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadcm <- df_explicit_na(adcm)\n\nadcm <- adcm %>%\n group_by(STUDYID, USUBJID, CMDECOD) %>%\n slice(1) %>%\n ungroup()\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\n \"ADSL\",\n adsl,\n code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'\n ),\n cdisc_dataset(\n \"ADCM\",\n adcm,\n code = 'ADCM <- df_explicit_na(\n synthetic_cdisc_dataset(\"latest\", \"adcm\")\n ) %>%\n group_by(STUDYID, USUBJID, CMDECOD) %>%\n slice(1) %>%\n ungroup',\n keys = c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"CMDECOD\")\n )\n ),\n modules = modules(\n tm_t_events(\n label = \"Concomitant Medication Table\",\n dataname = \"ADCM\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(adcm, \"CMDECOD\"),\n selected = \"CMDECOD\"\n ),\n hlt = choices_selected(\n choices = variable_choices(adcm, \"CMCLAS\"),\n selected = c(\"CMCLAS\")\n ),\n add_total = TRUE,\n event_type = \"treatment\"\n )\n )\n)\n\n[INFO] 2023-08-04 14:49:31.0092 pid:6638 token:[] teal.modules.clinical Initializing tm_t_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/cmt01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable Showing Medications Prior to the Start of the Study\nTable Sorted by Total Column Showing Additional “All Patients” Column\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\n# The following tables require ADCM data structure that follows the legacy concomitant medication coding. WHO coding is not used.\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\n# Below step is to set up example data based on legacy standard.\nadcm <- adcm %>%\n select(-starts_with(\"ATC\")) %>%\n unique()\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadcm <- df_explicit_na(adcm)\n\nadcm_con <- adcm %>%\n filter(ATIREL == \"CONCOMITANT\")\n\nadcm_prior <- adcm %>%\n filter(ATIREL == \"PRIOR\")\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\"CMCLAS\",\n split_fun = split_fun,\n child_labels = \"visible\",\n nested = FALSE,\n indent_mod = 1L,\n label_pos = \"topleft\",\n split_label = obj_label(adcm_con$CMCLAS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adcm_con, \"CMDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adcm_con,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"CMCLAS\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nMedication Class A: Drug X B: Placebo C: Combination\n Standardized Medication Name (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) \nTotal number of treatments 415 414 460 \n medcl A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n Total number of treatments 134 137 143 \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \n medcl B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n Total number of treatments 141 137 162 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \n medcl C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\"CMCLAS\",\n split_fun = split_fun,\n child_labels = \"visible\",\n nested = FALSE,\n label_pos = \"topleft\",\n split_label = obj_label(adcm_con$CMCLAS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adcm_prior, \"CMDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adcm_prior,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"CMCLAS\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nMedication Class A: Drug X B: Placebo C: Combination\n Standardized Medication Name (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 89 (66.4%) 95 (70.9%) 106 (80.3%) \nTotal number of treatments 194 208 243 \nmedcl A \n Total number of patients with at least one treatment 54 (40.3%) 49 (36.6%) 69 (52.3%) \n Total number of treatments 71 70 99 \n medname A_1/3 54 (40.3%) 49 (36.6%) 69 (52.3%) \nmedcl B \n Total number of patients with at least one treatment 76 (56.7%) 80 (59.7%) 81 (61.4%) \n Total number of treatments 123 138 144 \n medname B_2/4 52 (38.8%) 55 (41.0%) 56 (42.4%) \n medname B_3/4 47 (35.1%) 47 (35.1%) 52 (39.4%) \n\n\nTable with Subtotal Per Medication Class Suppressed\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n analyze_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\"CMCLAS\",\n split_fun = split_fun, child_labels = \"visible\",\n nested = FALSE,\n label_pos = \"topleft\",\n split_label = obj_label(adcm_con$CMCLAS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .labels = c(unique = \"Total number of patients with at least one treatment\"),\n .stats = \"unique\"\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adcm_con, \"CMDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adcm_con,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"CMCLAS\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nMedication Class A: Drug X B: Placebo C: Combination\n Standardized Medication Name (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) \nTotal number of treatments 415 414 460 \nmedcl A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nmedcl B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \nmedcl C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n add_overall_col(\"All Patients\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n \"Total number of patients with at least one treatment (%)\",\n \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\n \"CMCLAS\",\n split_fun = split_fun,\n child_labels = \"visible\",\n nested = FALSE,\n label_pos = \"topleft\",\n split_label = obj_label(adcm_con$CMCLAS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n \"Total number of patients with at least one treatment (%)\",\n \"Total number of treatments\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adcm_con, \"CMDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adcm_con,\n alt_counts_df = adsl\n) %>%\n prune_table() %>%\n sort_at_path(\n path = c(\"CMCLAS\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"CMCLAS\"),\n scorefun = cont_n_allcols,\n decreasing = TRUE\n )\n\nresult\n\nMedication Class A: Drug X B: Placebo C: Combination All Patients\n Standardized Medication Name (N=134) (N=134) (N=132) (N=400) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment (%) 117 (87.3%) 116 (86.6%) 116 (87.9%) 349 (87.2%) \nTotal number of treatments 415 414 460 1289 \nmedcl C \n Total number of patients with at least one treatment (%) 82 (61.2%) 84 (62.7%) 89 (67.4%) 255 (63.7%) \n Total number of treatments 140 140 155 435 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) 170 (42.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) 157 (39.2%) \nmedcl B \n Total number of patients with at least one treatment (%) 83 (61.9%) 74 (55.2%) 88 (66.7%) 245 (61.3%) \n Total number of treatments 141 137 162 440 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) 168 (42.0%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) 150 (37.5%) \nmedcl A \n Total number of patients with at least one treatment (%) 75 (56.0%) 79 (59.0%) 81 (61.4%) 235 (58.8%) \n Total number of treatments 134 137 143 414 \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) 159 (39.8%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) 147 (36.8%) \n\n\n\n\nHere, adcm is processed to keep only one path per treatment.\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadcm <- df_explicit_na(adcm)\n\nadcm <- adcm %>%\n group_by(STUDYID, USUBJID, CMDECOD) %>%\n slice(1) %>%\n ungroup()\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\n \"ADSL\",\n adsl,\n code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'\n ),\n cdisc_dataset(\n \"ADCM\",\n adcm,\n code = 'ADCM <- df_explicit_na(\n synthetic_cdisc_dataset(\"latest\", \"adcm\")\n ) %>%\n group_by(STUDYID, USUBJID, CMDECOD) %>%\n slice(1) %>%\n ungroup',\n keys = c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"CMDECOD\")\n )\n ),\n modules = modules(\n tm_t_events(\n label = \"Concomitant Medication Table\",\n dataname = \"ADCM\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(adcm, \"CMDECOD\"),\n selected = \"CMDECOD\"\n ),\n hlt = choices_selected(\n choices = variable_choices(adcm, \"CMCLAS\"),\n selected = c(\"CMCLAS\")\n ),\n add_total = TRUE,\n event_type = \"treatment\"\n )\n )\n)\n\n[INFO] 2023-08-04 15:06:04.1572 pid:6642 token:[] teal.modules.clinical Initializing tm_t_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/cmt01.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/ext01.html", "href": "tables/safety/ext01.html", "title": "EXT01", "section": "", - "text": "Data Setup\nStandard Table\nTable with Optional Analyses\nTable with User-Specified Categories for Missed Doses\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\nlibrary(tidyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadex <- df_explicit_na(adex)\n\nadex <- adex %>%\n filter(PARCAT1 == \"OVERALL\") %>%\n select(STUDYID, USUBJID, ACTARM, PARAMCD, PARAM, AVAL, PARCAT2) %>%\n mutate(\n PARAMCD = as.character(PARAMCD),\n AVALC = \"\"\n ) %>%\n droplevels()\n\n# Add new param tdurd for treatment duration.\nset.seed(99)\ntdurd_adsl <- adsl %>%\n select(STUDYID, USUBJID, ACTARM) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(1:150, size = nrow(adsl), replace = TRUE),\n AVALC = case_when(\n 0 <= AVAL & AVAL <= 30 ~ \"0 - 30\",\n 31 <= AVAL & AVAL <= 60 ~ \"31 - 60\",\n 61 <= AVAL & AVAL <= 90 ~ \"61 - 90\",\n TRUE ~ \">= 91\"\n )\n )\ntdurd <- adex %>%\n filter(PARAMCD == \"TNDOSE\") %>%\n select(STUDYID, USUBJID, PARCAT2) %>%\n left_join(tdurd_adsl, by = c(\"STUDYID\", \"USUBJID\"))\n\n# Add new param tndosmis for missed doses.\ntndosmis_adsl <- adsl %>%\n select(STUDYID, USUBJID, ACTARM) %>%\n mutate(\n PARAMCD = \"TNDOSMIS\",\n PARAM = \"Total number of missed doses during study\",\n AVAL = sample(0:20, size = nrow(adsl), replace = TRUE),\n AVALC = \"\"\n )\ntndosmis <- adex %>%\n filter(PARAMCD == \"TNDOSE\") %>%\n select(STUDYID, USUBJID, PARCAT2) %>%\n left_join(tndosmis_adsl, by = c(\"STUDYID\", \"USUBJID\"))\n\nadex <- dplyr::bind_rows(adex, tdurd, tndosmis) %>%\n mutate(PARAM = factor(\n PARAM,\n levels = c(\n \"Overall duration (days)\", \"Total dose administered\", \"Total number of doses administered\",\n \"Total number of missed doses during study\"\n )\n ))\n\n\n\n\n\nCode# When summary table contains only categorical or only numeric parameters\n\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\"PARCAT2\", split_label = \"\\nParameter Category (Drug A/Drug B)\", label_pos = \"topleft\") %>%\n split_rows_by(\"PARAM\", split_fun = split_fun) %>%\n summarize_vars(vars = \"AVAL\")\n\nresult <- build_table(lyt = lyt, df = adex, alt_counts_df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination \nParameter Category (Drug A/Drug B) (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————\nDrug A \n Overall duration (days) \n n 75 67 75 \n Mean (SD) 74.3 (41.6) 79.0 (43.1) 74.2 (39.5) \n Median 77.0 80.0 78.0 \n Min - Max 5.0 - 149.0 2.0 - 150.0 1.0 - 147.0 \n Total dose administered \n n 75 67 75 \n Mean (SD) 6675.2 (1110.9) 6505.1 (1249.3) 6982.4 (1272.5)\n Median 6720.0 6480.0 7200.0 \n Min - Max 4800.0 - 9360.0 4080.0 - 9360.0 4320.0 - 9360.0\n Total number of doses administered \n n 75 67 75 \n Mean (SD) 7.0 (0.0) 7.0 (0.0) 7.0 (0.0) \n Median 7.0 7.0 7.0 \n Min - Max 7.0 - 7.0 7.0 - 7.0 7.0 - 7.0 \n Total number of missed doses during study \n n 75 67 75 \n Mean (SD) 10.5 (5.9) 10.0 (6.1) 9.5 (5.5) \n Median 10.0 11.0 9.0 \n Min - Max 0.0 - 20.0 0.0 - 19.0 0.0 - 20.0 \nDrug B \n Overall duration (days) \n n 59 67 57 \n Mean (SD) 77.5 (40.5) 76.3 (41.0) 69.5 (46.2) \n Median 79.0 76.0 65.0 \n Min - Max 2.0 - 149.0 5.0 - 148.0 1.0 - 149.0 \n Total dose administered \n n 59 67 57 \n Mean (SD) 6630.5 (1334.0) 6297.3 (1291.1) 6505.3 (1080.7)\n Median 6720.0 6240.0 6480.0 \n Min - Max 4320.0 - 8880.0 4080.0 - 9120.0 4320.0 - 8640.0\n Total number of doses administered \n n 59 67 57 \n Mean (SD) 7.0 (0.0) 7.0 (0.0) 7.0 (0.0) \n Median 7.0 7.0 7.0 \n Min - Max 7.0 - 7.0 7.0 - 7.0 7.0 - 7.0 \n Total number of missed doses during study \n n 59 67 57 \n Mean (SD) 9.1 (6.5) 10.0 (6.3) 10.7 (5.8) \n Median 9.0 10.0 11.0 \n Min - Max 0.0 - 20.0 0.0 - 20.0 1.0 - 20.0 \n\n\n\n\n\nCode# When summary table contains both categorical and numeric parameters,\n# developer needs to do pre-processing to transform dataset to wide format.\nadex_avalc_wide <- adex %>%\n filter(PARAMCD == \"TDURD\") %>%\n select(STUDYID, USUBJID, PARAMCD, AVALC, PARCAT2) %>%\n tidyr::pivot_wider(\n id_cols = c(STUDYID, USUBJID, PARCAT2),\n names_from = PARAMCD,\n values_from = AVALC\n ) %>%\n mutate(\n TDURDC = factor(TDURD, levels = c(\"0 - 30\", \"31 - 60\", \"61 - 90\", \">= 91\"))\n ) %>%\n select(-TDURD)\n\nanl <- adex %>%\n select(STUDYID, USUBJID, ACTARM, PARAMCD, AVAL, PARCAT2) %>%\n tidyr::pivot_wider(\n id_cols = c(STUDYID, USUBJID, ACTARM, PARCAT2),\n names_from = PARAMCD,\n values_from = AVAL\n ) %>%\n left_join(adex_avalc_wide, by = c(\"STUDYID\", \"USUBJID\", \"PARCAT2\")) %>%\n var_relabel(\n TDOSE = \"Total dose administered\",\n TNDOSE = \"Total number of doses administered\",\n TDURD = \"Overall duration (days)\",\n TNDOSMIS = \"Total number of missed doses during study\",\n TDURDC = \"Overall duration (days)\"\n )\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\"PARCAT2\", split_label = \"\\nParameter Category (Drug A/Drug B)\", label_pos = \"topleft\") %>%\n summarize_vars(\n vars = c(\"TDURD\", \"TDURDC\", \"TDOSE\", \"TNDOSE\"),\n var_labels = var_labels(anl)[c(\"TDURD\", \"TDURDC\", \"TDOSE\", \"TNDOSE\")]\n )\n\nresult <- build_table(lyt = lyt, df = anl, alt_counts_df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination \nParameter Category (Drug A/Drug B) (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————\nDrug A \n Overall duration (days) \n n 75 67 75 \n Mean (SD) 74.3 (41.6) 79.0 (43.1) 74.2 (39.5) \n Median 77.0 80.0 78.0 \n Min - Max 5.0 - 149.0 2.0 - 150.0 1.0 - 147.0 \n Overall duration (days) \n n 75 67 75 \n 0 - 30 12 (16%) 12 (17.9%) 15 (20%) \n 31 - 60 18 (24%) 12 (17.9%) 14 (18.7%) \n 61 - 90 19 (25.3%) 15 (22.4%) 18 (24%) \n >= 91 26 (34.7%) 28 (41.8%) 28 (37.3%) \n Total dose administered \n n 75 67 75 \n Mean (SD) 6675.2 (1110.9) 6505.1 (1249.3) 6982.4 (1272.5)\n Median 6720.0 6480.0 7200.0 \n Min - Max 4800.0 - 9360.0 4080.0 - 9360.0 4320.0 - 9360.0\n Total number of doses administered \n n 75 67 75 \n Mean (SD) 7.0 (0.0) 7.0 (0.0) 7.0 (0.0) \n Median 7.0 7.0 7.0 \n Min - Max 7.0 - 7.0 7.0 - 7.0 7.0 - 7.0 \nDrug B \n Overall duration (days) \n n 59 67 57 \n Mean (SD) 77.5 (40.5) 76.3 (41.0) 69.5 (46.2) \n Median 79.0 76.0 65.0 \n Min - Max 2.0 - 149.0 5.0 - 148.0 1.0 - 149.0 \n Overall duration (days) \n n 59 67 57 \n 0 - 30 8 (13.6%) 10 (14.9%) 16 (28.1%) \n 31 - 60 14 (23.7%) 16 (23.9%) 12 (21.1%) \n 61 - 90 15 (25.4%) 17 (25.4%) 11 (19.3%) \n >= 91 22 (37.3%) 24 (35.8%) 18 (31.6%) \n Total dose administered \n n 59 67 57 \n Mean (SD) 6630.5 (1334.0) 6297.3 (1291.1) 6505.3 (1080.7)\n Median 6720.0 6240.0 6480.0 \n Min - Max 4320.0 - 8880.0 4080.0 - 9120.0 4320.0 - 8640.0\n Total number of doses administered \n n 59 67 57 \n Mean (SD) 7.0 (0.0) 7.0 (0.0) 7.0 (0.0) \n Median 7.0 7.0 7.0 \n Min - Max 7.0 - 7.0 7.0 - 7.0 7.0 - 7.0 \n\n\n\n\n\nCode# When summary table contains both categorical and numeric parameters,\n# developer needs to do pre-processing to transform dataset to wide format.\nadex_avalc_wide <- adex %>%\n filter(PARAMCD == \"TDURD\") %>%\n select(STUDYID, USUBJID, PARAMCD, AVALC, PARCAT2) %>%\n tidyr::pivot_wider(\n id_cols = c(STUDYID, USUBJID, PARCAT2),\n names_from = PARAMCD,\n values_from = AVALC\n ) %>%\n mutate(\n TDURDC = factor(TDURD, levels = c(\"0 - 30\", \"31 - 60\", \"61 - 90\", \">= 91\"))\n ) %>%\n select(-TDURD)\n\nanl <- adex %>%\n select(STUDYID, USUBJID, ACTARM, PARAMCD, AVAL, PARCAT2) %>%\n tidyr::pivot_wider(\n id_cols = c(STUDYID, USUBJID, ACTARM, PARCAT2),\n names_from = PARAMCD,\n values_from = AVAL\n ) %>%\n left_join(adex_avalc_wide, by = c(\"STUDYID\", \"USUBJID\", \"PARCAT2\")) %>%\n var_relabel(\n TDOSE = \"Total dose administered\",\n TNDOSE = \"Total number of doses administered\",\n TDURD = \"Overall duration (days)\",\n TNDOSMIS = \"Total number of missed doses during study\",\n TDURDC = \"Overall duration (days)\"\n )\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\"PARCAT2\", split_label = \"\\nParameter Category (Drug A/Drug B)\", label_pos = \"topleft\") %>%\n summarize_vars(\n vars = c(\"TDURD\", \"TDURDC\", \"TDOSE\", \"TNDOSE\"),\n var_labels = var_labels(anl)[c(\"TDURD\", \"TDURDC\", \"TDOSE\", \"TNDOSE\")]\n ) %>%\n count_missed_doses(\n \"TNDOSMIS\",\n thresholds = c(1, 5, 10, 15),\n var_labels = \"Missed Doses\"\n )\n\nresult <- build_table(lyt = lyt, df = anl, alt_counts_df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination \nParameter Category (Drug A/Drug B) (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————\nDrug A \n Overall duration (days) \n n 75 67 75 \n Mean (SD) 74.3 (41.6) 79.0 (43.1) 74.2 (39.5) \n Median 77.0 80.0 78.0 \n Min - Max 5.0 - 149.0 2.0 - 150.0 1.0 - 147.0 \n Overall duration (days) \n n 75 67 75 \n 0 - 30 12 (16%) 12 (17.9%) 15 (20%) \n 31 - 60 18 (24%) 12 (17.9%) 14 (18.7%) \n 61 - 90 19 (25.3%) 15 (22.4%) 18 (24%) \n >= 91 26 (34.7%) 28 (41.8%) 28 (37.3%) \n Total dose administered \n n 75 67 75 \n Mean (SD) 6675.2 (1110.9) 6505.1 (1249.3) 6982.4 (1272.5)\n Median 6720.0 6480.0 7200.0 \n Min - Max 4800.0 - 9360.0 4080.0 - 9360.0 4320.0 - 9360.0\n Total number of doses administered \n n 75 67 75 \n Mean (SD) 7.0 (0.0) 7.0 (0.0) 7.0 (0.0) \n Median 7.0 7.0 7.0 \n Min - Max 7.0 - 7.0 7.0 - 7.0 7.0 - 7.0 \n Missed Doses \n n 75 67 75 \n At least 1 missed dose 74 (55.2%) 63 (47%) 73 (55.3%) \n At least 5 missed doses 59 (44%) 49 (36.6%) 59 (44.7%) \n At least 10 missed doses 41 (30.6%) 38 (28.4%) 37 (28%) \n At least 15 missed doses 26 (19.4%) 21 (15.7%) 16 (12.1%) \nDrug B \n Overall duration (days) \n n 59 67 57 \n Mean (SD) 77.5 (40.5) 76.3 (41.0) 69.5 (46.2) \n Median 79.0 76.0 65.0 \n Min - Max 2.0 - 149.0 5.0 - 148.0 1.0 - 149.0 \n Overall duration (days) \n n 59 67 57 \n 0 - 30 8 (13.6%) 10 (14.9%) 16 (28.1%) \n 31 - 60 14 (23.7%) 16 (23.9%) 12 (21.1%) \n 61 - 90 15 (25.4%) 17 (25.4%) 11 (19.3%) \n >= 91 22 (37.3%) 24 (35.8%) 18 (31.6%) \n Total dose administered \n n 59 67 57 \n Mean (SD) 6630.5 (1334.0) 6297.3 (1291.1) 6505.3 (1080.7)\n Median 6720.0 6240.0 6480.0 \n Min - Max 4320.0 - 8880.0 4080.0 - 9120.0 4320.0 - 8640.0\n Total number of doses administered \n n 59 67 57 \n Mean (SD) 7.0 (0.0) 7.0 (0.0) 7.0 (0.0) \n Median 7.0 7.0 7.0 \n Min - Max 7.0 - 7.0 7.0 - 7.0 7.0 - 7.0 \n Missed Doses \n n 59 67 57 \n At least 1 missed dose 56 (41.8%) 63 (47%) 57 (43.2%) \n At least 5 missed doses 41 (30.6%) 50 (37.3%) 47 (35.6%) \n At least 10 missed doses 27 (20.1%) 36 (26.9%) 31 (23.5%) \n At least 15 missed doses 17 (12.7%) 18 (13.4%) 20 (15.2%) \n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\nadex_labels <- unname(var_labels(adex))\nadex <- adex %>%\n filter(PARCAT1 == \"OVERALL\") %>%\n mutate(\n AVALCAT1 = case_when(\n PARAMCD == \"TDOSE\" & AVAL < 5000 ~ \"LOW\",\n PARAMCD == \"TDOSE\" & AVAL >= 5000 ~ \"HIGH\",\n PARAMCD == \"TNDOSE\" & AVAL < 10 ~ \"< 10\",\n PARAMCD == \"TNDOSE\" & AVAL >= 10 ~ \">= 10\"\n )\n )\nvar_labels(adex) <- c(adex_labels, \"\")\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\n \"ADSL\",\n adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'\n ),\n cdisc_dataset(\n \"ADEX\",\n adex,\n code = 'ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n ADEX_labels <- unname(var_labels(ADEX))\n ADEX <- ADEX %>%\n filter(PARCAT1 == \"OVERALL\") %>%\n mutate(\n AVALCAT1 = case_when(\n PARAMCD == \"TDOSE\" & AVAL < 5000 ~ \"LOW\",\n PARAMCD == \"TDOSE\" & AVAL >= 5000 ~ \"HIGH\",\n PARAMCD == \"TNDOSE\" & AVAL < 10 ~ \"< 10\",\n PARAMCD == \"TNDOSE\" & AVAL >= 10 ~ \">= 10\")\n )\n var_labels(ADEX) <- c(ADEX_labels, \"\")'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"Exposure Table\",\n dataname = \"ADEX\",\n arm_var = choices_selected(\n choices = variable_choices(adex, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adex, c(\"PARCAT2\", \"PARAM\")),\n selected = c(\"PARCAT2\", \"PARAM\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(adex, c(\"AVAL\", \"AVALCAT1\")),\n selected = c(\"AVAL\", \"AVALCAT1\")\n ),\n paramcd = choices_selected(\n choices = value_choices(adex, \"PARAMCD\", \"PARAM\"),\n selected = c(\"TDOSE\", \"TNDOSE\")\n ),\n denominator = choices_selected(\n choices = c(\"n\", \"N\", \"omit\"),\n selected = \"N\"\n )\n )\n ), # Set initial filter state as single study drug to produce smaller table\n filter = list(ADEX = list(PARCAT2 = \"Drug A\", AVAL = list()))\n)\n\n[INFO] 2023-08-04 14:50:29.0277 pid:6850 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\nWarning: The 'plotly_relayout' event tied a source ID of\n'teal-main_ui-filter_panel-active-ADEX-filter-ADEX_AVAL-inputs-histogram_plot'\nis not registered. In order to obtain this event data, please add\n`event_register(p, 'plotly_relayout')` to the plot (`p`) that you wish to\nobtain event data from.\n\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tidyr_1.3.0 dplyr_1.1.2 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n[13] scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[13] ellipsis_0.3.2 fontawesome_0.5.1 utf8_1.2.3 \n[16] promises_1.2.0.1 rmarkdown_2.23 ps_1.7.5 \n[19] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[22] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[25] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[31] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[34] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[37] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[40] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[43] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[46] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[49] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[52] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[55] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[58] plotly_4.10.2 generics_0.1.3 ggplot2_3.4.2 \n[61] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[64] glue_1.6.2 emmeans_1.8.7 lazyeval_0.2.2 \n[67] tools_4.3.1 data.table_1.14.8 webshot_0.5.5 \n[70] forcats_1.0.0 mvtnorm_1.2-2 grid_4.3.1 \n[73] rbibutils_2.2.13 colorspace_2.1-0 nlme_3.1-162 \n[76] cli_3.6.1 fansi_1.0.4 viridisLite_0.4.2 \n[79] geepack_1.3.9 gtable_0.3.3 R.methodsS3_1.8.2 \n[82] sass_0.4.7 digest_0.6.33 htmlwidgets_1.6.2 \n[85] memoise_2.0.1 htmltools_0.5.5 R.oo_1.25.0 \n[88] lifecycle_1.0.3 httr_1.4.6 shinyWidgets_0.7.6 \n[91] mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/ext01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable with Optional Analyses\nTable with User-Specified Categories for Missed Doses\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\nlibrary(tidyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadex <- df_explicit_na(adex)\n\nadex <- adex %>%\n filter(PARCAT1 == \"OVERALL\") %>%\n select(STUDYID, USUBJID, ACTARM, PARAMCD, PARAM, AVAL, PARCAT2) %>%\n mutate(\n PARAMCD = as.character(PARAMCD),\n AVALC = \"\"\n ) %>%\n droplevels()\n\n# Add new param tdurd for treatment duration.\nset.seed(99)\ntdurd_adsl <- adsl %>%\n select(STUDYID, USUBJID, ACTARM) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(1:150, size = nrow(adsl), replace = TRUE),\n AVALC = case_when(\n 0 <= AVAL & AVAL <= 30 ~ \"0 - 30\",\n 31 <= AVAL & AVAL <= 60 ~ \"31 - 60\",\n 61 <= AVAL & AVAL <= 90 ~ \"61 - 90\",\n TRUE ~ \">= 91\"\n )\n )\ntdurd <- adex %>%\n filter(PARAMCD == \"TNDOSE\") %>%\n select(STUDYID, USUBJID, PARCAT2) %>%\n left_join(tdurd_adsl, by = c(\"STUDYID\", \"USUBJID\"))\n\n# Add new param tndosmis for missed doses.\ntndosmis_adsl <- adsl %>%\n select(STUDYID, USUBJID, ACTARM) %>%\n mutate(\n PARAMCD = \"TNDOSMIS\",\n PARAM = \"Total number of missed doses during study\",\n AVAL = sample(0:20, size = nrow(adsl), replace = TRUE),\n AVALC = \"\"\n )\ntndosmis <- adex %>%\n filter(PARAMCD == \"TNDOSE\") %>%\n select(STUDYID, USUBJID, PARCAT2) %>%\n left_join(tndosmis_adsl, by = c(\"STUDYID\", \"USUBJID\"))\n\nadex <- dplyr::bind_rows(adex, tdurd, tndosmis) %>%\n mutate(PARAM = factor(\n PARAM,\n levels = c(\n \"Overall duration (days)\", \"Total dose administered\", \"Total number of doses administered\",\n \"Total number of missed doses during study\"\n )\n ))\n\n\n\n\n\nCode# When summary table contains only categorical or only numeric parameters\n\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\"PARCAT2\", split_label = \"\\nParameter Category (Drug A/Drug B)\", label_pos = \"topleft\") %>%\n split_rows_by(\"PARAM\", split_fun = split_fun) %>%\n summarize_vars(vars = \"AVAL\")\n\nresult <- build_table(lyt = lyt, df = adex, alt_counts_df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination \nParameter Category (Drug A/Drug B) (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————\nDrug A \n Overall duration (days) \n n 75 67 75 \n Mean (SD) 74.3 (41.6) 79.0 (43.1) 74.2 (39.5) \n Median 77.0 80.0 78.0 \n Min - Max 5.0 - 149.0 2.0 - 150.0 1.0 - 147.0 \n Total dose administered \n n 75 67 75 \n Mean (SD) 6675.2 (1110.9) 6505.1 (1249.3) 6982.4 (1272.5)\n Median 6720.0 6480.0 7200.0 \n Min - Max 4800.0 - 9360.0 4080.0 - 9360.0 4320.0 - 9360.0\n Total number of doses administered \n n 75 67 75 \n Mean (SD) 7.0 (0.0) 7.0 (0.0) 7.0 (0.0) \n Median 7.0 7.0 7.0 \n Min - Max 7.0 - 7.0 7.0 - 7.0 7.0 - 7.0 \n Total number of missed doses during study \n n 75 67 75 \n Mean (SD) 10.5 (5.9) 10.0 (6.1) 9.5 (5.5) \n Median 10.0 11.0 9.0 \n Min - Max 0.0 - 20.0 0.0 - 19.0 0.0 - 20.0 \nDrug B \n Overall duration (days) \n n 59 67 57 \n Mean (SD) 77.5 (40.5) 76.3 (41.0) 69.5 (46.2) \n Median 79.0 76.0 65.0 \n Min - Max 2.0 - 149.0 5.0 - 148.0 1.0 - 149.0 \n Total dose administered \n n 59 67 57 \n Mean (SD) 6630.5 (1334.0) 6297.3 (1291.1) 6505.3 (1080.7)\n Median 6720.0 6240.0 6480.0 \n Min - Max 4320.0 - 8880.0 4080.0 - 9120.0 4320.0 - 8640.0\n Total number of doses administered \n n 59 67 57 \n Mean (SD) 7.0 (0.0) 7.0 (0.0) 7.0 (0.0) \n Median 7.0 7.0 7.0 \n Min - Max 7.0 - 7.0 7.0 - 7.0 7.0 - 7.0 \n Total number of missed doses during study \n n 59 67 57 \n Mean (SD) 9.1 (6.5) 10.0 (6.3) 10.7 (5.8) \n Median 9.0 10.0 11.0 \n Min - Max 0.0 - 20.0 0.0 - 20.0 1.0 - 20.0 \n\n\n\n\n\nCode# When summary table contains both categorical and numeric parameters,\n# developer needs to do pre-processing to transform dataset to wide format.\nadex_avalc_wide <- adex %>%\n filter(PARAMCD == \"TDURD\") %>%\n select(STUDYID, USUBJID, PARAMCD, AVALC, PARCAT2) %>%\n tidyr::pivot_wider(\n id_cols = c(STUDYID, USUBJID, PARCAT2),\n names_from = PARAMCD,\n values_from = AVALC\n ) %>%\n mutate(\n TDURDC = factor(TDURD, levels = c(\"0 - 30\", \"31 - 60\", \"61 - 90\", \">= 91\"))\n ) %>%\n select(-TDURD)\n\nanl <- adex %>%\n select(STUDYID, USUBJID, ACTARM, PARAMCD, AVAL, PARCAT2) %>%\n tidyr::pivot_wider(\n id_cols = c(STUDYID, USUBJID, ACTARM, PARCAT2),\n names_from = PARAMCD,\n values_from = AVAL\n ) %>%\n left_join(adex_avalc_wide, by = c(\"STUDYID\", \"USUBJID\", \"PARCAT2\")) %>%\n var_relabel(\n TDOSE = \"Total dose administered\",\n TNDOSE = \"Total number of doses administered\",\n TDURD = \"Overall duration (days)\",\n TNDOSMIS = \"Total number of missed doses during study\",\n TDURDC = \"Overall duration (days)\"\n )\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\"PARCAT2\", split_label = \"\\nParameter Category (Drug A/Drug B)\", label_pos = \"topleft\") %>%\n summarize_vars(\n vars = c(\"TDURD\", \"TDURDC\", \"TDOSE\", \"TNDOSE\"),\n var_labels = var_labels(anl)[c(\"TDURD\", \"TDURDC\", \"TDOSE\", \"TNDOSE\")]\n )\n\nresult <- build_table(lyt = lyt, df = anl, alt_counts_df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination \nParameter Category (Drug A/Drug B) (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————\nDrug A \n Overall duration (days) \n n 75 67 75 \n Mean (SD) 74.3 (41.6) 79.0 (43.1) 74.2 (39.5) \n Median 77.0 80.0 78.0 \n Min - Max 5.0 - 149.0 2.0 - 150.0 1.0 - 147.0 \n Overall duration (days) \n n 75 67 75 \n 0 - 30 12 (16%) 12 (17.9%) 15 (20%) \n 31 - 60 18 (24%) 12 (17.9%) 14 (18.7%) \n 61 - 90 19 (25.3%) 15 (22.4%) 18 (24%) \n >= 91 26 (34.7%) 28 (41.8%) 28 (37.3%) \n Total dose administered \n n 75 67 75 \n Mean (SD) 6675.2 (1110.9) 6505.1 (1249.3) 6982.4 (1272.5)\n Median 6720.0 6480.0 7200.0 \n Min - Max 4800.0 - 9360.0 4080.0 - 9360.0 4320.0 - 9360.0\n Total number of doses administered \n n 75 67 75 \n Mean (SD) 7.0 (0.0) 7.0 (0.0) 7.0 (0.0) \n Median 7.0 7.0 7.0 \n Min - Max 7.0 - 7.0 7.0 - 7.0 7.0 - 7.0 \nDrug B \n Overall duration (days) \n n 59 67 57 \n Mean (SD) 77.5 (40.5) 76.3 (41.0) 69.5 (46.2) \n Median 79.0 76.0 65.0 \n Min - Max 2.0 - 149.0 5.0 - 148.0 1.0 - 149.0 \n Overall duration (days) \n n 59 67 57 \n 0 - 30 8 (13.6%) 10 (14.9%) 16 (28.1%) \n 31 - 60 14 (23.7%) 16 (23.9%) 12 (21.1%) \n 61 - 90 15 (25.4%) 17 (25.4%) 11 (19.3%) \n >= 91 22 (37.3%) 24 (35.8%) 18 (31.6%) \n Total dose administered \n n 59 67 57 \n Mean (SD) 6630.5 (1334.0) 6297.3 (1291.1) 6505.3 (1080.7)\n Median 6720.0 6240.0 6480.0 \n Min - Max 4320.0 - 8880.0 4080.0 - 9120.0 4320.0 - 8640.0\n Total number of doses administered \n n 59 67 57 \n Mean (SD) 7.0 (0.0) 7.0 (0.0) 7.0 (0.0) \n Median 7.0 7.0 7.0 \n Min - Max 7.0 - 7.0 7.0 - 7.0 7.0 - 7.0 \n\n\n\n\n\nCode# When summary table contains both categorical and numeric parameters,\n# developer needs to do pre-processing to transform dataset to wide format.\nadex_avalc_wide <- adex %>%\n filter(PARAMCD == \"TDURD\") %>%\n select(STUDYID, USUBJID, PARAMCD, AVALC, PARCAT2) %>%\n tidyr::pivot_wider(\n id_cols = c(STUDYID, USUBJID, PARCAT2),\n names_from = PARAMCD,\n values_from = AVALC\n ) %>%\n mutate(\n TDURDC = factor(TDURD, levels = c(\"0 - 30\", \"31 - 60\", \"61 - 90\", \">= 91\"))\n ) %>%\n select(-TDURD)\n\nanl <- adex %>%\n select(STUDYID, USUBJID, ACTARM, PARAMCD, AVAL, PARCAT2) %>%\n tidyr::pivot_wider(\n id_cols = c(STUDYID, USUBJID, ACTARM, PARCAT2),\n names_from = PARAMCD,\n values_from = AVAL\n ) %>%\n left_join(adex_avalc_wide, by = c(\"STUDYID\", \"USUBJID\", \"PARCAT2\")) %>%\n var_relabel(\n TDOSE = \"Total dose administered\",\n TNDOSE = \"Total number of doses administered\",\n TDURD = \"Overall duration (days)\",\n TNDOSMIS = \"Total number of missed doses during study\",\n TDURDC = \"Overall duration (days)\"\n )\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\"PARCAT2\", split_label = \"\\nParameter Category (Drug A/Drug B)\", label_pos = \"topleft\") %>%\n summarize_vars(\n vars = c(\"TDURD\", \"TDURDC\", \"TDOSE\", \"TNDOSE\"),\n var_labels = var_labels(anl)[c(\"TDURD\", \"TDURDC\", \"TDOSE\", \"TNDOSE\")]\n ) %>%\n count_missed_doses(\n \"TNDOSMIS\",\n thresholds = c(1, 5, 10, 15),\n var_labels = \"Missed Doses\"\n )\n\nresult <- build_table(lyt = lyt, df = anl, alt_counts_df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination \nParameter Category (Drug A/Drug B) (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————\nDrug A \n Overall duration (days) \n n 75 67 75 \n Mean (SD) 74.3 (41.6) 79.0 (43.1) 74.2 (39.5) \n Median 77.0 80.0 78.0 \n Min - Max 5.0 - 149.0 2.0 - 150.0 1.0 - 147.0 \n Overall duration (days) \n n 75 67 75 \n 0 - 30 12 (16%) 12 (17.9%) 15 (20%) \n 31 - 60 18 (24%) 12 (17.9%) 14 (18.7%) \n 61 - 90 19 (25.3%) 15 (22.4%) 18 (24%) \n >= 91 26 (34.7%) 28 (41.8%) 28 (37.3%) \n Total dose administered \n n 75 67 75 \n Mean (SD) 6675.2 (1110.9) 6505.1 (1249.3) 6982.4 (1272.5)\n Median 6720.0 6480.0 7200.0 \n Min - Max 4800.0 - 9360.0 4080.0 - 9360.0 4320.0 - 9360.0\n Total number of doses administered \n n 75 67 75 \n Mean (SD) 7.0 (0.0) 7.0 (0.0) 7.0 (0.0) \n Median 7.0 7.0 7.0 \n Min - Max 7.0 - 7.0 7.0 - 7.0 7.0 - 7.0 \n Missed Doses \n n 75 67 75 \n At least 1 missed dose 74 (55.2%) 63 (47%) 73 (55.3%) \n At least 5 missed doses 59 (44%) 49 (36.6%) 59 (44.7%) \n At least 10 missed doses 41 (30.6%) 38 (28.4%) 37 (28%) \n At least 15 missed doses 26 (19.4%) 21 (15.7%) 16 (12.1%) \nDrug B \n Overall duration (days) \n n 59 67 57 \n Mean (SD) 77.5 (40.5) 76.3 (41.0) 69.5 (46.2) \n Median 79.0 76.0 65.0 \n Min - Max 2.0 - 149.0 5.0 - 148.0 1.0 - 149.0 \n Overall duration (days) \n n 59 67 57 \n 0 - 30 8 (13.6%) 10 (14.9%) 16 (28.1%) \n 31 - 60 14 (23.7%) 16 (23.9%) 12 (21.1%) \n 61 - 90 15 (25.4%) 17 (25.4%) 11 (19.3%) \n >= 91 22 (37.3%) 24 (35.8%) 18 (31.6%) \n Total dose administered \n n 59 67 57 \n Mean (SD) 6630.5 (1334.0) 6297.3 (1291.1) 6505.3 (1080.7)\n Median 6720.0 6240.0 6480.0 \n Min - Max 4320.0 - 8880.0 4080.0 - 9120.0 4320.0 - 8640.0\n Total number of doses administered \n n 59 67 57 \n Mean (SD) 7.0 (0.0) 7.0 (0.0) 7.0 (0.0) \n Median 7.0 7.0 7.0 \n Min - Max 7.0 - 7.0 7.0 - 7.0 7.0 - 7.0 \n Missed Doses \n n 59 67 57 \n At least 1 missed dose 56 (41.8%) 63 (47%) 57 (43.2%) \n At least 5 missed doses 41 (30.6%) 50 (37.3%) 47 (35.6%) \n At least 10 missed doses 27 (20.1%) 36 (26.9%) 31 (23.5%) \n At least 15 missed doses 17 (12.7%) 18 (13.4%) 20 (15.2%) \n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\nadex_labels <- unname(var_labels(adex))\nadex <- adex %>%\n filter(PARCAT1 == \"OVERALL\") %>%\n mutate(\n AVALCAT1 = case_when(\n PARAMCD == \"TDOSE\" & AVAL < 5000 ~ \"LOW\",\n PARAMCD == \"TDOSE\" & AVAL >= 5000 ~ \"HIGH\",\n PARAMCD == \"TNDOSE\" & AVAL < 10 ~ \"< 10\",\n PARAMCD == \"TNDOSE\" & AVAL >= 10 ~ \">= 10\"\n )\n )\nvar_labels(adex) <- c(adex_labels, \"\")\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\n \"ADSL\",\n adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'\n ),\n cdisc_dataset(\n \"ADEX\",\n adex,\n code = 'ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n ADEX_labels <- unname(var_labels(ADEX))\n ADEX <- ADEX %>%\n filter(PARCAT1 == \"OVERALL\") %>%\n mutate(\n AVALCAT1 = case_when(\n PARAMCD == \"TDOSE\" & AVAL < 5000 ~ \"LOW\",\n PARAMCD == \"TDOSE\" & AVAL >= 5000 ~ \"HIGH\",\n PARAMCD == \"TNDOSE\" & AVAL < 10 ~ \"< 10\",\n PARAMCD == \"TNDOSE\" & AVAL >= 10 ~ \">= 10\")\n )\n var_labels(ADEX) <- c(ADEX_labels, \"\")'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"Exposure Table\",\n dataname = \"ADEX\",\n arm_var = choices_selected(\n choices = variable_choices(adex, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adex, c(\"PARCAT2\", \"PARAM\")),\n selected = c(\"PARCAT2\", \"PARAM\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(adex, c(\"AVAL\", \"AVALCAT1\")),\n selected = c(\"AVAL\", \"AVALCAT1\")\n ),\n paramcd = choices_selected(\n choices = value_choices(adex, \"PARAMCD\", \"PARAM\"),\n selected = c(\"TDOSE\", \"TNDOSE\")\n ),\n denominator = choices_selected(\n choices = c(\"n\", \"N\", \"omit\"),\n selected = \"N\"\n )\n )\n ), # Set initial filter state as single study drug to produce smaller table\n filter = list(ADEX = list(PARCAT2 = \"Drug A\", AVAL = list()))\n)\n\n[INFO] 2023-08-04 15:07:07.1574 pid:6854 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\nWarning: The 'plotly_relayout' event tied a source ID of\n'teal-main_ui-filter_panel-active-ADEX-filter-ADEX_AVAL-inputs-histogram_plot'\nis not registered. In order to obtain this event data, please add\n`event_register(p, 'plotly_relayout')` to the plot (`p`) that you wish to\nobtain event data from.\n\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tidyr_1.3.0 dplyr_1.1.2 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n[13] scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[13] ellipsis_0.3.2 fontawesome_0.5.1 utf8_1.2.3 \n[16] promises_1.2.0.1 rmarkdown_2.23 ps_1.7.5 \n[19] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[22] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[25] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[31] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[34] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[37] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[40] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[43] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[46] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[49] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[52] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[55] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[58] plotly_4.10.2 generics_0.1.3 ggplot2_3.4.2 \n[61] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[64] glue_1.6.2 emmeans_1.8.7 lazyeval_0.2.2 \n[67] tools_4.3.1 data.table_1.14.8 webshot_0.5.5 \n[70] forcats_1.0.0 mvtnorm_1.2-2 grid_4.3.1 \n[73] rbibutils_2.2.13 colorspace_2.1-0 nlme_3.1-162 \n[76] cli_3.6.1 fansi_1.0.4 viridisLite_0.4.2 \n[79] geepack_1.3.9 gtable_0.3.3 R.methodsS3_1.8.2 \n[82] sass_0.4.7 digest_0.6.33 htmlwidgets_1.6.2 \n[85] memoise_2.0.1 htmltools_0.5.5 R.oo_1.25.0 \n[88] lifecycle_1.0.3 httr_1.4.6 shinyWidgets_0.7.6 \n[91] mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/ext01.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/egt01.html", "href": "tables/safety/egt01.html", "title": "EGT01", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\n# Data should be filtered for the studied Parameter (`PARAM`) and the\n# Analysis Visit (`AVISIT`). According to the GDSR template, the values for\n# the `AVISIT` reported in the EGT01 standard may be:\n# 'POST-BASELINE MAXIMUM', 'POST-BASELINE MINIMUM', 'POST-BASELINE LAST'.\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadeg <- df_explicit_na(adeg)\n\nadeg_f <- adeg %>%\n filter(ANL01FL == \"Y\") %>%\n filter(PARAM %in% c(\"Heart Rate\", \"QT Duration\", \"RR Duration\"))\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nafun <- function(x, .var, .spl_context, ...) {\n n_fun <- sum(!is.na(x), na.rm = TRUE)\n if (n_fun == 0) {\n mean_sd_fun <- c(NA, NA)\n median_fun <- NA\n min_max_fun <- c(NA, NA)\n } else {\n mean_sd_fun <- c(mean(x, na.rm = TRUE), sd(x, na.rm = TRUE))\n median_fun <- median(x, na.rm = TRUE)\n min_max_fun <- c(min(x), max(x))\n }\n is_chg <- .var == \"CHG\"\n is_baseline <- .spl_context$value[which(.spl_context$split == \"AVISIT\")] == \"BASELINE\"\n if (is_baseline && is_chg) n_fun <- mean_sd_fun <- median_fun <- min_max_fun <- NULL\n\n in_rows(\n \"n\" = n_fun,\n \"Mean (SD)\" = mean_sd_fun,\n \"Median\" = median_fun,\n \"Min - Max\" = min_max_fun,\n .formats = list(\"n\" = \"xx\", \"Mean (SD)\" = \"xx.xx (xx.xx)\", \"Median\" = \"xx.xx\", \"Min - Max\" = \"xx.xx - xx.xx\"),\n .format_na_strs = list(\"n\" = \"NE\", \"Mean (SD)\" = \"NE (NE)\", \"Median\" = \"NE\", \"Min - Max\" = \"NE - NE\")\n )\n}\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\"PARAM\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adeg_f$PARAM)) %>%\n split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adeg_f$AVISIT)) %>%\n split_cols_by_multivar(\n vars = c(\"AVAL\", \"CHG\"),\n varlabels = c(\"Value at Visit\", \"Change from\\nBaseline\")\n ) %>%\n analyze_colvars(afun = afun)\n\nresult <- build_table(lyt, adeg_f, alt_counts_df = adsl)\nresult\n\nParameter A: Drug X B: Placebo C: Combination \n Analysis Visit Change from Change from Change from \n Value at Visit Baseline Value at Visit Baseline Value at Visit Baseline \n (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nHeart Rate \n BASELINE \n n 134 134 132 \n Mean (SD) 71.45 (17.93) 69.83 (20.72) 69.34 (20.95) \n Median 72.70 73.35 71.96 \n Min - Max 9.09 - 106.91 13.49 - 115.52 11.63 - 115.49 \n WEEK 1 DAY 8 \n n 134 134 134 134 132 132 \n Mean (SD) 70.19 (20.27) -1.26 (25.97) 69.43 (20.80) -0.40 (29.73) 68.65 (18.06) -0.69 (27.81) \n Median 70.70 -2.20 70.46 -0.52 68.57 -0.76 \n Min - Max 8.53 - 127.50 -50.97 - 89.16 16.85 - 129.14 -68.18 - 88.38 16.87 - 115.60 -68.25 - 67.20 \n WEEK 2 DAY 15 \n n 134 134 134 134 132 132 \n Mean (SD) 70.32 (19.56) -1.13 (26.26) 71.11 (20.56) 1.28 (31.35) 69.19 (18.06) -0.15 (28.61) \n Median 70.88 -1.10 72.52 -0.31 69.30 -1.55 \n Min - Max 17.14 - 116.32 -85.03 - 67.52 9.22 - 120.54 -73.07 - 81.44 29.62 - 120.50 -67.75 - 66.29 \n WEEK 3 DAY 22 \n n 134 134 134 134 132 132 \n Mean (SD) 68.25 (20.17) -3.20 (28.66) 68.95 (20.56) -0.88 (30.14) 70.88 (20.28) 1.54 (27.28) \n Median 68.79 -2.17 67.80 1.19 70.12 0.14 \n Min - Max 13.33 - 131.73 -81.20 - 72.57 23.98 - 130.41 -73.03 - 103.31 20.91 - 116.79 -64.51 - 72.52 \n WEEK 4 DAY 29 \n n 134 134 134 134 132 132 \n Mean (SD) 70.06 (18.41) -1.38 (26.59) 71.60 (20.34) 1.77 (30.26) 71.02 (20.59) 1.68 (29.60) \n Median 69.33 -4.54 72.21 -0.88 70.52 3.81 \n Min - Max 22.30 - 116.51 -58.07 - 77.32 17.53 - 129.06 -64.32 - 85.34 10.35 - 117.30 -65.91 - 105.67 \n WEEK 5 DAY 36 \n n 134 134 134 134 132 132 \n Mean (SD) 66.41 (19.74) -5.04 (27.11) 71.25 (18.92) 1.42 (27.08) 71.26 (18.56) 1.92 (29.59) \n Median 65.40 -6.83 70.86 0.64 73.29 1.74 \n Min - Max 23.89 - 110.38 -73.26 - 57.24 25.86 - 125.73 -71.15 - 67.37 23.89 - 117.19 -58.23 - 68.86 \nQT Duration \n BASELINE \n n 134 134 132 \n Mean (SD) 336.83 (117.96) 351.00 (98.44) 352.60 (105.11) \n Median 344.41 351.48 347.96 \n Min - Max 86.98 - 665.40 98.90 - 641.92 105.68 - 628.14 \n WEEK 1 DAY 8 \n n 134 134 134 134 132 132 \n Mean (SD) 342.57 (101.09) 5.74 (159.94) 363.95 (102.34) 12.94 (140.73) 359.42 (105.16) 6.83 (147.13) \n Median 347.26 -1.78 356.54 13.73 363.84 8.69 \n Min - Max 91.63 - 591.42 -346.44 - 452.75 114.92 - 656.45 -317.53 - 416.35 51.91 - 611.88 -473.19 - 358.00 \n WEEK 2 DAY 15 \n n 134 134 134 134 132 132 \n Mean (SD) 353.24 (93.93) 16.41 (162.10) 345.93 (96.78) -5.08 (152.51) 335.69 (98.61) -16.91 (138.45) \n Median 351.10 16.72 346.83 -9.68 320.96 -22.27 \n Min - Max 138.01 - 587.30 -414.07 - 389.16 146.42 - 556.07 -440.28 - 364.76 104.91 - 562.34 -326.55 - 325.27 \n WEEK 3 DAY 22 \n n 134 134 134 134 132 132 \n Mean (SD) 370.12 (101.57) 33.28 (152.78) 343.41 (102.58) -7.59 (138.80) 346.95 (94.96) -5.65 (144.65) \n Median 378.21 39.59 335.12 -15.89 352.15 9.11 \n Min - Max 118.14 - 615.18 -391.72 - 520.09 63.37 - 566.51 -311.28 - 293.76 126.09 - 580.81 -412.11 - 410.01 \n WEEK 4 DAY 29 \n n 134 134 134 134 132 132 \n Mean (SD) 345.77 (95.97) 8.94 (145.65) 354.38 (108.29) 3.37 (142.39) 341.36 (106.75) -11.24 (145.65) \n Median 340.13 5.58 346.70 -17.13 352.30 -11.87 \n Min - Max 110.12 - 616.58 -393.34 - 456.04 80.82 - 687.69 -439.90 - 364.80 4.95 - 570.61 -480.94 - 330.67 \n WEEK 5 DAY 36 \n n 134 134 134 134 132 132 \n Mean (SD) 358.90 (97.69) 22.07 (155.68) 338.65 (99.26) -12.36 (130.46) 349.30 (95.77) -3.30 (136.00) \n Median 351.96 5.89 344.17 0.40 350.32 12.68 \n Min - Max 88.38 - 661.12 -353.30 - 539.84 31.25 - 563.90 -338.85 - 352.75 119.02 - 581.83 -311.45 - 295.53 \nRR Duration \n BASELINE \n n 134 134 132 \n Mean (SD) 1028.42 (286.38) 1027.48 (324.00) 1074.62 (277.33) \n Median 1041.86 1047.27 1080.87 \n Min - Max 34.33 - 1783.71 5.29 - 1877.19 289.60 - 1617.06 \n WEEK 1 DAY 8 \n n 134 134 134 134 132 132 \n Mean (SD) 990.15 (318.74) -38.26 (446.40) 1061.59 (269.14) 34.10 (401.76) 1039.64 (284.39) -34.98 (406.04) \n Median 963.88 -86.50 1061.50 66.91 1014.78 -97.83 \n Min - Max 110.82 - 2014.56 -1014.82 - 1389.40 276.83 - 1711.99 -942.16 - 993.82 498.21 - 1937.47 -958.61 - 908.90 \n WEEK 2 DAY 15 \n n 134 134 134 134 132 132 \n Mean (SD) 1013.37 (304.13) -15.05 (425.81) 1109.40 (318.23) 81.92 (453.11) 1045.21 (277.51) -29.41 (380.84) \n Median 1040.69 40.49 1117.76 69.27 1034.64 -15.33 \n Min - Max 164.19 - 1677.10 -1216.10 - 1053.15 160.73 - 2048.73 -1127.10 - 1148.61 252.84 - 1722.33 -859.27 - 871.54 \n WEEK 3 DAY 22 \n n 134 134 134 134 132 132 \n Mean (SD) 1013.99 (304.99) -14.43 (406.53) 1118.35 (296.53) 90.86 (409.57) 1036.59 (268.52) -38.03 (421.48) \n Median 1027.23 -50.54 1134.60 52.03 1030.72 -60.72 \n Min - Max 357.04 - 1798.65 -882.94 - 1080.26 97.14 - 1825.43 -887.06 - 1166.15 446.02 - 1713.38 -984.79 - 902.37 \n WEEK 4 DAY 29 \n n 134 134 134 134 132 132 \n Mean (SD) 1033.31 (313.92) 4.89 (483.15) 1079.76 (298.94) 52.28 (429.25) 1027.55 (295.86) -47.07 (378.23) \n Median 1050.40 5.60 1051.61 69.55 1023.36 -49.52 \n Min - Max 54.33 - 1979.43 -1345.93 - 1195.41 347.94 - 1762.04 -826.43 - 1191.83 341.62 - 2144.86 -1002.03 - 1048.66\n WEEK 5 DAY 36 \n n 134 134 134 134 132 132 \n Mean (SD) 1072.33 (282.90) 43.92 (379.05) 1058.45 (271.01) 30.97 (436.03) 1029.04 (271.21) -45.58 (405.53) \n Median 1067.33 55.87 1068.95 33.61 1065.26 -34.40 \n Min - Max 352.97 - 2000.56 -1028.79 - 1418.57 208.83 - 1794.73 -978.97 - 1365.13 436.28 - 1794.07 -962.18 - 1329.88 \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadeg <- df_explicit_na(adeg)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\",\n adsl,\n code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'\n ),\n cdisc_dataset(\"ADEG\",\n adeg,\n code = 'ADEG <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adeg\"))'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"ECG Results and Change from Baseline by Visit\",\n dataname = \"ADEG\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adeg, c(\"PARAM\", \"AVISIT\")),\n selected = c(\"AVISIT\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(adeg, c(\"AVAL\", \"CHG\")),\n selected = c(\"AVAL\")\n ),\n useNA = \"ifany\",\n paramcd = choices_selected(\n choices = value_choices(adeg, \"PARAMCD\", \"PARAM\"),\n selected = \"HR\"\n ),\n parallel_vars = TRUE\n )\n ),\n filter = list(ADEG = list(AVAL = list()))\n)\n\n[INFO] 2023-08-04 14:51:20.3216 pid:7064 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\nWarning: The 'plotly_relayout' event tied a source ID of\n'teal-main_ui-filter_panel-active-ADEG-filter-ADEG_AVAL-inputs-histogram_plot'\nis not registered. In order to obtain this event data, please add\n`event_register(p, 'plotly_relayout')` to the plot (`p`) that you wish to\nobtain event data from.\n\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[13] ellipsis_0.3.2 fontawesome_0.5.1 utf8_1.2.3 \n[16] promises_1.2.0.1 rmarkdown_2.23 ps_1.7.5 \n[19] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[22] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[25] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[31] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[34] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[37] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[40] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[43] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[46] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[49] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[52] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[55] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[58] plotly_4.10.2 generics_0.1.3 ggplot2_3.4.2 \n[61] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[64] glue_1.6.2 emmeans_1.8.7 lazyeval_0.2.2 \n[67] tools_4.3.1 data.table_1.14.8 webshot_0.5.5 \n[70] forcats_1.0.0 mvtnorm_1.2-2 grid_4.3.1 \n[73] tidyr_1.3.0 rbibutils_2.2.13 colorspace_2.1-0 \n[76] nlme_3.1-162 cli_3.6.1 fansi_1.0.4 \n[79] viridisLite_0.4.2 geepack_1.3.9 gtable_0.3.3 \n[82] R.methodsS3_1.8.2 sass_0.4.7 digest_0.6.33 \n[85] htmlwidgets_1.6.2 memoise_2.0.1 htmltools_0.5.5 \n[88] R.oo_1.25.0 lifecycle_1.0.3 httr_1.4.6 \n[91] shinyWidgets_0.7.6 mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/egt01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\n# Data should be filtered for the studied Parameter (`PARAM`) and the\n# Analysis Visit (`AVISIT`). According to the GDSR template, the values for\n# the `AVISIT` reported in the EGT01 standard may be:\n# 'POST-BASELINE MAXIMUM', 'POST-BASELINE MINIMUM', 'POST-BASELINE LAST'.\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadeg <- df_explicit_na(adeg)\n\nadeg_f <- adeg %>%\n filter(ANL01FL == \"Y\") %>%\n filter(PARAM %in% c(\"Heart Rate\", \"QT Duration\", \"RR Duration\"))\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nafun <- function(x, .var, .spl_context, ...) {\n n_fun <- sum(!is.na(x), na.rm = TRUE)\n if (n_fun == 0) {\n mean_sd_fun <- c(NA, NA)\n median_fun <- NA\n min_max_fun <- c(NA, NA)\n } else {\n mean_sd_fun <- c(mean(x, na.rm = TRUE), sd(x, na.rm = TRUE))\n median_fun <- median(x, na.rm = TRUE)\n min_max_fun <- c(min(x), max(x))\n }\n is_chg <- .var == \"CHG\"\n is_baseline <- .spl_context$value[which(.spl_context$split == \"AVISIT\")] == \"BASELINE\"\n if (is_baseline && is_chg) n_fun <- mean_sd_fun <- median_fun <- min_max_fun <- NULL\n\n in_rows(\n \"n\" = n_fun,\n \"Mean (SD)\" = mean_sd_fun,\n \"Median\" = median_fun,\n \"Min - Max\" = min_max_fun,\n .formats = list(\"n\" = \"xx\", \"Mean (SD)\" = \"xx.xx (xx.xx)\", \"Median\" = \"xx.xx\", \"Min - Max\" = \"xx.xx - xx.xx\"),\n .format_na_strs = list(\"n\" = \"NE\", \"Mean (SD)\" = \"NE (NE)\", \"Median\" = \"NE\", \"Min - Max\" = \"NE - NE\")\n )\n}\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\"PARAM\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adeg_f$PARAM)) %>%\n split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adeg_f$AVISIT)) %>%\n split_cols_by_multivar(\n vars = c(\"AVAL\", \"CHG\"),\n varlabels = c(\"Value at Visit\", \"Change from\\nBaseline\")\n ) %>%\n analyze_colvars(afun = afun)\n\nresult <- build_table(lyt, adeg_f, alt_counts_df = adsl)\nresult\n\nParameter A: Drug X B: Placebo C: Combination \n Analysis Visit Change from Change from Change from \n Value at Visit Baseline Value at Visit Baseline Value at Visit Baseline \n (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nHeart Rate \n BASELINE \n n 134 134 132 \n Mean (SD) 71.45 (17.93) 69.83 (20.72) 69.34 (20.95) \n Median 72.70 73.35 71.96 \n Min - Max 9.09 - 106.91 13.49 - 115.52 11.63 - 115.49 \n WEEK 1 DAY 8 \n n 134 134 134 134 132 132 \n Mean (SD) 70.19 (20.27) -1.26 (25.97) 69.43 (20.80) -0.40 (29.73) 68.65 (18.06) -0.69 (27.81) \n Median 70.70 -2.20 70.46 -0.52 68.57 -0.76 \n Min - Max 8.53 - 127.50 -50.97 - 89.16 16.85 - 129.14 -68.18 - 88.38 16.87 - 115.60 -68.25 - 67.20 \n WEEK 2 DAY 15 \n n 134 134 134 134 132 132 \n Mean (SD) 70.32 (19.56) -1.13 (26.26) 71.11 (20.56) 1.28 (31.35) 69.19 (18.06) -0.15 (28.61) \n Median 70.88 -1.10 72.52 -0.31 69.30 -1.55 \n Min - Max 17.14 - 116.32 -85.03 - 67.52 9.22 - 120.54 -73.07 - 81.44 29.62 - 120.50 -67.75 - 66.29 \n WEEK 3 DAY 22 \n n 134 134 134 134 132 132 \n Mean (SD) 68.25 (20.17) -3.20 (28.66) 68.95 (20.56) -0.88 (30.14) 70.88 (20.28) 1.54 (27.28) \n Median 68.79 -2.17 67.80 1.19 70.12 0.14 \n Min - Max 13.33 - 131.73 -81.20 - 72.57 23.98 - 130.41 -73.03 - 103.31 20.91 - 116.79 -64.51 - 72.52 \n WEEK 4 DAY 29 \n n 134 134 134 134 132 132 \n Mean (SD) 70.06 (18.41) -1.38 (26.59) 71.60 (20.34) 1.77 (30.26) 71.02 (20.59) 1.68 (29.60) \n Median 69.33 -4.54 72.21 -0.88 70.52 3.81 \n Min - Max 22.30 - 116.51 -58.07 - 77.32 17.53 - 129.06 -64.32 - 85.34 10.35 - 117.30 -65.91 - 105.67 \n WEEK 5 DAY 36 \n n 134 134 134 134 132 132 \n Mean (SD) 66.41 (19.74) -5.04 (27.11) 71.25 (18.92) 1.42 (27.08) 71.26 (18.56) 1.92 (29.59) \n Median 65.40 -6.83 70.86 0.64 73.29 1.74 \n Min - Max 23.89 - 110.38 -73.26 - 57.24 25.86 - 125.73 -71.15 - 67.37 23.89 - 117.19 -58.23 - 68.86 \nQT Duration \n BASELINE \n n 134 134 132 \n Mean (SD) 336.83 (117.96) 351.00 (98.44) 352.60 (105.11) \n Median 344.41 351.48 347.96 \n Min - Max 86.98 - 665.40 98.90 - 641.92 105.68 - 628.14 \n WEEK 1 DAY 8 \n n 134 134 134 134 132 132 \n Mean (SD) 342.57 (101.09) 5.74 (159.94) 363.95 (102.34) 12.94 (140.73) 359.42 (105.16) 6.83 (147.13) \n Median 347.26 -1.78 356.54 13.73 363.84 8.69 \n Min - Max 91.63 - 591.42 -346.44 - 452.75 114.92 - 656.45 -317.53 - 416.35 51.91 - 611.88 -473.19 - 358.00 \n WEEK 2 DAY 15 \n n 134 134 134 134 132 132 \n Mean (SD) 353.24 (93.93) 16.41 (162.10) 345.93 (96.78) -5.08 (152.51) 335.69 (98.61) -16.91 (138.45) \n Median 351.10 16.72 346.83 -9.68 320.96 -22.27 \n Min - Max 138.01 - 587.30 -414.07 - 389.16 146.42 - 556.07 -440.28 - 364.76 104.91 - 562.34 -326.55 - 325.27 \n WEEK 3 DAY 22 \n n 134 134 134 134 132 132 \n Mean (SD) 370.12 (101.57) 33.28 (152.78) 343.41 (102.58) -7.59 (138.80) 346.95 (94.96) -5.65 (144.65) \n Median 378.21 39.59 335.12 -15.89 352.15 9.11 \n Min - Max 118.14 - 615.18 -391.72 - 520.09 63.37 - 566.51 -311.28 - 293.76 126.09 - 580.81 -412.11 - 410.01 \n WEEK 4 DAY 29 \n n 134 134 134 134 132 132 \n Mean (SD) 345.77 (95.97) 8.94 (145.65) 354.38 (108.29) 3.37 (142.39) 341.36 (106.75) -11.24 (145.65) \n Median 340.13 5.58 346.70 -17.13 352.30 -11.87 \n Min - Max 110.12 - 616.58 -393.34 - 456.04 80.82 - 687.69 -439.90 - 364.80 4.95 - 570.61 -480.94 - 330.67 \n WEEK 5 DAY 36 \n n 134 134 134 134 132 132 \n Mean (SD) 358.90 (97.69) 22.07 (155.68) 338.65 (99.26) -12.36 (130.46) 349.30 (95.77) -3.30 (136.00) \n Median 351.96 5.89 344.17 0.40 350.32 12.68 \n Min - Max 88.38 - 661.12 -353.30 - 539.84 31.25 - 563.90 -338.85 - 352.75 119.02 - 581.83 -311.45 - 295.53 \nRR Duration \n BASELINE \n n 134 134 132 \n Mean (SD) 1028.42 (286.38) 1027.48 (324.00) 1074.62 (277.33) \n Median 1041.86 1047.27 1080.87 \n Min - Max 34.33 - 1783.71 5.29 - 1877.19 289.60 - 1617.06 \n WEEK 1 DAY 8 \n n 134 134 134 134 132 132 \n Mean (SD) 990.15 (318.74) -38.26 (446.40) 1061.59 (269.14) 34.10 (401.76) 1039.64 (284.39) -34.98 (406.04) \n Median 963.88 -86.50 1061.50 66.91 1014.78 -97.83 \n Min - Max 110.82 - 2014.56 -1014.82 - 1389.40 276.83 - 1711.99 -942.16 - 993.82 498.21 - 1937.47 -958.61 - 908.90 \n WEEK 2 DAY 15 \n n 134 134 134 134 132 132 \n Mean (SD) 1013.37 (304.13) -15.05 (425.81) 1109.40 (318.23) 81.92 (453.11) 1045.21 (277.51) -29.41 (380.84) \n Median 1040.69 40.49 1117.76 69.27 1034.64 -15.33 \n Min - Max 164.19 - 1677.10 -1216.10 - 1053.15 160.73 - 2048.73 -1127.10 - 1148.61 252.84 - 1722.33 -859.27 - 871.54 \n WEEK 3 DAY 22 \n n 134 134 134 134 132 132 \n Mean (SD) 1013.99 (304.99) -14.43 (406.53) 1118.35 (296.53) 90.86 (409.57) 1036.59 (268.52) -38.03 (421.48) \n Median 1027.23 -50.54 1134.60 52.03 1030.72 -60.72 \n Min - Max 357.04 - 1798.65 -882.94 - 1080.26 97.14 - 1825.43 -887.06 - 1166.15 446.02 - 1713.38 -984.79 - 902.37 \n WEEK 4 DAY 29 \n n 134 134 134 134 132 132 \n Mean (SD) 1033.31 (313.92) 4.89 (483.15) 1079.76 (298.94) 52.28 (429.25) 1027.55 (295.86) -47.07 (378.23) \n Median 1050.40 5.60 1051.61 69.55 1023.36 -49.52 \n Min - Max 54.33 - 1979.43 -1345.93 - 1195.41 347.94 - 1762.04 -826.43 - 1191.83 341.62 - 2144.86 -1002.03 - 1048.66\n WEEK 5 DAY 36 \n n 134 134 134 134 132 132 \n Mean (SD) 1072.33 (282.90) 43.92 (379.05) 1058.45 (271.01) 30.97 (436.03) 1029.04 (271.21) -45.58 (405.53) \n Median 1067.33 55.87 1068.95 33.61 1065.26 -34.40 \n Min - Max 352.97 - 2000.56 -1028.79 - 1418.57 208.83 - 1794.73 -978.97 - 1365.13 436.28 - 1794.07 -962.18 - 1329.88 \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadeg <- df_explicit_na(adeg)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\",\n adsl,\n code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'\n ),\n cdisc_dataset(\"ADEG\",\n adeg,\n code = 'ADEG <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adeg\"))'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"ECG Results and Change from Baseline by Visit\",\n dataname = \"ADEG\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adeg, c(\"PARAM\", \"AVISIT\")),\n selected = c(\"AVISIT\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(adeg, c(\"AVAL\", \"CHG\")),\n selected = c(\"AVAL\")\n ),\n useNA = \"ifany\",\n paramcd = choices_selected(\n choices = value_choices(adeg, \"PARAMCD\", \"PARAM\"),\n selected = \"HR\"\n ),\n parallel_vars = TRUE\n )\n ),\n filter = list(ADEG = list(AVAL = list()))\n)\n\n[INFO] 2023-08-04 15:08:02.3493 pid:7068 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\nWarning: The 'plotly_relayout' event tied a source ID of\n'teal-main_ui-filter_panel-active-ADEG-filter-ADEG_AVAL-inputs-histogram_plot'\nis not registered. In order to obtain this event data, please add\n`event_register(p, 'plotly_relayout')` to the plot (`p`) that you wish to\nobtain event data from.\n\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[13] ellipsis_0.3.2 fontawesome_0.5.1 utf8_1.2.3 \n[16] promises_1.2.0.1 rmarkdown_2.23 ps_1.7.5 \n[19] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[22] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[25] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[31] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[34] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[37] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[40] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[43] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[46] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[49] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[52] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[55] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[58] plotly_4.10.2 generics_0.1.3 ggplot2_3.4.2 \n[61] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[64] glue_1.6.2 emmeans_1.8.7 lazyeval_0.2.2 \n[67] tools_4.3.1 data.table_1.14.8 webshot_0.5.5 \n[70] forcats_1.0.0 mvtnorm_1.2-2 grid_4.3.1 \n[73] tidyr_1.3.0 rbibutils_2.2.13 colorspace_2.1-0 \n[76] nlme_3.1-162 cli_3.6.1 fansi_1.0.4 \n[79] viridisLite_0.4.2 geepack_1.3.9 gtable_0.3.3 \n[82] R.methodsS3_1.8.2 sass_0.4.7 digest_0.6.33 \n[85] htmlwidgets_1.6.2 memoise_2.0.1 htmltools_0.5.5 \n[88] R.oo_1.25.0 lifecycle_1.0.3 httr_1.4.6 \n[91] shinyWidgets_0.7.6 mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/egt01.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/eudrat02.html", @@ -760,56 +760,56 @@ "href": "tables/safety/dst01.html", "title": "DST01", "section": "", - "text": "Data Setup\nStandard Table\nTable with Grouping of Reasons\nTable Adding Optional Rows\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nset.seed(1, kind = \"Mersenne-Twister\")\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\n# reorder EOSSTT factor levels so DISCONTINUED is the last level\nadsl <- df_explicit_na(adsl) %>%\n mutate(EOSSTT = factor(EOSSTT, levels = c(\"COMPLETED\", \"ONGOING\", \"DISCONTINUED\")))\n\nadsl_gp_added <- adsl %>%\n mutate(DCSREASGP = case_when(\n DCSREAS %in% c(\"ADVERSE EVENT\", \"DEATH\") ~ \"Safety\",\n (DCSREAS != \"<Missing>\" & !DCSREAS %in% c(\"ADVERSE EVENT\", \"DEATH\")) ~ \"Non-Safety\",\n DCSREAS == \"<Missing>\" ~ \"<Missing>\"\n ) %>% factor(levels = c(\"Safety\", \"Non-Safety\", \"<Missing>\")))\n\nadsl_eotstt_added <- adsl_gp_added %>%\n mutate(\n EOTSTT = sample(\n c(\"ONGOING\", \"COMPLETED\", \"DISCONTINUED\"),\n size = nrow(adsl),\n replace = TRUE\n ) %>% factor(levels = c(\"COMPLETED\", \"ONGOING\", \"DISCONTINUED\"))\n )\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_overall_level(\"All Patients\", first = FALSE)\n ) %>%\n count_occurrences(\n \"EOSSTT\",\n .stats = \"count_fraction\",\n show_labels = \"hidden\"\n ) %>%\n summarize_vars(\n \"DCSREAS\",\n .stats = \"count_fraction\",\n denom = \"N_col\",\n show_labels = \"hidden\",\n .indent_mods = c(count_fraction = 1L)\n )\n\nresult1 <- build_table(lyt = lyt, df = adsl)\nresult1\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n—————————————————————————————————————————————————————————————————————————————————————————\nCOMPLETED 68 (50.7%) 66 (49.3%) 73 (55.3%) 207 (51.7%) \nONGOING 24 (17.9%) 28 (20.9%) 21 (15.9%) 73 (18.2%) \nDISCONTINUED 42 (31.3%) 40 (29.9%) 38 (28.8%) 120 (30.0%) \n ADVERSE EVENT 3 (2.2%) 6 (4.5%) 5 (3.8%) 14 (3.5%) \n DEATH 25 (18.7%) 23 (17.2%) 22 (16.7%) 70 (17.5%) \n LACK OF EFFICACY 2 (1.5%) 2 (1.5%) 3 (2.3%) 7 (1.8%) \n PHYSICIAN DECISION 2 (1.5%) 3 (2.2%) 2 (1.5%) 7 (1.8%) \n PROTOCOL VIOLATION 5 (3.7%) 3 (2.2%) 4 (3%) 12 (3%) \n WITHDRAWAL BY PARENT/GUARDIAN 4 (3%) 2 (1.5%) 1 (0.8%) 7 (1.8%) \n WITHDRAWAL BY SUBJECT 1 (0.7%) 1 (0.7%) 1 (0.8%) 3 (0.8%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_overall_level(\"All Patients\", first = FALSE)\n ) %>%\n count_occurrences(\n \"EOSSTT\",\n .stats = \"count_fraction\",\n show_labels = \"hidden\"\n ) %>%\n split_rows_by(\"DCSREASGP\", indent_mod = 1L) %>%\n summarize_vars(\n \"DCSREAS\",\n .stats = \"count_fraction\",\n denom = \"N_col\",\n show_labels = \"hidden\"\n )\n\ntbl <- build_table(lyt = lyt, df = adsl_gp_added)\nresult2 <- prune_table(tbl) # remove rows containing all zeros\n\nresult2\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————————————————————————\nCOMPLETED 68 (50.7%) 66 (49.3%) 73 (55.3%) 207 (51.7%) \nONGOING 24 (17.9%) 28 (20.9%) 21 (15.9%) 73 (18.2%) \nDISCONTINUED 42 (31.3%) 40 (29.9%) 38 (28.8%) 120 (30.0%) \n Safety \n ADVERSE EVENT 3 (2.2%) 6 (4.5%) 5 (3.8%) 14 (3.5%) \n DEATH 25 (18.7%) 23 (17.2%) 22 (16.7%) 70 (17.5%) \n Non-Safety \n LACK OF EFFICACY 2 (1.5%) 2 (1.5%) 3 (2.3%) 7 (1.8%) \n PHYSICIAN DECISION 2 (1.5%) 3 (2.2%) 2 (1.5%) 7 (1.8%) \n PROTOCOL VIOLATION 5 (3.7%) 3 (2.2%) 4 (3%) 12 (3%) \n WITHDRAWAL BY PARENT/GUARDIAN 4 (3%) 2 (1.5%) 1 (0.8%) 7 (1.8%) \n WITHDRAWAL BY SUBJECT 1 (0.7%) 1 (0.7%) 1 (0.8%) 3 (0.8%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_overall_level(\"All Patients\", first = FALSE)\n ) %>%\n count_occurrences(\n \"EOTSTT\",\n .stats = \"count_fraction\",\n show_labels = \"hidden\"\n )\n\ntbl <- build_table(lyt = lyt, df = adsl_eotstt_added)\ntbl <- prune_table(tbl) # remove rows containing all zeros\n\n# Combine tables\ncol_info(result2) <- col_info(tbl)\nresult3 <- rbind(result2, tbl)\n\nresult3\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————————————————————————\nCOMPLETED 68 (50.7%) 66 (49.3%) 73 (55.3%) 207 (51.7%) \nONGOING 24 (17.9%) 28 (20.9%) 21 (15.9%) 73 (18.2%) \nDISCONTINUED 42 (31.3%) 40 (29.9%) 38 (28.8%) 120 (30.0%) \n Safety \n ADVERSE EVENT 3 (2.2%) 6 (4.5%) 5 (3.8%) 14 (3.5%) \n DEATH 25 (18.7%) 23 (17.2%) 22 (16.7%) 70 (17.5%) \n Non-Safety \n LACK OF EFFICACY 2 (1.5%) 2 (1.5%) 3 (2.3%) 7 (1.8%) \n PHYSICIAN DECISION 2 (1.5%) 3 (2.2%) 2 (1.5%) 7 (1.8%) \n PROTOCOL VIOLATION 5 (3.7%) 3 (2.2%) 4 (3%) 12 (3%) \n WITHDRAWAL BY PARENT/GUARDIAN 4 (3%) 2 (1.5%) 1 (0.8%) 7 (1.8%) \n WITHDRAWAL BY SUBJECT 1 (0.7%) 1 (0.7%) 1 (0.8%) 3 (0.8%) \nCOMPLETED 46 (34.3%) 38 (28.4%) 41 (31.1%) 125 (31.2%) \nONGOING 50 (37.3%) 51 (38.1%) 46 (34.8%) 147 (36.8%) \nDISCONTINUED 38 (28.4%) 45 (33.6%) 45 (34.1%) 128 (32.0%) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nset.seed(1, kind = \"Mersenne-Twister\")\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadsl <- df_explicit_na(adsl)\nadsl <- adsl %>%\n mutate(\n DCSREASGP = case_when(\n DCSREAS %in% c(\"ADVERSE EVENT\", \"DEATH\") ~ \"Safety\",\n (DCSREAS != \"<Missing>\" & !DCSREAS %in% c(\"ADVERSE EVENT\", \"DEATH\")) ~ \"Non-Safety\",\n DCSREAS == \"<Missing>\" ~ \"<Missing>\"\n ) %>% as.factor(),\n EOTSTT = sample(\n c(\"ONGOING\", \"COMPLETED\", \"DISCONTINUED\"),\n size = nrow(adsl),\n replace = TRUE\n ) %>% as.factor()\n ) %>%\n var_relabel(\n EOTSTT = \"End Of Treatment Status\"\n )\n\ndate_vars_asl <- names(adsl)[vapply(adsl, function(x) inherits(x, c(\"Date\", \"POSIXct\", \"POSIXlt\")), logical(1))]\ndemog_vars_asl <- names(adsl)[!(names(adsl) %in% c(\"USUBJID\", \"STUDYID\", date_vars_asl))]\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n code = '\n set.seed(1, kind = \"Mersenne-Twister\")\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- df_explicit_na(ADSL)\n ADSL <- ADSL %>%\n mutate(\n DCSREASGP = case_when(\n DCSREAS %in% c(\"ADVERSE EVENT\", \"DEATH\") ~ \"Safety\",\n (DCSREAS != \"<Missing>\" & !DCSREAS %in% c(\"ADVERSE EVENT\", \"DEATH\")) ~ \"Non-Safety\",\n DCSREAS == \"<Missing>\" ~ \"<Missing>\"\n ) %>% as.factor(),\n EOTSTT = sample(\n c(\"ONGOING\", \"COMPLETED\", \"DISCONTINUED\"),\n size = nrow(ADSL),\n replace = TRUE\n ) %>% as.factor()\n ) %>% var_relabel(\n EOTSTT = \"End Of Treatment Status\"\n )\n ',\n check = TRUE\n ),\n modules = modules(\n tm_t_summary(\n label = \"Disposition Table\",\n dataname = \"ADSL\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n summarize_vars = choices_selected(\n variable_choices(adsl, demog_vars_asl),\n c(\"EOSSTT\", \"DCSREAS\", \"EOTSTT\")\n ),\n useNA = \"ifany\"\n )\n )\n)\n\n[INFO] 2023-08-04 14:53:29.6826 pid:7536 token:[] teal.modules.clinical Initializing tm_t_summary\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/dst01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable with Grouping of Reasons\nTable Adding Optional Rows\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nset.seed(1, kind = \"Mersenne-Twister\")\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\n# reorder EOSSTT factor levels so DISCONTINUED is the last level\nadsl <- df_explicit_na(adsl) %>%\n mutate(EOSSTT = factor(EOSSTT, levels = c(\"COMPLETED\", \"ONGOING\", \"DISCONTINUED\")))\n\nadsl_gp_added <- adsl %>%\n mutate(DCSREASGP = case_when(\n DCSREAS %in% c(\"ADVERSE EVENT\", \"DEATH\") ~ \"Safety\",\n (DCSREAS != \"<Missing>\" & !DCSREAS %in% c(\"ADVERSE EVENT\", \"DEATH\")) ~ \"Non-Safety\",\n DCSREAS == \"<Missing>\" ~ \"<Missing>\"\n ) %>% factor(levels = c(\"Safety\", \"Non-Safety\", \"<Missing>\")))\n\nadsl_eotstt_added <- adsl_gp_added %>%\n mutate(\n EOTSTT = sample(\n c(\"ONGOING\", \"COMPLETED\", \"DISCONTINUED\"),\n size = nrow(adsl),\n replace = TRUE\n ) %>% factor(levels = c(\"COMPLETED\", \"ONGOING\", \"DISCONTINUED\"))\n )\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_overall_level(\"All Patients\", first = FALSE)\n ) %>%\n count_occurrences(\n \"EOSSTT\",\n .stats = \"count_fraction\",\n show_labels = \"hidden\"\n ) %>%\n summarize_vars(\n \"DCSREAS\",\n .stats = \"count_fraction\",\n denom = \"N_col\",\n show_labels = \"hidden\",\n .indent_mods = c(count_fraction = 1L)\n )\n\nresult1 <- build_table(lyt = lyt, df = adsl)\nresult1\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n—————————————————————————————————————————————————————————————————————————————————————————\nCOMPLETED 68 (50.7%) 66 (49.3%) 73 (55.3%) 207 (51.7%) \nONGOING 24 (17.9%) 28 (20.9%) 21 (15.9%) 73 (18.2%) \nDISCONTINUED 42 (31.3%) 40 (29.9%) 38 (28.8%) 120 (30.0%) \n ADVERSE EVENT 3 (2.2%) 6 (4.5%) 5 (3.8%) 14 (3.5%) \n DEATH 25 (18.7%) 23 (17.2%) 22 (16.7%) 70 (17.5%) \n LACK OF EFFICACY 2 (1.5%) 2 (1.5%) 3 (2.3%) 7 (1.8%) \n PHYSICIAN DECISION 2 (1.5%) 3 (2.2%) 2 (1.5%) 7 (1.8%) \n PROTOCOL VIOLATION 5 (3.7%) 3 (2.2%) 4 (3%) 12 (3%) \n WITHDRAWAL BY PARENT/GUARDIAN 4 (3%) 2 (1.5%) 1 (0.8%) 7 (1.8%) \n WITHDRAWAL BY SUBJECT 1 (0.7%) 1 (0.7%) 1 (0.8%) 3 (0.8%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_overall_level(\"All Patients\", first = FALSE)\n ) %>%\n count_occurrences(\n \"EOSSTT\",\n .stats = \"count_fraction\",\n show_labels = \"hidden\"\n ) %>%\n split_rows_by(\"DCSREASGP\", indent_mod = 1L) %>%\n summarize_vars(\n \"DCSREAS\",\n .stats = \"count_fraction\",\n denom = \"N_col\",\n show_labels = \"hidden\"\n )\n\ntbl <- build_table(lyt = lyt, df = adsl_gp_added)\nresult2 <- prune_table(tbl) # remove rows containing all zeros\n\nresult2\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————————————————————————\nCOMPLETED 68 (50.7%) 66 (49.3%) 73 (55.3%) 207 (51.7%) \nONGOING 24 (17.9%) 28 (20.9%) 21 (15.9%) 73 (18.2%) \nDISCONTINUED 42 (31.3%) 40 (29.9%) 38 (28.8%) 120 (30.0%) \n Safety \n ADVERSE EVENT 3 (2.2%) 6 (4.5%) 5 (3.8%) 14 (3.5%) \n DEATH 25 (18.7%) 23 (17.2%) 22 (16.7%) 70 (17.5%) \n Non-Safety \n LACK OF EFFICACY 2 (1.5%) 2 (1.5%) 3 (2.3%) 7 (1.8%) \n PHYSICIAN DECISION 2 (1.5%) 3 (2.2%) 2 (1.5%) 7 (1.8%) \n PROTOCOL VIOLATION 5 (3.7%) 3 (2.2%) 4 (3%) 12 (3%) \n WITHDRAWAL BY PARENT/GUARDIAN 4 (3%) 2 (1.5%) 1 (0.8%) 7 (1.8%) \n WITHDRAWAL BY SUBJECT 1 (0.7%) 1 (0.7%) 1 (0.8%) 3 (0.8%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_overall_level(\"All Patients\", first = FALSE)\n ) %>%\n count_occurrences(\n \"EOTSTT\",\n .stats = \"count_fraction\",\n show_labels = \"hidden\"\n )\n\ntbl <- build_table(lyt = lyt, df = adsl_eotstt_added)\ntbl <- prune_table(tbl) # remove rows containing all zeros\n\n# Combine tables\ncol_info(result2) <- col_info(tbl)\nresult3 <- rbind(result2, tbl)\n\nresult3\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————————————————————————\nCOMPLETED 68 (50.7%) 66 (49.3%) 73 (55.3%) 207 (51.7%) \nONGOING 24 (17.9%) 28 (20.9%) 21 (15.9%) 73 (18.2%) \nDISCONTINUED 42 (31.3%) 40 (29.9%) 38 (28.8%) 120 (30.0%) \n Safety \n ADVERSE EVENT 3 (2.2%) 6 (4.5%) 5 (3.8%) 14 (3.5%) \n DEATH 25 (18.7%) 23 (17.2%) 22 (16.7%) 70 (17.5%) \n Non-Safety \n LACK OF EFFICACY 2 (1.5%) 2 (1.5%) 3 (2.3%) 7 (1.8%) \n PHYSICIAN DECISION 2 (1.5%) 3 (2.2%) 2 (1.5%) 7 (1.8%) \n PROTOCOL VIOLATION 5 (3.7%) 3 (2.2%) 4 (3%) 12 (3%) \n WITHDRAWAL BY PARENT/GUARDIAN 4 (3%) 2 (1.5%) 1 (0.8%) 7 (1.8%) \n WITHDRAWAL BY SUBJECT 1 (0.7%) 1 (0.7%) 1 (0.8%) 3 (0.8%) \nCOMPLETED 46 (34.3%) 38 (28.4%) 41 (31.1%) 125 (31.2%) \nONGOING 50 (37.3%) 51 (38.1%) 46 (34.8%) 147 (36.8%) \nDISCONTINUED 38 (28.4%) 45 (33.6%) 45 (34.1%) 128 (32.0%) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nset.seed(1, kind = \"Mersenne-Twister\")\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadsl <- df_explicit_na(adsl)\nadsl <- adsl %>%\n mutate(\n DCSREASGP = case_when(\n DCSREAS %in% c(\"ADVERSE EVENT\", \"DEATH\") ~ \"Safety\",\n (DCSREAS != \"<Missing>\" & !DCSREAS %in% c(\"ADVERSE EVENT\", \"DEATH\")) ~ \"Non-Safety\",\n DCSREAS == \"<Missing>\" ~ \"<Missing>\"\n ) %>% as.factor(),\n EOTSTT = sample(\n c(\"ONGOING\", \"COMPLETED\", \"DISCONTINUED\"),\n size = nrow(adsl),\n replace = TRUE\n ) %>% as.factor()\n ) %>%\n var_relabel(\n EOTSTT = \"End Of Treatment Status\"\n )\n\ndate_vars_asl <- names(adsl)[vapply(adsl, function(x) inherits(x, c(\"Date\", \"POSIXct\", \"POSIXlt\")), logical(1))]\ndemog_vars_asl <- names(adsl)[!(names(adsl) %in% c(\"USUBJID\", \"STUDYID\", date_vars_asl))]\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n code = '\n set.seed(1, kind = \"Mersenne-Twister\")\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- df_explicit_na(ADSL)\n ADSL <- ADSL %>%\n mutate(\n DCSREASGP = case_when(\n DCSREAS %in% c(\"ADVERSE EVENT\", \"DEATH\") ~ \"Safety\",\n (DCSREAS != \"<Missing>\" & !DCSREAS %in% c(\"ADVERSE EVENT\", \"DEATH\")) ~ \"Non-Safety\",\n DCSREAS == \"<Missing>\" ~ \"<Missing>\"\n ) %>% as.factor(),\n EOTSTT = sample(\n c(\"ONGOING\", \"COMPLETED\", \"DISCONTINUED\"),\n size = nrow(ADSL),\n replace = TRUE\n ) %>% as.factor()\n ) %>% var_relabel(\n EOTSTT = \"End Of Treatment Status\"\n )\n ',\n check = TRUE\n ),\n modules = modules(\n tm_t_summary(\n label = \"Disposition Table\",\n dataname = \"ADSL\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n summarize_vars = choices_selected(\n variable_choices(adsl, demog_vars_asl),\n c(\"EOSSTT\", \"DCSREAS\", \"EOTSTT\")\n ),\n useNA = \"ifany\"\n )\n )\n)\n\n[INFO] 2023-08-04 15:10:20.8808 pid:7540 token:[] teal.modules.clinical Initializing tm_t_summary\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/dst01.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/cmt01a.html", "href": "tables/safety/cmt01a.html", "title": "CMT01A", "section": "", - "text": "Data Setup\nStandard Table, Safety-Evaluable Patients\nTable Changing ATC Class Level\nTable with Classes Sorted by Frequency\nTable with Total Number of Treatments per Medication Class Suppressed\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\nadcm$CMSEQ <- as.factor(adcm$CMSEQ)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n# If you want your missing levels to show as \"No Coding Available\", please use\n# adsl <- df_explicit_na(adsl, na_level = \"No Coding Available\")\n# adcm <- df_explicit_na(adcm, na_level = \"No Coding Available\")\nadsl <- df_explicit_na(adsl)\nadcm <- df_explicit_na(adcm)\n\n# Keep only safety-evaluable patients and concomitant medications\nadsl <- adsl %>%\n filter(SAFFL == \"Y\")\n\nadcm <- adcm %>%\n filter(SAFFL == \"Y\" & ATIREL == \"CONCOMITANT\") %>%\n var_relabel(CMDECOD = \"Other Treatment\")\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\n \"ATC2\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC2)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adcm, \"CMDECOD\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = adcm, alt_counts_df = adsl) %>%\n prune_table() %>%\n # Sort lowest level terms by descending frequency.\n sort_at_path(\n path = c(\"ATC2\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nATC Level 2 Text A: Drug X B: Placebo C: Combination\n Other Treatment (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) \nTotal number of treatments 415 414 460 \nATCCLAS2 A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n Total number of treatments 134 137 143 \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS2 A p2 \n Total number of patients with at least one treatment 45 (33.6%) 54 (40.3%) 48 (36.4%) \n Total number of treatments 58 66 64 \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS2 B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n Total number of treatments 141 137 162 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \nATCCLAS2 B p2 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS2 B p3 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS2 C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS2 C p2 \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS2 C p3 \n Total number of patients with at least one treatment 52 (38.8%) 58 (43.3%) 60 (45.5%) \n Total number of treatments 69 73 80 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\n \"ATC1\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC1)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adcm, \"CMDECOD\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = adcm, alt_counts_df = adsl) %>%\n prune_table() %>%\n # Sort lowest level terms by descending frequency.\n sort_at_path(\n path = c(\"ATC1\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nATC Level 1 Text A: Drug X B: Placebo C: Combination\n Other Treatment (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) \nTotal number of treatments 415 414 460 \nATCCLAS1 A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n Total number of treatments 134 137 143 \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS1 A p2 \n Total number of patients with at least one treatment 45 (33.6%) 54 (40.3%) 48 (36.4%) \n Total number of treatments 58 66 64 \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS1 B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n Total number of treatments 141 137 162 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \nATCCLAS1 B p2 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS1 B p3 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS1 C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS1 C p2 \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS1 C p3 \n Total number of patients with at least one treatment 52 (38.8%) 58 (43.3%) 60 (45.5%) \n Total number of treatments 69 73 80 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\n \"ATC2\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC2)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adcm, \"CMDECOD\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = adcm, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(path = c(\"ATC2\"), scorefun = cont_n_allcols) %>%\n sort_at_path(path = c(\"ATC2\", \"*\", \"CMDECOD\"), scorefun = score_occurrences)\n\nresult\n\nATC Level 2 Text A: Drug X B: Placebo C: Combination\n Other Treatment (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) \nTotal number of treatments 415 414 460 \nATCCLAS2 C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS2 C p2 \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS2 B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n Total number of treatments 141 137 162 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \nATCCLAS2 A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n Total number of treatments 134 137 143 \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS2 C p3 \n Total number of patients with at least one treatment 52 (38.8%) 58 (43.3%) 60 (45.5%) \n Total number of treatments 69 73 80 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \nATCCLAS2 B p2 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS2 B p3 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS2 A p2 \n Total number of patients with at least one treatment 45 (33.6%) 54 (40.3%) 48 (36.4%) \n Total number of treatments 58 66 64 \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\n \"ATC2\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC2)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adcm, \"CMDECOD\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = adcm, alt_counts_df = adsl) %>%\n prune_table() %>%\n # Sort lowest level terms by descending frequency.\n sort_at_path(\n path = c(\"ATC2\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nATC Level 2 Text A: Drug X B: Placebo C: Combination\n Other Treatment (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) \nTotal number of treatments 415 414 460 \nATCCLAS2 A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS2 A p2 \n Total number of patients with at least one treatment 45 (33.6%) 54 (40.3%) 48 (36.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS2 B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \nATCCLAS2 B p2 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS2 B p3 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS2 C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS2 C p2 \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS2 C p3 \n Total number of patients with at least one treatment 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\nadcm$CMSEQ <- as.integer(adcm$CMSEQ)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n# If you want your missing levels to show as \"No Coding Available\", please use\n# adsl <- df_explicit_na(adsl, na_level = \"No Coding Available\")\n# adcm <- df_explicit_na(adcm, na_level = \"No Coding Available\")\nadsl <- df_explicit_na(adsl)\nadcm <- df_explicit_na(adcm)\n\nadcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = '\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- df_explicit_na(ADSL)\n '),\n cdisc_dataset(\"ADCM\", adcm,\n code = '\n ADCM <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n ADCM$CMSEQ <- as.factor(ADCM$CMSEQ)\n ADCM <- df_explicit_na(ADCM)\n ',\n keys = adcm_keys\n )\n ),\n modules = modules(\n tm_t_mult_events(\n label = \"Concomitant Medications by Medication Class and Preferred Name\",\n dataname = \"ADCM\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n seq_var = choices_selected(\"CMSEQ\", selected = \"CMSEQ\", fixed = TRUE),\n hlt = choices_selected(\n choices = variable_choices(adcm, c(\"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")),\n selected = c(\"ATC2\")\n ),\n llt = choices_selected(\n choices = variable_choices(adcm, c(\"CMDECOD\")),\n selected = c(\"CMDECOD\")\n ),\n add_total = FALSE,\n event_type = \"treatment\"\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\"),\n ADCM = list(ATIREL = \"CONCOMITANT\")\n )\n)\n\n[INFO] 2023-08-04 14:54:48.3741 pid:7746 token:[] teal.modules.clinical Initializing tm_t_mult_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/cmt01a.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table, Safety-Evaluable Patients\nTable Changing ATC Class Level\nTable with Classes Sorted by Frequency\nTable with Total Number of Treatments per Medication Class Suppressed\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\nadcm$CMSEQ <- as.factor(adcm$CMSEQ)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n# If you want your missing levels to show as \"No Coding Available\", please use\n# adsl <- df_explicit_na(adsl, na_level = \"No Coding Available\")\n# adcm <- df_explicit_na(adcm, na_level = \"No Coding Available\")\nadsl <- df_explicit_na(adsl)\nadcm <- df_explicit_na(adcm)\n\n# Keep only safety-evaluable patients and concomitant medications\nadsl <- adsl %>%\n filter(SAFFL == \"Y\")\n\nadcm <- adcm %>%\n filter(SAFFL == \"Y\" & ATIREL == \"CONCOMITANT\") %>%\n var_relabel(CMDECOD = \"Other Treatment\")\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\n \"ATC2\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC2)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adcm, \"CMDECOD\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = adcm, alt_counts_df = adsl) %>%\n prune_table() %>%\n # Sort lowest level terms by descending frequency.\n sort_at_path(\n path = c(\"ATC2\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nATC Level 2 Text A: Drug X B: Placebo C: Combination\n Other Treatment (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) \nTotal number of treatments 415 414 460 \nATCCLAS2 A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n Total number of treatments 134 137 143 \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS2 A p2 \n Total number of patients with at least one treatment 45 (33.6%) 54 (40.3%) 48 (36.4%) \n Total number of treatments 58 66 64 \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS2 B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n Total number of treatments 141 137 162 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \nATCCLAS2 B p2 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS2 B p3 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS2 C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS2 C p2 \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS2 C p3 \n Total number of patients with at least one treatment 52 (38.8%) 58 (43.3%) 60 (45.5%) \n Total number of treatments 69 73 80 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\n \"ATC1\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC1)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adcm, \"CMDECOD\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = adcm, alt_counts_df = adsl) %>%\n prune_table() %>%\n # Sort lowest level terms by descending frequency.\n sort_at_path(\n path = c(\"ATC1\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nATC Level 1 Text A: Drug X B: Placebo C: Combination\n Other Treatment (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) \nTotal number of treatments 415 414 460 \nATCCLAS1 A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n Total number of treatments 134 137 143 \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS1 A p2 \n Total number of patients with at least one treatment 45 (33.6%) 54 (40.3%) 48 (36.4%) \n Total number of treatments 58 66 64 \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS1 B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n Total number of treatments 141 137 162 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \nATCCLAS1 B p2 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS1 B p3 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS1 C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS1 C p2 \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS1 C p3 \n Total number of patients with at least one treatment 52 (38.8%) 58 (43.3%) 60 (45.5%) \n Total number of treatments 69 73 80 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\n \"ATC2\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC2)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adcm, \"CMDECOD\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = adcm, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(path = c(\"ATC2\"), scorefun = cont_n_allcols) %>%\n sort_at_path(path = c(\"ATC2\", \"*\", \"CMDECOD\"), scorefun = score_occurrences)\n\nresult\n\nATC Level 2 Text A: Drug X B: Placebo C: Combination\n Other Treatment (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) \nTotal number of treatments 415 414 460 \nATCCLAS2 C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS2 C p2 \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n Total number of treatments 140 140 155 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS2 B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n Total number of treatments 141 137 162 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \nATCCLAS2 A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n Total number of treatments 134 137 143 \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS2 C p3 \n Total number of patients with at least one treatment 52 (38.8%) 58 (43.3%) 60 (45.5%) \n Total number of treatments 69 73 80 \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \nATCCLAS2 B p2 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS2 B p3 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n Total number of treatments 75 82 83 \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS2 A p2 \n Total number of patients with at least one treatment 45 (33.6%) 54 (40.3%) 48 (36.4%) \n Total number of treatments 58 66 64 \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n )\n ) %>%\n split_rows_by(\n \"ATC2\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adcm$ATC2)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\"\n )\n ) %>%\n count_occurrences(vars = \"CMDECOD\", .indent_mods = -1L) %>%\n append_varlabels(adcm, \"CMDECOD\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = adcm, alt_counts_df = adsl) %>%\n prune_table() %>%\n # Sort lowest level terms by descending frequency.\n sort_at_path(\n path = c(\"ATC2\", \"*\", \"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\nATC Level 2 Text A: Drug X B: Placebo C: Combination\n Other Treatment (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) \nTotal number of treatments 415 414 460 \nATCCLAS2 A \n Total number of patients with at least one treatment 75 (56.0%) 79 (59.0%) 81 (61.4%) \n medname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS2 A p2 \n Total number of patients with at least one treatment 45 (33.6%) 54 (40.3%) 48 (36.4%) \n medname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) \nATCCLAS2 B \n Total number of patients with at least one treatment 83 (61.9%) 74 (55.2%) 88 (66.7%) \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) \nATCCLAS2 B p2 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS2 B p3 \n Total number of patients with at least one treatment 52 (38.8%) 57 (42.5%) 59 (44.7%) \n medname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) \nATCCLAS2 C \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS2 C p2 \n Total number of patients with at least one treatment 82 (61.2%) 84 (62.7%) 89 (67.4%) \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) \nATCCLAS2 C p3 \n Total number of patients with at least one treatment 52 (38.8%) 58 (43.3%) 60 (45.5%) \n medname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\nadcm$CMSEQ <- as.integer(adcm$CMSEQ)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n# If you want your missing levels to show as \"No Coding Available\", please use\n# adsl <- df_explicit_na(adsl, na_level = \"No Coding Available\")\n# adcm <- df_explicit_na(adcm, na_level = \"No Coding Available\")\nadsl <- df_explicit_na(adsl)\nadcm <- df_explicit_na(adcm)\n\nadcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = '\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- df_explicit_na(ADSL)\n '),\n cdisc_dataset(\"ADCM\", adcm,\n code = '\n ADCM <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n ADCM$CMSEQ <- as.factor(ADCM$CMSEQ)\n ADCM <- df_explicit_na(ADCM)\n ',\n keys = adcm_keys\n )\n ),\n modules = modules(\n tm_t_mult_events(\n label = \"Concomitant Medications by Medication Class and Preferred Name\",\n dataname = \"ADCM\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n seq_var = choices_selected(\"CMSEQ\", selected = \"CMSEQ\", fixed = TRUE),\n hlt = choices_selected(\n choices = variable_choices(adcm, c(\"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")),\n selected = c(\"ATC2\")\n ),\n llt = choices_selected(\n choices = variable_choices(adcm, c(\"CMDECOD\")),\n selected = c(\"CMDECOD\")\n ),\n add_total = FALSE,\n event_type = \"treatment\"\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\"),\n ADCM = list(ATIREL = \"CONCOMITANT\")\n )\n)\n\n[INFO] 2023-08-04 15:11:43.4491 pid:7751 token:[] teal.modules.clinical Initializing tm_t_mult_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/cmt01a.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/cmt02_pt.html", "href": "tables/safety/cmt02_pt.html", "title": "CMT02_PT", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\nadcm$CMSEQ <- as.factor(adcm$CMSEQ)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n# If you want your missing levels to show as \"No Coding Available\", please use\nadsl <- df_explicit_na(adsl, na_level = \"No Coding Available\")\nadcm <- df_explicit_na(adcm, na_level = \"No Coding Available\")\n\n# Keep only safety-evaluable patients and concomitant medications\nadsl <- adsl %>%\n filter(SAFFL == \"Y\")\n\n# Keep only concomitant medications\nadcm <- adcm %>% filter(ATIREL == \"CONCOMITANT\")\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n add_overall_col(\"All Patients\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n ),\n show_labels = \"hidden\"\n ) %>%\n count_occurrences(vars = \"CMDECOD\") %>%\n append_topleft(paste(\"\\nOther Treatment\"))\n\nresult <- build_table(lyt = lyt, df = adcm, alt_counts_df = adsl) %>%\n sort_at_path(\n path = c(\"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\nOther Treatment (N=134) (N=134) (N=132) (N=400) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) 349 (87.2%) \nTotal number of treatments 415 414 460 1289 \nmedname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) 170 (42.5%) \nmedname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) 168 (42.0%) \nmedname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) 159 (39.8%) \nmedname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) 157 (39.2%) \nmedname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) 150 (37.5%) \nmedname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) 147 (36.8%) \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\nadcm$CMSEQ <- as.integer(adcm$CMSEQ)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n# If you want your missing levels to show as \"No Coding Available\", please use\n# adsl <- df_explicit_na(adsl, na_level = \"No Coding Available\")\n# adcm <- df_explicit_na(adcm, na_level = \"No Coding Available\")\nadsl <- df_explicit_na(adsl)\nadcm <- df_explicit_na(adcm)\n\nadcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = '\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- df_explicit_na(ADSL)\n '),\n cdisc_dataset(\"ADCM\", adcm,\n code = '\n ADCM <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n ADCM$CMID <- as.factor(ADCM$CMSEQ)\n ADCM <- df_explicit_na(ADCM)\n ',\n keys = adcm_keys\n )\n ),\n modules = modules(\n tm_t_mult_events(\n label = \"Concomitant Medications by Medication Class and Preferred Name\",\n dataname = \"ADCM\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n seq_var = choices_selected(\"CMSEQ\", selected = \"CMSEQ\", fixed = TRUE),\n hlt = choices_selected(\n choices = variable_choices(adcm, c(\"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")),\n selected = c(\"ATC1\")\n ),\n llt = choices_selected(\n choices = variable_choices(adcm, c(\"CMDECOD\")),\n selected = c(\"CMDECOD\")\n ),\n add_total = TRUE,\n event_type = \"treatment\"\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\"),\n ADCM = list(ATIREL = \"CONCOMITANT\")\n )\n)\n\n[INFO] 2023-08-04 14:55:38.7545 pid:7959 token:[] teal.modules.clinical Initializing tm_t_mult_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/cmt02_pt.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\nadcm$CMSEQ <- as.factor(adcm$CMSEQ)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n# If you want your missing levels to show as \"No Coding Available\", please use\nadsl <- df_explicit_na(adsl, na_level = \"No Coding Available\")\nadcm <- df_explicit_na(adcm, na_level = \"No Coding Available\")\n\n# Keep only safety-evaluable patients and concomitant medications\nadsl <- adsl %>%\n filter(SAFFL == \"Y\")\n\n# Keep only concomitant medications\nadcm <- adcm %>% filter(ATIREL == \"CONCOMITANT\")\n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n add_overall_col(\"All Patients\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n count_by = \"CMSEQ\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one treatment\",\n nonunique = \"Total number of treatments\"\n ),\n show_labels = \"hidden\"\n ) %>%\n count_occurrences(vars = \"CMDECOD\") %>%\n append_topleft(paste(\"\\nOther Treatment\"))\n\nresult <- build_table(lyt = lyt, df = adcm, alt_counts_df = adsl) %>%\n sort_at_path(\n path = c(\"CMDECOD\"),\n scorefun = score_occurrences\n )\n\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\nOther Treatment (N=134) (N=134) (N=132) (N=400) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one treatment 117 (87.3%) 116 (86.6%) 116 (87.9%) 349 (87.2%) \nTotal number of treatments 415 414 460 1289 \nmedname C_2/2 52 (38.8%) 58 (43.3%) 60 (45.5%) 170 (42.5%) \nmedname B_1/4 52 (38.8%) 57 (42.5%) 59 (44.7%) 168 (42.0%) \nmedname A_2/3 53 (39.6%) 50 (37.3%) 56 (42.4%) 159 (39.8%) \nmedname C_1/2 51 (38.1%) 50 (37.3%) 56 (42.4%) 157 (39.2%) \nmedname B_4/4 50 (37.3%) 45 (33.6%) 55 (41.7%) 150 (37.5%) \nmedname A_3/3 45 (33.6%) 54 (40.3%) 48 (36.4%) 147 (36.8%) \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\nadcm$CMSEQ <- as.integer(adcm$CMSEQ)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n# If you want your missing levels to show as \"No Coding Available\", please use\n# adsl <- df_explicit_na(adsl, na_level = \"No Coding Available\")\n# adcm <- df_explicit_na(adcm, na_level = \"No Coding Available\")\nadsl <- df_explicit_na(adsl)\nadcm <- df_explicit_na(adcm)\n\nadcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")\n\napp <- teal::init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = '\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- df_explicit_na(ADSL)\n '),\n cdisc_dataset(\"ADCM\", adcm,\n code = '\n ADCM <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n ADCM$CMID <- as.factor(ADCM$CMSEQ)\n ADCM <- df_explicit_na(ADCM)\n ',\n keys = adcm_keys\n )\n ),\n modules = modules(\n tm_t_mult_events(\n label = \"Concomitant Medications by Medication Class and Preferred Name\",\n dataname = \"ADCM\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n seq_var = choices_selected(\"CMSEQ\", selected = \"CMSEQ\", fixed = TRUE),\n hlt = choices_selected(\n choices = variable_choices(adcm, c(\"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")),\n selected = c(\"ATC1\")\n ),\n llt = choices_selected(\n choices = variable_choices(adcm, c(\"CMDECOD\")),\n selected = c(\"CMDECOD\")\n ),\n add_total = TRUE,\n event_type = \"treatment\"\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\"),\n ADCM = list(ATIREL = \"CONCOMITANT\")\n )\n)\n\n[INFO] 2023-08-04 15:12:38.0175 pid:7963 token:[] teal.modules.clinical Initializing tm_t_mult_events\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/cmt02_pt.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/dmt01.html", "href": "tables/safety/dmt01.html", "title": "DMT01", "section": "", - "text": "Data Setup\nTable with an Additional Study-Specific Continuous Variable\nTable with an Additional Study-Specific Categorical Variable\nTable with Subgrouping for Some Analyses\nTable with Additional Vital Signs Baseline Values\nTable with Additional Values from ADSUB\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(tidyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadvs <- synthetic_cdisc_dataset(\"latest\", \"advs\")\nadsub <- synthetic_cdisc_dataset(\"latest\", \"adsub\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadvs <- df_explicit_na(advs)\nadsub <- df_explicit_na(adsub)\n\n# Change description in variable SEX.\nadsl <- adsl %>%\n mutate(\n SEX = factor(case_when(\n SEX == \"M\" ~ \"Male\",\n SEX == \"F\" ~ \"Female\",\n SEX == \"U\" ~ \"Unknown\",\n SEX == \"UNDIFFERENTIATED\" ~ \"Undifferentiated\"\n )),\n AGEGR1 = factor(\n case_when(\n between(AGE, 18, 40) ~ \"18-40\",\n between(AGE, 41, 64) ~ \"41-64\",\n AGE > 64 ~ \">=65\"\n ),\n levels = c(\"18-40\", \"41-64\", \">=65\")\n ),\n BMRKR1_CAT = factor(\n case_when(\n BMRKR1 < 3.5 ~ \"LOW\",\n BMRKR1 >= 3.5 & BMRKR1 < 10 ~ \"MEDIUM\",\n BMRKR1 >= 10 ~ \"HIGH\"\n ),\n levels = c(\"LOW\", \"MEDIUM\", \"HIGH\")\n )\n ) %>%\n var_relabel(\n BMRKR1_CAT = \"Biomarker 1 Categories\"\n )\n# The developer needs to do pre-processing to add necessary variables based on ADVS to analysis dataset.\n# Obtain SBP, DBP and weight.\nget_param_advs <- function(pname, plabel) {\n ds <- advs %>%\n filter(PARAM == plabel & AVISIT == \"BASELINE\") %>%\n select(USUBJID, AVAL)\n\n colnames(ds) <- c(\"USUBJID\", pname)\n\n ds\n}\n# The developer needs to do pre-processing to add necessary variables based on ADSUB to analysis dataset.\n# Obtain baseline BMI (BBMISI).\nget_param_adsub <- function(pname, plabel) {\n ds <- adsub %>%\n filter(PARAM == plabel) %>%\n select(USUBJID, AVAL)\n\n colnames(ds) <- c(\"USUBJID\", pname)\n\n ds\n}\nadsl <- adsl %>%\n left_join(get_param_advs(\"SBP\", \"Systolic Blood Pressure\"), by = \"USUBJID\") %>%\n left_join(get_param_advs(\"DBP\", \"Diastolic Blood Pressure\"), by = \"USUBJID\") %>%\n left_join(get_param_advs(\"WGT\", \"Weight\"), by = \"USUBJID\") %>%\n left_join(get_param_adsub(\"BBMISI\", \"Baseline BMI\"), by = \"USUBJID\")\n\n\n\n\n\nCodevars <- c(\"AGE\", \"AGEGR1\", \"SEX\", \"ETHNIC\", \"RACE\", \"BMRKR1\")\nvar_labels <- c(\n \"Age (yr)\",\n \"Age Group\",\n \"Sex\",\n \"Ethnicity\",\n \"Race\",\n \"Continous Level Biomarker 1\"\n)\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n add_overall_col(\"All Patients\") %>%\n summarize_vars(\n vars = vars,\n var_labels = var_labels\n ) %>%\n build_table(adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————————————————————————————————————\nAge (yr) \n n 134 134 132 400 \n Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7) 34.9 (7.4) \n Median 33.0 35.0 35.0 34.0 \n Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0 20.0 - 69.0 \nAge Group \n n 134 134 132 400 \n 18-40 113 (84.3%) 103 (76.9%) 106 (80.3%) 322 (80.5%) \n 41-64 21 (15.7%) 31 (23.1%) 25 (18.9%) 77 (19.2%) \n >=65 0 0 1 (0.8%) 1 (0.2%) \nSex \n n 134 134 132 400 \n Female 79 (59%) 82 (61.2%) 70 (53%) 231 (57.8%) \n Male 55 (41%) 52 (38.8%) 62 (47%) 169 (42.2%) \nEthnicity \n n 134 134 132 400 \n NOT REPORTED 6 (4.5%) 10 (7.5%) 11 (8.3%) 27 (6.8%) \n HISPANIC OR LATINO 15 (11.2%) 18 (13.4%) 15 (11.4%) 48 (12%) \n NOT HISPANIC OR LATINO 104 (77.6%) 103 (76.9%) 101 (76.5%) 308 (77%) \n UNKNOWN 9 (6.7%) 3 (2.2%) 5 (3.8%) 17 (4.2%) \nRace \n n 134 134 132 400 \n ASIAN 68 (50.7%) 67 (50%) 73 (55.3%) 208 (52%) \n BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%) 91 (22.8%) \n WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%) 74 (18.5%) \n AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%) 25 (6.2%) \n MULTIPLE 0 1 (0.7%) 0 1 (0.2%) \n NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0 1 (0.2%) \n OTHER 0 0 0 0 \n UNKNOWN 0 0 0 0 \nContinous Level Biomarker 1 \n n 134 134 132 400 \n Mean (SD) 6.0 (3.6) 5.7 (3.3) 5.6 (3.5) 5.8 (3.4) \n Median 5.4 4.8 4.6 4.8 \n Min - Max 0.4 - 17.7 0.6 - 14.2 0.2 - 21.4 0.2 - 21.4 \n\n\n\n\n\nCodevars <- c(\"AGE\", \"AGEGR1\", \"SEX\", \"ETHNIC\", \"RACE\", \"BMRKR1_CAT\")\nvar_labels <- c(\n \"Age (yr)\",\n \"Age Group\",\n \"Sex\",\n \"Ethnicity\",\n \"Race\",\n \"Biomarker 1 Categories\"\n)\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n summarize_vars(\n vars = vars,\n var_labels = var_labels\n ) %>%\n build_table(adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————\nAge (yr) \n n 134 134 132 \n Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7) \n Median 33.0 35.0 35.0 \n Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0 \nAge Group \n n 134 134 132 \n 18-40 113 (84.3%) 103 (76.9%) 106 (80.3%) \n 41-64 21 (15.7%) 31 (23.1%) 25 (18.9%) \n >=65 0 0 1 (0.8%) \nSex \n n 134 134 132 \n Female 79 (59%) 82 (61.2%) 70 (53%) \n Male 55 (41%) 52 (38.8%) 62 (47%) \nEthnicity \n n 134 134 132 \n NOT REPORTED 6 (4.5%) 10 (7.5%) 11 (8.3%) \n HISPANIC OR LATINO 15 (11.2%) 18 (13.4%) 15 (11.4%) \n NOT HISPANIC OR LATINO 104 (77.6%) 103 (76.9%) 101 (76.5%) \n UNKNOWN 9 (6.7%) 3 (2.2%) 5 (3.8%) \nRace \n n 134 134 132 \n ASIAN 68 (50.7%) 67 (50%) 73 (55.3%) \n BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%) \n WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%) \n AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%) \n MULTIPLE 0 1 (0.7%) 0 \n NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0 \n OTHER 0 0 0 \n UNKNOWN 0 0 0 \nBiomarker 1 Categories \n n 134 134 132 \n LOW 33 (24.6%) 41 (30.6%) 38 (28.8%) \n MEDIUM 84 (62.7%) 76 (56.7%) 80 (60.6%) \n HIGH 17 (12.7%) 17 (12.7%) 14 (10.6%) \n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n summarize_vars(\n vars = c(\"AGE\", \"SEX\", \"RACE\"),\n var_labels = c(\"Age\", \"Sex\", \"Race\")\n ) %>%\n split_rows_by(\"STRATA1\",\n split_fun = split_fun\n ) %>%\n summarize_vars(\"BMRKR1\") %>%\n build_table(adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————\nAge \n n 134 134 132 \n Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7) \n Median 33.0 35.0 35.0 \n Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0 \nSex \n n 134 134 132 \n Female 79 (59%) 82 (61.2%) 70 (53%) \n Male 55 (41%) 52 (38.8%) 62 (47%) \nRace \n n 134 134 132 \n ASIAN 68 (50.7%) 67 (50%) 73 (55.3%) \n BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%) \n WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%) \n AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%) \n MULTIPLE 0 1 (0.7%) 0 \n NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0 \n OTHER 0 0 0 \n UNKNOWN 0 0 0 \nA \n n 38 44 40 \n Mean (SD) 5.8 (3.8) 5.4 (3.2) 5.1 (3.2) \n Median 5.1 4.5 3.8 \n Min - Max 0.4 - 17.7 1.4 - 14.2 1.5 - 14.0 \nB \n n 47 45 43 \n Mean (SD) 6.1 (3.6) 5.8 (3.6) 5.7 (3.4) \n Median 5.2 4.8 5.1 \n Min - Max 1.6 - 17.2 0.6 - 13.3 0.2 - 16.5 \nC \n n 49 45 49 \n Mean (SD) 6.0 (3.4) 5.9 (3.2) 6.0 (3.8) \n Median 5.8 5.6 4.5 \n Min - Max 0.5 - 15.1 1.5 - 13.9 1.2 - 21.4 \n\n\n\n\n\nCoderesult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n summarize_vars(\n vars = c(\"AGE\", \"SEX\", \"RACE\", \"DBP\", \"SBP\"),\n var_labels = c(\n \"Age (yr)\",\n \"Sex\",\n \"Race\",\n \"Diastolic Blood Pressure\",\n \"Systolic Blood Pressure\"\n )\n ) %>%\n build_table(adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————\nAge (yr) \n n 134 134 132 \n Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7) \n Median 33.0 35.0 35.0 \n Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0 \nSex \n n 134 134 132 \n Female 79 (59%) 82 (61.2%) 70 (53%) \n Male 55 (41%) 52 (38.8%) 62 (47%) \nRace \n n 134 134 132 \n ASIAN 68 (50.7%) 67 (50%) 73 (55.3%) \n BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%) \n WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%) \n AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%) \n MULTIPLE 0 1 (0.7%) 0 \n NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0 \n OTHER 0 0 0 \n UNKNOWN 0 0 0 \nDiastolic Blood Pressure \n n 134 134 132 \n Mean (SD) 96.5 (19.9) 101.1 (19.9) 102.8 (19.5) \n Median 96.0 100.4 102.0 \n Min - Max 44.3 - 136.6 29.2 - 143.8 49.4 - 153.5 \nSystolic Blood Pressure \n n 134 134 132 \n Mean (SD) 151.7 (31.5) 149.5 (26.5) 144.7 (30.1) \n Median 150.1 153.0 146.5 \n Min - Max 69.1 - 231.2 87.2 - 220.9 71.8 - 220.2 \n\n\n\n\n\nCoderesult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n summarize_vars(\n vars = c(\"AGE\", \"SEX\", \"RACE\", \"BBMISI\"),\n var_labels = c(\n \"Age (yr)\",\n \"Sex\",\n \"Race\",\n \"Baseline BMI\"\n )\n ) %>%\n build_table(adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————\nAge (yr) \n n 134 134 132 \n Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7) \n Median 33.0 35.0 35.0 \n Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0 \nSex \n n 134 134 132 \n Female 79 (59%) 82 (61.2%) 70 (53%) \n Male 55 (41%) 52 (38.8%) 62 (47%) \nRace \n n 134 134 132 \n ASIAN 68 (50.7%) 67 (50%) 73 (55.3%) \n BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%) \n WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%) \n AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%) \n MULTIPLE 0 1 (0.7%) 0 \n NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0 \n OTHER 0 0 0 \n UNKNOWN 0 0 0 \nBaseline BMI \n n 134 134 132 \n Mean (SD) 30.0 (18.3) 32.4 (23.2) 30.1 (18.4) \n Median 27.1 31.1 30.0 \n Min - Max -6.9 - 75.9 -26.6 - 117.9 -44.2 - 87.5 \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\n# Include `EOSDY` and `DCSREAS` variables below because they contain missing data.\nstopifnot(\n any(is.na(adsl$EOSDY)),\n any(is.na(adsl$DCSREAS))\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")',\n check = TRUE\n ),\n modules = modules(\n tm_t_summary(\n label = \"Demographic Table\",\n dataname = \"ADSL\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n summarize_vars = choices_selected(\n c(\"SEX\", \"RACE\", \"BMRKR2\", \"EOSDY\", \"DCSREAS\"),\n c(\"SEX\", \"RACE\")\n ),\n useNA = \"ifany\"\n )\n )\n)\n\n[INFO] 2023-08-04 14:56:55.6759 pid:8169 token:[] teal.modules.clinical Initializing tm_t_summary\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tidyr_1.3.0 dplyr_1.1.2 \n [9] scda_0.1.6.9010 tern_0.8.5.9006 \n[11] rtables_0.6.2.9001 magrittr_2.0.3 \n[13] formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 jquerylib_0.1.4 glue_1.6.2 \n[55] ps_1.7.5 codetools_0.2-19 gtable_0.3.3 \n[58] later_1.3.1 shinycssloaders_1.0.0 munsell_0.5.0 \n[61] tibble_3.2.1 styler_1.10.1 logger_0.2.2 \n[64] pillar_1.9.0 htmltools_0.5.5 brio_1.1.3 \n[67] R6_2.5.1 Rdpack_2.4 evaluate_0.21 \n[70] lattice_0.21-8 R.methodsS3_1.8.2 rbibutils_2.2.13 \n[73] backports_1.4.1 memoise_2.0.1 broom_1.0.5 \n[76] teal.reporter_0.1.1.9020 httpuv_1.6.11 bslib_0.5.0 \n[79] Rcpp_1.0.11 teal.code_0.3.0.9009 shinyvalidate_0.1.2 \n[82] coda_0.19-4 nlme_3.1-162 checkmate_2.2.0 \n[85] xfun_0.39 forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/dmt01.lock'.\n\n\nDownload" + "text": "Data Setup\nTable with an Additional Study-Specific Continuous Variable\nTable with an Additional Study-Specific Categorical Variable\nTable with Subgrouping for Some Analyses\nTable with Additional Vital Signs Baseline Values\nTable with Additional Values from ADSUB\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(tidyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadvs <- synthetic_cdisc_dataset(\"latest\", \"advs\")\nadsub <- synthetic_cdisc_dataset(\"latest\", \"adsub\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadvs <- df_explicit_na(advs)\nadsub <- df_explicit_na(adsub)\n\n# Change description in variable SEX.\nadsl <- adsl %>%\n mutate(\n SEX = factor(case_when(\n SEX == \"M\" ~ \"Male\",\n SEX == \"F\" ~ \"Female\",\n SEX == \"U\" ~ \"Unknown\",\n SEX == \"UNDIFFERENTIATED\" ~ \"Undifferentiated\"\n )),\n AGEGR1 = factor(\n case_when(\n between(AGE, 18, 40) ~ \"18-40\",\n between(AGE, 41, 64) ~ \"41-64\",\n AGE > 64 ~ \">=65\"\n ),\n levels = c(\"18-40\", \"41-64\", \">=65\")\n ),\n BMRKR1_CAT = factor(\n case_when(\n BMRKR1 < 3.5 ~ \"LOW\",\n BMRKR1 >= 3.5 & BMRKR1 < 10 ~ \"MEDIUM\",\n BMRKR1 >= 10 ~ \"HIGH\"\n ),\n levels = c(\"LOW\", \"MEDIUM\", \"HIGH\")\n )\n ) %>%\n var_relabel(\n BMRKR1_CAT = \"Biomarker 1 Categories\"\n )\n# The developer needs to do pre-processing to add necessary variables based on ADVS to analysis dataset.\n# Obtain SBP, DBP and weight.\nget_param_advs <- function(pname, plabel) {\n ds <- advs %>%\n filter(PARAM == plabel & AVISIT == \"BASELINE\") %>%\n select(USUBJID, AVAL)\n\n colnames(ds) <- c(\"USUBJID\", pname)\n\n ds\n}\n# The developer needs to do pre-processing to add necessary variables based on ADSUB to analysis dataset.\n# Obtain baseline BMI (BBMISI).\nget_param_adsub <- function(pname, plabel) {\n ds <- adsub %>%\n filter(PARAM == plabel) %>%\n select(USUBJID, AVAL)\n\n colnames(ds) <- c(\"USUBJID\", pname)\n\n ds\n}\nadsl <- adsl %>%\n left_join(get_param_advs(\"SBP\", \"Systolic Blood Pressure\"), by = \"USUBJID\") %>%\n left_join(get_param_advs(\"DBP\", \"Diastolic Blood Pressure\"), by = \"USUBJID\") %>%\n left_join(get_param_advs(\"WGT\", \"Weight\"), by = \"USUBJID\") %>%\n left_join(get_param_adsub(\"BBMISI\", \"Baseline BMI\"), by = \"USUBJID\")\n\n\n\n\n\nCodevars <- c(\"AGE\", \"AGEGR1\", \"SEX\", \"ETHNIC\", \"RACE\", \"BMRKR1\")\nvar_labels <- c(\n \"Age (yr)\",\n \"Age Group\",\n \"Sex\",\n \"Ethnicity\",\n \"Race\",\n \"Continous Level Biomarker 1\"\n)\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n add_overall_col(\"All Patients\") %>%\n summarize_vars(\n vars = vars,\n var_labels = var_labels\n ) %>%\n build_table(adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————————————————————————————————————\nAge (yr) \n n 134 134 132 400 \n Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7) 34.9 (7.4) \n Median 33.0 35.0 35.0 34.0 \n Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0 20.0 - 69.0 \nAge Group \n n 134 134 132 400 \n 18-40 113 (84.3%) 103 (76.9%) 106 (80.3%) 322 (80.5%) \n 41-64 21 (15.7%) 31 (23.1%) 25 (18.9%) 77 (19.2%) \n >=65 0 0 1 (0.8%) 1 (0.2%) \nSex \n n 134 134 132 400 \n Female 79 (59%) 82 (61.2%) 70 (53%) 231 (57.8%) \n Male 55 (41%) 52 (38.8%) 62 (47%) 169 (42.2%) \nEthnicity \n n 134 134 132 400 \n NOT REPORTED 6 (4.5%) 10 (7.5%) 11 (8.3%) 27 (6.8%) \n HISPANIC OR LATINO 15 (11.2%) 18 (13.4%) 15 (11.4%) 48 (12%) \n NOT HISPANIC OR LATINO 104 (77.6%) 103 (76.9%) 101 (76.5%) 308 (77%) \n UNKNOWN 9 (6.7%) 3 (2.2%) 5 (3.8%) 17 (4.2%) \nRace \n n 134 134 132 400 \n ASIAN 68 (50.7%) 67 (50%) 73 (55.3%) 208 (52%) \n BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%) 91 (22.8%) \n WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%) 74 (18.5%) \n AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%) 25 (6.2%) \n MULTIPLE 0 1 (0.7%) 0 1 (0.2%) \n NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0 1 (0.2%) \n OTHER 0 0 0 0 \n UNKNOWN 0 0 0 0 \nContinous Level Biomarker 1 \n n 134 134 132 400 \n Mean (SD) 6.0 (3.6) 5.7 (3.3) 5.6 (3.5) 5.8 (3.4) \n Median 5.4 4.8 4.6 4.8 \n Min - Max 0.4 - 17.7 0.6 - 14.2 0.2 - 21.4 0.2 - 21.4 \n\n\n\n\n\nCodevars <- c(\"AGE\", \"AGEGR1\", \"SEX\", \"ETHNIC\", \"RACE\", \"BMRKR1_CAT\")\nvar_labels <- c(\n \"Age (yr)\",\n \"Age Group\",\n \"Sex\",\n \"Ethnicity\",\n \"Race\",\n \"Biomarker 1 Categories\"\n)\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n summarize_vars(\n vars = vars,\n var_labels = var_labels\n ) %>%\n build_table(adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————\nAge (yr) \n n 134 134 132 \n Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7) \n Median 33.0 35.0 35.0 \n Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0 \nAge Group \n n 134 134 132 \n 18-40 113 (84.3%) 103 (76.9%) 106 (80.3%) \n 41-64 21 (15.7%) 31 (23.1%) 25 (18.9%) \n >=65 0 0 1 (0.8%) \nSex \n n 134 134 132 \n Female 79 (59%) 82 (61.2%) 70 (53%) \n Male 55 (41%) 52 (38.8%) 62 (47%) \nEthnicity \n n 134 134 132 \n NOT REPORTED 6 (4.5%) 10 (7.5%) 11 (8.3%) \n HISPANIC OR LATINO 15 (11.2%) 18 (13.4%) 15 (11.4%) \n NOT HISPANIC OR LATINO 104 (77.6%) 103 (76.9%) 101 (76.5%) \n UNKNOWN 9 (6.7%) 3 (2.2%) 5 (3.8%) \nRace \n n 134 134 132 \n ASIAN 68 (50.7%) 67 (50%) 73 (55.3%) \n BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%) \n WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%) \n AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%) \n MULTIPLE 0 1 (0.7%) 0 \n NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0 \n OTHER 0 0 0 \n UNKNOWN 0 0 0 \nBiomarker 1 Categories \n n 134 134 132 \n LOW 33 (24.6%) 41 (30.6%) 38 (28.8%) \n MEDIUM 84 (62.7%) 76 (56.7%) 80 (60.6%) \n HIGH 17 (12.7%) 17 (12.7%) 14 (10.6%) \n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nresult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n summarize_vars(\n vars = c(\"AGE\", \"SEX\", \"RACE\"),\n var_labels = c(\"Age\", \"Sex\", \"Race\")\n ) %>%\n split_rows_by(\"STRATA1\",\n split_fun = split_fun\n ) %>%\n summarize_vars(\"BMRKR1\") %>%\n build_table(adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————\nAge \n n 134 134 132 \n Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7) \n Median 33.0 35.0 35.0 \n Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0 \nSex \n n 134 134 132 \n Female 79 (59%) 82 (61.2%) 70 (53%) \n Male 55 (41%) 52 (38.8%) 62 (47%) \nRace \n n 134 134 132 \n ASIAN 68 (50.7%) 67 (50%) 73 (55.3%) \n BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%) \n WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%) \n AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%) \n MULTIPLE 0 1 (0.7%) 0 \n NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0 \n OTHER 0 0 0 \n UNKNOWN 0 0 0 \nA \n n 38 44 40 \n Mean (SD) 5.8 (3.8) 5.4 (3.2) 5.1 (3.2) \n Median 5.1 4.5 3.8 \n Min - Max 0.4 - 17.7 1.4 - 14.2 1.5 - 14.0 \nB \n n 47 45 43 \n Mean (SD) 6.1 (3.6) 5.8 (3.6) 5.7 (3.4) \n Median 5.2 4.8 5.1 \n Min - Max 1.6 - 17.2 0.6 - 13.3 0.2 - 16.5 \nC \n n 49 45 49 \n Mean (SD) 6.0 (3.4) 5.9 (3.2) 6.0 (3.8) \n Median 5.8 5.6 4.5 \n Min - Max 0.5 - 15.1 1.5 - 13.9 1.2 - 21.4 \n\n\n\n\n\nCoderesult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n summarize_vars(\n vars = c(\"AGE\", \"SEX\", \"RACE\", \"DBP\", \"SBP\"),\n var_labels = c(\n \"Age (yr)\",\n \"Sex\",\n \"Race\",\n \"Diastolic Blood Pressure\",\n \"Systolic Blood Pressure\"\n )\n ) %>%\n build_table(adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————\nAge (yr) \n n 134 134 132 \n Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7) \n Median 33.0 35.0 35.0 \n Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0 \nSex \n n 134 134 132 \n Female 79 (59%) 82 (61.2%) 70 (53%) \n Male 55 (41%) 52 (38.8%) 62 (47%) \nRace \n n 134 134 132 \n ASIAN 68 (50.7%) 67 (50%) 73 (55.3%) \n BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%) \n WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%) \n AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%) \n MULTIPLE 0 1 (0.7%) 0 \n NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0 \n OTHER 0 0 0 \n UNKNOWN 0 0 0 \nDiastolic Blood Pressure \n n 134 134 132 \n Mean (SD) 96.5 (19.9) 101.1 (19.9) 102.8 (19.5) \n Median 96.0 100.4 102.0 \n Min - Max 44.3 - 136.6 29.2 - 143.8 49.4 - 153.5 \nSystolic Blood Pressure \n n 134 134 132 \n Mean (SD) 151.7 (31.5) 149.5 (26.5) 144.7 (30.1) \n Median 150.1 153.0 146.5 \n Min - Max 69.1 - 231.2 87.2 - 220.9 71.8 - 220.2 \n\n\n\n\n\nCoderesult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ACTARM\") %>%\n summarize_vars(\n vars = c(\"AGE\", \"SEX\", \"RACE\", \"BBMISI\"),\n var_labels = c(\n \"Age (yr)\",\n \"Sex\",\n \"Race\",\n \"Baseline BMI\"\n )\n ) %>%\n build_table(adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————\nAge (yr) \n n 134 134 132 \n Mean (SD) 33.8 (6.6) 35.4 (7.9) 35.4 (7.7) \n Median 33.0 35.0 35.0 \n Min - Max 21.0 - 50.0 21.0 - 62.0 20.0 - 69.0 \nSex \n n 134 134 132 \n Female 79 (59%) 82 (61.2%) 70 (53%) \n Male 55 (41%) 52 (38.8%) 62 (47%) \nRace \n n 134 134 132 \n ASIAN 68 (50.7%) 67 (50%) 73 (55.3%) \n BLACK OR AFRICAN AMERICAN 31 (23.1%) 28 (20.9%) 32 (24.2%) \n WHITE 27 (20.1%) 26 (19.4%) 21 (15.9%) \n AMERICAN INDIAN OR ALASKA NATIVE 8 (6%) 11 (8.2%) 6 (4.5%) \n MULTIPLE 0 1 (0.7%) 0 \n NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 0 1 (0.7%) 0 \n OTHER 0 0 0 \n UNKNOWN 0 0 0 \nBaseline BMI \n n 134 134 132 \n Mean (SD) 30.0 (18.3) 32.4 (23.2) 30.1 (18.4) \n Median 27.1 31.1 30.0 \n Min - Max -6.9 - 75.9 -26.6 - 117.9 -44.2 - 87.5 \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\n# Include `EOSDY` and `DCSREAS` variables below because they contain missing data.\nstopifnot(\n any(is.na(adsl$EOSDY)),\n any(is.na(adsl$DCSREAS))\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")',\n check = TRUE\n ),\n modules = modules(\n tm_t_summary(\n label = \"Demographic Table\",\n dataname = \"ADSL\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n summarize_vars = choices_selected(\n c(\"SEX\", \"RACE\", \"BMRKR2\", \"EOSDY\", \"DCSREAS\"),\n c(\"SEX\", \"RACE\")\n ),\n useNA = \"ifany\"\n )\n )\n)\n\n[INFO] 2023-08-04 15:14:00.6578 pid:8173 token:[] teal.modules.clinical Initializing tm_t_summary\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tidyr_1.3.0 dplyr_1.1.2 \n [9] scda_0.1.6.9010 tern_0.8.5.9006 \n[11] rtables_0.6.2.9001 magrittr_2.0.3 \n[13] formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 jquerylib_0.1.4 glue_1.6.2 \n[55] ps_1.7.5 codetools_0.2-19 gtable_0.3.3 \n[58] later_1.3.1 shinycssloaders_1.0.0 munsell_0.5.0 \n[61] tibble_3.2.1 styler_1.10.1 logger_0.2.2 \n[64] pillar_1.9.0 htmltools_0.5.5 brio_1.1.3 \n[67] R6_2.5.1 Rdpack_2.4 evaluate_0.21 \n[70] lattice_0.21-8 R.methodsS3_1.8.2 rbibutils_2.2.13 \n[73] backports_1.4.1 memoise_2.0.1 broom_1.0.5 \n[76] teal.reporter_0.1.1.9020 httpuv_1.6.11 bslib_0.5.0 \n[79] Rcpp_1.0.11 teal.code_0.3.0.9009 shinyvalidate_0.1.2 \n[82] coda_0.19-4 nlme_3.1-162 checkmate_2.2.0 \n[85] xfun_0.39 forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/dmt01.lock'.\n\n\nDownload" }, { "objectID": "tables/safety/egt03.html", "href": "tables/safety/egt03.html", "title": "EGT03", "section": "", - "text": "Data Setup\nTable of Baseline Versus Minimum Post-Baseline\nTable of Baseline Versus Maximum Post-Baseline\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadeg <- df_explicit_na(adeg)\n\nadeg_labels <- var_labels(adeg)\n\nadeg_f_pbmin <- subset(\n adeg,\n PARAMCD == \"HR\" & # Heart Rate\n SAFFL == \"Y\" & # \"Safety Population Flag\"\n ONTRTFL == \"Y\" & # \"On Treatment Record Flag\"\n AVISIT == \"POST-BASELINE MINIMUM\" # \"Analysis Visit\"\n)\n\nadeg_f_pbmax <- subset(\n adeg,\n PARAMCD == \"HR\" & # Heart Rate\n SAFFL == \"Y\" & # \"Safety Population Flag\"\n ONTRTFL == \"Y\" & # \"On Treatment Record Flag\"\n AVISIT == \"POST-BASELINE MAXIMUM\" # \"Analysis Visit\"\n)\n\nvar_labels(adeg_f_pbmin) <- adeg_labels\nvar_labels(adeg_f_pbmax) <- adeg_labels\n\n\n\n\nFor the EGT03 template, data imputation should be avoided, and missing data explicit and accounted for, so the contingency table sum adds up to the group N. For illustration purposes, missing data are added to the example dataset.\n\nCodeset.seed(123, kind = \"Mersenne-Twister\")\n\nadeg_f_pbmin$BNRIND <- factor(\n adeg_f_pbmin$BNRIND,\n levels = c(\"LOW\", \"NORMAL\", \"HIGH\", \"Missing\"),\n labels = c(\"LOW\", \"NORMAL\", \"HIGH\", \"Missing\")\n)\nadeg_f_pbmin$ANRIND <- factor(\n adeg_f_pbmin$ANRIND,\n levels = c(\"LOW\", \"NORMAL\", \"HIGH\", \"Missing\"),\n labels = c(\"LOW\", \"NORMAL\", \"HIGH\", \"Missing\")\n)\n\nadeg_f_pbmin$BNRIND[sample(1:nrow(adeg_f_pbmin), size = 5)] <- \"Missing\"\nadeg_f_pbmin$ANRIND[sample(1:nrow(adeg_f_pbmin), size = 5)] <- \"Missing\"\n\nattr(adeg_f_pbmin$ANRIND, \"label\") <- \"Analysis Reference Range Indicator\"\nattr(adeg_f_pbmin$BNRIND, \"label\") <- \"Baseline Reference Range Indicator\"\n\n# Temporary solution for overarching column\nadeg_f_pbmin <- adeg_f_pbmin %>% mutate(min_label = \"Minimum Post-Baseline Assessment\")\n\n# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table() %>%\n split_cols_by(\"min_label\") %>%\n split_cols_by(\"ANRIND\") %>%\n split_rows_by(\"ARMCD\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adeg_f_pbmin$ARMCD)) %>%\n add_rowcounts() %>%\n summarize_vars(\"BNRIND\", denom = \"N_row\", .stats = \"count_fraction\") %>%\n append_varlabels(adeg_f_pbmin, c(\"BNRIND\"), indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adeg_f_pbmin\n)\n\nresult\n\nPlanned Arm Code Minimum Post-Baseline Assessment \n Baseline Reference Range Indicator LOW NORMAL HIGH Missing \n————————————————————————————————————————————————————————————————————————————————\nARM A (N=134) \n LOW 1 (0.7%) 5 (3.7%) 0 0 \n NORMAL 36 (26.9%) 83 (61.9%) 0 1 (0.7%)\n HIGH 2 (1.5%) 4 (3%) 0 0 \n Missing 1 (0.7%) 0 0 1 (0.7%)\nARM B (N=134) \n LOW 1 (0.7%) 9 (6.7%) 0 0 \n NORMAL 40 (29.9%) 75 (56%) 0 2 (1.5%)\n HIGH 1 (0.7%) 4 (3%) 0 0 \n Missing 1 (0.7%) 1 (0.7%) 0 0 \nARM C (N=132) \n LOW 4 (3%) 11 (8.3%) 0 0 \n NORMAL 31 (23.5%) 75 (56.8%) 0 0 \n HIGH 1 (0.8%) 8 (6.1%) 0 1 (0.8%)\n Missing 1 (0.8%) 0 0 0 \n\n\n\n\nFor the EGT03 template, data imputation should be avoided, and missing data explicit and accounted for, so the contingency table sum adds up to the group N. For illustration purpose, missing data are added to the example dataset.\n\nCodeset.seed(123, kind = \"Mersenne-Twister\")\n\nadeg_f_pbmax$BNRIND <- factor(\n adeg_f_pbmax$BNRIND,\n levels = c(\"LOW\", \"NORMAL\", \"HIGH\", \"Missing\"),\n labels = c(\"LOW\", \"NORMAL\", \"HIGH\", \"Missing\")\n)\nadeg_f_pbmax$ANRIND <- factor(\n adeg_f_pbmax$ANRIND,\n levels = c(\"LOW\", \"NORMAL\", \"HIGH\", \"Missing\"),\n labels = c(\"LOW\", \"NORMAL\", \"HIGH\", \"Missing\")\n)\n\nadeg_f_pbmax$BNRIND[sample(1:nrow(adeg_f_pbmax), size = 5)] <- \"Missing\"\nadeg_f_pbmax$ANRIND[sample(1:nrow(adeg_f_pbmax), size = 5)] <- \"Missing\"\n\nattr(adeg_f_pbmax$ANRIND, \"label\") <- \"Analysis Reference Range Indicator\"\nattr(adeg_f_pbmax$BNRIND, \"label\") <- \"Baseline Reference Range Indicator\"\n\n# Temporary solution for overarching column\nadeg_f_pbmax <- adeg_f_pbmax %>% mutate(max_label = \"Maximum Post-Baseline Assessment\")\n\n# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table() %>%\n split_cols_by(\"max_label\") %>%\n split_cols_by(\"ANRIND\") %>%\n split_rows_by(\"ARMCD\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adeg_f_pbmax$ARMCD)) %>%\n add_rowcounts() %>%\n summarize_vars(\"BNRIND\", denom = \"N_row\", .stats = \"count_fraction\") %>%\n append_varlabels(adeg_f_pbmax, c(\"BNRIND\"), indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adeg_f_pbmax\n)\n\nresult\n\nPlanned Arm Code Maximum Post-Baseline Assessment \n Baseline Reference Range Indicator LOW NORMAL HIGH Missing \n————————————————————————————————————————————————————————————————————————————————\nARM A (N=134) \n LOW 0 2 (1.5%) 4 (3%) 0 \n NORMAL 0 88 (65.7%) 31 (23.1%) 1 (0.7%)\n HIGH 0 5 (3.7%) 1 (0.7%) 0 \n Missing 0 0 1 (0.7%) 1 (0.7%)\nARM B (N=134) \n LOW 0 8 (6%) 2 (1.5%) 0 \n NORMAL 0 76 (56.7%) 39 (29.1%) 2 (1.5%)\n HIGH 0 3 (2.2%) 2 (1.5%) 0 \n Missing 0 1 (0.7%) 1 (0.7%) 0 \nARM C (N=132) \n LOW 0 12 (9.1%) 3 (2.3%) 0 \n NORMAL 0 79 (59.8%) 27 (20.5%) 0 \n HIGH 0 5 (3.8%) 4 (3%) 1 (0.8%)\n Missing 0 0 1 (0.8%) 0 \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADEG\", adeg, code = 'ADEG <- synthetic_cdisc_dataset(\"latest\", \"adeg\")'),\n check = TRUE\n ),\n modules = modules(\n tm_t_shift_by_arm(\n label = \"Shift by Arm Table\",\n dataname = \"ADEG\",\n arm_var = choices_selected(\n variable_choices(adsl, subset = c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n paramcd = choices_selected(\n value_choices(adeg, \"PARAMCD\"),\n selected = \"HR\"\n ),\n visit_var = choices_selected(\n value_choices(adeg, \"AVISIT\"),\n selected = \"POST-BASELINE MINIMUM\"\n ),\n aval_var = choices_selected(\n variable_choices(adeg, subset = \"ANRIND\"),\n selected = \"ANRIND\", fixed = TRUE\n ),\n base_var = choices_selected(\n variable_choices(adeg, subset = \"BNRIND\"),\n selected = \"BNRIND\", fixed = TRUE\n ),\n treatment_flag_var = choices_selected(\n variable_choices(adeg, subset = \"ONTRTFL\"),\n selected = \"ONTRTFL\", fixed = TRUE\n ),\n treatment_flag = choices_selected(\n value_choices(adeg, \"ONTRTFL\"),\n selected = \"Y\", fixed = TRUE\n )\n )\n ),\n filter = list(ADSL = list(SAFFL = \"Y\"))\n)\n\n[INFO] 2023-08-04 14:58:00.1851 pid:8379 token:[] teal.modules.clinical Initializing tm_t_shift_by_arm\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/egt03.lock'.\n\n\nDownload" + "text": "Data Setup\nTable of Baseline Versus Minimum Post-Baseline\nTable of Baseline Versus Maximum Post-Baseline\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadeg <- df_explicit_na(adeg)\n\nadeg_labels <- var_labels(adeg)\n\nadeg_f_pbmin <- subset(\n adeg,\n PARAMCD == \"HR\" & # Heart Rate\n SAFFL == \"Y\" & # \"Safety Population Flag\"\n ONTRTFL == \"Y\" & # \"On Treatment Record Flag\"\n AVISIT == \"POST-BASELINE MINIMUM\" # \"Analysis Visit\"\n)\n\nadeg_f_pbmax <- subset(\n adeg,\n PARAMCD == \"HR\" & # Heart Rate\n SAFFL == \"Y\" & # \"Safety Population Flag\"\n ONTRTFL == \"Y\" & # \"On Treatment Record Flag\"\n AVISIT == \"POST-BASELINE MAXIMUM\" # \"Analysis Visit\"\n)\n\nvar_labels(adeg_f_pbmin) <- adeg_labels\nvar_labels(adeg_f_pbmax) <- adeg_labels\n\n\n\n\nFor the EGT03 template, data imputation should be avoided, and missing data explicit and accounted for, so the contingency table sum adds up to the group N. For illustration purposes, missing data are added to the example dataset.\n\nCodeset.seed(123, kind = \"Mersenne-Twister\")\n\nadeg_f_pbmin$BNRIND <- factor(\n adeg_f_pbmin$BNRIND,\n levels = c(\"LOW\", \"NORMAL\", \"HIGH\", \"Missing\"),\n labels = c(\"LOW\", \"NORMAL\", \"HIGH\", \"Missing\")\n)\nadeg_f_pbmin$ANRIND <- factor(\n adeg_f_pbmin$ANRIND,\n levels = c(\"LOW\", \"NORMAL\", \"HIGH\", \"Missing\"),\n labels = c(\"LOW\", \"NORMAL\", \"HIGH\", \"Missing\")\n)\n\nadeg_f_pbmin$BNRIND[sample(1:nrow(adeg_f_pbmin), size = 5)] <- \"Missing\"\nadeg_f_pbmin$ANRIND[sample(1:nrow(adeg_f_pbmin), size = 5)] <- \"Missing\"\n\nattr(adeg_f_pbmin$ANRIND, \"label\") <- \"Analysis Reference Range Indicator\"\nattr(adeg_f_pbmin$BNRIND, \"label\") <- \"Baseline Reference Range Indicator\"\n\n# Temporary solution for overarching column\nadeg_f_pbmin <- adeg_f_pbmin %>% mutate(min_label = \"Minimum Post-Baseline Assessment\")\n\n# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table() %>%\n split_cols_by(\"min_label\") %>%\n split_cols_by(\"ANRIND\") %>%\n split_rows_by(\"ARMCD\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adeg_f_pbmin$ARMCD)) %>%\n add_rowcounts() %>%\n summarize_vars(\"BNRIND\", denom = \"N_row\", .stats = \"count_fraction\") %>%\n append_varlabels(adeg_f_pbmin, c(\"BNRIND\"), indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adeg_f_pbmin\n)\n\nresult\n\nPlanned Arm Code Minimum Post-Baseline Assessment \n Baseline Reference Range Indicator LOW NORMAL HIGH Missing \n————————————————————————————————————————————————————————————————————————————————\nARM A (N=134) \n LOW 1 (0.7%) 5 (3.7%) 0 0 \n NORMAL 36 (26.9%) 83 (61.9%) 0 1 (0.7%)\n HIGH 2 (1.5%) 4 (3%) 0 0 \n Missing 1 (0.7%) 0 0 1 (0.7%)\nARM B (N=134) \n LOW 1 (0.7%) 9 (6.7%) 0 0 \n NORMAL 40 (29.9%) 75 (56%) 0 2 (1.5%)\n HIGH 1 (0.7%) 4 (3%) 0 0 \n Missing 1 (0.7%) 1 (0.7%) 0 0 \nARM C (N=132) \n LOW 4 (3%) 11 (8.3%) 0 0 \n NORMAL 31 (23.5%) 75 (56.8%) 0 0 \n HIGH 1 (0.8%) 8 (6.1%) 0 1 (0.8%)\n Missing 1 (0.8%) 0 0 0 \n\n\n\n\nFor the EGT03 template, data imputation should be avoided, and missing data explicit and accounted for, so the contingency table sum adds up to the group N. For illustration purpose, missing data are added to the example dataset.\n\nCodeset.seed(123, kind = \"Mersenne-Twister\")\n\nadeg_f_pbmax$BNRIND <- factor(\n adeg_f_pbmax$BNRIND,\n levels = c(\"LOW\", \"NORMAL\", \"HIGH\", \"Missing\"),\n labels = c(\"LOW\", \"NORMAL\", \"HIGH\", \"Missing\")\n)\nadeg_f_pbmax$ANRIND <- factor(\n adeg_f_pbmax$ANRIND,\n levels = c(\"LOW\", \"NORMAL\", \"HIGH\", \"Missing\"),\n labels = c(\"LOW\", \"NORMAL\", \"HIGH\", \"Missing\")\n)\n\nadeg_f_pbmax$BNRIND[sample(1:nrow(adeg_f_pbmax), size = 5)] <- \"Missing\"\nadeg_f_pbmax$ANRIND[sample(1:nrow(adeg_f_pbmax), size = 5)] <- \"Missing\"\n\nattr(adeg_f_pbmax$ANRIND, \"label\") <- \"Analysis Reference Range Indicator\"\nattr(adeg_f_pbmax$BNRIND, \"label\") <- \"Baseline Reference Range Indicator\"\n\n# Temporary solution for overarching column\nadeg_f_pbmax <- adeg_f_pbmax %>% mutate(max_label = \"Maximum Post-Baseline Assessment\")\n\n# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table() %>%\n split_cols_by(\"max_label\") %>%\n split_cols_by(\"ANRIND\") %>%\n split_rows_by(\"ARMCD\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adeg_f_pbmax$ARMCD)) %>%\n add_rowcounts() %>%\n summarize_vars(\"BNRIND\", denom = \"N_row\", .stats = \"count_fraction\") %>%\n append_varlabels(adeg_f_pbmax, c(\"BNRIND\"), indent = 1L)\n\nresult <- build_table(\n lyt = lyt,\n df = adeg_f_pbmax\n)\n\nresult\n\nPlanned Arm Code Maximum Post-Baseline Assessment \n Baseline Reference Range Indicator LOW NORMAL HIGH Missing \n————————————————————————————————————————————————————————————————————————————————\nARM A (N=134) \n LOW 0 2 (1.5%) 4 (3%) 0 \n NORMAL 0 88 (65.7%) 31 (23.1%) 1 (0.7%)\n HIGH 0 5 (3.7%) 1 (0.7%) 0 \n Missing 0 0 1 (0.7%) 1 (0.7%)\nARM B (N=134) \n LOW 0 8 (6%) 2 (1.5%) 0 \n NORMAL 0 76 (56.7%) 39 (29.1%) 2 (1.5%)\n HIGH 0 3 (2.2%) 2 (1.5%) 0 \n Missing 0 1 (0.7%) 1 (0.7%) 0 \nARM C (N=132) \n LOW 0 12 (9.1%) 3 (2.3%) 0 \n NORMAL 0 79 (59.8%) 27 (20.5%) 0 \n HIGH 0 5 (3.8%) 4 (3%) 1 (0.8%)\n Missing 0 0 1 (0.8%) 0 \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADEG\", adeg, code = 'ADEG <- synthetic_cdisc_dataset(\"latest\", \"adeg\")'),\n check = TRUE\n ),\n modules = modules(\n tm_t_shift_by_arm(\n label = \"Shift by Arm Table\",\n dataname = \"ADEG\",\n arm_var = choices_selected(\n variable_choices(adsl, subset = c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n paramcd = choices_selected(\n value_choices(adeg, \"PARAMCD\"),\n selected = \"HR\"\n ),\n visit_var = choices_selected(\n value_choices(adeg, \"AVISIT\"),\n selected = \"POST-BASELINE MINIMUM\"\n ),\n aval_var = choices_selected(\n variable_choices(adeg, subset = \"ANRIND\"),\n selected = \"ANRIND\", fixed = TRUE\n ),\n base_var = choices_selected(\n variable_choices(adeg, subset = \"BNRIND\"),\n selected = \"BNRIND\", fixed = TRUE\n ),\n treatment_flag_var = choices_selected(\n variable_choices(adeg, subset = \"ONTRTFL\"),\n selected = \"ONTRTFL\", fixed = TRUE\n ),\n treatment_flag = choices_selected(\n value_choices(adeg, \"ONTRTFL\"),\n selected = \"Y\", fixed = TRUE\n )\n )\n ),\n filter = list(ADSL = list(SAFFL = \"Y\"))\n)\n\n[INFO] 2023-08-04 15:15:09.5582 pid:8383 token:[] teal.modules.clinical Initializing tm_t_shift_by_arm\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/safety/egt03.lock'.\n\n\nDownload" }, { "objectID": "tables/lab-results/lbt04.html", "href": "tables/lab-results/lbt04.html", "title": "LBT04", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\nadlb_f <- adlb %>%\n filter(ONTRTFL == \"Y\", ANRIND != \"<Missing>\") %>%\n var_relabel(\n PARAM = \"Laboratory Test\",\n ANRIND = \"Direction of Abnormality\"\n )\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\"PARAM\",\n split_fun = drop_split_levels,\n label_pos = \"topleft\",\n split_label = obj_label(adlb_f$PARAM)\n ) %>%\n count_abnormal(\n var = \"ANRIND\",\n abnormal = list(Low = c(\"LOW\", \"LOW LOW\"), High = c(\"HIGH\", \"HIGH HIGH\")),\n exclude_base_abn = TRUE\n ) %>%\n append_varlabels(adlb_f, \"ANRIND\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = adlb_f, alt_counts_df = adsl)\n\nresult\n\nLaboratory Test A: Drug X B: Placebo C: Combination\n Direction of Abnormality (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement \n Low 57/113 (50.4%) 62/117 (53%) 61/123 (49.6%)\n High 0/134 0/134 0/132 \nC-Reactive Protein Measurement \n Low 78/119 (65.5%) 71/113 (62.8%) 62/112 (55.4%)\n High 69/114 (60.5%) 57/112 (50.9%) 58/115 (50.4%)\nImmunoglobulin A Measurement \n Low 0/134 0/134 0/132 \n High 64/119 (53.8%) 62/116 (53.4%) 62/113 (54.9%)\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n var_relabel(PARAM = \"Laboratory Test\", ANRIND = \"Direction of Abnormality\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADLB\", adlb, code = '\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n var_relabel(PARAM = \"Laboratory Test\", ANRIND = \"Direction of Abnormality\")'),\n check = TRUE\n ),\n modules = modules(\n tm_t_abnormality(\n label = \"Abnormality Table\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adlb, subset = c(\"LBCAT\", \"PARAM\", \"AVISIT\")),\n selected = c(\"LBCAT\", \"PARAM\"),\n keep_order = TRUE\n ),\n grade = choices_selected(\n choices = variable_choices(adlb, subset = \"ANRIND\"),\n selected = \"ANRIND\",\n fixed = TRUE\n ),\n abnormal = list(low = \"LOW\", high = \"HIGH\"),\n exclude_base_abn = TRUE\n )\n )\n)\n\n[INFO] 2023-08-04 14:59:11.0737 pid:8589 token:[] teal.modules.clinical Initializing tm_t_abnormality\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] dplyr_1.1.2 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt04.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\nadlb_f <- adlb %>%\n filter(ONTRTFL == \"Y\", ANRIND != \"<Missing>\") %>%\n var_relabel(\n PARAM = \"Laboratory Test\",\n ANRIND = \"Direction of Abnormality\"\n )\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\"PARAM\",\n split_fun = drop_split_levels,\n label_pos = \"topleft\",\n split_label = obj_label(adlb_f$PARAM)\n ) %>%\n count_abnormal(\n var = \"ANRIND\",\n abnormal = list(Low = c(\"LOW\", \"LOW LOW\"), High = c(\"HIGH\", \"HIGH HIGH\")),\n exclude_base_abn = TRUE\n ) %>%\n append_varlabels(adlb_f, \"ANRIND\", indent = 1L)\n\nresult <- build_table(lyt = lyt, df = adlb_f, alt_counts_df = adsl)\n\nresult\n\nLaboratory Test A: Drug X B: Placebo C: Combination\n Direction of Abnormality (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement \n Low 57/113 (50.4%) 62/117 (53%) 61/123 (49.6%)\n High 0/134 0/134 0/132 \nC-Reactive Protein Measurement \n Low 78/119 (65.5%) 71/113 (62.8%) 62/112 (55.4%)\n High 69/114 (60.5%) 57/112 (50.9%) 58/115 (50.4%)\nImmunoglobulin A Measurement \n Low 0/134 0/134 0/132 \n High 64/119 (53.8%) 62/116 (53.4%) 62/113 (54.9%)\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n var_relabel(PARAM = \"Laboratory Test\", ANRIND = \"Direction of Abnormality\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADLB\", adlb, code = '\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n var_relabel(PARAM = \"Laboratory Test\", ANRIND = \"Direction of Abnormality\")'),\n check = TRUE\n ),\n modules = modules(\n tm_t_abnormality(\n label = \"Abnormality Table\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adlb, subset = c(\"LBCAT\", \"PARAM\", \"AVISIT\")),\n selected = c(\"LBCAT\", \"PARAM\"),\n keep_order = TRUE\n ),\n grade = choices_selected(\n choices = variable_choices(adlb, subset = \"ANRIND\"),\n selected = \"ANRIND\",\n fixed = TRUE\n ),\n abnormal = list(low = \"LOW\", high = \"HIGH\"),\n exclude_base_abn = TRUE\n )\n )\n)\n\n[INFO] 2023-08-04 15:16:26.0409 pid:8593 token:[] teal.modules.clinical Initializing tm_t_abnormality\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] dplyr_1.1.2 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt04.lock'.\n\n\nDownload" }, { "objectID": "tables/lab-results/lbt01.html", "href": "tables/lab-results/lbt01.html", "title": "LBT01", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\nIn order to generate the LBT01 standard tabulation, the adlb dataset may be pre-processed so as to discriminate baseline from follow-up visits.\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb) %>%\n filter(ANL01FL == \"Y\")\n\n# For illustration purpose, the example focuses on \"Alanine Aminotransferase\n# Measurement\" starting from baseline, while excluding visit at week 1 for\n# subjects who were prescribed a placebo.\nadlb_f <- adlb %>%\n dplyr::filter(\n PARAM == \"Alanine Aminotransferase Measurement\" &\n !(ACTARM == \"B: Placebo\" & AVISIT == \"WEEK 1 DAY 8\") &\n AVISIT != \"SCREENING\"\n )\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nafun <- function(x, .var, .spl_context, ...) {\n n_fun <- sum(!is.na(x), na.rm = TRUE)\n if (n_fun == 0) {\n mean_sd_fun <- c(NA, NA)\n median_fun <- NA\n min_max_fun <- c(NA, NA)\n } else {\n mean_sd_fun <- c(mean(x, na.rm = TRUE), sd(x, na.rm = TRUE))\n median_fun <- median(x, na.rm = TRUE)\n min_max_fun <- c(min(x), max(x))\n }\n is_chg <- .var == \"CHG\"\n is_baseline <- .spl_context$value[which(.spl_context$split == \"AVISIT\")] == \"BASELINE\"\n if (is_baseline && is_chg) n_fun <- mean_sd_fun <- median_fun <- min_max_fun <- NULL\n\n in_rows(\n \"n\" = n_fun,\n \"Mean (SD)\" = mean_sd_fun,\n \"Median\" = median_fun,\n \"Min - Max\" = min_max_fun,\n .formats = list(\"n\" = \"xx\", \"Mean (SD)\" = \"xx.xx (xx.xx)\", \"Median\" = \"xx.xx\", \"Min - Max\" = \"xx.xx - xx.xx\"),\n .format_na_strs = list(\"n\" = \"NE\", \"Mean (SD)\" = \"NE (NE)\", \"Median\" = \"NE\", \"Min - Max\" = \"NE - NE\")\n )\n}\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\"PARAM\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adlb_f$PARAM)) %>%\n split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adlb_f$AVISIT)) %>%\n split_cols_by_multivar(\n vars = c(\"AVAL\", \"CHG\"),\n varlabels = c(\"Value at Visit\", \"Change from\\nBaseline\")\n ) %>%\n analyze_colvars(afun = afun)\n\nresult <- build_table(lyt, adlb_f)\nresult\n\nParameter A: Drug X B: Placebo C: Combination \n Analysis Visit Change from Change from Change from \n Value at Visit Baseline Value at Visit Baseline Value at Visit Baseline \n (N=804) (N=804) (N=670) (N=670) (N=792) (N=792) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement \n BASELINE \n n 134 134 132 \n Mean (SD) 17.74 (9.93) 18.71 (9.83) 19.46 (9.08) \n Median 17.46 18.19 18.97 \n Min - Max 0.00 - 44.06 1.48 - 54.40 0.57 - 39.81 \n WEEK 1 DAY 8 \n n 134 134 0 0 132 132 \n Mean (SD) 16.75 (9.08) -0.99 (13.49) NE (NE) NE (NE) 19.61 (9.27) 0.14 (12.85) \n Median 16.02 -1.28 NE NE 19.00 0.06 \n Min - Max 0.05 - 36.30 -31.31 - 27.89 NE - NE NE - NE 0.91 - 44.75 -32.45 - 38.85\n WEEK 2 DAY 15 \n n 134 134 134 134 132 132 \n Mean (SD) 17.82 (9.60) 0.08 (14.15) 18.82 (9.73) 0.11 (14.45) 16.55 (8.15) -2.92 (12.64) \n Median 15.92 0.28 17.96 -0.93 17.02 -1.11 \n Min - Max 0.40 - 44.33 -32.89 - 40.55 0.18 - 44.34 -45.93 - 29.85 0.35 - 34.69 -28.36 - 23.98\n WEEK 3 DAY 22 \n n 134 134 134 134 132 132 \n Mean (SD) 18.37 (9.30) 0.63 (13.85) 17.65 (9.58) -1.06 (13.58) 16.75 (9.54) -2.71 (13.22) \n Median 18.11 1.13 17.68 -0.49 15.10 -2.66 \n Min - Max 0.59 - 41.73 -40.09 - 31.24 0.02 - 38.61 -46.30 - 31.38 0.48 - 39.23 -30.63 - 26.51\n WEEK 4 DAY 29 \n n 134 134 134 134 132 132 \n Mean (SD) 19.17 (10.95) 1.44 (15.39) 17.22 (10.64) -1.48 (15.20) 17.92 (9.32) -1.54 (12.63) \n Median 17.41 0.88 15.88 -2.96 17.71 -1.53 \n Min - Max 0.93 - 54.24 -32.93 - 46.98 0.39 - 47.96 -41.45 - 43.08 0.25 - 41.27 -30.33 - 27.99\n WEEK 5 DAY 36 \n n 134 134 134 134 132 132 \n Mean (SD) 19.22 (9.47) 1.48 (14.49) 18.01 (9.92) -0.69 (14.65) 18.51 (9.43) -0.95 (12.92) \n Median 19.80 2.31 18.28 1.82 19.26 -2.48 \n Min - Max 0.01 - 43.42 -40.08 - 30.07 0.11 - 40.64 -47.60 - 26.04 0.02 - 37.46 -29.78 - 25.00\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\",\n adsl,\n code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'\n ),\n cdisc_dataset(\"ADLB\",\n adlb,\n code = 'ADLB <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adlb\"))'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"Laboratory Test Results and Change from Baseline by Visit\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adlb, c(\"PARAM\", \"AVISIT\")),\n selected = c(\"AVISIT\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(adlb, c(\"AVAL\", \"CHG\")),\n selected = c(\"AVAL\", \"CHG\")\n ),\n useNA = \"ifany\",\n paramcd = choices_selected(\n choices = value_choices(adlb, \"PARAMCD\", \"PARAM\"),\n selected = \"ALT\"\n ),\n parallel_vars = TRUE\n )\n ),\n filter = list(ADLB = list(AVAL = list()))\n)\n\n[INFO] 2023-08-04 14:59:55.2848 pid:8745 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\nWarning: The 'plotly_relayout' event tied a source ID of\n'teal-main_ui-filter_panel-active-ADLB-filter-ADLB_AVAL-inputs-histogram_plot'\nis not registered. In order to obtain this event data, please add\n`event_register(p, 'plotly_relayout')` to the plot (`p`) that you wish to\nobtain event data from.\n\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[13] ellipsis_0.3.2 fontawesome_0.5.1 utf8_1.2.3 \n[16] promises_1.2.0.1 rmarkdown_2.23 ps_1.7.5 \n[19] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[22] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[25] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[31] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[34] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[37] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[40] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[43] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[46] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[49] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[52] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[55] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[58] plotly_4.10.2 generics_0.1.3 ggplot2_3.4.2 \n[61] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[64] glue_1.6.2 emmeans_1.8.7 lazyeval_0.2.2 \n[67] tools_4.3.1 data.table_1.14.8 webshot_0.5.5 \n[70] forcats_1.0.0 mvtnorm_1.2-2 grid_4.3.1 \n[73] tidyr_1.3.0 rbibutils_2.2.13 colorspace_2.1-0 \n[76] nlme_3.1-162 cli_3.6.1 fansi_1.0.4 \n[79] viridisLite_0.4.2 geepack_1.3.9 gtable_0.3.3 \n[82] R.methodsS3_1.8.2 sass_0.4.7 digest_0.6.33 \n[85] htmlwidgets_1.6.2 memoise_2.0.1 htmltools_0.5.5 \n[88] R.oo_1.25.0 lifecycle_1.0.3 httr_1.4.6 \n[91] shinyWidgets_0.7.6 mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\nIn order to generate the LBT01 standard tabulation, the adlb dataset may be pre-processed so as to discriminate baseline from follow-up visits.\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb) %>%\n filter(ANL01FL == \"Y\")\n\n# For illustration purpose, the example focuses on \"Alanine Aminotransferase\n# Measurement\" starting from baseline, while excluding visit at week 1 for\n# subjects who were prescribed a placebo.\nadlb_f <- adlb %>%\n dplyr::filter(\n PARAM == \"Alanine Aminotransferase Measurement\" &\n !(ACTARM == \"B: Placebo\" & AVISIT == \"WEEK 1 DAY 8\") &\n AVISIT != \"SCREENING\"\n )\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nafun <- function(x, .var, .spl_context, ...) {\n n_fun <- sum(!is.na(x), na.rm = TRUE)\n if (n_fun == 0) {\n mean_sd_fun <- c(NA, NA)\n median_fun <- NA\n min_max_fun <- c(NA, NA)\n } else {\n mean_sd_fun <- c(mean(x, na.rm = TRUE), sd(x, na.rm = TRUE))\n median_fun <- median(x, na.rm = TRUE)\n min_max_fun <- c(min(x), max(x))\n }\n is_chg <- .var == \"CHG\"\n is_baseline <- .spl_context$value[which(.spl_context$split == \"AVISIT\")] == \"BASELINE\"\n if (is_baseline && is_chg) n_fun <- mean_sd_fun <- median_fun <- min_max_fun <- NULL\n\n in_rows(\n \"n\" = n_fun,\n \"Mean (SD)\" = mean_sd_fun,\n \"Median\" = median_fun,\n \"Min - Max\" = min_max_fun,\n .formats = list(\"n\" = \"xx\", \"Mean (SD)\" = \"xx.xx (xx.xx)\", \"Median\" = \"xx.xx\", \"Min - Max\" = \"xx.xx - xx.xx\"),\n .format_na_strs = list(\"n\" = \"NE\", \"Mean (SD)\" = \"NE (NE)\", \"Median\" = \"NE\", \"Min - Max\" = \"NE - NE\")\n )\n}\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\"PARAM\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adlb_f$PARAM)) %>%\n split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adlb_f$AVISIT)) %>%\n split_cols_by_multivar(\n vars = c(\"AVAL\", \"CHG\"),\n varlabels = c(\"Value at Visit\", \"Change from\\nBaseline\")\n ) %>%\n analyze_colvars(afun = afun)\n\nresult <- build_table(lyt, adlb_f)\nresult\n\nParameter A: Drug X B: Placebo C: Combination \n Analysis Visit Change from Change from Change from \n Value at Visit Baseline Value at Visit Baseline Value at Visit Baseline \n (N=804) (N=804) (N=670) (N=670) (N=792) (N=792) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement \n BASELINE \n n 134 134 132 \n Mean (SD) 17.74 (9.93) 18.71 (9.83) 19.46 (9.08) \n Median 17.46 18.19 18.97 \n Min - Max 0.00 - 44.06 1.48 - 54.40 0.57 - 39.81 \n WEEK 1 DAY 8 \n n 134 134 0 0 132 132 \n Mean (SD) 16.75 (9.08) -0.99 (13.49) NE (NE) NE (NE) 19.61 (9.27) 0.14 (12.85) \n Median 16.02 -1.28 NE NE 19.00 0.06 \n Min - Max 0.05 - 36.30 -31.31 - 27.89 NE - NE NE - NE 0.91 - 44.75 -32.45 - 38.85\n WEEK 2 DAY 15 \n n 134 134 134 134 132 132 \n Mean (SD) 17.82 (9.60) 0.08 (14.15) 18.82 (9.73) 0.11 (14.45) 16.55 (8.15) -2.92 (12.64) \n Median 15.92 0.28 17.96 -0.93 17.02 -1.11 \n Min - Max 0.40 - 44.33 -32.89 - 40.55 0.18 - 44.34 -45.93 - 29.85 0.35 - 34.69 -28.36 - 23.98\n WEEK 3 DAY 22 \n n 134 134 134 134 132 132 \n Mean (SD) 18.37 (9.30) 0.63 (13.85) 17.65 (9.58) -1.06 (13.58) 16.75 (9.54) -2.71 (13.22) \n Median 18.11 1.13 17.68 -0.49 15.10 -2.66 \n Min - Max 0.59 - 41.73 -40.09 - 31.24 0.02 - 38.61 -46.30 - 31.38 0.48 - 39.23 -30.63 - 26.51\n WEEK 4 DAY 29 \n n 134 134 134 134 132 132 \n Mean (SD) 19.17 (10.95) 1.44 (15.39) 17.22 (10.64) -1.48 (15.20) 17.92 (9.32) -1.54 (12.63) \n Median 17.41 0.88 15.88 -2.96 17.71 -1.53 \n Min - Max 0.93 - 54.24 -32.93 - 46.98 0.39 - 47.96 -41.45 - 43.08 0.25 - 41.27 -30.33 - 27.99\n WEEK 5 DAY 36 \n n 134 134 134 134 132 132 \n Mean (SD) 19.22 (9.47) 1.48 (14.49) 18.01 (9.92) -0.69 (14.65) 18.51 (9.43) -0.95 (12.92) \n Median 19.80 2.31 18.28 1.82 19.26 -2.48 \n Min - Max 0.01 - 43.42 -40.08 - 30.07 0.11 - 40.64 -47.60 - 26.04 0.02 - 37.46 -29.78 - 25.00\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\",\n adsl,\n code = 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))'\n ),\n cdisc_dataset(\"ADLB\",\n adlb,\n code = 'ADLB <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adlb\"))'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"Laboratory Test Results and Change from Baseline by Visit\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adlb, c(\"PARAM\", \"AVISIT\")),\n selected = c(\"AVISIT\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(adlb, c(\"AVAL\", \"CHG\")),\n selected = c(\"AVAL\", \"CHG\")\n ),\n useNA = \"ifany\",\n paramcd = choices_selected(\n choices = value_choices(adlb, \"PARAMCD\", \"PARAM\"),\n selected = \"ALT\"\n ),\n parallel_vars = TRUE\n )\n ),\n filter = list(ADLB = list(AVAL = list()))\n)\n\n[INFO] 2023-08-04 15:17:13.5111 pid:8749 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\nWarning: The 'plotly_relayout' event tied a source ID of\n'teal-main_ui-filter_panel-active-ADLB-filter-ADLB_AVAL-inputs-histogram_plot'\nis not registered. In order to obtain this event data, please add\n`event_register(p, 'plotly_relayout')` to the plot (`p`) that you wish to\nobtain event data from.\n\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[13] ellipsis_0.3.2 fontawesome_0.5.1 utf8_1.2.3 \n[16] promises_1.2.0.1 rmarkdown_2.23 ps_1.7.5 \n[19] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[22] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[25] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[31] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[34] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[37] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[40] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[43] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[46] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[49] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[52] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[55] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[58] plotly_4.10.2 generics_0.1.3 ggplot2_3.4.2 \n[61] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[64] glue_1.6.2 emmeans_1.8.7 lazyeval_0.2.2 \n[67] tools_4.3.1 data.table_1.14.8 webshot_0.5.5 \n[70] forcats_1.0.0 mvtnorm_1.2-2 grid_4.3.1 \n[73] tidyr_1.3.0 rbibutils_2.2.13 colorspace_2.1-0 \n[76] nlme_3.1-162 cli_3.6.1 fansi_1.0.4 \n[79] viridisLite_0.4.2 geepack_1.3.9 gtable_0.3.3 \n[82] R.methodsS3_1.8.2 sass_0.4.7 digest_0.6.33 \n[85] htmlwidgets_1.6.2 memoise_2.0.1 htmltools_0.5.5 \n[88] R.oo_1.25.0 lifecycle_1.0.3 httr_1.4.6 \n[91] shinyWidgets_0.7.6 mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt01.lock'.\n\n\nDownload" }, { "objectID": "tables/lab-results/lbt11.html", "href": "tables/lab-results/lbt11.html", "title": "LBT11", "section": "", - "text": "Data Setup\nTime-To-Event Summary\nTime-To-Event Summary Selecting Sections to Display\nTime-To-Event Summary with Stratified Analysis\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadsaftte <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadsaftte <- df_explicit_na(adsaftte)\n\nadsl_safl <- dplyr::filter(adsl, .data$SAFFL == \"Y\")\n\nanl <- adsaftte %>%\n dplyr::filter(\n SAFFL == \"Y\",\n PARAMCD == \"HYSTTEUL\"\n ) %>%\n dplyr::mutate(\n AVAL = .data$AVAL * dplyr::case_when( # convert to days, if possible\n .data$AVALU == \"WEEKS\" ~ 7,\n .data$AVALU == \"MONTHS\" ~ 30.4375,\n .data$AVALU == \"YEARS\" ~ 365,\n TRUE ~ 1\n ),\n AVALU = factor(dplyr::case_when(\n .data$AVALU %in% c(\"WEEKS\", \"MONTHS\", \"YEARS\") ~ factor(\"DAYS\"),\n TRUE ~ .data$AVALU\n ), levels = \"DAYS\"),\n is_event = CNSR == 0, # this will be a LLT event\n event_grp = factor(\n dplyr::case_when(\n CNSR == 0 ~ \"Patients with LLT event (%)\",\n CNSR == 1 ~ \"Patients without LLT event (%)\"\n ),\n levels = c(\n \"Patients with LLT event (%)\",\n \"Patients without LLT event (%)\"\n )\n )\n )\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARMCD\", ref_group = \"ARM A\") %>%\n count_occurrences(vars = \"event_grp\") %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = paste0(\"Time to 1st LLT Event (\", levels(anl$AVALU), \")\"),\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = \"Unstratified Analysis\",\n control = control_coxph(pval_method = \"log-rank\"),\n table_names = \"coxph_unstratified\"\n )\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_safl)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————\nPatients with LLT event (%) 20 (14.9%) 9 (6.7%) 9 (6.8%) \nPatients without LLT event (%) 114 (85.1%) 125 (93.3%) 123 (93.2%) \nTime to 1st LLT Event (DAYS) \n Median NA NA 728.0 \n 95% CI NA (724.0, NA) NA \n 25% and 75%-ile 618.0, NA 724.0, NA 728.0, 728.0 \n Range (censored) 1.0 to 731.0 1.0 to 728.0 1.0 to 722.0 \n Range (event) 34.0 to 666.0 139.0 to 724.0 10.0 to 728.0\nUnstratified Analysis \n p-value (log-rank) 0.0295 0.1687 \n Hazard Ratio 0.43 0.58 \n 95% CI (0.19, 0.94) (0.26, 1.27) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARMCD\", ref_group = \"ARM A\") %>%\n count_occurrences(vars = \"event_grp\") %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = paste0(\"Time to 1st LLT Event (\", levels(anl$AVALU), \")\"),\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n )\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_safl)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————\nPatients with LLT event (%) 20 (14.9%) 9 (6.7%) 9 (6.8%) \nPatients without LLT event (%) 114 (85.1%) 125 (93.3%) 123 (93.2%) \nTime to 1st LLT Event (DAYS) \n Median NA NA 728.0 \n 95% CI NA (724.0, NA) NA \n 25% and 75%-ile 618.0, NA 724.0, NA 728.0, 728.0 \n Range (censored) 1.0 to 731.0 1.0 to 728.0 1.0 to 722.0 \n Range (event) 34.0 to 666.0 139.0 to 724.0 10.0 to 728.0\n\n\n\n\n\nCodestrata <- c(\"RACE\", \"SEX\")\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARMCD\", ref_group = \"ARM A\") %>%\n count_occurrences(vars = \"event_grp\") %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = paste0(\"Time to 1st LLT Event (\", levels(anl$AVALU), \")\"),\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = \"Unstratified Analysis\",\n control = control_coxph(pval_method = \"log-rank\"),\n table_names = \"coxph_unstratified\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = paste0(\"Stratified By: \", paste(strata, collapse = \", \")),\n strat = strata,\n table_names = \"coxph_stratified\"\n )\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_safl)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————\nPatients with LLT event (%) 20 (14.9%) 9 (6.7%) 9 (6.8%) \nPatients without LLT event (%) 114 (85.1%) 125 (93.3%) 123 (93.2%) \nTime to 1st LLT Event (DAYS) \n Median NA NA 728.0 \n 95% CI NA (724.0, NA) NA \n 25% and 75%-ile 618.0, NA 724.0, NA 728.0, 728.0 \n Range (censored) 1.0 to 731.0 1.0 to 728.0 1.0 to 722.0 \n Range (event) 34.0 to 666.0 139.0 to 724.0 10.0 to 728.0\nUnstratified Analysis \n p-value (log-rank) 0.0295 0.1687 \n Hazard Ratio 0.43 0.58 \n 95% CI (0.19, 0.94) (0.26, 1.27) \nStratified By: RACE, SEX \n p-value (log-rank) 0.0858 0.1605 \n Hazard Ratio 0.51 0.57 \n 95% CI (0.23, 1.12) (0.26, 1.26) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadsaftte <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadsaftte <- df_explicit_na(adsaftte)\n\nadsl <- dplyr::filter(adsl, .data$SAFFL == \"Y\")\nadsaftte <- dplyr::filter(adsaftte, .data$SAFFL == \"Y\")\n\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\n \"ADSL\",\n adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% df_explicit_na() %>% dplyr::filter(.data$SAFFL == \"Y\")'\n ),\n cdisc_dataset(\n \"ADSAFTTE\",\n adsaftte,\n keys = c(\"STUDYID\", \"USUBJID\", \"PARAMCD\"),\n code = 'ADSAFTTE <- synthetic_cdisc_dataset(\"latest\", \"adaette\") %>% df_explicit_na() %>% dplyr::filter(.data$SAFFL == \"Y\")'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_tte(\n label = \"Time To LLT Event Table\",\n dataname = \"ADSAFTTE\",\n arm_var = choices_selected(\n variable_choices(adsl, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")),\n \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(adsaftte, \"PARAMCD\", \"PARAM\"),\n \"HYSTTEUL\"\n ),\n strata_var = choices_selected(\n variable_choices(adsl, c(\"RACE\", \"SEX\")),\n c(\"RACE\", \"SEX\")\n ),\n time_points = choices_selected(0, NULL),\n event_desc_var = choices_selected(\"EVNTDESC\", \"EVNTDESC\", fixed = TRUE)\n )\n )\n)\n\n[INFO] 2023-08-04 15:00:39.9085 pid:8903 token:[] teal.modules.clinical Initializing tm_t_tte\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt11.lock'.\n\n\nDownload" + "text": "Data Setup\nTime-To-Event Summary\nTime-To-Event Summary Selecting Sections to Display\nTime-To-Event Summary with Stratified Analysis\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadsaftte <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadsaftte <- df_explicit_na(adsaftte)\n\nadsl_safl <- dplyr::filter(adsl, .data$SAFFL == \"Y\")\n\nanl <- adsaftte %>%\n dplyr::filter(\n SAFFL == \"Y\",\n PARAMCD == \"HYSTTEUL\"\n ) %>%\n dplyr::mutate(\n AVAL = .data$AVAL * dplyr::case_when( # convert to days, if possible\n .data$AVALU == \"WEEKS\" ~ 7,\n .data$AVALU == \"MONTHS\" ~ 30.4375,\n .data$AVALU == \"YEARS\" ~ 365,\n TRUE ~ 1\n ),\n AVALU = factor(dplyr::case_when(\n .data$AVALU %in% c(\"WEEKS\", \"MONTHS\", \"YEARS\") ~ factor(\"DAYS\"),\n TRUE ~ .data$AVALU\n ), levels = \"DAYS\"),\n is_event = CNSR == 0, # this will be a LLT event\n event_grp = factor(\n dplyr::case_when(\n CNSR == 0 ~ \"Patients with LLT event (%)\",\n CNSR == 1 ~ \"Patients without LLT event (%)\"\n ),\n levels = c(\n \"Patients with LLT event (%)\",\n \"Patients without LLT event (%)\"\n )\n )\n )\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARMCD\", ref_group = \"ARM A\") %>%\n count_occurrences(vars = \"event_grp\") %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = paste0(\"Time to 1st LLT Event (\", levels(anl$AVALU), \")\"),\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = \"Unstratified Analysis\",\n control = control_coxph(pval_method = \"log-rank\"),\n table_names = \"coxph_unstratified\"\n )\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_safl)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————\nPatients with LLT event (%) 20 (14.9%) 9 (6.7%) 9 (6.8%) \nPatients without LLT event (%) 114 (85.1%) 125 (93.3%) 123 (93.2%) \nTime to 1st LLT Event (DAYS) \n Median NA NA 728.0 \n 95% CI NA (724.0, NA) NA \n 25% and 75%-ile 618.0, NA 724.0, NA 728.0, 728.0 \n Range (censored) 1.0 to 731.0 1.0 to 728.0 1.0 to 722.0 \n Range (event) 34.0 to 666.0 139.0 to 724.0 10.0 to 728.0\nUnstratified Analysis \n p-value (log-rank) 0.0295 0.1687 \n Hazard Ratio 0.43 0.58 \n 95% CI (0.19, 0.94) (0.26, 1.27) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARMCD\", ref_group = \"ARM A\") %>%\n count_occurrences(vars = \"event_grp\") %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = paste0(\"Time to 1st LLT Event (\", levels(anl$AVALU), \")\"),\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n )\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_safl)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————\nPatients with LLT event (%) 20 (14.9%) 9 (6.7%) 9 (6.8%) \nPatients without LLT event (%) 114 (85.1%) 125 (93.3%) 123 (93.2%) \nTime to 1st LLT Event (DAYS) \n Median NA NA 728.0 \n 95% CI NA (724.0, NA) NA \n 25% and 75%-ile 618.0, NA 724.0, NA 728.0, 728.0 \n Range (censored) 1.0 to 731.0 1.0 to 728.0 1.0 to 722.0 \n Range (event) 34.0 to 666.0 139.0 to 724.0 10.0 to 728.0\n\n\n\n\n\nCodestrata <- c(\"RACE\", \"SEX\")\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARMCD\", ref_group = \"ARM A\") %>%\n count_occurrences(vars = \"event_grp\") %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = paste0(\"Time to 1st LLT Event (\", levels(anl$AVALU), \")\"),\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = \"Unstratified Analysis\",\n control = control_coxph(pval_method = \"log-rank\"),\n table_names = \"coxph_unstratified\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = paste0(\"Stratified By: \", paste(strata, collapse = \", \")),\n strat = strata,\n table_names = \"coxph_stratified\"\n )\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_safl)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————\nPatients with LLT event (%) 20 (14.9%) 9 (6.7%) 9 (6.8%) \nPatients without LLT event (%) 114 (85.1%) 125 (93.3%) 123 (93.2%) \nTime to 1st LLT Event (DAYS) \n Median NA NA 728.0 \n 95% CI NA (724.0, NA) NA \n 25% and 75%-ile 618.0, NA 724.0, NA 728.0, 728.0 \n Range (censored) 1.0 to 731.0 1.0 to 728.0 1.0 to 722.0 \n Range (event) 34.0 to 666.0 139.0 to 724.0 10.0 to 728.0\nUnstratified Analysis \n p-value (log-rank) 0.0295 0.1687 \n Hazard Ratio 0.43 0.58 \n 95% CI (0.19, 0.94) (0.26, 1.27) \nStratified By: RACE, SEX \n p-value (log-rank) 0.0858 0.1605 \n Hazard Ratio 0.51 0.57 \n 95% CI (0.23, 1.12) (0.26, 1.26) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadsaftte <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadsaftte <- df_explicit_na(adsaftte)\n\nadsl <- dplyr::filter(adsl, .data$SAFFL == \"Y\")\nadsaftte <- dplyr::filter(adsaftte, .data$SAFFL == \"Y\")\n\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\n \"ADSL\",\n adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% df_explicit_na() %>% dplyr::filter(.data$SAFFL == \"Y\")'\n ),\n cdisc_dataset(\n \"ADSAFTTE\",\n adsaftte,\n keys = c(\"STUDYID\", \"USUBJID\", \"PARAMCD\"),\n code = 'ADSAFTTE <- synthetic_cdisc_dataset(\"latest\", \"adaette\") %>% df_explicit_na() %>% dplyr::filter(.data$SAFFL == \"Y\")'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_tte(\n label = \"Time To LLT Event Table\",\n dataname = \"ADSAFTTE\",\n arm_var = choices_selected(\n variable_choices(adsl, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")),\n \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(adsaftte, \"PARAMCD\", \"PARAM\"),\n \"HYSTTEUL\"\n ),\n strata_var = choices_selected(\n variable_choices(adsl, c(\"RACE\", \"SEX\")),\n c(\"RACE\", \"SEX\")\n ),\n time_points = choices_selected(0, NULL),\n event_desc_var = choices_selected(\"EVNTDESC\", \"EVNTDESC\", fixed = TRUE)\n )\n )\n)\n\n[INFO] 2023-08-04 15:18:01.5586 pid:8907 token:[] teal.modules.clinical Initializing tm_t_tte\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt11.lock'.\n\n\nDownload" }, { "objectID": "tables/lab-results/lbt12_bl.html", @@ -823,21 +823,21 @@ "href": "tables/lab-results/lbt11_bl.html", "title": "LBT11_BL", "section": "", - "text": "Data Setup\nTime-To-Event Summary\nTime-To-Event Summary Selecting Sections to Display\nTime-To-Event Summary with Stratified Analysis\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadsaftte <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadsaftte <- df_explicit_na(adsaftte)\n\nadsl_safl <- dplyr::filter(adsl, .data$SAFFL == \"Y\")\n\nanl <- adsaftte %>%\n dplyr::filter(\n SAFFL == \"Y\",\n PARAMCD == \"HYSTTEBL\"\n ) %>%\n dplyr::mutate(\n AVAL = .data$AVAL * dplyr::case_when( # convert to days, if possible\n .data$AVALU == \"WEEKS\" ~ 7,\n .data$AVALU == \"MONTHS\" ~ 30.4375,\n .data$AVALU == \"YEARS\" ~ 365,\n TRUE ~ 1\n ),\n AVALU = factor(dplyr::case_when(\n .data$AVALU %in% c(\"WEEKS\", \"MONTHS\", \"YEARS\") ~ factor(\"DAYS\"),\n TRUE ~ .data$AVALU\n ), levels = \"DAYS\"),\n is_event = CNSR == 0, # this will be a LLT event\n event_grp = factor(\n dplyr::case_when(\n CNSR == 0 ~ \"Patients with LLT event (%)\",\n CNSR == 1 ~ \"Patients without LLT event (%)\"\n ),\n levels = c(\n \"Patients with LLT event (%)\",\n \"Patients without LLT event (%)\"\n )\n )\n )\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARMCD\", ref_group = \"ARM A\") %>%\n count_occurrences(vars = \"event_grp\") %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = paste0(\"Time to 1st LLT Event (\", levels(anl$AVALU), \")\"),\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = \"Unstratified Analysis\",\n control = control_coxph(pval_method = \"log-rank\"),\n table_names = \"coxph_unstratified\"\n )\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_safl)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————\nPatients with LLT event (%) 14 (10.4%) 18 (13.4%) 15 (11.4%) \nPatients without LLT event (%) 120 (89.6%) 116 (86.6%) 117 (88.6%) \nTime to 1st LLT Event (DAYS) \n Median NA NA 721.0 \n 95% CI NA (681.0, NA) (691.0, NA) \n 25% and 75%-ile 608.0, NA 558.0, NA 644.0, NA \n Range (censored) 1.0 to 728.0 1.0 to 726.0 1.0 to 724.0 \n Range (event) 23.0 to 608.0 36.0 to 681.0 61.0 to 721.0\nUnstratified Analysis \n p-value (log-rank) 0.5013 0.6413 \n Hazard Ratio 1.27 0.84 \n 95% CI (0.63, 2.56) (0.40, 1.75) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARMCD\", ref_group = \"ARM A\") %>%\n count_occurrences(vars = \"event_grp\") %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = paste0(\"Time to 1st LLT Event (\", levels(anl$AVALU), \")\"),\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n )\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_safl)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————\nPatients with LLT event (%) 14 (10.4%) 18 (13.4%) 15 (11.4%) \nPatients without LLT event (%) 120 (89.6%) 116 (86.6%) 117 (88.6%) \nTime to 1st LLT Event (DAYS) \n Median NA NA 721.0 \n 95% CI NA (681.0, NA) (691.0, NA) \n 25% and 75%-ile 608.0, NA 558.0, NA 644.0, NA \n Range (censored) 1.0 to 728.0 1.0 to 726.0 1.0 to 724.0 \n Range (event) 23.0 to 608.0 36.0 to 681.0 61.0 to 721.0\n\n\n\n\n\nCodestrata <- c(\"RACE\", \"SEX\")\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARMCD\", ref_group = \"ARM A\") %>%\n count_occurrences(vars = \"event_grp\") %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = paste0(\"Time to 1st LLT Event (\", levels(anl$AVALU), \")\"),\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = \"Unstratified Analysis\",\n control = control_coxph(pval_method = \"log-rank\"),\n table_names = \"coxph_unstratified\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = paste0(\"Stratified By: \", paste(strata, collapse = \", \")),\n strat = strata,\n table_names = \"coxph_stratified\"\n )\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_safl)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————\nPatients with LLT event (%) 14 (10.4%) 18 (13.4%) 15 (11.4%) \nPatients without LLT event (%) 120 (89.6%) 116 (86.6%) 117 (88.6%) \nTime to 1st LLT Event (DAYS) \n Median NA NA 721.0 \n 95% CI NA (681.0, NA) (691.0, NA) \n 25% and 75%-ile 608.0, NA 558.0, NA 644.0, NA \n Range (censored) 1.0 to 728.0 1.0 to 726.0 1.0 to 724.0 \n Range (event) 23.0 to 608.0 36.0 to 681.0 61.0 to 721.0\nUnstratified Analysis \n p-value (log-rank) 0.5013 0.6413 \n Hazard Ratio 1.27 0.84 \n 95% CI (0.63, 2.56) (0.40, 1.75) \nStratified By: RACE, SEX \n p-value (log-rank) 0.3886 0.7970 \n Hazard Ratio 1.39 0.91 \n 95% CI (0.65, 2.97) (0.43, 1.93) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadsaftte <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadsaftte <- df_explicit_na(adsaftte)\n\nadsl <- dplyr::filter(adsl, .data$SAFFL == \"Y\")\nadsaftte <- dplyr::filter(adsaftte, .data$SAFFL == \"Y\")\n\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\n \"ADSL\",\n adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% df_explicit_na() %>% dplyr::filter(.data$SAFFL == \"Y\")'\n ),\n cdisc_dataset(\n \"ADSAFTTE\",\n adsaftte,\n keys = c(\"STUDYID\", \"USUBJID\", \"PARAMCD\"),\n code = 'ADSAFTTE <- synthetic_cdisc_dataset(\"latest\", \"adaette\") %>% df_explicit_na() %>% dplyr::filter(.data$SAFFL == \"Y\")'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_tte(\n label = \"Time To LLT Event Table\",\n dataname = \"ADSAFTTE\",\n arm_var = choices_selected(\n variable_choices(adsl, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")),\n \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(adsaftte, \"PARAMCD\", \"PARAM\"),\n \"HYSTTEBL\"\n ),\n strata_var = choices_selected(\n variable_choices(adsl, c(\"RACE\", \"SEX\")),\n c(\"RACE\", \"SEX\")\n ),\n time_points = choices_selected(0, NULL),\n event_desc_var = choices_selected(\"EVNTDESC\", \"EVNTDESC\", fixed = TRUE)\n )\n )\n)\n\n[INFO] 2023-08-04 15:01:38.4114 pid:9165 token:[] teal.modules.clinical Initializing tm_t_tte\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt11_bl.lock'.\n\n\nDownload" + "text": "Data Setup\nTime-To-Event Summary\nTime-To-Event Summary Selecting Sections to Display\nTime-To-Event Summary with Stratified Analysis\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadsaftte <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadsaftte <- df_explicit_na(adsaftte)\n\nadsl_safl <- dplyr::filter(adsl, .data$SAFFL == \"Y\")\n\nanl <- adsaftte %>%\n dplyr::filter(\n SAFFL == \"Y\",\n PARAMCD == \"HYSTTEBL\"\n ) %>%\n dplyr::mutate(\n AVAL = .data$AVAL * dplyr::case_when( # convert to days, if possible\n .data$AVALU == \"WEEKS\" ~ 7,\n .data$AVALU == \"MONTHS\" ~ 30.4375,\n .data$AVALU == \"YEARS\" ~ 365,\n TRUE ~ 1\n ),\n AVALU = factor(dplyr::case_when(\n .data$AVALU %in% c(\"WEEKS\", \"MONTHS\", \"YEARS\") ~ factor(\"DAYS\"),\n TRUE ~ .data$AVALU\n ), levels = \"DAYS\"),\n is_event = CNSR == 0, # this will be a LLT event\n event_grp = factor(\n dplyr::case_when(\n CNSR == 0 ~ \"Patients with LLT event (%)\",\n CNSR == 1 ~ \"Patients without LLT event (%)\"\n ),\n levels = c(\n \"Patients with LLT event (%)\",\n \"Patients without LLT event (%)\"\n )\n )\n )\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARMCD\", ref_group = \"ARM A\") %>%\n count_occurrences(vars = \"event_grp\") %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = paste0(\"Time to 1st LLT Event (\", levels(anl$AVALU), \")\"),\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = \"Unstratified Analysis\",\n control = control_coxph(pval_method = \"log-rank\"),\n table_names = \"coxph_unstratified\"\n )\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_safl)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————\nPatients with LLT event (%) 14 (10.4%) 18 (13.4%) 15 (11.4%) \nPatients without LLT event (%) 120 (89.6%) 116 (86.6%) 117 (88.6%) \nTime to 1st LLT Event (DAYS) \n Median NA NA 721.0 \n 95% CI NA (681.0, NA) (691.0, NA) \n 25% and 75%-ile 608.0, NA 558.0, NA 644.0, NA \n Range (censored) 1.0 to 728.0 1.0 to 726.0 1.0 to 724.0 \n Range (event) 23.0 to 608.0 36.0 to 681.0 61.0 to 721.0\nUnstratified Analysis \n p-value (log-rank) 0.5013 0.6413 \n Hazard Ratio 1.27 0.84 \n 95% CI (0.63, 2.56) (0.40, 1.75) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARMCD\", ref_group = \"ARM A\") %>%\n count_occurrences(vars = \"event_grp\") %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = paste0(\"Time to 1st LLT Event (\", levels(anl$AVALU), \")\"),\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n )\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_safl)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————\nPatients with LLT event (%) 14 (10.4%) 18 (13.4%) 15 (11.4%) \nPatients without LLT event (%) 120 (89.6%) 116 (86.6%) 117 (88.6%) \nTime to 1st LLT Event (DAYS) \n Median NA NA 721.0 \n 95% CI NA (681.0, NA) (691.0, NA) \n 25% and 75%-ile 608.0, NA 558.0, NA 644.0, NA \n Range (censored) 1.0 to 728.0 1.0 to 726.0 1.0 to 724.0 \n Range (event) 23.0 to 608.0 36.0 to 681.0 61.0 to 721.0\n\n\n\n\n\nCodestrata <- c(\"RACE\", \"SEX\")\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARMCD\", ref_group = \"ARM A\") %>%\n count_occurrences(vars = \"event_grp\") %>%\n surv_time(\n vars = \"AVAL\",\n var_labels = paste0(\"Time to 1st LLT Event (\", levels(anl$AVALU), \")\"),\n is_event = \"is_event\",\n table_names = \"time_to_event\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = \"Unstratified Analysis\",\n control = control_coxph(pval_method = \"log-rank\"),\n table_names = \"coxph_unstratified\"\n ) %>%\n coxph_pairwise(\n vars = \"AVAL\",\n is_event = \"is_event\",\n var_labels = paste0(\"Stratified By: \", paste(strata, collapse = \", \")),\n strat = strata,\n table_names = \"coxph_stratified\"\n )\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_safl)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————\nPatients with LLT event (%) 14 (10.4%) 18 (13.4%) 15 (11.4%) \nPatients without LLT event (%) 120 (89.6%) 116 (86.6%) 117 (88.6%) \nTime to 1st LLT Event (DAYS) \n Median NA NA 721.0 \n 95% CI NA (681.0, NA) (691.0, NA) \n 25% and 75%-ile 608.0, NA 558.0, NA 644.0, NA \n Range (censored) 1.0 to 728.0 1.0 to 726.0 1.0 to 724.0 \n Range (event) 23.0 to 608.0 36.0 to 681.0 61.0 to 721.0\nUnstratified Analysis \n p-value (log-rank) 0.5013 0.6413 \n Hazard Ratio 1.27 0.84 \n 95% CI (0.63, 2.56) (0.40, 1.75) \nStratified By: RACE, SEX \n p-value (log-rank) 0.3886 0.7970 \n Hazard Ratio 1.39 0.91 \n 95% CI (0.65, 2.97) (0.43, 1.93) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadsaftte <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadsaftte <- df_explicit_na(adsaftte)\n\nadsl <- dplyr::filter(adsl, .data$SAFFL == \"Y\")\nadsaftte <- dplyr::filter(adsaftte, .data$SAFFL == \"Y\")\n\narm_ref_comp <- list(\n ACTARMCD = list(\n ref = \"ARM B\",\n comp = c(\"ARM A\", \"ARM C\")\n ),\n ARM = list(\n ref = \"B: Placebo\",\n comp = c(\"A: Drug X\", \"C: Combination\")\n )\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\n \"ADSL\",\n adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% df_explicit_na() %>% dplyr::filter(.data$SAFFL == \"Y\")'\n ),\n cdisc_dataset(\n \"ADSAFTTE\",\n adsaftte,\n keys = c(\"STUDYID\", \"USUBJID\", \"PARAMCD\"),\n code = 'ADSAFTTE <- synthetic_cdisc_dataset(\"latest\", \"adaette\") %>% df_explicit_na() %>% dplyr::filter(.data$SAFFL == \"Y\")'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_tte(\n label = \"Time To LLT Event Table\",\n dataname = \"ADSAFTTE\",\n arm_var = choices_selected(\n variable_choices(adsl, c(\"ARM\", \"ARMCD\", \"ACTARMCD\")),\n \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(adsaftte, \"PARAMCD\", \"PARAM\"),\n \"HYSTTEBL\"\n ),\n strata_var = choices_selected(\n variable_choices(adsl, c(\"RACE\", \"SEX\")),\n c(\"RACE\", \"SEX\")\n ),\n time_points = choices_selected(0, NULL),\n event_desc_var = choices_selected(\"EVNTDESC\", \"EVNTDESC\", fixed = TRUE)\n )\n )\n)\n\n[INFO] 2023-08-04 15:19:06.4869 pid:9169 token:[] teal.modules.clinical Initializing tm_t_tte\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt11_bl.lock'.\n\n\nDownload" }, { "objectID": "tables/lab-results/lbt15.html", "href": "tables/lab-results/lbt15.html", "title": "LBT15", "section": "", - "text": "Data Setup\nStandard Table\nTable Modifying Cut Point\nTeal\nSession Info\n\n\n\nBecause the scda dataset adlb doesn’t have the PARCAT1 variable, this variable is created from LBCAT in pre-processing.\nadlb <- adlb %>%\nmutate(\nPARAM = with_label(.data$PARAM, “Laboratory Test”),\nANRIND = with_label(.data$ANRIND, “Direction of Abnormality”)\n)\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\nlibrary(forcats)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb <- adlb %>%\n mutate(\n PARAM = with_label(.data$PARAM, \"Laboratory Test\"),\n ANRIND = with_label(.data$ANRIND, \"Direction of Abnormality\")\n ) %>%\n mutate(\n PARCAT1 = LBCAT\n ) %>%\n mutate(\n ANRIND = fct_collapse(.data$ATOXGR,\n \"LOW\" = c(\"-3\", \"-4\"),\n \"MODERATE/NORMAL\" = c(\"-2\", \"-1\", \"0\", \"1\", \"2\"),\n \"HIGH\" = c(\"3\", \"4\")\n ),\n BNRIND = fct_collapse(.data$BTOXGR,\n \"LOW\" = c(\"-3\", \"-4\"),\n \"MODERATE/NORMAL\" = c(\"-2\", \"-1\", \"0\", \"1\", \"2\"),\n \"HIGH\" = c(\"3\", \"4\")\n ),\n PARCAT1 = LBCAT\n ) %>%\n filter(ONTRTFL == \"Y\")\n\n\nadlb_alt_cut <- adlb %>%\n mutate(\n ANRIND = fct_collapse(.data$ATOXGR,\n \"LOW\" = c(\"-2\", \"-3\", \"-4\"),\n \"MODERATE/NORMAL\" = c(\"-1\", \"0\", \"1\"),\n \"HIGH\" = c(\"2\", \"3\", \"4\")\n ),\n BNRIND = fct_collapse(.data$BTOXGR,\n \"LOW\" = c(\"-2\", \"-3\", \"-4\"),\n \"MODERATE/NORMAL\" = c(\"-1\", \"0\", \"1\"),\n \"HIGH\" = c(\"2\", \"3\", \"4\")\n )\n ) %>%\n filter(ONTRTFL == \"Y\")\n\nadlb <- adlb %>% var_relabel(\n PARCAT1 = \"Category for Lab Test\",\n PARAM = \"Parameter\"\n)\n\n\n\n\n\nCode# Argument exclude_base_abn must be TRUE to include patients with normal or abnormal in the opposite direction in the denom\n# So for \"High\" direction, subjects with baseline grade 3-4 are not in the denom.\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n add_overall_col(\"All Patients\") %>%\n split_rows_by(\"PARCAT1\", split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb$PARCAT1)) %>%\n split_rows_by(\"PARAM\", split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb$PARAM)) %>%\n count_abnormal(\n var = \"ANRIND\",\n abnormal = list(Low = \"LOW\", High = \"HIGH\"),\n variables = list(id = \"USUBJID\", baseline = \"BNRIND\"),\n exclude_base_abn = TRUE,\n .indent_mods = 4L\n ) %>%\n append_topleft(\" Direction of Abnormality\")\n\nresult <- build_table(lyt, adlb, alt_counts_df = adsl)\nresult\n\nCategory for Lab Test \n Parameter A: Drug X B: Placebo C: Combination All Patients \n Direction of Abnormality (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————\nCHEMISTRY \n Alanine Aminotransferase Measurement \n Low 32/127 (25.2%) 32/128 (25%) 32/128 (25%) 96/383 (25.1%) \n High 0/134 0/134 0/132 0/400 \n C-Reactive Protein Measurement \n Low 36/127 (28.3%) 36/127 (28.3%) 42/123 (34.1%) 114/377 (30.2%)\n High 34/124 (27.4%) 33/128 (25.8%) 31/129 (24%) 98/381 (25.7%) \nIMMUNOLOGY \n Immunoglobulin A Measurement \n Low 0/134 0/134 0/132 0/400 \n High 33/128 (25.8%) 32/124 (25.8%) 28/120 (23.3%) 93/372 (25%) \n\n\n\n\n\nCoderesult <- build_table(lyt, adlb_alt_cut, alt_counts_df = adsl)\nresult\n\nCategory for Lab Test \n Parameter A: Drug X B: Placebo C: Combination All Patients \n Direction of Abnormality (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————\nCHEMISTRY \n Alanine Aminotransferase Measurement \n Low 46/119 (38.7%) 54/123 (43.9%) 47/127 (37%) 147/369 (39.8%)\n High 0/134 0/134 0/132 0/400 \n C-Reactive Protein Measurement \n Low 59/122 (48.4%) 56/118 (47.5%) 58/121 (47.9%) 173/361 (47.9%)\n High 54/122 (44.3%) 46/122 (37.7%) 44/122 (36.1%) 144/366 (39.3%)\nIMMUNOLOGY \n Immunoglobulin A Measurement \n Low 0/134 0/134 0/132 0/400 \n High 47/124 (37.9%) 54/120 (45%) 47/115 (40.9%) 148/359 (41.2%)\n\n\n\n\nThe current module tm_t_abnormality is only displaying rows that are not all-zero, so the result could be a little different from static output where all-zero rows can be shown.\n\nCodelibrary(teal.modules.clinical)\nlibrary(forcats)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n mutate(\n ANRIND = fct_collapse(ATOXGR,\n \"LOW\" = c(\"-3\", \"-4\"),\n \"MODERATE/NORMAL\" = c(\"-2\", \"-1\", \"0\", \"1\", \"2\"),\n \"HIGH\" = c(\"3\", \"4\")\n ),\n BNRIND = fct_collapse(.data$BTOXGR,\n \"LOW\" = c(\"-3\", \"-4\"),\n \"MODERATE/NORMAL\" = c(\"-2\", \"-1\", \"0\", \"1\", \"2\"),\n \"HIGH\" = c(\"3\", \"4\")\n )\n ) %>%\n filter(ONTRTFL == \"Y\") %>%\n var_relabel(ANRIND = \"Direction of Abnormality\")\n\n\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADLB\", adlb, code = '\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n mutate(\n ANRIND = fct_collapse(ATOXGR,\n \"LOW\" = c(\"-3\", \"-4\"),\n \"MODERATE/NORMAL\" = c(\"-2\", \"-1\", \"0\", \"1\", \"2\"),\n \"HIGH\" = c(\"3\", \"4\")\n ),\n BNRIND = fct_collapse(BTOXGR,\n \"LOW\" = c(\"-3\", \"-4\"),\n \"MODERATE/NORMAL\" = c(\"-2\", \"-1\", \"0\", \"1\", \"2\"),\n \"HIGH\" = c(\"3\", \"4\")\n )\n ) %>%\n filter(ONTRTFL == \"Y\") %>%\n var_relabel(ANRIND = \"Direction of Abnormality\")\n '),\n check = TRUE\n ),\n modules = modules(\n tm_t_abnormality(\n label = \"Abnormality Table\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adlb, subset = c(\"PARAM\")),\n selected = c(\"PARAM\"),\n keep_order = TRUE\n ),\n grade = choices_selected(\n choices = variable_choices(adlb, subset = \"ANRIND\"),\n selected = \"ANRIND\",\n fixed = TRUE\n ),\n baseline_var = choices_selected(\n choices = variable_choices(adlb, subset = \"BNRIND\"),\n selected = \"BNRIND\",\n fixed = TRUE\n ),\n abnormal = list(Low = \"LOW\", High = \"HIGH\"),\n exclude_base_abn = TRUE\n )\n )\n)\n\n[INFO] 2023-08-04 15:02:21.0290 pid:9325 token:[] teal.modules.clinical Initializing tm_t_abnormality\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] forcats_1.0.0 dplyr_1.1.2 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n[13] scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt15.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable Modifying Cut Point\nTeal\nSession Info\n\n\n\nBecause the scda dataset adlb doesn’t have the PARCAT1 variable, this variable is created from LBCAT in pre-processing.\nadlb <- adlb %>%\nmutate(\nPARAM = with_label(.data$PARAM, “Laboratory Test”),\nANRIND = with_label(.data$ANRIND, “Direction of Abnormality”)\n)\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\nlibrary(forcats)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb <- adlb %>%\n mutate(\n PARAM = with_label(.data$PARAM, \"Laboratory Test\"),\n ANRIND = with_label(.data$ANRIND, \"Direction of Abnormality\")\n ) %>%\n mutate(\n PARCAT1 = LBCAT\n ) %>%\n mutate(\n ANRIND = fct_collapse(.data$ATOXGR,\n \"LOW\" = c(\"-3\", \"-4\"),\n \"MODERATE/NORMAL\" = c(\"-2\", \"-1\", \"0\", \"1\", \"2\"),\n \"HIGH\" = c(\"3\", \"4\")\n ),\n BNRIND = fct_collapse(.data$BTOXGR,\n \"LOW\" = c(\"-3\", \"-4\"),\n \"MODERATE/NORMAL\" = c(\"-2\", \"-1\", \"0\", \"1\", \"2\"),\n \"HIGH\" = c(\"3\", \"4\")\n ),\n PARCAT1 = LBCAT\n ) %>%\n filter(ONTRTFL == \"Y\")\n\n\nadlb_alt_cut <- adlb %>%\n mutate(\n ANRIND = fct_collapse(.data$ATOXGR,\n \"LOW\" = c(\"-2\", \"-3\", \"-4\"),\n \"MODERATE/NORMAL\" = c(\"-1\", \"0\", \"1\"),\n \"HIGH\" = c(\"2\", \"3\", \"4\")\n ),\n BNRIND = fct_collapse(.data$BTOXGR,\n \"LOW\" = c(\"-2\", \"-3\", \"-4\"),\n \"MODERATE/NORMAL\" = c(\"-1\", \"0\", \"1\"),\n \"HIGH\" = c(\"2\", \"3\", \"4\")\n )\n ) %>%\n filter(ONTRTFL == \"Y\")\n\nadlb <- adlb %>% var_relabel(\n PARCAT1 = \"Category for Lab Test\",\n PARAM = \"Parameter\"\n)\n\n\n\n\n\nCode# Argument exclude_base_abn must be TRUE to include patients with normal or abnormal in the opposite direction in the denom\n# So for \"High\" direction, subjects with baseline grade 3-4 are not in the denom.\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n add_overall_col(\"All Patients\") %>%\n split_rows_by(\"PARCAT1\", split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb$PARCAT1)) %>%\n split_rows_by(\"PARAM\", split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb$PARAM)) %>%\n count_abnormal(\n var = \"ANRIND\",\n abnormal = list(Low = \"LOW\", High = \"HIGH\"),\n variables = list(id = \"USUBJID\", baseline = \"BNRIND\"),\n exclude_base_abn = TRUE,\n .indent_mods = 4L\n ) %>%\n append_topleft(\" Direction of Abnormality\")\n\nresult <- build_table(lyt, adlb, alt_counts_df = adsl)\nresult\n\nCategory for Lab Test \n Parameter A: Drug X B: Placebo C: Combination All Patients \n Direction of Abnormality (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————\nCHEMISTRY \n Alanine Aminotransferase Measurement \n Low 32/127 (25.2%) 32/128 (25%) 32/128 (25%) 96/383 (25.1%) \n High 0/134 0/134 0/132 0/400 \n C-Reactive Protein Measurement \n Low 36/127 (28.3%) 36/127 (28.3%) 42/123 (34.1%) 114/377 (30.2%)\n High 34/124 (27.4%) 33/128 (25.8%) 31/129 (24%) 98/381 (25.7%) \nIMMUNOLOGY \n Immunoglobulin A Measurement \n Low 0/134 0/134 0/132 0/400 \n High 33/128 (25.8%) 32/124 (25.8%) 28/120 (23.3%) 93/372 (25%) \n\n\n\n\n\nCoderesult <- build_table(lyt, adlb_alt_cut, alt_counts_df = adsl)\nresult\n\nCategory for Lab Test \n Parameter A: Drug X B: Placebo C: Combination All Patients \n Direction of Abnormality (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————\nCHEMISTRY \n Alanine Aminotransferase Measurement \n Low 46/119 (38.7%) 54/123 (43.9%) 47/127 (37%) 147/369 (39.8%)\n High 0/134 0/134 0/132 0/400 \n C-Reactive Protein Measurement \n Low 59/122 (48.4%) 56/118 (47.5%) 58/121 (47.9%) 173/361 (47.9%)\n High 54/122 (44.3%) 46/122 (37.7%) 44/122 (36.1%) 144/366 (39.3%)\nIMMUNOLOGY \n Immunoglobulin A Measurement \n Low 0/134 0/134 0/132 0/400 \n High 47/124 (37.9%) 54/120 (45%) 47/115 (40.9%) 148/359 (41.2%)\n\n\n\n\nThe current module tm_t_abnormality is only displaying rows that are not all-zero, so the result could be a little different from static output where all-zero rows can be shown.\n\nCodelibrary(teal.modules.clinical)\nlibrary(forcats)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n mutate(\n ANRIND = fct_collapse(ATOXGR,\n \"LOW\" = c(\"-3\", \"-4\"),\n \"MODERATE/NORMAL\" = c(\"-2\", \"-1\", \"0\", \"1\", \"2\"),\n \"HIGH\" = c(\"3\", \"4\")\n ),\n BNRIND = fct_collapse(.data$BTOXGR,\n \"LOW\" = c(\"-3\", \"-4\"),\n \"MODERATE/NORMAL\" = c(\"-2\", \"-1\", \"0\", \"1\", \"2\"),\n \"HIGH\" = c(\"3\", \"4\")\n )\n ) %>%\n filter(ONTRTFL == \"Y\") %>%\n var_relabel(ANRIND = \"Direction of Abnormality\")\n\n\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADLB\", adlb, code = '\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n mutate(\n ANRIND = fct_collapse(ATOXGR,\n \"LOW\" = c(\"-3\", \"-4\"),\n \"MODERATE/NORMAL\" = c(\"-2\", \"-1\", \"0\", \"1\", \"2\"),\n \"HIGH\" = c(\"3\", \"4\")\n ),\n BNRIND = fct_collapse(BTOXGR,\n \"LOW\" = c(\"-3\", \"-4\"),\n \"MODERATE/NORMAL\" = c(\"-2\", \"-1\", \"0\", \"1\", \"2\"),\n \"HIGH\" = c(\"3\", \"4\")\n )\n ) %>%\n filter(ONTRTFL == \"Y\") %>%\n var_relabel(ANRIND = \"Direction of Abnormality\")\n '),\n check = TRUE\n ),\n modules = modules(\n tm_t_abnormality(\n label = \"Abnormality Table\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adlb, subset = c(\"PARAM\")),\n selected = c(\"PARAM\"),\n keep_order = TRUE\n ),\n grade = choices_selected(\n choices = variable_choices(adlb, subset = \"ANRIND\"),\n selected = \"ANRIND\",\n fixed = TRUE\n ),\n baseline_var = choices_selected(\n choices = variable_choices(adlb, subset = \"BNRIND\"),\n selected = \"BNRIND\",\n fixed = TRUE\n ),\n abnormal = list(Low = \"LOW\", High = \"HIGH\"),\n exclude_base_abn = TRUE\n )\n )\n)\n\n[INFO] 2023-08-04 15:19:52.3078 pid:9329 token:[] teal.modules.clinical Initializing tm_t_abnormality\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] forcats_1.0.0 dplyr_1.1.2 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n[13] scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt15.lock'.\n\n\nDownload" }, { "objectID": "tables/lab-results/lbt02.html", "href": "tables/lab-results/lbt02.html", "title": "LBT02", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCode# Preparation of an illustrative dataset\nlibrary(scda)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb_labels <- var_labels(adlb)\n\n# For illustration purposes, the example focuses on ALT\n# Measurements starting from baseline and excluding all screening visits\nadlb <- subset(adlb, AVISIT != \"SCREENING\" & PARAMCD == \"ALT\")\nadlb$AVISIT <- droplevels(adlb$AVISIT)\n\nvar_labels(adlb) <- adlb_labels\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n add_overall_col(\"All Patients\") %>%\n split_rows_by(\n var = \"AVISIT\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adlb$AVISIT)\n ) %>%\n summarize_vars(vars = \"AVAL\")\n\nresult <- build_table(l,\n df = adlb,\n alt_counts_df = adsl\n)\nresult\n\nAnalysis Visit A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n——————————————————————————————————————————————————————————————————————————\nBASELINE \n n 134 134 132 400 \n Mean (SD) 17.7 (9.9) 18.7 (9.8) 19.5 (9.1) 18.6 (9.6) \n Median 17.5 18.2 19.0 18.0 \n Min - Max 0.0 - 44.1 1.5 - 54.4 0.6 - 39.8 0.0 - 54.4 \nWEEK 1 DAY 8 \n n 134 134 132 400 \n Mean (SD) 16.8 (9.1) 18.9 (9.2) 19.6 (9.3) 18.4 (9.2) \n Median 16.0 18.2 19.0 18.0 \n Min - Max 0.1 - 36.3 0.7 - 39.9 0.9 - 44.7 0.1 - 44.7 \nWEEK 2 DAY 15 \n n 134 134 132 400 \n Mean (SD) 17.8 (9.6) 18.8 (9.7) 16.5 (8.2) 17.7 (9.2) \n Median 15.9 18.0 17.0 17.0 \n Min - Max 0.4 - 44.3 0.2 - 44.3 0.3 - 34.7 0.2 - 44.3 \nWEEK 3 DAY 22 \n n 134 134 132 400 \n Mean (SD) 18.4 (9.3) 17.6 (9.6) 16.8 (9.5) 17.6 (9.5) \n Median 18.1 17.7 15.1 17.2 \n Min - Max 0.6 - 41.7 0.0 - 38.6 0.5 - 39.2 0.0 - 41.7 \nWEEK 4 DAY 29 \n n 134 134 132 400 \n Mean (SD) 19.2 (11.0) 17.2 (10.6) 17.9 (9.3) 18.1 (10.3) \n Median 17.4 15.9 17.7 17.3 \n Min - Max 0.9 - 54.2 0.4 - 48.0 0.2 - 41.3 0.2 - 54.2 \nWEEK 5 DAY 36 \n n 134 134 132 400 \n Mean (SD) 19.2 (9.5) 18.0 (9.9) 18.5 (9.4) 18.6 (9.6) \n Median 19.8 18.3 19.3 19.0 \n Min - Max 0.0 - 43.4 0.1 - 40.6 0.0 - 37.5 0.0 - 43.4 \n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\n# Ensure missing and NA values are cleaned up and convert variables to factors.\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- df_explicit_na(ADSL)'),\n cdisc_dataset(\"ADLB\", adlb, code = 'ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n ADLB <- df_explicit_na(ADLB)'),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"Laboratory Test Results by Visit\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adlb, c(\"PARAM\", \"AVISIT\")), # note: order matters here. If `PARAM` is first, the split will be first by `PARAM`and then by `AVISIT`\n selected = c(\"PARAM\", \"AVISIT\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(adlb, c(\"AVAL\")),\n selected = c(\"AVAL\")\n ),\n useNA = \"ifany\",\n paramcd = choices_selected(\n choices = value_choices(adlb, \"PARAMCD\", \"PARAM\"),\n selected = \"ALT\"\n )\n )\n ),\n filter = list(ADLB = list(AVAL = list()))\n)\n\n[INFO] 2023-08-04 15:03:47.8471 pid:9535 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\nWarning: The 'plotly_relayout' event tied a source ID of\n'teal-main_ui-filter_panel-active-ADLB-filter-ADLB_AVAL-inputs-histogram_plot'\nis not registered. In order to obtain this event data, please add\n`event_register(p, 'plotly_relayout')` to the plot (`p`) that you wish to\nobtain event data from.\n\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] dplyr_1.1.2 teal.modules.clinical_0.8.15.9013\n [3] teal_0.13.0.9024 teal.transform_0.3.0.9009 \n [5] teal.slice_0.3.0.9028 teal.data_0.2.0.9007 \n [7] shiny_1.7.4.1 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[13] ellipsis_0.3.2 fontawesome_0.5.1 utf8_1.2.3 \n[16] promises_1.2.0.1 rmarkdown_2.23 ps_1.7.5 \n[19] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[22] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[25] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[31] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[34] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[37] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[40] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[43] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[46] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[49] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[52] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[55] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[58] plotly_4.10.2 generics_0.1.3 ggplot2_3.4.2 \n[61] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[64] glue_1.6.2 emmeans_1.8.7 lazyeval_0.2.2 \n[67] tools_4.3.1 data.table_1.14.8 webshot_0.5.5 \n[70] forcats_1.0.0 mvtnorm_1.2-2 grid_4.3.1 \n[73] tidyr_1.3.0 rbibutils_2.2.13 colorspace_2.1-0 \n[76] nlme_3.1-162 cli_3.6.1 fansi_1.0.4 \n[79] viridisLite_0.4.2 geepack_1.3.9 gtable_0.3.3 \n[82] R.methodsS3_1.8.2 sass_0.4.7 digest_0.6.33 \n[85] htmlwidgets_1.6.2 memoise_2.0.1 htmltools_0.5.5 \n[88] R.oo_1.25.0 lifecycle_1.0.3 httr_1.4.6 \n[91] shinyWidgets_0.7.6 mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt02.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCode# Preparation of an illustrative dataset\nlibrary(scda)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb_labels <- var_labels(adlb)\n\n# For illustration purposes, the example focuses on ALT\n# Measurements starting from baseline and excluding all screening visits\nadlb <- subset(adlb, AVISIT != \"SCREENING\" & PARAMCD == \"ALT\")\nadlb$AVISIT <- droplevels(adlb$AVISIT)\n\nvar_labels(adlb) <- adlb_labels\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n add_overall_col(\"All Patients\") %>%\n split_rows_by(\n var = \"AVISIT\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adlb$AVISIT)\n ) %>%\n summarize_vars(vars = \"AVAL\")\n\nresult <- build_table(l,\n df = adlb,\n alt_counts_df = adsl\n)\nresult\n\nAnalysis Visit A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n——————————————————————————————————————————————————————————————————————————\nBASELINE \n n 134 134 132 400 \n Mean (SD) 17.7 (9.9) 18.7 (9.8) 19.5 (9.1) 18.6 (9.6) \n Median 17.5 18.2 19.0 18.0 \n Min - Max 0.0 - 44.1 1.5 - 54.4 0.6 - 39.8 0.0 - 54.4 \nWEEK 1 DAY 8 \n n 134 134 132 400 \n Mean (SD) 16.8 (9.1) 18.9 (9.2) 19.6 (9.3) 18.4 (9.2) \n Median 16.0 18.2 19.0 18.0 \n Min - Max 0.1 - 36.3 0.7 - 39.9 0.9 - 44.7 0.1 - 44.7 \nWEEK 2 DAY 15 \n n 134 134 132 400 \n Mean (SD) 17.8 (9.6) 18.8 (9.7) 16.5 (8.2) 17.7 (9.2) \n Median 15.9 18.0 17.0 17.0 \n Min - Max 0.4 - 44.3 0.2 - 44.3 0.3 - 34.7 0.2 - 44.3 \nWEEK 3 DAY 22 \n n 134 134 132 400 \n Mean (SD) 18.4 (9.3) 17.6 (9.6) 16.8 (9.5) 17.6 (9.5) \n Median 18.1 17.7 15.1 17.2 \n Min - Max 0.6 - 41.7 0.0 - 38.6 0.5 - 39.2 0.0 - 41.7 \nWEEK 4 DAY 29 \n n 134 134 132 400 \n Mean (SD) 19.2 (11.0) 17.2 (10.6) 17.9 (9.3) 18.1 (10.3) \n Median 17.4 15.9 17.7 17.3 \n Min - Max 0.9 - 54.2 0.4 - 48.0 0.2 - 41.3 0.2 - 54.2 \nWEEK 5 DAY 36 \n n 134 134 132 400 \n Mean (SD) 19.2 (9.5) 18.0 (9.9) 18.5 (9.4) 18.6 (9.6) \n Median 19.8 18.3 19.3 19.0 \n Min - Max 0.0 - 43.4 0.1 - 40.6 0.0 - 37.5 0.0 - 43.4 \n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\n# Ensure missing and NA values are cleaned up and convert variables to factors.\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- df_explicit_na(ADSL)'),\n cdisc_dataset(\"ADLB\", adlb, code = 'ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n ADLB <- df_explicit_na(ADLB)'),\n check = TRUE\n ),\n modules = modules(\n tm_t_summary_by(\n label = \"Laboratory Test Results by Visit\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n by_vars = choices_selected(\n choices = variable_choices(adlb, c(\"PARAM\", \"AVISIT\")), # note: order matters here. If `PARAM` is first, the split will be first by `PARAM`and then by `AVISIT`\n selected = c(\"PARAM\", \"AVISIT\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(adlb, c(\"AVAL\")),\n selected = c(\"AVAL\")\n ),\n useNA = \"ifany\",\n paramcd = choices_selected(\n choices = value_choices(adlb, \"PARAMCD\", \"PARAM\"),\n selected = \"ALT\"\n )\n )\n ),\n filter = list(ADLB = list(AVAL = list()))\n)\n\n[INFO] 2023-08-04 15:21:25.1286 pid:9539 token:[] teal.modules.clinical Initializing tm_t_summary_by\n\nCodeshinyApp(app$ui, app$server)\n\nWarning: The 'plotly_relayout' event tied a source ID of\n'teal-main_ui-filter_panel-active-ADLB-filter-ADLB_AVAL-inputs-histogram_plot'\nis not registered. In order to obtain this event data, please add\n`event_register(p, 'plotly_relayout')` to the plot (`p`) that you wish to\nobtain event data from.\n\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] dplyr_1.1.2 teal.modules.clinical_0.8.15.9013\n [3] teal_0.13.0.9024 teal.transform_0.3.0.9009 \n [5] teal.slice_0.3.0.9028 teal.data_0.2.0.9007 \n [7] shiny_1.7.4.1 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.4 tern.gee_0.1.0.9006 logger_0.2.2 \n [4] testthat_3.1.10 rlang_1.1.1 teal.code_0.3.0.9009 \n [7] compiler_4.3.1 callr_3.7.3 vctrs_0.6.3 \n[10] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[13] ellipsis_0.3.2 fontawesome_0.5.1 utf8_1.2.3 \n[16] promises_1.2.0.1 rmarkdown_2.23 ps_1.7.5 \n[19] purrr_1.0.1 xfun_0.39 shinyvalidate_0.1.2 \n[22] cachem_1.0.8 teal.reporter_0.1.1.9020 jsonlite_1.8.7 \n[25] later_1.3.1 styler_1.10.1 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.5.0 brio_1.1.3 \n[31] jquerylib_0.1.4 estimability_1.4.1 Rcpp_1.0.11 \n[34] assertthat_0.2.1 knitr_1.43 teal.logger_0.1.1.9009 \n[37] R.utils_2.12.2 httpuv_1.6.11 Matrix_1.6-0 \n[40] splines_4.3.1 R.cache_0.16.0 tidyselect_1.2.0 \n[43] rstudioapi_0.15.0 yaml_2.3.7 codetools_0.2-19 \n[46] processx_3.8.2 teal.widgets_0.3.0.9007 lattice_0.21-8 \n[49] tibble_3.2.1 withr_2.5.0 coda_0.19-4 \n[52] evaluate_0.21 survival_3.5-5 pillar_1.9.0 \n[55] shinycssloaders_1.0.0 checkmate_2.2.0 shinyjs_2.1.0 \n[58] plotly_4.10.2 generics_0.1.3 ggplot2_3.4.2 \n[61] munsell_0.5.0 scales_1.2.1 xtable_1.8-4 \n[64] glue_1.6.2 emmeans_1.8.7 lazyeval_0.2.2 \n[67] tools_4.3.1 data.table_1.14.8 webshot_0.5.5 \n[70] forcats_1.0.0 mvtnorm_1.2-2 grid_4.3.1 \n[73] tidyr_1.3.0 rbibutils_2.2.13 colorspace_2.1-0 \n[76] nlme_3.1-162 cli_3.6.1 fansi_1.0.4 \n[79] viridisLite_0.4.2 geepack_1.3.9 gtable_0.3.3 \n[82] R.methodsS3_1.8.2 sass_0.4.7 digest_0.6.33 \n[85] htmlwidgets_1.6.2 memoise_2.0.1 htmltools_0.5.5 \n[88] R.oo_1.25.0 lifecycle_1.0.3 httr_1.4.6 \n[91] shinyWidgets_0.7.6 mime_0.12 MASS_7.3-60 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt02.lock'.\n\n\nDownload" }, { "objectID": "tables/lab-results/lbt06.html", @@ -851,21 +851,21 @@ "href": "tables/lab-results/lbt07.html", "title": "LBT07", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\nlibrary(forcats)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb_labels <- var_labels(adlb)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\n# Select worst post-baseline records.\nadlb_f <- adlb %>%\n filter(ATOXGR != \"<Missing>\") %>%\n filter(ONTRTFL == \"Y\") %>%\n filter(WGRLOFL == \"Y\" | WGRHIFL == \"Y\")\n\nvar_labels(adlb_f) <- adlb_labels\n\n# Derive GRADE_DIR and GRADE_ANL to use in layout from ATOXGR\nadlb_f <- adlb_f %>%\n mutate(\n GRADE_DIR = factor(\n case_when(\n ATOXGR %in% c(\"-1\", \"-2\", \"-3\", \"-4\") & .data$WGRLOFL == \"Y\" ~ \"LOW\",\n ATOXGR == \"0\" ~ \"ZERO\",\n ATOXGR %in% c(\"1\", \"2\", \"3\", \"4\") & .data$WGRHIFL == \"Y\" ~ \"HIGH\",\n TRUE ~ \"NONE\"\n ),\n levels = c(\"LOW\", \"ZERO\", \"HIGH\", \"NONE\")\n ),\n GRADE_ANL = forcats::fct_relevel(\n forcats::fct_recode(ATOXGR,\n `1` = \"-1\", `2` = \"-2\", `3` = \"-3\", `4` = \"-4\"\n ),\n c(\"0\", \"1\", \"2\", \"3\", \"4\")\n )\n ) %>%\n var_relabel(\n GRADE_DIR = \"Direction of Abnormality\",\n GRADE_ANL = \"Analysis Grade\"\n )\n\n# Construct analysis map\nmap <- expand.grid(\n PARAM = levels(adlb$PARAM),\n GRADE_DIR = c(\"LOW\", \"HIGH\"),\n GRADE_ANL = as.character(1:4),\n stringsAsFactors = FALSE\n) %>%\n arrange(PARAM, desc(GRADE_DIR), GRADE_ANL)\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAM\",\n label_pos = \"topleft\",\n split_label = obj_label(adlb_f$PARAM)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n required = \"ATOXGR\",\n .stats = \"unique_count\"\n ) %>%\n split_rows_by(\n \"GRADE_DIR\",\n label_pos = \"topleft\",\n split_label = obj_label(adlb_f$GRADE_DIR),\n split_fun = trim_levels_to_map(map)\n ) %>%\n count_abnormal_by_worst_grade(\n var = \"GRADE_ANL\",\n variables = list(id = \"USUBJID\", param = \"PARAM\", grade_dir = \"GRADE_DIR\"),\n .indent_mods = 4L\n ) %>%\n append_topleft(\" Highest NCI CTCAE Grade\")\n\nresult <- build_table(lyt = lyt, df = adlb_f, alt_counts_df = adsl)\nresult <- result %>% prune_table()\n\nresult\n\nParameter \n Direction of Abnormality A: Drug X B: Placebo C: Combination\n Highest NCI CTCAE Grade (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement (n) 134 134 132 \n LOW \n 1 15 (11.2%) 11 (8.2%) 15 (11.4%) \n 2 18 (13.4%) 24 (17.9%) 17 (12.9%) \n 3 16 (11.9%) 24 (17.9%) 16 (12.1%) \n 4 17 (12.7%) 10 (7.5%) 18 (13.6%) \n Any 66 (49.3%) 69 (51.5%) 66 (50%) \nC-Reactive Protein Measurement (n) 134 134 132 \n LOW \n 1 21 (15.7%) 22 (16.4%) 12 (9.1%) \n 2 24 (17.9%) 22 (16.4%) 18 (13.6%) \n 3 29 (21.6%) 21 (15.7%) 25 (18.9%) \n 4 10 (7.5%) 16 (11.9%) 22 (16.7%) \n Any 84 (62.7%) 81 (60.4%) 77 (58.3%) \n HIGH \n 1 20 (14.9%) 22 (16.4%) 22 (16.7%) \n 2 21 (15.7%) 15 (11.2%) 14 (10.6%) \n 3 25 (18.7%) 16 (11.9%) 20 (15.2%) \n 4 13 (9.7%) 20 (14.9%) 11 (8.3%) \n Any 79 (59%) 73 (54.5%) 67 (50.8%) \nImmunoglobulin A Measurement (n) 134 134 132 \n HIGH \n 1 19 (14.2%) 12 (9%) 18 (13.6%) \n 2 17 (12.7%) 24 (17.9%) 19 (14.4%) \n 3 21 (15.7%) 23 (17.2%) 23 (17.4%) \n 4 13 (9.7%) 13 (9.7%) 9 (6.8%) \n Any 70 (52.2%) 72 (53.7%) 69 (52.3%) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n filter(!AVISIT %in% c(\"SCREENING\", \"BASELINE\"))\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADLB\", adlb,\n code = 'ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n filter(!AVISIT %in% c(\"SCREENING\", \"BASELINE\"))'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_abnormality_by_worst_grade(\n label = \"Laboratory Test Results with Highest Grade Post-Baseline\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n paramcd = choices_selected(\n choices = value_choices(adlb, \"PARAMCD\", \"PARAM\"),\n selected = c(\"ALT\", \"CRP\", \"IGA\")\n ),\n add_total = FALSE\n )\n ),\n filter = (\n list(\n ADSL = list(SAFFL = \"Y\"),\n ADLB = list(ONTRTFL = \"Y\")\n )\n )\n)\n\n[INFO] 2023-08-04 15:04:52.8160 pid:9852 token:[] teal.modules.clinical Initializing tm_t_abnormality_by_worst_grade\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] forcats_1.0.0 dplyr_1.1.2 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n[13] scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt07.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\nlibrary(forcats)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb_labels <- var_labels(adlb)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\n# Select worst post-baseline records.\nadlb_f <- adlb %>%\n filter(ATOXGR != \"<Missing>\") %>%\n filter(ONTRTFL == \"Y\") %>%\n filter(WGRLOFL == \"Y\" | WGRHIFL == \"Y\")\n\nvar_labels(adlb_f) <- adlb_labels\n\n# Derive GRADE_DIR and GRADE_ANL to use in layout from ATOXGR\nadlb_f <- adlb_f %>%\n mutate(\n GRADE_DIR = factor(\n case_when(\n ATOXGR %in% c(\"-1\", \"-2\", \"-3\", \"-4\") & .data$WGRLOFL == \"Y\" ~ \"LOW\",\n ATOXGR == \"0\" ~ \"ZERO\",\n ATOXGR %in% c(\"1\", \"2\", \"3\", \"4\") & .data$WGRHIFL == \"Y\" ~ \"HIGH\",\n TRUE ~ \"NONE\"\n ),\n levels = c(\"LOW\", \"ZERO\", \"HIGH\", \"NONE\")\n ),\n GRADE_ANL = forcats::fct_relevel(\n forcats::fct_recode(ATOXGR,\n `1` = \"-1\", `2` = \"-2\", `3` = \"-3\", `4` = \"-4\"\n ),\n c(\"0\", \"1\", \"2\", \"3\", \"4\")\n )\n ) %>%\n var_relabel(\n GRADE_DIR = \"Direction of Abnormality\",\n GRADE_ANL = \"Analysis Grade\"\n )\n\n# Construct analysis map\nmap <- expand.grid(\n PARAM = levels(adlb$PARAM),\n GRADE_DIR = c(\"LOW\", \"HIGH\"),\n GRADE_ANL = as.character(1:4),\n stringsAsFactors = FALSE\n) %>%\n arrange(PARAM, desc(GRADE_DIR), GRADE_ANL)\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"PARAM\",\n label_pos = \"topleft\",\n split_label = obj_label(adlb_f$PARAM)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n required = \"ATOXGR\",\n .stats = \"unique_count\"\n ) %>%\n split_rows_by(\n \"GRADE_DIR\",\n label_pos = \"topleft\",\n split_label = obj_label(adlb_f$GRADE_DIR),\n split_fun = trim_levels_to_map(map)\n ) %>%\n count_abnormal_by_worst_grade(\n var = \"GRADE_ANL\",\n variables = list(id = \"USUBJID\", param = \"PARAM\", grade_dir = \"GRADE_DIR\"),\n .indent_mods = 4L\n ) %>%\n append_topleft(\" Highest NCI CTCAE Grade\")\n\nresult <- build_table(lyt = lyt, df = adlb_f, alt_counts_df = adsl)\nresult <- result %>% prune_table()\n\nresult\n\nParameter \n Direction of Abnormality A: Drug X B: Placebo C: Combination\n Highest NCI CTCAE Grade (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement (n) 134 134 132 \n LOW \n 1 15 (11.2%) 11 (8.2%) 15 (11.4%) \n 2 18 (13.4%) 24 (17.9%) 17 (12.9%) \n 3 16 (11.9%) 24 (17.9%) 16 (12.1%) \n 4 17 (12.7%) 10 (7.5%) 18 (13.6%) \n Any 66 (49.3%) 69 (51.5%) 66 (50%) \nC-Reactive Protein Measurement (n) 134 134 132 \n LOW \n 1 21 (15.7%) 22 (16.4%) 12 (9.1%) \n 2 24 (17.9%) 22 (16.4%) 18 (13.6%) \n 3 29 (21.6%) 21 (15.7%) 25 (18.9%) \n 4 10 (7.5%) 16 (11.9%) 22 (16.7%) \n Any 84 (62.7%) 81 (60.4%) 77 (58.3%) \n HIGH \n 1 20 (14.9%) 22 (16.4%) 22 (16.7%) \n 2 21 (15.7%) 15 (11.2%) 14 (10.6%) \n 3 25 (18.7%) 16 (11.9%) 20 (15.2%) \n 4 13 (9.7%) 20 (14.9%) 11 (8.3%) \n Any 79 (59%) 73 (54.5%) 67 (50.8%) \nImmunoglobulin A Measurement (n) 134 134 132 \n HIGH \n 1 19 (14.2%) 12 (9%) 18 (13.6%) \n 2 17 (12.7%) 24 (17.9%) 19 (14.4%) \n 3 21 (15.7%) 23 (17.2%) 23 (17.4%) \n 4 13 (9.7%) 13 (9.7%) 9 (6.8%) \n Any 70 (52.2%) 72 (53.7%) 69 (52.3%) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n filter(!AVISIT %in% c(\"SCREENING\", \"BASELINE\"))\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADLB\", adlb,\n code = 'ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n filter(!AVISIT %in% c(\"SCREENING\", \"BASELINE\"))'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_abnormality_by_worst_grade(\n label = \"Laboratory Test Results with Highest Grade Post-Baseline\",\n dataname = \"ADLB\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n paramcd = choices_selected(\n choices = value_choices(adlb, \"PARAMCD\", \"PARAM\"),\n selected = c(\"ALT\", \"CRP\", \"IGA\")\n ),\n add_total = FALSE\n )\n ),\n filter = (\n list(\n ADSL = list(SAFFL = \"Y\"),\n ADLB = list(ONTRTFL = \"Y\")\n )\n )\n)\n\n[INFO] 2023-08-04 15:22:36.8602 pid:9855 token:[] teal.modules.clinical Initializing tm_t_abnormality_by_worst_grade\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] forcats_1.0.0 dplyr_1.1.2 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n[13] scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/lab-results/lbt07.lock'.\n\n\nDownload" }, { "objectID": "tables/pharmacokinetic/adat04b.html", "href": "tables/pharmacokinetic/adat04b.html", "title": "ADAT04B", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\nlibrary(tibble)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadab <- synthetic_cdisc_dataset(\"latest\", \"adab\")\n\ncombodf <- tribble(\n ~valname, ~label, ~levelcombo, ~exargs,\n \"all_X\", \"All Drug X\", c(\"A: Drug X\", \"C: Combination\"), list(),\n \"all_pt\", \"All Patients\", c(\"A: Drug X\", \"B: Placebo\", \"C: Combination\"), list()\n)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\n\n# Baseline Pts\nadab_b <- df_explicit_na(adab) %>%\n filter(\n ABLFL == \"Y\",\n ADABLPFL == \"Y\",\n PARAM %in% c(\n \"ADA interpreted per sample result\",\n \"NAB interpreted per sample result\"\n )\n ) %>%\n select(-PARAMCD, -AVALC, -AVALU) %>%\n tidyr::pivot_wider(\n names_from = PARAM,\n values_from = AVAL\n ) %>%\n mutate(\n across(\n any_of(c(\n \"ADA interpreted per sample result\",\n \"NAB interpreted per sample result\"\n )),\n as.logical\n )\n ) %>%\n mutate(\n ADABLPFL = ADABLPFL == \"Y\",\n PADABLPFL = if (exists(\"ADA interpreted per sample result\", where = .)) `ADA interpreted per sample result` == \"TRUE\" else FALSE,\n PNABBLFL = if (exists(\"NAB interpreted per sample result\", where = .)) `NAB interpreted per sample result` == \"TRUE\" else FALSE,\n NNABBLFL = if (exists(\"NAB interpreted per sample result\", where = .)) `NAB interpreted per sample result` == \"FALSE\" else FALSE\n ) %>%\n var_relabel(\n ADABLPFL = \"Baseline evaluable patients for ADA\",\n PADABLPFL = \"Patients with a positive ADA sample at baseline\",\n PNABBLFL = \"Patients with a positive NAb sample at baseline\",\n NNABBLFL = \"Patients with no positive NAb sample at baseline\"\n )\n\n# Post-Baseline Evaluable Pts\nadab_pb_ada <- df_explicit_na(adab) %>%\n filter(ADPBLPFL == \"Y\") %>%\n select(STUDYID, USUBJID, ARM, ACTARM, ADPBLPFL) %>%\n mutate(ADPBLPFL = ADPBLPFL == \"Y\") %>%\n distinct()\n\n# Post-Baseline ADA Positive Pts\nadab_pb_adap <- df_explicit_na(adab) %>%\n filter(\n ABLFL != \"Y\",\n PARAM == \"ADA interpreted per sample result\",\n AVALC == \"POSITIVE\"\n ) %>%\n mutate(ADAPFL = AVALC == \"POSITIVE\") %>%\n select(STUDYID, USUBJID, ARM, ACTARM, ADAPFL) %>%\n distinct()\n\n# Post-Baseline NAb Positive Pts\nadab_pb_nabp <- df_explicit_na(adab) %>%\n filter(\n ABLFL != \"Y\",\n PARAM == \"NAb interpreted per sample result\",\n AVALC == \"POSITIVE\"\n ) %>%\n mutate(NABPFL = AVALC == \"POSITIVE\") %>%\n select(STUDYID, USUBJID, ARM, ACTARM, NABPFL) %>%\n distinct()\n\n# Post-Baseline NAb Negative Pts\nadab_pb_nabn <- df_explicit_na(adab) %>%\n filter(\n ABLFL != \"Y\",\n PARAM == \"NAb interpreted per sample result\",\n AVALC == \"NEGATIVE\"\n ) %>%\n rename(NABNFL = AVALC) %>%\n select(STUDYID, USUBJID, ARM, ACTARM, NABNFL) %>%\n distinct()\n\nmergecol <- c(\"STUDYID\", \"USUBJID\", \"ARM\", \"ACTARM\")\n\nadab_pb <- left_join(adab_pb_ada, adab_pb_adap, by = mergecol) %>%\n left_join(adab_pb_nabp, by = mergecol) %>%\n mutate(\n NABNFL = ifelse(is.na(NABPFL), \"TRUE\", \"FALSE\"),\n NABNFL = NABNFL == \"TRUE\"\n ) %>%\n var_relabel(\n ADPBLPFL = \"Post-baseline evaluable patients for ADA\",\n ADAPFL = \"Patients positive for ADA\",\n NABPFL = \"Patients positive for NAb\",\n NABNFL = \"Patients negative for NAb\"\n )\n\n\n\n\n\nCode# Layout for Baseline Prevalence of NAbs\nlyt_bl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_combo_levels(combodf)\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = formatters::var_labels(adab_b[, c(\"ADABLPFL\", \"PADABLPFL\")]),\n .stats = \"count\",\n var_labels = \"Baseline Prevalence of NAbs\",\n show_labels = \"visible\",\n table_names = \"t1\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adab_b[, \"PNABBLFL\"]),\n table_names = \"t2\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adab_b[, \"NNABBLFL\"]),\n .stats = \"count\",\n table_names = \"t3\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n )\n\n# Layout for incidence of NAbs\nlyt_pb <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_combo_levels(combodf)\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = formatters::var_labels(adab_pb[, c(\"ADPBLPFL\", \"ADAPFL\")]),\n .stats = \"count\",\n var_labels = \"Incidence of NAbs\",\n show_labels = \"visible\",\n table_names = \"tb1\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = formatters::var_labels(data.frame(NABPFL = adab_pb[, \"NABPFL\"])),\n table_names = \"tb2\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(data.frame(NABNFL = adab_pb[, \"NABNFL\"])),\n .stats = \"count\",\n table_names = \"tb3\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n )\n\nresult_1 <- build_table(lyt_bl, df = adab_b, alt_counts_df = adsl)\nresult_2 <- build_table(lyt_pb, df = adab_pb, alt_counts_df = adsl)\n\n# Combine tables.\nresult <- rbind(result_1, result_2)\n\n# Change the column order.\nresult <- cbind_rtables(result[, 1], result[, 3]) %>%\n cbind_rtables(result[, 4]) %>%\n cbind_rtables(result[, 2]) %>%\n cbind_rtables(result[, 5])\n\nmain_title(result) <- paste(\n \"Baseline Prevalence and Incidence of Neutralizing Antibodies (NAbs)\"\n)\nsubtitles(result) <- paste(\"Protocol:\", unique(adab$PARCAT1)[1])\nmain_footer(result) <- paste(\n \"NAb = Neutralizing Antibodies ADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies) Baseline evaluable patient for ADA = a patient with an ADA assay result from a baseline sample(s) Baseline evaluable patient for NAb = a patient with a NAb assay result from a baseline sample(s) Post-baseline evaluable patient for ADA = a patient with an ADA assay result from at least one post-baseline sample Post-baseline evaluable patient for NAb = a patient with a NAb assay result from at least one post-baseline sample Number of patients positive for ADA = the number of post-baseline evaluable patients for ADA determined to have Treatment Emergent ADA during the study period.\nNumber of patients positive for NAb = the number (and percentage) of post-baseline evaluable patients for ADA determined to have at least one positive post-baseline NAb result during the study period. Number of patients negative for NAb = number of post-baseline evaluable patients with all negative post-baseline NAb results.\"\n)\nresult\n\nBaseline Prevalence and Incidence of Neutralizing Antibodies (NAbs)\nProtocol: A: Drug X Antibody\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X C: Combination <Missing> B: Placebo All Drug X\n (N=134) (N=132) (N=0) (N=134) (N=266) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nBaseline Prevalence of NAbs \n Baseline evaluable patients for ADA 134 132 0 0 266 \n Patients with a positive ADA sample at baseline 63 64 0 0 127 \nPatients with a positive NAb sample at baseline 0 0 NA NA 0 \nPatients with no positive NAb sample at baseline 0 0 0 0 0 \nIncidence of NAbs \n Post-baseline evaluable patients for ADA 134 132 0 0 266 \n Patients positive for ADA 66 59 0 0 125 \nPatients positive for NAb 0 0 NA NA 0 \nPatients negative for NAb 134 132 0 0 266 \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nNAb = Neutralizing Antibodies ADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies) Baseline evaluable patient for ADA = a patient with an ADA assay result from a baseline sample(s) Baseline evaluable patient for NAb = a patient with a NAb assay result from a baseline sample(s) Post-baseline evaluable patient for ADA = a patient with an ADA assay result from at least one post-baseline sample Post-baseline evaluable patient for NAb = a patient with a NAb assay result from at least one post-baseline sample Number of patients positive for ADA = the number of post-baseline evaluable patients for ADA determined to have Treatment Emergent ADA during the study period.\nNumber of patients positive for NAb = the number (and percentage) of post-baseline evaluable patients for ADA determined to have at least one positive post-baseline NAb result during the study period. Number of patients negative for NAb = number of post-baseline evaluable patients with all negative post-baseline NAb results.\n\n\n\n\n\nCode# In progress\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] tibble_3.2.1 scda_0.1.6.9010 dplyr_1.1.2 \n[4] tern_0.8.5.9006 rtables_0.6.2.9001 magrittr_2.0.3 \n[7] formatters_0.5.1.9001\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-0 gtable_0.3.3 jsonlite_1.8.7 compiler_4.3.1 \n [5] brio_1.1.3 tidyselect_1.2.0 tidyr_1.3.0 splines_4.3.1 \n [9] scales_1.2.1 yaml_2.3.7 fastmap_1.1.1 lattice_0.21-8 \n[13] ggplot2_3.4.2 R6_2.5.1 generics_0.1.3 knitr_1.43 \n[17] forcats_1.0.0 rbibutils_2.2.13 htmlwidgets_1.6.2 backports_1.4.1 \n[21] checkmate_2.2.0 munsell_0.5.0 pillar_1.9.0 rlang_1.1.1 \n[25] utf8_1.2.3 testthat_3.1.10 broom_1.0.5 xfun_0.39 \n[29] cli_3.6.1 withr_2.5.0 Rdpack_2.4 digest_0.6.33 \n[33] grid_4.3.1 rstudioapi_0.15.0 lifecycle_1.0.3 vctrs_0.6.3 \n[37] evaluate_0.21 glue_1.6.2 codetools_0.2-19 survival_3.5-5 \n[41] fansi_1.0.4 colorspace_2.1-0 purrr_1.0.1 rmarkdown_2.23 \n[45] tools_4.3.1 pkgconfig_2.0.3 htmltools_0.5.5 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- colorspace [* -> 2.1-0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- fs [* -> 1.6.3]\n- generics [* -> 0.1.3]\n- ggplot2 [* -> 3.4.2]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- highr [* -> 0.10]\n- htmltools [* -> 0.5.5]\n- isoband [* -> 0.2.7]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- lattice [* -> 0.21-8]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- praise [* -> 1.0.0]\n- processx [* -> 3.8.2]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quantreg [* -> 5.96]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- survival [* -> 3.5-5]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- yaml [* -> 2.3.7]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- tern [* -> 0.8.5.9006]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/pharmacokinetic/adat04b.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\nlibrary(tibble)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadab <- synthetic_cdisc_dataset(\"latest\", \"adab\")\n\ncombodf <- tribble(\n ~valname, ~label, ~levelcombo, ~exargs,\n \"all_X\", \"All Drug X\", c(\"A: Drug X\", \"C: Combination\"), list(),\n \"all_pt\", \"All Patients\", c(\"A: Drug X\", \"B: Placebo\", \"C: Combination\"), list()\n)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\n\n# Baseline Pts\nadab_b <- df_explicit_na(adab) %>%\n filter(\n ABLFL == \"Y\",\n ADABLPFL == \"Y\",\n PARAM %in% c(\n \"ADA interpreted per sample result\",\n \"NAB interpreted per sample result\"\n )\n ) %>%\n select(-PARAMCD, -AVALC, -AVALU) %>%\n tidyr::pivot_wider(\n names_from = PARAM,\n values_from = AVAL\n ) %>%\n mutate(\n across(\n any_of(c(\n \"ADA interpreted per sample result\",\n \"NAB interpreted per sample result\"\n )),\n as.logical\n )\n ) %>%\n mutate(\n ADABLPFL = ADABLPFL == \"Y\",\n PADABLPFL = if (exists(\"ADA interpreted per sample result\", where = .)) `ADA interpreted per sample result` == \"TRUE\" else FALSE,\n PNABBLFL = if (exists(\"NAB interpreted per sample result\", where = .)) `NAB interpreted per sample result` == \"TRUE\" else FALSE,\n NNABBLFL = if (exists(\"NAB interpreted per sample result\", where = .)) `NAB interpreted per sample result` == \"FALSE\" else FALSE\n ) %>%\n var_relabel(\n ADABLPFL = \"Baseline evaluable patients for ADA\",\n PADABLPFL = \"Patients with a positive ADA sample at baseline\",\n PNABBLFL = \"Patients with a positive NAb sample at baseline\",\n NNABBLFL = \"Patients with no positive NAb sample at baseline\"\n )\n\n# Post-Baseline Evaluable Pts\nadab_pb_ada <- df_explicit_na(adab) %>%\n filter(ADPBLPFL == \"Y\") %>%\n select(STUDYID, USUBJID, ARM, ACTARM, ADPBLPFL) %>%\n mutate(ADPBLPFL = ADPBLPFL == \"Y\") %>%\n distinct()\n\n# Post-Baseline ADA Positive Pts\nadab_pb_adap <- df_explicit_na(adab) %>%\n filter(\n ABLFL != \"Y\",\n PARAM == \"ADA interpreted per sample result\",\n AVALC == \"POSITIVE\"\n ) %>%\n mutate(ADAPFL = AVALC == \"POSITIVE\") %>%\n select(STUDYID, USUBJID, ARM, ACTARM, ADAPFL) %>%\n distinct()\n\n# Post-Baseline NAb Positive Pts\nadab_pb_nabp <- df_explicit_na(adab) %>%\n filter(\n ABLFL != \"Y\",\n PARAM == \"NAb interpreted per sample result\",\n AVALC == \"POSITIVE\"\n ) %>%\n mutate(NABPFL = AVALC == \"POSITIVE\") %>%\n select(STUDYID, USUBJID, ARM, ACTARM, NABPFL) %>%\n distinct()\n\n# Post-Baseline NAb Negative Pts\nadab_pb_nabn <- df_explicit_na(adab) %>%\n filter(\n ABLFL != \"Y\",\n PARAM == \"NAb interpreted per sample result\",\n AVALC == \"NEGATIVE\"\n ) %>%\n rename(NABNFL = AVALC) %>%\n select(STUDYID, USUBJID, ARM, ACTARM, NABNFL) %>%\n distinct()\n\nmergecol <- c(\"STUDYID\", \"USUBJID\", \"ARM\", \"ACTARM\")\n\nadab_pb <- left_join(adab_pb_ada, adab_pb_adap, by = mergecol) %>%\n left_join(adab_pb_nabp, by = mergecol) %>%\n mutate(\n NABNFL = ifelse(is.na(NABPFL), \"TRUE\", \"FALSE\"),\n NABNFL = NABNFL == \"TRUE\"\n ) %>%\n var_relabel(\n ADPBLPFL = \"Post-baseline evaluable patients for ADA\",\n ADAPFL = \"Patients positive for ADA\",\n NABPFL = \"Patients positive for NAb\",\n NABNFL = \"Patients negative for NAb\"\n )\n\n\n\n\n\nCode# Layout for Baseline Prevalence of NAbs\nlyt_bl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_combo_levels(combodf)\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = c(\"ADABLPFL\", \"PADABLPFL\"),\n .stats = \"count\",\n var_labels = \"Baseline Prevalence of NAbs\",\n show_labels = \"visible\",\n table_names = \"t1\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"PNABBLFL\",\n table_names = \"t2\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"NNABBLFL\",\n .stats = \"count\",\n table_names = \"t3\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n )\n\n# Layout for incidence of NAbs\nlyt_pb <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_combo_levels(combodf)\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = c(\"ADPBLPFL\", \"ADAPFL\"),\n .stats = \"count\",\n var_labels = \"Incidence of NAbs\",\n show_labels = \"visible\",\n table_names = \"tb1\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"NABPFL\",\n table_names = \"tb2\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"NABNFL\",\n .stats = \"count\",\n table_names = \"tb3\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n )\n\nresult_1 <- build_table(lyt_bl, df = adab_b, alt_counts_df = adsl)\nresult_2 <- build_table(lyt_pb, df = adab_pb, alt_counts_df = adsl)\n\n# Combine tables.\nresult <- rbind(result_1, result_2)\n\n# Change the column order.\nresult <- cbind_rtables(result[, 1], result[, 3]) %>%\n cbind_rtables(result[, 4]) %>%\n cbind_rtables(result[, 2]) %>%\n cbind_rtables(result[, 5])\n\nmain_title(result) <- paste(\n \"Baseline Prevalence and Incidence of Neutralizing Antibodies (NAbs)\"\n)\nsubtitles(result) <- paste(\"Protocol:\", unique(adab$PARCAT1)[1])\nmain_footer(result) <- paste(\n \"NAb = Neutralizing Antibodies ADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies) Baseline evaluable patient for ADA = a patient with an ADA assay result from a baseline sample(s) Baseline evaluable patient for NAb = a patient with a NAb assay result from a baseline sample(s) Post-baseline evaluable patient for ADA = a patient with an ADA assay result from at least one post-baseline sample Post-baseline evaluable patient for NAb = a patient with a NAb assay result from at least one post-baseline sample Number of patients positive for ADA = the number of post-baseline evaluable patients for ADA determined to have Treatment Emergent ADA during the study period.\nNumber of patients positive for NAb = the number (and percentage) of post-baseline evaluable patients for ADA determined to have at least one positive post-baseline NAb result during the study period. Number of patients negative for NAb = number of post-baseline evaluable patients with all negative post-baseline NAb results.\"\n)\nresult\n\nBaseline Prevalence and Incidence of Neutralizing Antibodies (NAbs)\nProtocol: A: Drug X Antibody\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X C: Combination <Missing> B: Placebo All Drug X\n (N=134) (N=132) (N=0) (N=134) (N=266) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nBaseline Prevalence of NAbs \n Baseline evaluable patients for ADA 134 132 0 0 266 \n Patients with a positive ADA sample at baseline 63 64 0 0 127 \nPatients with a positive NAb sample at baseline 0 0 NA NA 0 \nPatients with no positive NAb sample at baseline 0 0 0 0 0 \nIncidence of NAbs \n Post-baseline evaluable patients for ADA 134 132 0 0 266 \n Patients positive for ADA 66 59 0 0 125 \nPatients positive for NAb 0 0 NA NA 0 \nPatients negative for NAb 134 132 0 0 266 \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nNAb = Neutralizing Antibodies ADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies) Baseline evaluable patient for ADA = a patient with an ADA assay result from a baseline sample(s) Baseline evaluable patient for NAb = a patient with a NAb assay result from a baseline sample(s) Post-baseline evaluable patient for ADA = a patient with an ADA assay result from at least one post-baseline sample Post-baseline evaluable patient for NAb = a patient with a NAb assay result from at least one post-baseline sample Number of patients positive for ADA = the number of post-baseline evaluable patients for ADA determined to have Treatment Emergent ADA during the study period.\nNumber of patients positive for NAb = the number (and percentage) of post-baseline evaluable patients for ADA determined to have at least one positive post-baseline NAb result during the study period. Number of patients negative for NAb = number of post-baseline evaluable patients with all negative post-baseline NAb results.\n\n\n\n\n\nCode# In progress\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] tibble_3.2.1 scda_0.1.6.9010 dplyr_1.1.2 \n[4] tern_0.8.5.9006 rtables_0.6.2.9001 magrittr_2.0.3 \n[7] formatters_0.5.1.9001\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-0 gtable_0.3.3 jsonlite_1.8.7 compiler_4.3.1 \n [5] brio_1.1.3 tidyselect_1.2.0 tidyr_1.3.0 splines_4.3.1 \n [9] scales_1.2.1 yaml_2.3.7 fastmap_1.1.1 lattice_0.21-8 \n[13] ggplot2_3.4.2 R6_2.5.1 generics_0.1.3 knitr_1.43 \n[17] forcats_1.0.0 rbibutils_2.2.13 htmlwidgets_1.6.2 backports_1.4.1 \n[21] checkmate_2.2.0 munsell_0.5.0 pillar_1.9.0 rlang_1.1.1 \n[25] utf8_1.2.3 testthat_3.1.10 broom_1.0.5 xfun_0.39 \n[29] cli_3.6.1 withr_2.5.0 Rdpack_2.4 digest_0.6.33 \n[33] grid_4.3.1 rstudioapi_0.15.0 lifecycle_1.0.3 vctrs_0.6.3 \n[37] evaluate_0.21 glue_1.6.2 codetools_0.2-19 survival_3.5-5 \n[41] fansi_1.0.4 colorspace_2.1-0 purrr_1.0.1 rmarkdown_2.23 \n[45] tools_4.3.1 pkgconfig_2.0.3 htmltools_0.5.5 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- colorspace [* -> 2.1-0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- fs [* -> 1.6.3]\n- generics [* -> 0.1.3]\n- ggplot2 [* -> 3.4.2]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- highr [* -> 0.10]\n- htmltools [* -> 0.5.5]\n- isoband [* -> 0.2.7]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- lattice [* -> 0.21-8]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- praise [* -> 1.0.0]\n- processx [* -> 3.8.2]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quantreg [* -> 5.96]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- survival [* -> 3.5-5]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- yaml [* -> 2.3.7]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- tern [* -> 0.8.5.9006]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/pharmacokinetic/adat04b.lock'.\n\n\nDownload" }, { "objectID": "tables/pharmacokinetic/adat01.html", "href": "tables/pharmacokinetic/adat01.html", "title": "ADAT01", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\nlibrary(tibble)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadab <- synthetic_cdisc_dataset(\"latest\", \"adab\")\n\ncombodf <- tribble(\n ~valname, ~label, ~levelcombo, ~exargs,\n \"all_X\", \"All Drug X\", c(\"A: Drug X\", \"C: Combination\"), list(),\n \"all_pt\", \"All Patients\", c(\"A: Drug X\", \"B: Placebo\", \"C: Combination\"), list()\n)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadab <- adab %>%\n filter(PARCAT1 == \"A: Drug X Antibody\") %>%\n select(-ARRLT, -NRRLT)\n\n# Baseline Pts\nadab_b <- df_explicit_na(adab) %>%\n filter(\n ABLFL == \"Y\",\n ADABLPFL == \"Y\",\n PARAM %in% c(\"ADA interpreted per sample result\")\n ) %>%\n select(-PARAMCD, -AVALC, -AVALU) %>%\n tidyr::pivot_wider(\n names_from = PARAM,\n values_from = AVAL\n ) %>%\n mutate_at(\n c(\"ADA interpreted per sample result\"),\n as.logical\n ) %>%\n mutate(\n ADABLPFL = ADABLPFL == \"Y\",\n PADABLPFL = `ADA interpreted per sample result` == \"TRUE\",\n NADABLPFL = `ADA interpreted per sample result` == \"FALSE\"\n ) %>%\n var_relabel(\n ADABLPFL = \"Baseline evaluable patients\",\n PADABLPFL = \"Patient with a positive sample at baseline\",\n NADABLPFL = \"Patient with no positive samples at baseline\"\n )\n\n# Post Baseline Treatment Enhanced NAb positive Pts\nadab_pb <- df_explicit_na(adab) %>%\n filter(\n ABLFL != \"Y\",\n ADPBLPFL == \"Y\",\n PARAM %in% c(\n \"ADA interpreted per sample result\",\n \"Treatment Emergent - Positive\",\n \"Treatment induced ADA\",\n \"Treatment enhanced ADA\",\n \"Treatment Emergent - Negative\",\n \"Treatment unaffected\"\n )\n ) %>%\n select(-PARAMCD, -AVALC, -AVALU) %>%\n unique() %>%\n tidyr::pivot_wider(\n names_from = PARAM,\n values_from = AVAL\n ) %>%\n mutate(\n across(\n any_of(c(\n \"ADA interpreted per sample result\", \"Treatment Emergent - Positive\",\n \"Treatment induced ADA\", \"Treatment enhanced ADA\",\n \"Treatment Emergent - Negative\", \"Treatment unaffected\"\n )),\n as.logical\n )\n ) %>%\n mutate(\n ADPBLPFL = ADPBLPFL == \"Y\",\n PTEFL = if (exists(\"Treatment Emergent - Positive\", where = .)) `Treatment Emergent - Positive` == \"TRUE\" else FALSE,\n TIFL = if (exists(\"Treatment induced ADA\", where = .)) `Treatment induced ADA` == \"TRUE\" else FALSE,\n TEFL = if (exists(\"Treatment enhanced ADA\", where = .)) `Treatment enhanced ADA` == \"TRUE\" else FALSE,\n NTEFL = if (exists(\"Treatment Emergent - Negative\", where = .)) `Treatment Emergent - Negative` == \"TRUE\" else FALSE,\n TUFL = if (exists(\"Treatment unaffected\", where = .)) `Treatment unaffected` == \"TRUE\" else FALSE\n ) %>%\n var_relabel(\n ADPBLPFL = \"Post-baseline evaluable patients\",\n PTEFL = \"Patient positive for Treatment Emergent ADA\",\n TIFL = \"Treatment-induced ADA\",\n TEFL = \"Treatment-enhanced ADA\",\n NTEFL = \"Patient negative for Treatment Emergent ADA\",\n TUFL = \"Treatment unaffected\"\n )\n\n\n\n\n\nCode# Layout for Baseline Prevalence of NAbs\nlyt_bl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_combo_levels(combodf)\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = formatters::var_labels(adab_b[, c(\"ADABLPFL\")]),\n .stats = \"count\",\n var_labels = \"Baseline Prevalence of ADAs\",\n show_labels = \"visible\",\n table_names = \"t1\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adab_b[, \"PADABLPFL\"]),\n table_names = \"t2\",\n .indent_mods = 1L,\n var_labels = \"a\",\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = formatters::var_labels(adab_b[, c(\"NADABLPFL\")]),\n .stats = \"count\",\n show_labels = \"hidden\",\n .indent_mods = 1L,\n table_names = \"t3\"\n )\n\n# Layout for incidence of NAbs\nlyt_pb <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_combo_levels(combodf)\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = formatters::var_labels(adab_pb[, c(\"ADPBLPFL\")]),\n .stats = \"count\",\n var_labels = \"Incidence of Treatment Emergent ADAs\",\n show_labels = \"visible\",\n table_names = \"tb1\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = formatters::var_labels(data.frame(PTEFL = adab_pb[, \"PTEFL\"])),\n table_names = \"tb2\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = formatters::var_labels(adab_pb[, c(\"TIFL\", \"TEFL\")]),\n .stats = \"count\",\n table_names = \"tb3\",\n .indent_mods = 2L,\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = formatters::var_labels(data.frame(NTEFL = adab_pb[, \"NTEFL\"])),\n table_names = \"tb4\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = formatters::var_labels(data.frame(TUFL = adab_pb[, \"TUFL\"])),\n .stats = \"count\",\n table_names = \"tb5\",\n .indent_mods = 2L,\n show_labels = \"hidden\"\n )\n\nresult_1 <- build_table(lyt_bl, df = adab_b, alt_counts_df = adsl)\nresult_2 <- build_table(lyt_pb, df = adab_pb, alt_counts_df = adsl)\n\n# Combine tables.\nresult_1@col_info <- result_2@col_info\nresult <- rbind(result_1, result_2)\n\n# Change the column order.\nresult <- cbind_rtables(result[, 1], result[, 3]) %>%\n cbind_rtables(result[, 4]) %>%\n cbind_rtables(result[, 2]) %>%\n cbind_rtables(result[, 5])\n\nmain_title(result) <- paste(\n \"Baseline Prevalence and Incidence of Treatment Emergent ADA\"\n)\nmain_footer(result) <- paste(\n \"ADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies) Baseline evaluable patient = a patient with an ADA assay result from a baseline sample(s)\n Post-baseline evaluable patient = a patient with an ADA assay result from at least one post-baseline sample Number of patients positive for Treatment Emergent\n ADA = the number (and percentage) of post-baseline evaluable patients determined to have treatment-induced ADA or treatment-enhanced ADA during the study period.\n Treatment-induced ADA = a patient with negative or missing baseline ADA result(s) and at least one positive post-baseline ADA result.\n Treatment-enhanced ADA = a patient with positive ADA result at baseline who has one or more post-baseline titer results that are at least 0.60 t.u. greater than the baseline titer result.\n Number of patients negative for Treatment Emergent ADA = number of post-baseline evaluable patients with negative or missing baseline ADA result(s) and all negative post-baseline results, or a patient who is treatment unaffected.\n Treatment unaffected = A post-baseline evaluable patient with a positive ADA result at baseline and (a) where all post-baseline titer results are less than 0.60 t.u. greater than the baseline titer result, OR (b) where all post-baseline results are negative or missing.\n For any positive sample with titer result less than the minimum reportable titer or any positive sample where a titer cannot be obtained, titer value is imputed as equal to the minimum reportable titer.\"\n)\nresult\n\nBaseline Prevalence and Incidence of Treatment Emergent ADA\n\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X C: Combination <Missing> B: Placebo All Drug X \n (N=134) (N=132) (N=0) (N=134) (N=266) \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nBaseline Prevalence of ADAs \n Baseline evaluable patients 134 132 0 0 266 \nPatient with a positive sample at baseline 63 (47.0%) 64 (48.5%) NA NA 127 (47.7%)\nPatient with no positive samples at baseline 71 68 0 0 139 \nIncidence of Treatment Emergent ADAs \n Post-baseline evaluable patients 134 132 0 0 266 \nPatient positive for Treatment Emergent ADA 0 0 NA NA 0 \nTreatment-induced ADA 0 0 0 0 0 \nTreatment-enhanced ADA 0 0 0 0 0 \nPatient negative for Treatment Emergent ADA 0 0 NA NA 0 \nTreatment unaffected 0 0 0 0 0 \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies) Baseline evaluable patient = a patient with an ADA assay result from a baseline sample(s)\n Post-baseline evaluable patient = a patient with an ADA assay result from at least one post-baseline sample Number of patients positive for Treatment Emergent\n ADA = the number (and percentage) of post-baseline evaluable patients determined to have treatment-induced ADA or treatment-enhanced ADA during the study period.\n Treatment-induced ADA = a patient with negative or missing baseline ADA result(s) and at least one positive post-baseline ADA result.\n Treatment-enhanced ADA = a patient with positive ADA result at baseline who has one or more post-baseline titer results that are at least 0.60 t.u. greater than the baseline titer result.\n Number of patients negative for Treatment Emergent ADA = number of post-baseline evaluable patients with negative or missing baseline ADA result(s) and all negative post-baseline results, or a patient who is treatment unaffected.\n Treatment unaffected = A post-baseline evaluable patient with a positive ADA result at baseline and (a) where all post-baseline titer results are less than 0.60 t.u. greater than the baseline titer result, OR (b) where all post-baseline results are negative or missing.\n For any positive sample with titer result less than the minimum reportable titer or any positive sample where a titer cannot be obtained, titer value is imputed as equal to the minimum reportable titer.\n\n\n\n\n\nCode# In progress\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] tibble_3.2.1 scda_0.1.6.9010 dplyr_1.1.2 \n[4] tern_0.8.5.9006 rtables_0.6.2.9001 magrittr_2.0.3 \n[7] formatters_0.5.1.9001\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-0 gtable_0.3.3 jsonlite_1.8.7 compiler_4.3.1 \n [5] brio_1.1.3 tidyselect_1.2.0 tidyr_1.3.0 splines_4.3.1 \n [9] scales_1.2.1 yaml_2.3.7 fastmap_1.1.1 lattice_0.21-8 \n[13] ggplot2_3.4.2 R6_2.5.1 generics_0.1.3 knitr_1.43 \n[17] forcats_1.0.0 rbibutils_2.2.13 htmlwidgets_1.6.2 backports_1.4.1 \n[21] checkmate_2.2.0 munsell_0.5.0 pillar_1.9.0 rlang_1.1.1 \n[25] utf8_1.2.3 testthat_3.1.10 broom_1.0.5 xfun_0.39 \n[29] cli_3.6.1 withr_2.5.0 Rdpack_2.4 digest_0.6.33 \n[33] grid_4.3.1 rstudioapi_0.15.0 lifecycle_1.0.3 vctrs_0.6.3 \n[37] evaluate_0.21 glue_1.6.2 codetools_0.2-19 survival_3.5-5 \n[41] fansi_1.0.4 colorspace_2.1-0 purrr_1.0.1 rmarkdown_2.23 \n[45] tools_4.3.1 pkgconfig_2.0.3 htmltools_0.5.5 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- colorspace [* -> 2.1-0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- fs [* -> 1.6.3]\n- generics [* -> 0.1.3]\n- ggplot2 [* -> 3.4.2]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- highr [* -> 0.10]\n- htmltools [* -> 0.5.5]\n- isoband [* -> 0.2.7]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- lattice [* -> 0.21-8]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- praise [* -> 1.0.0]\n- processx [* -> 3.8.2]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quantreg [* -> 5.96]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- survival [* -> 3.5-5]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- yaml [* -> 2.3.7]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- tern [* -> 0.8.5.9006]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/pharmacokinetic/adat01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\nlibrary(tibble)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadab <- synthetic_cdisc_dataset(\"latest\", \"adab\")\n\ncombodf <- tribble(\n ~valname, ~label, ~levelcombo, ~exargs,\n \"all_X\", \"All Drug X\", c(\"A: Drug X\", \"C: Combination\"), list(),\n \"all_pt\", \"All Patients\", c(\"A: Drug X\", \"B: Placebo\", \"C: Combination\"), list()\n)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadab <- adab %>%\n filter(PARCAT1 == \"A: Drug X Antibody\") %>%\n select(-ARRLT, -NRRLT)\n\n# Baseline Pts\nadab_b <- df_explicit_na(adab) %>%\n filter(\n ABLFL == \"Y\",\n ADABLPFL == \"Y\",\n PARAM %in% c(\"ADA interpreted per sample result\")\n ) %>%\n select(-PARAMCD, -AVALC, -AVALU) %>%\n tidyr::pivot_wider(\n names_from = PARAM,\n values_from = AVAL\n ) %>%\n mutate_at(\n c(\"ADA interpreted per sample result\"),\n as.logical\n ) %>%\n mutate(\n ADABLPFL = ADABLPFL == \"Y\",\n PADABLPFL = `ADA interpreted per sample result` == \"TRUE\",\n NADABLPFL = `ADA interpreted per sample result` == \"FALSE\"\n ) %>%\n var_relabel(\n ADABLPFL = \"Baseline evaluable patients\",\n PADABLPFL = \"Patient with a positive sample at baseline\",\n NADABLPFL = \"Patient with no positive samples at baseline\"\n )\n\n# Post Baseline Treatment Enhanced NAb positive Pts\nadab_pb <- df_explicit_na(adab) %>%\n filter(\n ABLFL != \"Y\",\n ADPBLPFL == \"Y\",\n PARAM %in% c(\n \"ADA interpreted per sample result\",\n \"Treatment Emergent - Positive\",\n \"Treatment induced ADA\",\n \"Treatment enhanced ADA\",\n \"Treatment Emergent - Negative\",\n \"Treatment unaffected\"\n )\n ) %>%\n select(-PARAMCD, -AVALC, -AVALU) %>%\n unique() %>%\n tidyr::pivot_wider(\n names_from = PARAM,\n values_from = AVAL\n ) %>%\n mutate(\n across(\n any_of(c(\n \"ADA interpreted per sample result\", \"Treatment Emergent - Positive\",\n \"Treatment induced ADA\", \"Treatment enhanced ADA\",\n \"Treatment Emergent - Negative\", \"Treatment unaffected\"\n )),\n as.logical\n )\n ) %>%\n mutate(\n ADPBLPFL = ADPBLPFL == \"Y\",\n PTEFL = if (exists(\"Treatment Emergent - Positive\", where = .)) `Treatment Emergent - Positive` == \"TRUE\" else FALSE,\n TIFL = if (exists(\"Treatment induced ADA\", where = .)) `Treatment induced ADA` == \"TRUE\" else FALSE,\n TEFL = if (exists(\"Treatment enhanced ADA\", where = .)) `Treatment enhanced ADA` == \"TRUE\" else FALSE,\n NTEFL = if (exists(\"Treatment Emergent - Negative\", where = .)) `Treatment Emergent - Negative` == \"TRUE\" else FALSE,\n TUFL = if (exists(\"Treatment unaffected\", where = .)) `Treatment unaffected` == \"TRUE\" else FALSE\n ) %>%\n var_relabel(\n ADPBLPFL = \"Post-baseline evaluable patients\",\n PTEFL = \"Patient positive for Treatment Emergent ADA\",\n TIFL = \"Treatment-induced ADA\",\n TEFL = \"Treatment-enhanced ADA\",\n NTEFL = \"Patient negative for Treatment Emergent ADA\",\n TUFL = \"Treatment unaffected\"\n )\n\n\n\n\n\nCode# Layout for Baseline Prevalence of NAbs\nlyt_bl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_combo_levels(combodf)\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"ADABLPFL\",\n .stats = \"count\",\n var_labels = \"Baseline Prevalence of ADAs\",\n show_labels = \"visible\",\n table_names = \"t1\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"PADABLPFL\",\n table_names = \"t2\",\n .indent_mods = 1L,\n var_labels = \"a\",\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"NADABLPFL\",\n .stats = \"count\",\n show_labels = \"hidden\",\n .indent_mods = 1L,\n table_names = \"t3\"\n )\n\n# Layout for incidence of NAbs\nlyt_pb <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_combo_levels(combodf)\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"ADPBLPFL\",\n .stats = \"count\",\n var_labels = \"Incidence of Treatment Emergent ADAs\",\n show_labels = \"visible\",\n table_names = \"tb1\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"PTEFL\",\n table_names = \"tb2\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = c(\"TIFL\", \"TEFL\"),\n .stats = \"count\",\n table_names = \"tb3\",\n .indent_mods = 2L,\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"NTEFL\",\n table_names = \"tb4\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"TUFL\",\n .stats = \"count\",\n table_names = \"tb5\",\n .indent_mods = 2L,\n show_labels = \"hidden\"\n )\n\nresult_1 <- build_table(lyt_bl, df = adab_b, alt_counts_df = adsl)\nresult_2 <- build_table(lyt_pb, df = adab_pb, alt_counts_df = adsl)\n\n# Combine tables.\nresult_1@col_info <- result_2@col_info\nresult <- rbind(result_1, result_2)\n\n# Change the column order.\nresult <- cbind_rtables(result[, 1], result[, 3]) %>%\n cbind_rtables(result[, 4]) %>%\n cbind_rtables(result[, 2]) %>%\n cbind_rtables(result[, 5])\n\nmain_title(result) <- paste(\n \"Baseline Prevalence and Incidence of Treatment Emergent ADA\"\n)\nmain_footer(result) <- paste(\n \"ADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies) Baseline evaluable patient = a patient with an ADA assay result from a baseline sample(s)\n Post-baseline evaluable patient = a patient with an ADA assay result from at least one post-baseline sample Number of patients positive for Treatment Emergent\n ADA = the number (and percentage) of post-baseline evaluable patients determined to have treatment-induced ADA or treatment-enhanced ADA during the study period.\n Treatment-induced ADA = a patient with negative or missing baseline ADA result(s) and at least one positive post-baseline ADA result.\n Treatment-enhanced ADA = a patient with positive ADA result at baseline who has one or more post-baseline titer results that are at least 0.60 t.u. greater than the baseline titer result.\n Number of patients negative for Treatment Emergent ADA = number of post-baseline evaluable patients with negative or missing baseline ADA result(s) and all negative post-baseline results, or a patient who is treatment unaffected.\n Treatment unaffected = A post-baseline evaluable patient with a positive ADA result at baseline and (a) where all post-baseline titer results are less than 0.60 t.u. greater than the baseline titer result, OR (b) where all post-baseline results are negative or missing.\n For any positive sample with titer result less than the minimum reportable titer or any positive sample where a titer cannot be obtained, titer value is imputed as equal to the minimum reportable titer.\"\n)\nresult\n\nBaseline Prevalence and Incidence of Treatment Emergent ADA\n\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X C: Combination <Missing> B: Placebo All Drug X \n (N=134) (N=132) (N=0) (N=134) (N=266) \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nBaseline Prevalence of ADAs \n Baseline evaluable patients 134 132 0 0 266 \nPatient with a positive sample at baseline 63 (47.0%) 64 (48.5%) NA NA 127 (47.7%)\nPatient with no positive samples at baseline 71 68 0 0 139 \nIncidence of Treatment Emergent ADAs \n Post-baseline evaluable patients 134 132 0 0 266 \nPatient positive for Treatment Emergent ADA 0 0 NA NA 0 \nTreatment-induced ADA 0 0 0 0 0 \nTreatment-enhanced ADA 0 0 0 0 0 \nPatient negative for Treatment Emergent ADA 0 0 NA NA 0 \nTreatment unaffected 0 0 0 0 0 \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies) Baseline evaluable patient = a patient with an ADA assay result from a baseline sample(s)\n Post-baseline evaluable patient = a patient with an ADA assay result from at least one post-baseline sample Number of patients positive for Treatment Emergent\n ADA = the number (and percentage) of post-baseline evaluable patients determined to have treatment-induced ADA or treatment-enhanced ADA during the study period.\n Treatment-induced ADA = a patient with negative or missing baseline ADA result(s) and at least one positive post-baseline ADA result.\n Treatment-enhanced ADA = a patient with positive ADA result at baseline who has one or more post-baseline titer results that are at least 0.60 t.u. greater than the baseline titer result.\n Number of patients negative for Treatment Emergent ADA = number of post-baseline evaluable patients with negative or missing baseline ADA result(s) and all negative post-baseline results, or a patient who is treatment unaffected.\n Treatment unaffected = A post-baseline evaluable patient with a positive ADA result at baseline and (a) where all post-baseline titer results are less than 0.60 t.u. greater than the baseline titer result, OR (b) where all post-baseline results are negative or missing.\n For any positive sample with titer result less than the minimum reportable titer or any positive sample where a titer cannot be obtained, titer value is imputed as equal to the minimum reportable titer.\n\n\n\n\n\nCode# In progress\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] tibble_3.2.1 scda_0.1.6.9010 dplyr_1.1.2 \n[4] tern_0.8.5.9006 rtables_0.6.2.9001 magrittr_2.0.3 \n[7] formatters_0.5.1.9001\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-0 gtable_0.3.3 jsonlite_1.8.7 compiler_4.3.1 \n [5] brio_1.1.3 tidyselect_1.2.0 tidyr_1.3.0 splines_4.3.1 \n [9] scales_1.2.1 yaml_2.3.7 fastmap_1.1.1 lattice_0.21-8 \n[13] ggplot2_3.4.2 R6_2.5.1 generics_0.1.3 knitr_1.43 \n[17] forcats_1.0.0 rbibutils_2.2.13 htmlwidgets_1.6.2 backports_1.4.1 \n[21] checkmate_2.2.0 munsell_0.5.0 pillar_1.9.0 rlang_1.1.1 \n[25] utf8_1.2.3 testthat_3.1.10 broom_1.0.5 xfun_0.39 \n[29] cli_3.6.1 withr_2.5.0 Rdpack_2.4 digest_0.6.33 \n[33] grid_4.3.1 rstudioapi_0.15.0 lifecycle_1.0.3 vctrs_0.6.3 \n[37] evaluate_0.21 glue_1.6.2 codetools_0.2-19 survival_3.5-5 \n[41] fansi_1.0.4 colorspace_2.1-0 purrr_1.0.1 rmarkdown_2.23 \n[45] tools_4.3.1 pkgconfig_2.0.3 htmltools_0.5.5 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- colorspace [* -> 2.1-0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- fs [* -> 1.6.3]\n- generics [* -> 0.1.3]\n- ggplot2 [* -> 3.4.2]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- highr [* -> 0.10]\n- htmltools [* -> 0.5.5]\n- isoband [* -> 0.2.7]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- lattice [* -> 0.21-8]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- praise [* -> 1.0.0]\n- processx [* -> 3.8.2]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quantreg [* -> 5.96]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- survival [* -> 3.5-5]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- yaml [* -> 2.3.7]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- tern [* -> 0.8.5.9006]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/pharmacokinetic/adat01.lock'.\n\n\nDownload" }, { "objectID": "tables/pharmacokinetic/pkpt03.html", @@ -893,7 +893,7 @@ "href": "tables/pharmacokinetic/adat04a.html", "title": "ADAT04A", "section": "", - "text": "Data Setup\nSummary of Treatment Emergent NAbs\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\nlibrary(tibble)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadab <- synthetic_cdisc_dataset(\"latest\", \"adab\")\n\ncombodf <- tribble(\n ~valname, ~label, ~levelcombo, ~exargs,\n \"all_X\", \"All Drug X\", c(\"A: Drug X\", \"C: Combination\"), list(),\n \"all_pt\", \"All Patients\", c(\"A: Drug X\", \"B: Placebo\", \"C: Combination\"), list()\n)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\n\n# Baseline Pts\nadab_b <- df_explicit_na(adab) %>%\n filter(\n ABLFL == \"Y\",\n ADABLPFL == \"Y\",\n PARAM %in% c(\n \"ADA interpreted per sample result\",\n \"NAB interpreted per sample result\"\n )\n ) %>%\n select(-PARAMCD, -AVALC, -AVALU) %>%\n tidyr::pivot_wider(\n names_from = PARAM,\n values_from = AVAL\n ) %>%\n mutate(\n across(\n any_of(c(\n \"ADA interpreted per sample result\",\n \"NAB interpreted per sample result\"\n )),\n as.logical\n )\n ) %>%\n mutate(\n ADABLPFL = ADABLPFL == \"Y\",\n PADABLPFL = if (exists(\"ADA interpreted per sample result\", where = .)) `ADA interpreted per sample result` == \"TRUE\" else FALSE,\n PNABBLFL = if (exists(\"NAB interpreted per sample result\", where = .)) `NAB interpreted per sample result` == \"TRUE\" else FALSE,\n NNABBLFL = if (exists(\"NAB interpreted per sample result\", where = .)) `NAB interpreted per sample result` == \"FALSE\" else FALSE\n ) %>%\n var_relabel(\n ADABLPFL = \"Baseline evaluable patients for ADA\",\n PADABLPFL = \"Patients with a positive ADA sample at baseline\",\n PNABBLFL = \"Patients with a positive NAb sample at baseline\",\n NNABBLFL = \"Patient with no positive NAb samples at baseline\"\n )\n\n# Post Baseline Treatment Enhanced NAb positive Pts\nadab_pb <- df_explicit_na(adab) %>%\n filter(\n ABLFL != \"Y\",\n ADPBLPFL == \"Y\",\n PARAM %in% c(\n \"ADA interpreted per sample result\",\n \"Treatment Emergent - Positive, Neutralizing Antibody\",\n \"Treatment induced ADA, Neutralizing Antibody\",\n \"Treatment enhanced ADA, Neutralizing Antibody\",\n \"NAB interpreted per sample result\",\n \"Treatment unaffected, Neutralizing Antibody\"\n )\n ) %>%\n select(-PARAMCD, -AVALC, -AVALU, -ARRLT, -NRRLT) %>%\n unique() %>%\n tidyr::pivot_wider(\n names_from = PARAM,\n values_from = AVAL\n ) %>%\n mutate(\n across(\n any_of(c(\n \"ADA interpreted per sample result\", \"NAB interpreted per sample result\",\n \"Treatment Emergent - Positive, Neutralizing Antibody\",\n \"Treatment induced ADA, Neutralizing Antibody\",\n \"Treatment enhanced ADA, Neutralizing Antibody\",\n \"Treatment unaffected, Neutralizing Antibody\"\n )),\n as.logical\n )\n ) %>%\n mutate(\n ADPBLPFL = ADPBLPFL == \"Y\",\n ADAPFL = if (exists(\"ADA interpreted per sample result\", where = .)) `ADA interpreted per sample result` == \"TRUE\" else FALSE,\n TENABPFL = if (exists(\"Treatment Emergent - Positive, Neutralizing Antibody\", where = .)) `Treatment Emergent - Positive, Neutralizing Antibody` == \"TRUE\" else FALSE,\n TINPBFL = if (exists(\"Treatment induced ADA, Neutralizing Antibody\", where = .)) `Treatment induced ADA, Neutralizing Antibody` == \"TRUE\" else FALSE,\n TENPBFL = if (exists(\"Treatment enhanced ADA, Neutralizing Antibody\", where = .)) `Treatment enhanced ADA, Neutralizing Antibody` == \"TRUE\" else FALSE,\n NABNFL = if (exists(\"NAB interpreted per sample result\", where = .)) `NAB interpreted per sample result` == \"FALSE\" else FALSE,\n TUNPBFL = if (exists(\"Treatment unaffected, Neutralizing Antibody\", where = .)) `Treatment unaffected, Neutralizing Antibody` == \"TRUE\" else FALSE\n ) %>%\n var_relabel(\n ADPBLPFL = \"Post-baseline evaluable patients for ADA\",\n ADAPFL = \"Patients positive for ADA\",\n TENABPFL = \"Patients positive for Treatment Emergent NAb\",\n TINPBFL = \"Treatment-induced NAb\",\n TENPBFL = \"Treatment-enhanced NAb\",\n NABNFL = \"Patients negative for NAb\",\n TUNPBFL = \"Treatment unaffected\"\n )\n\n\n\n\n\nCode# Layout for Baseline Prevalence of NAbs\nlyt_bl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_combo_levels(combodf)\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = formatters::var_labels(adab_b[, c(\"ADABLPFL\", \"PADABLPFL\")]),\n table_names = \"t1\",\n .stats = \"count\",\n var_labels = \"Baseline Prevalence of NAbs\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adab_b[, \"PNABBLFL\"]),\n table_names = \"t2\",\n .indent_mods = 1L\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adab_b[, \"NNABBLFL\"]),\n .stats = \"count\",\n table_names = \"t3\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n )\n\n# Layout for incidence of NAbs\nlyt_pb <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_combo_levels(combodf)\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = formatters::var_labels(adab_pb[, c(\"ADPBLPFL\", \"ADAPFL\")]),\n .stats = \"count\",\n var_labels = \"Incidence of Treatment Emergent NAbs\",\n show_labels = \"visible\",\n table_names = \"tb1\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = formatters::var_labels(data.frame(TENABPFL = adab_pb[, \"TENABPFL\"])),\n table_names = \"tb2\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = formatters::var_labels(adab_pb[, c(\"TINPBFL\", \"TENPBFL\")]),\n .stats = \"count\",\n table_names = \"tb3\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = formatters::var_labels(data.frame(NABNFL = adab_pb[, \"NABNFL\"])),\n table_names = \"tb4\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = formatters::var_labels(data.frame(TUNPBFL = adab_pb[, \"TUNPBFL\"])),\n .stats = \"count\",\n table_names = \"tb5\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n )\n\nresult_1 <- build_table(lyt_bl, df = adab_b, alt_counts_df = adsl)\nresult_2 <- build_table(lyt_pb, df = adab_pb, alt_counts_df = adsl)\n\n# Combine tables\nresult <- rbind(result_1, result_2)\n\n# Change the column order\nresult <- cbind_rtables(result[, 1], result[, 3]) %>%\n cbind_rtables(result[, 4]) %>%\n cbind_rtables(result[, 2]) %>%\n cbind_rtables(result[, 5])\n\nmain_title(result) <- paste(\n \"Baseline Prevalence and Incidence of Treatment Emergent NAbs\"\n)\nsubtitles(result) <- paste(\"Protocol:\", unique(adab$PARCAT1)[1])\nmain_footer(result) <- paste(\n \"NAb = Neutralizing Antibodies ADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies) Baseline evaluable patient for ADA = a patient with an ADA assay result from a baseline sample(s)\n Baseline evaluable patient for NAb = a patient with a NAb assay result from a baseline sample(s)\n Post-baseline evaluable patient for ADA = a patient with an ADA assay result from at least one post-baseline sample\n Post-baseline evaluable patient for NAb = a patient with a NAb assay result from at least one post-baseline sample\n Number of patients positive for ADA = the number of post-baseline evaluable patients for ADA determined to have Treatment Emergent ADA during the study period.\nNumber of patients positive for Treatment Emergent NAb = the number (and percentage) of post-baseline evaluable patients for ADA determined to have treatment-induced NAb or treatment-enhanced NAb during the study period.\nTreatment-induced = a patient with negative or missing baseline result(s) and at least one positive post-baseline result. Treatment-enhanced = a patient with positive result at baseline who has one or more post-baseline titer results that are at least 0.60 t.u. greater than the baseline titer result.\nNumber of patients negative for Treatment Emergent NAb = number of post-baseline evaluable patients with negative or missing baseline NAb result(s) and all negative post-baseline NAb results, or a patient who is NAb treatment unaffected.\nTreatment unaffected = A post-baseline evaluable patient with a positive result at baseline and (a) where all post-baseline titer results are less than 0.60 t.u. greater than the baseline titer result, OR (b) where all post-baseline results are negative or missing. For any positive sample with titer result less than the minimum reportable titer or any positive sample where a titer cannot be obtained, titer value is imputed as equal to the minimum reportable titer.\"\n)\nresult\n\nBaseline Prevalence and Incidence of Treatment Emergent NAbs\nProtocol: A: Drug X Antibody\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X C: Combination <Missing> B: Placebo All Drug X\n (N=134) (N=132) (N=0) (N=134) (N=266) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nBaseline Prevalence of NAbs \n Baseline evaluable patients for ADA 134 132 0 0 266 \n Patients with a positive ADA sample at baseline 63 64 0 0 127 \nPatients with a positive NAb sample at baseline 0 0 NA NA 0 \nPatient with no positive NAb samples at baseline 0 0 0 0 0 \nIncidence of Treatment Emergent NAbs \n Post-baseline evaluable patients for ADA 134 132 0 0 266 \n Patients positive for ADA 66 59 0 0 125 \nPatients positive for Treatment Emergent NAb 0 0 NA NA 0 \nTreatment-induced NAb 0 0 0 0 0 \nTreatment-enhanced NAb 0 0 0 0 0 \nPatients negative for NAb 0 0 NA NA 0 \nTreatment unaffected 0 0 0 0 0 \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nNAb = Neutralizing Antibodies ADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies) Baseline evaluable patient for ADA = a patient with an ADA assay result from a baseline sample(s)\n Baseline evaluable patient for NAb = a patient with a NAb assay result from a baseline sample(s)\n Post-baseline evaluable patient for ADA = a patient with an ADA assay result from at least one post-baseline sample\n Post-baseline evaluable patient for NAb = a patient with a NAb assay result from at least one post-baseline sample\n Number of patients positive for ADA = the number of post-baseline evaluable patients for ADA determined to have Treatment Emergent ADA during the study period.\nNumber of patients positive for Treatment Emergent NAb = the number (and percentage) of post-baseline evaluable patients for ADA determined to have treatment-induced NAb or treatment-enhanced NAb during the study period.\nTreatment-induced = a patient with negative or missing baseline result(s) and at least one positive post-baseline result. Treatment-enhanced = a patient with positive result at baseline who has one or more post-baseline titer results that are at least 0.60 t.u. greater than the baseline titer result.\nNumber of patients negative for Treatment Emergent NAb = number of post-baseline evaluable patients with negative or missing baseline NAb result(s) and all negative post-baseline NAb results, or a patient who is NAb treatment unaffected.\nTreatment unaffected = A post-baseline evaluable patient with a positive result at baseline and (a) where all post-baseline titer results are less than 0.60 t.u. greater than the baseline titer result, OR (b) where all post-baseline results are negative or missing. For any positive sample with titer result less than the minimum reportable titer or any positive sample where a titer cannot be obtained, titer value is imputed as equal to the minimum reportable titer.\n\n\n\n\n\nCode# In progress\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] tibble_3.2.1 scda_0.1.6.9010 dplyr_1.1.2 \n[4] tern_0.8.5.9006 rtables_0.6.2.9001 magrittr_2.0.3 \n[7] formatters_0.5.1.9001\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-0 gtable_0.3.3 jsonlite_1.8.7 compiler_4.3.1 \n [5] brio_1.1.3 tidyselect_1.2.0 tidyr_1.3.0 splines_4.3.1 \n [9] scales_1.2.1 yaml_2.3.7 fastmap_1.1.1 lattice_0.21-8 \n[13] ggplot2_3.4.2 R6_2.5.1 generics_0.1.3 knitr_1.43 \n[17] forcats_1.0.0 rbibutils_2.2.13 htmlwidgets_1.6.2 backports_1.4.1 \n[21] checkmate_2.2.0 munsell_0.5.0 pillar_1.9.0 rlang_1.1.1 \n[25] utf8_1.2.3 testthat_3.1.10 broom_1.0.5 xfun_0.39 \n[29] cli_3.6.1 withr_2.5.0 Rdpack_2.4 digest_0.6.33 \n[33] grid_4.3.1 rstudioapi_0.15.0 lifecycle_1.0.3 vctrs_0.6.3 \n[37] evaluate_0.21 glue_1.6.2 codetools_0.2-19 survival_3.5-5 \n[41] fansi_1.0.4 colorspace_2.1-0 purrr_1.0.1 rmarkdown_2.23 \n[45] tools_4.3.1 pkgconfig_2.0.3 htmltools_0.5.5 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- colorspace [* -> 2.1-0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- fs [* -> 1.6.3]\n- generics [* -> 0.1.3]\n- ggplot2 [* -> 3.4.2]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- highr [* -> 0.10]\n- htmltools [* -> 0.5.5]\n- isoband [* -> 0.2.7]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- lattice [* -> 0.21-8]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- praise [* -> 1.0.0]\n- processx [* -> 3.8.2]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quantreg [* -> 5.96]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- survival [* -> 3.5-5]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- yaml [* -> 2.3.7]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- tern [* -> 0.8.5.9006]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/pharmacokinetic/adat04a.lock'.\n\n\nDownload" + "text": "Data Setup\nSummary of Treatment Emergent NAbs\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\nlibrary(tibble)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadab <- synthetic_cdisc_dataset(\"latest\", \"adab\")\n\ncombodf <- tribble(\n ~valname, ~label, ~levelcombo, ~exargs,\n \"all_X\", \"All Drug X\", c(\"A: Drug X\", \"C: Combination\"), list(),\n \"all_pt\", \"All Patients\", c(\"A: Drug X\", \"B: Placebo\", \"C: Combination\"), list()\n)\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\n\n# Baseline Pts\nadab_b <- df_explicit_na(adab) %>%\n filter(\n ABLFL == \"Y\",\n ADABLPFL == \"Y\",\n PARAM %in% c(\n \"ADA interpreted per sample result\",\n \"NAB interpreted per sample result\"\n )\n ) %>%\n select(-PARAMCD, -AVALC, -AVALU) %>%\n tidyr::pivot_wider(\n names_from = PARAM,\n values_from = AVAL\n ) %>%\n mutate(\n across(\n any_of(c(\n \"ADA interpreted per sample result\",\n \"NAB interpreted per sample result\"\n )),\n as.logical\n )\n ) %>%\n mutate(\n ADABLPFL = ADABLPFL == \"Y\",\n PADABLPFL = if (exists(\"ADA interpreted per sample result\", where = .)) `ADA interpreted per sample result` == \"TRUE\" else FALSE,\n PNABBLFL = if (exists(\"NAB interpreted per sample result\", where = .)) `NAB interpreted per sample result` == \"TRUE\" else FALSE,\n NNABBLFL = if (exists(\"NAB interpreted per sample result\", where = .)) `NAB interpreted per sample result` == \"FALSE\" else FALSE\n ) %>%\n var_relabel(\n ADABLPFL = \"Baseline evaluable patients for ADA\",\n PADABLPFL = \"Patients with a positive ADA sample at baseline\",\n PNABBLFL = \"Patients with a positive NAb sample at baseline\",\n NNABBLFL = \"Patient with no positive NAb samples at baseline\"\n )\n\n# Post Baseline Treatment Enhanced NAb positive Pts\nadab_pb <- df_explicit_na(adab) %>%\n filter(\n ABLFL != \"Y\",\n ADPBLPFL == \"Y\",\n PARAM %in% c(\n \"ADA interpreted per sample result\",\n \"Treatment Emergent - Positive, Neutralizing Antibody\",\n \"Treatment induced ADA, Neutralizing Antibody\",\n \"Treatment enhanced ADA, Neutralizing Antibody\",\n \"NAB interpreted per sample result\",\n \"Treatment unaffected, Neutralizing Antibody\"\n )\n ) %>%\n select(-PARAMCD, -AVALC, -AVALU, -ARRLT, -NRRLT) %>%\n unique() %>%\n tidyr::pivot_wider(\n names_from = PARAM,\n values_from = AVAL\n ) %>%\n mutate(\n across(\n any_of(c(\n \"ADA interpreted per sample result\", \"NAB interpreted per sample result\",\n \"Treatment Emergent - Positive, Neutralizing Antibody\",\n \"Treatment induced ADA, Neutralizing Antibody\",\n \"Treatment enhanced ADA, Neutralizing Antibody\",\n \"Treatment unaffected, Neutralizing Antibody\"\n )),\n as.logical\n )\n ) %>%\n mutate(\n ADPBLPFL = ADPBLPFL == \"Y\",\n ADAPFL = if (exists(\"ADA interpreted per sample result\", where = .)) `ADA interpreted per sample result` == \"TRUE\" else FALSE,\n TENABPFL = if (exists(\"Treatment Emergent - Positive, Neutralizing Antibody\", where = .)) `Treatment Emergent - Positive, Neutralizing Antibody` == \"TRUE\" else FALSE,\n TINPBFL = if (exists(\"Treatment induced ADA, Neutralizing Antibody\", where = .)) `Treatment induced ADA, Neutralizing Antibody` == \"TRUE\" else FALSE,\n TENPBFL = if (exists(\"Treatment enhanced ADA, Neutralizing Antibody\", where = .)) `Treatment enhanced ADA, Neutralizing Antibody` == \"TRUE\" else FALSE,\n NABNFL = if (exists(\"NAB interpreted per sample result\", where = .)) `NAB interpreted per sample result` == \"FALSE\" else FALSE,\n TUNPBFL = if (exists(\"Treatment unaffected, Neutralizing Antibody\", where = .)) `Treatment unaffected, Neutralizing Antibody` == \"TRUE\" else FALSE\n ) %>%\n var_relabel(\n ADPBLPFL = \"Post-baseline evaluable patients for ADA\",\n ADAPFL = \"Patients positive for ADA\",\n TENABPFL = \"Patients positive for Treatment Emergent NAb\",\n TINPBFL = \"Treatment-induced NAb\",\n TENPBFL = \"Treatment-enhanced NAb\",\n NABNFL = \"Patients negative for NAb\",\n TUNPBFL = \"Treatment unaffected\"\n )\n\n\n\n\n\nCode# Layout for Baseline Prevalence of NAbs\nlyt_bl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_combo_levels(combodf)\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = c(\"ADABLPFL\", \"PADABLPFL\"),\n table_names = \"t1\",\n .stats = \"count\",\n var_labels = \"Baseline Prevalence of NAbs\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"PNABBLFL\",\n table_names = \"t2\",\n .indent_mods = 1L\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"NNABBLFL\",\n .stats = \"count\",\n table_names = \"t3\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n )\n\n# Layout for incidence of NAbs\nlyt_pb <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ACTARM\",\n split_fun = add_combo_levels(combodf)\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = c(\"ADPBLPFL\", \"ADAPFL\"),\n .stats = \"count\",\n var_labels = \"Incidence of Treatment Emergent NAbs\",\n show_labels = \"visible\",\n table_names = \"tb1\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"TENABPFL\",\n table_names = \"tb2\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = c(\"TINPBFL\", \"TENPBFL\"),\n .stats = \"count\",\n table_names = \"tb3\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"NABNFL\",\n table_names = \"tb4\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = \"TUNPBFL\",\n .stats = \"count\",\n table_names = \"tb5\",\n .indent_mods = 1L,\n show_labels = \"hidden\"\n )\n\nresult_1 <- build_table(lyt_bl, df = adab_b, alt_counts_df = adsl)\nresult_2 <- build_table(lyt_pb, df = adab_pb, alt_counts_df = adsl)\n\n# Combine tables\nresult <- rbind(result_1, result_2)\n\n# Change the column order\nresult <- cbind_rtables(result[, 1], result[, 3]) %>%\n cbind_rtables(result[, 4]) %>%\n cbind_rtables(result[, 2]) %>%\n cbind_rtables(result[, 5])\n\nmain_title(result) <- paste(\n \"Baseline Prevalence and Incidence of Treatment Emergent NAbs\"\n)\nsubtitles(result) <- paste(\"Protocol:\", unique(adab$PARCAT1)[1])\nmain_footer(result) <- paste(\n \"NAb = Neutralizing Antibodies ADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies) Baseline evaluable patient for ADA = a patient with an ADA assay result from a baseline sample(s)\n Baseline evaluable patient for NAb = a patient with a NAb assay result from a baseline sample(s)\n Post-baseline evaluable patient for ADA = a patient with an ADA assay result from at least one post-baseline sample\n Post-baseline evaluable patient for NAb = a patient with a NAb assay result from at least one post-baseline sample\n Number of patients positive for ADA = the number of post-baseline evaluable patients for ADA determined to have Treatment Emergent ADA during the study period.\nNumber of patients positive for Treatment Emergent NAb = the number (and percentage) of post-baseline evaluable patients for ADA determined to have treatment-induced NAb or treatment-enhanced NAb during the study period.\nTreatment-induced = a patient with negative or missing baseline result(s) and at least one positive post-baseline result. Treatment-enhanced = a patient with positive result at baseline who has one or more post-baseline titer results that are at least 0.60 t.u. greater than the baseline titer result.\nNumber of patients negative for Treatment Emergent NAb = number of post-baseline evaluable patients with negative or missing baseline NAb result(s) and all negative post-baseline NAb results, or a patient who is NAb treatment unaffected.\nTreatment unaffected = A post-baseline evaluable patient with a positive result at baseline and (a) where all post-baseline titer results are less than 0.60 t.u. greater than the baseline titer result, OR (b) where all post-baseline results are negative or missing. For any positive sample with titer result less than the minimum reportable titer or any positive sample where a titer cannot be obtained, titer value is imputed as equal to the minimum reportable titer.\"\n)\nresult\n\nBaseline Prevalence and Incidence of Treatment Emergent NAbs\nProtocol: A: Drug X Antibody\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X C: Combination <Missing> B: Placebo All Drug X\n (N=134) (N=132) (N=0) (N=134) (N=266) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nBaseline Prevalence of NAbs \n Baseline evaluable patients for ADA 134 132 0 0 266 \n Patients with a positive ADA sample at baseline 63 64 0 0 127 \nPatients with a positive NAb sample at baseline 0 0 NA NA 0 \nPatient with no positive NAb samples at baseline 0 0 0 0 0 \nIncidence of Treatment Emergent NAbs \n Post-baseline evaluable patients for ADA 134 132 0 0 266 \n Patients positive for ADA 66 59 0 0 125 \nPatients positive for Treatment Emergent NAb 0 0 NA NA 0 \nTreatment-induced NAb 0 0 0 0 0 \nTreatment-enhanced NAb 0 0 0 0 0 \nPatients negative for NAb 0 0 NA NA 0 \nTreatment unaffected 0 0 0 0 0 \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nNAb = Neutralizing Antibodies ADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies) Baseline evaluable patient for ADA = a patient with an ADA assay result from a baseline sample(s)\n Baseline evaluable patient for NAb = a patient with a NAb assay result from a baseline sample(s)\n Post-baseline evaluable patient for ADA = a patient with an ADA assay result from at least one post-baseline sample\n Post-baseline evaluable patient for NAb = a patient with a NAb assay result from at least one post-baseline sample\n Number of patients positive for ADA = the number of post-baseline evaluable patients for ADA determined to have Treatment Emergent ADA during the study period.\nNumber of patients positive for Treatment Emergent NAb = the number (and percentage) of post-baseline evaluable patients for ADA determined to have treatment-induced NAb or treatment-enhanced NAb during the study period.\nTreatment-induced = a patient with negative or missing baseline result(s) and at least one positive post-baseline result. Treatment-enhanced = a patient with positive result at baseline who has one or more post-baseline titer results that are at least 0.60 t.u. greater than the baseline titer result.\nNumber of patients negative for Treatment Emergent NAb = number of post-baseline evaluable patients with negative or missing baseline NAb result(s) and all negative post-baseline NAb results, or a patient who is NAb treatment unaffected.\nTreatment unaffected = A post-baseline evaluable patient with a positive result at baseline and (a) where all post-baseline titer results are less than 0.60 t.u. greater than the baseline titer result, OR (b) where all post-baseline results are negative or missing. For any positive sample with titer result less than the minimum reportable titer or any positive sample where a titer cannot be obtained, titer value is imputed as equal to the minimum reportable titer.\n\n\n\n\n\nCode# In progress\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] tibble_3.2.1 scda_0.1.6.9010 dplyr_1.1.2 \n[4] tern_0.8.5.9006 rtables_0.6.2.9001 magrittr_2.0.3 \n[7] formatters_0.5.1.9001\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-0 gtable_0.3.3 jsonlite_1.8.7 compiler_4.3.1 \n [5] brio_1.1.3 tidyselect_1.2.0 tidyr_1.3.0 splines_4.3.1 \n [9] scales_1.2.1 yaml_2.3.7 fastmap_1.1.1 lattice_0.21-8 \n[13] ggplot2_3.4.2 R6_2.5.1 generics_0.1.3 knitr_1.43 \n[17] forcats_1.0.0 rbibutils_2.2.13 htmlwidgets_1.6.2 backports_1.4.1 \n[21] checkmate_2.2.0 munsell_0.5.0 pillar_1.9.0 rlang_1.1.1 \n[25] utf8_1.2.3 testthat_3.1.10 broom_1.0.5 xfun_0.39 \n[29] cli_3.6.1 withr_2.5.0 Rdpack_2.4 digest_0.6.33 \n[33] grid_4.3.1 rstudioapi_0.15.0 lifecycle_1.0.3 vctrs_0.6.3 \n[37] evaluate_0.21 glue_1.6.2 codetools_0.2-19 survival_3.5-5 \n[41] fansi_1.0.4 colorspace_2.1-0 purrr_1.0.1 rmarkdown_2.23 \n[45] tools_4.3.1 pkgconfig_2.0.3 htmltools_0.5.5 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- colorspace [* -> 2.1-0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- fs [* -> 1.6.3]\n- generics [* -> 0.1.3]\n- ggplot2 [* -> 3.4.2]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- highr [* -> 0.10]\n- htmltools [* -> 0.5.5]\n- isoband [* -> 0.2.7]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- lattice [* -> 0.21-8]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- praise [* -> 1.0.0]\n- processx [* -> 3.8.2]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quantreg [* -> 5.96]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- survival [* -> 3.5-5]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- yaml [* -> 2.3.7]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- tern [* -> 0.8.5.9006]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/pharmacokinetic/adat04a.lock'.\n\n\nDownload" }, { "objectID": "tables/pharmacokinetic/pkpt02.html", @@ -907,56 +907,56 @@ "href": "tables/adverse-events/aet05_all.html", "title": "AET05_ALL", "section": "", - "text": "Data Setup\nStandard Table\nTable Setting Type of Confidence Interval\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadaette <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadaette <- df_explicit_na(adaette)\n\n# Create analysis dataset anl from the 2 parameters AEREPTTE & AETOT1\nanl_events <- adaette %>%\n filter(PARAMCD == \"AETOT1\") %>%\n select(USUBJID, ARM, ARMCD, n_events = AVAL) %>%\n mutate(n_events = as.integer(n_events))\n\nanl_tte <- adaette %>%\n filter(PARAMCD == \"AEREPTTE\") %>%\n select(USUBJID, ARM, ARMCD, AVAL)\n\nanl <- full_join(anl_tte, anl_events, by = c(\"USUBJID\", \"ARM\", \"ARMCD\"))\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n estimate_incidence_rate(\n vars = \"AVAL\",\n n_events = \"n_events\",\n control = control_incidence_rate(time_unit_output = 100)\n )\n\nWarning: The `time_unit_output` argument of `control_incidence_rate()` is deprecated as\nof tern 0.8.3.\nℹ Please use the `num_pt_year` argument instead.\n\nCoderesult <- build_table(lyt, anl, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————\nTotal patient-years at risk 337.9 331.8 341.6 \nNumber of adverse events observed 343 380 397 \nAE rate per 100 patient-years 101.51 114.51 116.22 \n95% CI (90.77, 112.25) (103.00, 126.02) (104.79, 127.65)\n\n\n\n\nThe type of confidence interval can be specified through the conf_type argument.\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n estimate_incidence_rate(\n vars = \"AVAL\",\n n_events = \"n_events\",\n control = control_incidence_rate(conf_type = \"exact\", time_unit_output = 100)\n )\n\nresult <- build_table(lyt, anl, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————\nTotal patient-years at risk 337.9 331.8 341.6 \nNumber of adverse events observed 343 380 397 \nAE rate per 100 patient-years 101.51 114.51 116.22 \n95% CI (91.05, 112.84) (103.28, 126.62) (105.07, 128.24)\n\n\n\n\n\nCodelibrary(teal)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadaette <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadaette <- df_explicit_na(adaette)\n\n# Create analysis dataset anl from the 2 parameters AEREPTTE & AETOT1\nanl_events <- adaette %>%\n filter(PARAMCD %in% c(\"AETOT1\", \"AETOT2\", \"AETOT3\")) %>%\n select(USUBJID, STUDYID, PARAMCD, ARM, ARMCD, n_events = AVAL) %>%\n mutate(n_events = as.integer(n_events))\n\nanl_tte <- adaette %>%\n filter(PARAMCD == \"AEREPTTE\") %>%\n select(USUBJID, STUDYID, ARM, ARMCD, AVAL, AVALU)\n\nadaette <- full_join(anl_tte, anl_events, by = c(\"USUBJID\", \"STUDYID\", \"ARM\", \"ARMCD\"))\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n cdisc_dataset(\"ADAETTE\", adaette),\n code =\n 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAETTE <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n ADSL <- df_explicit_na(ADSL)\n ADAETTE <- df_explicit_na(ADAETTE)\n anl_events <- ADAETTE %>%\n filter(PARAMCD %in% c(\"AETOT1\", \"AETOT2\", \"AETOT3\")) %>%\n select(USUBJID, STUDYID, PARAMCD, ARM, ARMCD, n_events = AVAL) %>%\n mutate(n_events = as.integer(n_events))\n anl_tte <- ADAETTE %>%\n filter(PARAMCD == \"AEREPTTE\") %>%\n select(USUBJID, STUDYID, ARM, ARMCD, AVAL, AVALU)\n ADAETTE <- full_join(anl_tte, anl_events, by = c(\"USUBJID\", \"STUDYID\", \"ARM\", \"ARMCD\"))',\n check = TRUE\n ),\n modules = modules(\n tm_t_events_patyear(\n label = \"AE Rate Adjusted for Patient-Years at Risk - All Occurrences Table\",\n dataname = \"ADAETTE\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARMCD\"\n ),\n paramcd = choices_selected(\n choices = value_choices(adaette, \"PARAMCD\"),\n selected = \"AETOT1\"\n ),\n events_var = choices_selected(\n choices = variable_choices(adaette, \"n_events\"),\n selected = \"n_events\",\n fixed = TRUE\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:07:42.4281 pid:10776 token:[] teal.modules.clinical Initializing tm_t_events_patyear\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet05_all.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable Setting Type of Confidence Interval\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadaette <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadaette <- df_explicit_na(adaette)\n\n# Create analysis dataset anl from the 2 parameters AEREPTTE & AETOT1\nanl_events <- adaette %>%\n filter(PARAMCD == \"AETOT1\") %>%\n select(USUBJID, ARM, ARMCD, n_events = AVAL) %>%\n mutate(n_events = as.integer(n_events))\n\nanl_tte <- adaette %>%\n filter(PARAMCD == \"AEREPTTE\") %>%\n select(USUBJID, ARM, ARMCD, AVAL)\n\nanl <- full_join(anl_tte, anl_events, by = c(\"USUBJID\", \"ARM\", \"ARMCD\"))\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n estimate_incidence_rate(\n vars = \"AVAL\",\n n_events = \"n_events\",\n control = control_incidence_rate(time_unit_output = 100)\n )\n\nWarning: The `time_unit_output` argument of `control_incidence_rate()` is deprecated as\nof tern 0.8.3.\nℹ Please use the `num_pt_year` argument instead.\n\nCoderesult <- build_table(lyt, anl, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————\nTotal patient-years at risk 337.9 331.8 341.6 \nNumber of adverse events observed 343 380 397 \nAE rate per 100 patient-years 101.51 114.51 116.22 \n95% CI (90.77, 112.25) (103.00, 126.02) (104.79, 127.65)\n\n\n\n\nThe type of confidence interval can be specified through the conf_type argument.\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n estimate_incidence_rate(\n vars = \"AVAL\",\n n_events = \"n_events\",\n control = control_incidence_rate(conf_type = \"exact\", time_unit_output = 100)\n )\n\nresult <- build_table(lyt, anl, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination \n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————\nTotal patient-years at risk 337.9 331.8 341.6 \nNumber of adverse events observed 343 380 397 \nAE rate per 100 patient-years 101.51 114.51 116.22 \n95% CI (91.05, 112.84) (103.28, 126.62) (105.07, 128.24)\n\n\n\n\n\nCodelibrary(teal)\nlibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadaette <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadaette <- df_explicit_na(adaette)\n\n# Create analysis dataset anl from the 2 parameters AEREPTTE & AETOT1\nanl_events <- adaette %>%\n filter(PARAMCD %in% c(\"AETOT1\", \"AETOT2\", \"AETOT3\")) %>%\n select(USUBJID, STUDYID, PARAMCD, ARM, ARMCD, n_events = AVAL) %>%\n mutate(n_events = as.integer(n_events))\n\nanl_tte <- adaette %>%\n filter(PARAMCD == \"AEREPTTE\") %>%\n select(USUBJID, STUDYID, ARM, ARMCD, AVAL, AVALU)\n\nadaette <- full_join(anl_tte, anl_events, by = c(\"USUBJID\", \"STUDYID\", \"ARM\", \"ARMCD\"))\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n cdisc_dataset(\"ADAETTE\", adaette),\n code =\n 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAETTE <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n ADSL <- df_explicit_na(ADSL)\n ADAETTE <- df_explicit_na(ADAETTE)\n anl_events <- ADAETTE %>%\n filter(PARAMCD %in% c(\"AETOT1\", \"AETOT2\", \"AETOT3\")) %>%\n select(USUBJID, STUDYID, PARAMCD, ARM, ARMCD, n_events = AVAL) %>%\n mutate(n_events = as.integer(n_events))\n anl_tte <- ADAETTE %>%\n filter(PARAMCD == \"AEREPTTE\") %>%\n select(USUBJID, STUDYID, ARM, ARMCD, AVAL, AVALU)\n ADAETTE <- full_join(anl_tte, anl_events, by = c(\"USUBJID\", \"STUDYID\", \"ARM\", \"ARMCD\"))',\n check = TRUE\n ),\n modules = modules(\n tm_t_events_patyear(\n label = \"AE Rate Adjusted for Patient-Years at Risk - All Occurrences Table\",\n dataname = \"ADAETTE\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARMCD\"\n ),\n paramcd = choices_selected(\n choices = value_choices(adaette, \"PARAMCD\"),\n selected = \"AETOT1\"\n ),\n events_var = choices_selected(\n choices = variable_choices(adaette, \"n_events\"),\n selected = \"n_events\",\n fixed = TRUE\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:25:46.6203 pid:10779 token:[] teal.modules.clinical Initializing tm_t_events_patyear\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet05_all.lock'.\n\n\nDownload" }, { "objectID": "tables/adverse-events/aet01_aesi.html", "href": "tables/adverse-events/aet01_aesi.html", "title": "AET01_AESI", "section": "", - "text": "Data Setup\nStandard Table\nTable with Optional Lines\nTable For Studies with Multiple Drugs\nTable of AEs by SMQ\nTeal\nSession Info\n\n\n\nTo illustrate, additional variables such as flags (TRUE/FALSE) for selected AEs of interest. Please consult your SAP on how to handle missing AE grades.\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(stringr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nadsl <- filter(adsl, SAFFL == \"Y\")\nadae <- filter(adae, ANL01FL == \"Y\" & SAFFL == \"Y\")\n\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\nnot_resolved <- adae %>%\n filter(!(AEOUT %in% c(\"RECOVERED/RESOLVED\", \"FATAL\", \"RECOVERED/RESOLVED WITH SEQUELAE\"))) %>%\n distinct(USUBJID) %>%\n mutate(\n NOT_RESOLVED = \"Y\"\n )\n\nadae <- adae %>%\n left_join(not_resolved, by = c(\"USUBJID\")) %>%\n mutate(\n ALL_RESOLVED = is.na(NOT_RESOLVED),\n NOT_RESOLVED = !is.na(NOT_RESOLVED)\n ) %>%\n var_relabel(\n ALL_RESOLVED = \"Total number of patients with all non-fatal AEs resolved\",\n NOT_RESOLVED = \"Total number of patients with at least one non-fatal unresolved or ongoing AE\"\n )\n\nadae <- adae %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n WD = AEACN == \"DRUG WITHDRAWN\",\n DSM = AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n CONTRT = AECONTRT == \"Y\",\n SER = AESER == \"Y\",\n REL = AEREL == \"Y\",\n ALL_RESOLVED_WD = WD == TRUE & ALL_RESOLVED == TRUE,\n ALL_RESOLVED_DSM = DSM == TRUE & ALL_RESOLVED == TRUE,\n ALL_RESOLVED_CONTRT = CONTRT == TRUE & ALL_RESOLVED == TRUE,\n NOT_RESOLVED_WD = WD == TRUE & NOT_RESOLVED == TRUE,\n NOT_RESOLVED_DSM = DSM == TRUE & NOT_RESOLVED == TRUE,\n NOT_RESOLVED_CONTRT = CONTRT == TRUE & NOT_RESOLVED == TRUE,\n SERWD = AESER == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n SERCONTRT = AECONTRT == \"Y\" & AESER == \"Y\",\n SERDSM = AESER == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n RELWD = AEREL == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n RELDSM = AEREL == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n RELCONTRT = AECONTRT == \"Y\" & AEREL == \"Y\",\n RELSER = AESER == \"Y\" & AEREL == \"Y\"\n ) %>%\n var_relabel(\n WD = \"Total number of patients with study drug withdrawn due to AE\",\n DSM = \"Total number of patients with dose modified/interrupted due to AE\",\n CONTRT = \"Total number of patients with treatment received for AE\",\n SER = \"Total number of patients with at least one serious AE\",\n REL = \"Total number of patients with at least one related AE\",\n ALL_RESOLVED_WD = \" No. of patients with study drug withdrawn due to resolved AE\",\n ALL_RESOLVED_DSM = \" No. of patients with dose modified/interrupted due to resolved AE\",\n ALL_RESOLVED_CONTRT = \" No. of patients with treatment received for resolved AE\",\n NOT_RESOLVED_WD = \" No. of patients with study drug withdrawn due to unresolved or ongoing AE\",\n NOT_RESOLVED_DSM = \" No. of patients with dose modified/interrupted due to unresolved or ongoing AE\",\n NOT_RESOLVED_CONTRT = \" No. of patients with treatment received for unresolved or ongoing AE\",\n SERWD = \" No. of patients with study drug withdrawn due to serious AE\",\n SERDSM = \" No. of patients with dose modified/interrupted due to serious AE\",\n SERCONTRT = \" No. of patients with treatment received for serious AE\",\n RELWD = \" No. of patients with study drug withdrawn due to related AE\",\n RELDSM = \" No. of patients with dose modified/interrupted due to related AE\",\n RELCONTRT = \" No. of patients with treatment received for related AE\",\n RELSER = \" No. of patients with serious, related AE\"\n )\n\nadae <- adae %>%\n mutate(\n AETOXGR = forcats::fct_recode(AETOXGR,\n \"Grade 1\" = \"1\",\n \"Grade 2\" = \"2\",\n \"Grade 3\" = \"3\",\n \"Grade 4\" = \"4\",\n \"Grade 5 (fatal outcome)\" = \"5\"\n )\n )\n\n\n\n\n\nCodeaesi_vars <- c(\"WD\", \"DSM\", \"CONTRT\", \"ALL_RESOLVED\", \"NOT_RESOLVED\", \"SER\", \"REL\")\n\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_patients_with_event(\n vars = \"USUBJID\",\n filters = c(\"STUDYID\" = as.character(unique(adae$STUDYID))),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients with at least one AE\")\n ) %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total number of AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n var_labels = \"Total number of patients with at least one AE by worst grade\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adae[, aesi_vars]),\n denom = \"N_col\"\n )\n\nresult <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one AE 100 (74.6%) 98 (73.1%) 103 (78.0%) \nTotal number of AEs 502 480 604 \nTotal number of patients with at least one AE by worst grade \n Grade 1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n Grade 2 5 (3.7%) 8 (6.0%) 6 (4.5%) \n Grade 3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n Grade 4 13 (9.7%) 18 (13.4%) 15 (11.4%) \n Grade 5 (fatal outcome) 64 (47.8%) 52 (38.8%) 64 (48.5%) \nTotal number of patients with study drug withdrawn due to AE 22 (16.4%) 21 (15.7%) 28 (21.2%) \nTotal number of patients with dose modified/interrupted due to AE 55 (41.0%) 62 (46.3%) 64 (48.5%) \nTotal number of patients with treatment received for AE 80 (59.7%) 80 (59.7%) 89 (67.4%) \nTotal number of patients with all non-fatal AEs resolved 17 (12.7%) 12 (9.0%) 11 (8.3%) \nTotal number of patients with at least one non-fatal unresolved or ongoing AE 83 (61.9%) 86 (64.2%) 92 (69.7%) \nTotal number of patients with at least one serious AE 85 (63.4%) 80 (59.7%) 87 (65.9%) \nTotal number of patients with at least one related AE 86 (64.2%) 85 (63.4%) 92 (69.7%) \n\n\n\n\n\nCodeaesi_vars <- c(\n \"WD\", \"DSM\", \"CONTRT\", \"ALL_RESOLVED\", \"ALL_RESOLVED_WD\", \"ALL_RESOLVED_DSM\", \"ALL_RESOLVED_CONTRT\", \"NOT_RESOLVED\", \"NOT_RESOLVED_WD\", \"NOT_RESOLVED_DSM\", \"NOT_RESOLVED_CONTRT\", \"SER\", \"SERWD\", \"SERDSM\", \"SERCONTRT\",\n \"REL\", \"RELWD\", \"RELDSM\", \"RELCONTRT\", \"RELSER\"\n)\n\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_patients_with_event(\n vars = \"USUBJID\",\n filters = c(\"STUDYID\" = as.character(unique(adae$STUDYID))),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients with at least one AE\")\n ) %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total number of AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n var_labels = \"Total number of patients with at least one AE by worst grade\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adae[, aesi_vars]),\n denom = \"N_col\"\n )\n\nresult <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one AE 100 (74.6%) 98 (73.1%) 103 (78.0%) \nTotal number of AEs 502 480 604 \nTotal number of patients with at least one AE by worst grade \n Grade 1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n Grade 2 5 (3.7%) 8 (6.0%) 6 (4.5%) \n Grade 3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n Grade 4 13 (9.7%) 18 (13.4%) 15 (11.4%) \n Grade 5 (fatal outcome) 64 (47.8%) 52 (38.8%) 64 (48.5%) \nTotal number of patients with study drug withdrawn due to AE 22 (16.4%) 21 (15.7%) 28 (21.2%) \nTotal number of patients with dose modified/interrupted due to AE 55 (41.0%) 62 (46.3%) 64 (48.5%) \nTotal number of patients with treatment received for AE 80 (59.7%) 80 (59.7%) 89 (67.4%) \nTotal number of patients with all non-fatal AEs resolved 17 (12.7%) 12 (9.0%) 11 (8.3%) \nNo. of patients with study drug withdrawn due to resolved AE 0 1 (0.7%) 2 (1.5%) \nNo. of patients with dose modified/interrupted due to resolved AE 3 (2.2%) 4 (3.0%) 2 (1.5%) \nNo. of patients with treatment received for resolved AE 9 (6.7%) 7 (5.2%) 7 (5.3%) \nTotal number of patients with at least one non-fatal unresolved or ongoing AE 83 (61.9%) 86 (64.2%) 92 (69.7%) \nNo. of patients with study drug withdrawn due to unresolved or ongoing AE 22 (16.4%) 20 (14.9%) 26 (19.7%) \nNo. of patients with dose modified/interrupted due to unresolved or ongoing AE 52 (38.8%) 58 (43.3%) 62 (47.0%) \nNo. of patients with treatment received for unresolved or ongoing AE 71 (53.0%) 73 (54.5%) 82 (62.1%) \nTotal number of patients with at least one serious AE 85 (63.4%) 80 (59.7%) 87 (65.9%) \nNo. of patients with study drug withdrawn due to serious AE 9 (6.7%) 4 (3.0%) 10 (7.6%) \nNo. of patients with dose modified/interrupted due to serious AE 21 (15.7%) 22 (16.4%) 28 (21.2%) \nNo. of patients with treatment received for serious AE 59 (44.0%) 58 (43.3%) 53 (40.2%) \nTotal number of patients with at least one related AE 86 (64.2%) 85 (63.4%) 92 (69.7%) \nNo. of patients with study drug withdrawn due to related AE 5 (3.7%) 10 (7.5%) 7 (5.3%) \nNo. of patients with dose modified/interrupted due to related AE 24 (17.9%) 32 (23.9%) 34 (25.8%) \nNo. of patients with treatment received for related AE 53 (39.6%) 58 (43.3%) 60 (45.5%) \nNo. of patients with serious, related AE 64 (47.8%) 52 (38.8%) 64 (48.5%) \n\n\n\n\n\nCodeadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae_mult <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nadsl <- filter(adsl, SAFFL == \"Y\")\nadae_mult <- filter(adae_mult, ANL01FL == \"Y\" & SAFFL == \"Y\")\n\nadsl <- df_explicit_na(adsl)\nadae_mult <- df_explicit_na(adae_mult)\n\n# for illustration purposes only, create AEREL1, AEREL2, AEACN1, AEACN2 from respective variables\nadae_mult <- adae_mult %>%\n mutate(\n AEREL1 = AEREL,\n AEREL2 = AEREL,\n AEACN1 = AEACN,\n AEACN2 = AEACN\n )\n\nnot_resolved <- adae_mult %>%\n filter(!(AEOUT %in% c(\"RECOVERED/RESOLVED\", \"FATAL\", \"RECOVERED/RESOLVED WITH SEQUELAE\"))) %>%\n distinct(USUBJID) %>%\n mutate(\n NOT_RESOLVED = \"Y\"\n )\n\nadae_mult <- adae_mult %>%\n left_join(not_resolved, by = c(\"USUBJID\")) %>%\n mutate(\n ALL_RESOLVED = is.na(NOT_RESOLVED),\n NOT_RESOLVED = !is.na(NOT_RESOLVED)\n ) %>%\n var_relabel(\n ALL_RESOLVED = \"Total number of patients with all non-fatal AEs resolved\",\n NOT_RESOLVED = \"Total number of patients with at least one non-fatal unresolved or ongoing AE\"\n )\n\nadae_mult <- adae_mult %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n WD1 = AEACN1 == \"DRUG WITHDRAWN\",\n WD2 = AEACN2 == \"DRUG WITHDRAWN\",\n DSM1 = AEACN1 %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n DSM2 = AEACN2 %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n CONTRT = AECONTRT == \"Y\",\n SER = AESER == \"Y\",\n REL1 = AEREL1 == \"Y\",\n REL2 = AEREL2 == \"Y\",\n ALL_RESOLVED_WD1 = WD1 == TRUE & ALL_RESOLVED == TRUE,\n ALL_RESOLVED_DSM1 = DSM1 == TRUE & ALL_RESOLVED == TRUE,\n ALL_RESOLVED_CONTRT = CONTRT == TRUE & ALL_RESOLVED == TRUE,\n ALL_RESOLVED_WD2 = WD2 == TRUE & ALL_RESOLVED == TRUE,\n ALL_RESOLVED_DSM2 = DSM2 == TRUE & ALL_RESOLVED == TRUE,\n NOT_RESOLVED_WD1 = WD1 == TRUE & NOT_RESOLVED == TRUE,\n NOT_RESOLVED_DSM1 = DSM1 == TRUE & NOT_RESOLVED == TRUE,\n NOT_RESOLVED_CONTRT = CONTRT == TRUE & NOT_RESOLVED == TRUE,\n NOT_RESOLVED_WD2 = WD2 == TRUE & NOT_RESOLVED == TRUE,\n NOT_RESOLVED_DSM2 = DSM2 == TRUE & NOT_RESOLVED == TRUE,\n SERWD1 = AESER == \"Y\" & AEACN1 == \"DRUG WITHDRAWN\",\n SERWD2 = AESER == \"Y\" & AEACN2 == \"DRUG WITHDRAWN\",\n SERCONTRT = AECONTRT == \"Y\" & AESER == \"Y\",\n SERDSM1 = AESER == \"Y\" & AEACN1 %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n SERDSM2 = AESER == \"Y\" & AEACN2 %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n REL1WD1 = AEREL1 == \"Y\" & AEACN1 == \"DRUG WITHDRAWN\",\n REL1WD2 = AEREL1 == \"Y\" & AEACN2 == \"DRUG WITHDRAWN\",\n REL2WD1 = AEREL1 == \"Y\" & AEACN1 == \"DRUG WITHDRAWN\",\n REL2WD2 = AEREL1 == \"Y\" & AEACN2 == \"DRUG WITHDRAWN\",\n REL1DSM1 = AEREL1 == \"Y\" & AEACN1 %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n REL2DSM1 = AEREL2 == \"Y\" & AEACN1 %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n REL1DSM2 = AEREL1 == \"Y\" & AEACN2 %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n REL2DSM2 = AEREL2 == \"Y\" & AEACN2 %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n REL1CONTRT = AECONTRT == \"Y\" & AEREL1 == \"Y\",\n REL2CONTRT = AECONTRT == \"Y\" & AEREL2 == \"Y\",\n REL1SER = AESER == \"Y\" & AEREL1 == \"Y\",\n REL2SER = AESER == \"Y\" & AEREL2 == \"Y\"\n ) %>%\n var_relabel(\n WD1 = \"Total number of patients with study drug 1 withdrawn due to AE\",\n WD2 = \"Total number of patients with study drug 2 withdrawn due to AE\",\n DSM1 = \"Total number of patients with dose of study drug 1 modified/interrupted due to AE\",\n DSM2 = \"Total number of patients with dose of study drug 2 modified/interrupted due to AE\",\n CONTRT = \"Total number of patients with treatment received for AE\",\n SER = \"Total number of patients with at least one serious AE\",\n REL1 = \"Total number of patients with at least one AE related to study drug 1\",\n REL2 = \"Total number of patients with at least one AE related to study drug 2\",\n ALL_RESOLVED_WD1 = \" No. of patients with study drug 1 withdrawn due to resolved AE\",\n ALL_RESOLVED_DSM1 = \" No. of patients with dose of study drug 1 modified/interrupted due to resolved AE\",\n ALL_RESOLVED_WD2 = \" No. of patients with study drug 2 withdrawn due to resolved AE\",\n ALL_RESOLVED_DSM2 = \" No. of patients with dose of study drug 2 modified/interrupted due to resolved AE\",\n ALL_RESOLVED_CONTRT = \" No. of patients with treatment received for resolved AE\",\n NOT_RESOLVED_WD1 = \" No. of patients with study drug 1 withdrawn due to unresolved or ongoing AE\",\n NOT_RESOLVED_DSM1 = \" No. of patients with dose of study drug 1 modified/interrupted due to unresolved or ongoing AE\",\n NOT_RESOLVED_WD2 = \" No. of patients with study drug 2 withdrawn due to unresolved or ongoing AE\",\n NOT_RESOLVED_DSM2 = \" No. of patients with dose of study drug 2 modified/interrupted due to unresolved or ongoing AE\",\n NOT_RESOLVED_CONTRT = \" No. of patients with treatment received for unresolved or ongoing AE\",\n SERWD1 = \" No. of patients with study drug 1 withdrawn due to serious AE\",\n SERWD2 = \" No. of patients with study drug 2 withdrawn due to serious AE\",\n SERDSM1 = \" No. of patients with dose of study drug 1 modified/interrupted due to serious AE\",\n SERDSM2 = \" No. of patients with dose of study drug 2 modified/interrupted due to serious AE\",\n SERCONTRT = \" No. of patients with treatment received for serious AE\",\n REL1WD1 = \" No. of patients with study drug 1 withdrawn due to AE related to study drug 1\",\n REL1WD2 = \" No. of patients with study drug 1 withdrawn due to AE related to study drug 2\",\n REL2WD1 = \" No. of patients with study drug 2 withdrawn due to AE related to study drug 1\",\n REL2WD2 = \" No. of patients with study drug 2 withdrawn due to AE related to study drug 2\",\n REL1DSM1 = \" No. of patients with dose of study drug 1 modified/interrupted due to AE related to study drug 1\",\n REL1DSM2 = \" No. of patients with dose of study drug 1 modified/interrupted due to AE related to study drug 2\",\n REL2DSM1 = \" No. of patients with dose of study drug 2 modified/interrupted due to AE related to study drug 1\",\n REL2DSM2 = \" No. of patients with dose of study drug 2 modified/interrupted due to AE related to study drug 2\",\n REL1CONTRT = \" No. of patients with treatment received for AE related to study drug 1\",\n REL2CONTRT = \" No. of patients with treatment received for AE related to study drug 2\",\n REL1SER = \" No. of patients with serious AE related to study drug 1\",\n REL2SER = \" No. of patients with serious AE related to study drug 2\"\n )\n\nadae_mult <- adae_mult %>%\n mutate(\n AETOXGR = forcats::fct_recode(AETOXGR,\n \"Grade 1\" = \"1\",\n \"Grade 2\" = \"2\",\n \"Grade 3\" = \"3\",\n \"Grade 4\" = \"4\",\n \"Grade 5 (fatal outcome)\" = \"5\"\n )\n )\n\naesi_vars <- c(\n \"WD1\", \"WD2\", \"DSM1\", \"DSM2\", \"CONTRT\", \"ALL_RESOLVED\", \"ALL_RESOLVED_WD1\", \"ALL_RESOLVED_WD2\", \"ALL_RESOLVED_DSM1\", \"ALL_RESOLVED_DSM2\", \"ALL_RESOLVED_CONTRT\", \"NOT_RESOLVED\", \"NOT_RESOLVED_WD1\", \"NOT_RESOLVED_WD2\", \"NOT_RESOLVED_DSM1\", \"NOT_RESOLVED_DSM2\", \"NOT_RESOLVED_CONTRT\", \"SER\", \"SERWD1\", \"SERWD2\", \"SERDSM1\", \"SERDSM2\", \"SERCONTRT\", \"REL1\", \"REL1WD1\", \"REL1WD2\", \"REL1DSM1\", \"REL1DSM2\", \"REL1CONTRT\", \"REL1SER\",\n \"REL2\", \"REL2WD1\", \"REL2WD2\", \"REL2DSM1\", \"REL2DSM2\", \"REL2CONTRT\", \"REL2SER\"\n)\n\nlyt_adae_mult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_patients_with_event(\n vars = \"USUBJID\",\n filters = c(\"STUDYID\" = as.character(unique(adae_mult$STUDYID))),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients with at least one AE\")\n ) %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae_mult$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total number of AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n var_labels = \"Total number of patients with at least one AE by worst grade\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adae_mult[, aesi_vars]),\n denom = \"N_col\"\n )\n\nresult <- build_table(lyt_adae_mult, df = adae_mult, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one AE 100 (74.6%) 98 (73.1%) 103 (78.0%) \nTotal number of AEs 502 480 604 \nTotal number of patients with at least one AE by worst grade \n Grade 1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n Grade 2 5 (3.7%) 8 (6.0%) 6 (4.5%) \n Grade 3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n Grade 4 13 (9.7%) 18 (13.4%) 15 (11.4%) \n Grade 5 (fatal outcome) 64 (47.8%) 52 (38.8%) 64 (48.5%) \nTotal number of patients with study drug 1 withdrawn due to AE 22 (16.4%) 21 (15.7%) 28 (21.2%) \nTotal number of patients with study drug 2 withdrawn due to AE 22 (16.4%) 21 (15.7%) 28 (21.2%) \nTotal number of patients with dose of study drug 1 modified/interrupted due to AE 55 (41.0%) 62 (46.3%) 64 (48.5%) \nTotal number of patients with dose of study drug 2 modified/interrupted due to AE 55 (41.0%) 62 (46.3%) 64 (48.5%) \nTotal number of patients with treatment received for AE 80 (59.7%) 80 (59.7%) 89 (67.4%) \nTotal number of patients with all non-fatal AEs resolved 17 (12.7%) 12 (9.0%) 11 (8.3%) \nNo. of patients with study drug 1 withdrawn due to resolved AE 0 1 (0.7%) 2 (1.5%) \nNo. of patients with study drug 2 withdrawn due to resolved AE 0 1 (0.7%) 2 (1.5%) \nNo. of patients with dose of study drug 1 modified/interrupted due to resolved AE 3 (2.2%) 4 (3.0%) 2 (1.5%) \nNo. of patients with dose of study drug 2 modified/interrupted due to resolved AE 3 (2.2%) 4 (3.0%) 2 (1.5%) \nNo. of patients with treatment received for resolved AE 9 (6.7%) 7 (5.2%) 7 (5.3%) \nTotal number of patients with at least one non-fatal unresolved or ongoing AE 83 (61.9%) 86 (64.2%) 92 (69.7%) \nNo. of patients with study drug 1 withdrawn due to unresolved or ongoing AE 22 (16.4%) 20 (14.9%) 26 (19.7%) \nNo. of patients with study drug 2 withdrawn due to unresolved or ongoing AE 22 (16.4%) 20 (14.9%) 26 (19.7%) \nNo. of patients with dose of study drug 1 modified/interrupted due to unresolved or ongoing AE 52 (38.8%) 58 (43.3%) 62 (47.0%) \nNo. of patients with dose of study drug 2 modified/interrupted due to unresolved or ongoing AE 52 (38.8%) 58 (43.3%) 62 (47.0%) \nNo. of patients with treatment received for unresolved or ongoing AE 71 (53.0%) 73 (54.5%) 82 (62.1%) \nTotal number of patients with at least one serious AE 85 (63.4%) 80 (59.7%) 87 (65.9%) \nNo. of patients with study drug 1 withdrawn due to serious AE 9 (6.7%) 4 (3.0%) 10 (7.6%) \nNo. of patients with study drug 2 withdrawn due to serious AE 9 (6.7%) 4 (3.0%) 10 (7.6%) \nNo. of patients with dose of study drug 1 modified/interrupted due to serious AE 21 (15.7%) 22 (16.4%) 28 (21.2%) \nNo. of patients with dose of study drug 2 modified/interrupted due to serious AE 21 (15.7%) 22 (16.4%) 28 (21.2%) \nNo. of patients with treatment received for serious AE 59 (44.0%) 58 (43.3%) 53 (40.2%) \nTotal number of patients with at least one AE related to study drug 1 86 (64.2%) 85 (63.4%) 92 (69.7%) \nNo. of patients with study drug 1 withdrawn due to AE related to study drug 1 5 (3.7%) 10 (7.5%) 7 (5.3%) \nNo. of patients with study drug 1 withdrawn due to AE related to study drug 2 5 (3.7%) 10 (7.5%) 7 (5.3%) \nNo. of patients with dose of study drug 1 modified/interrupted due to AE related to study drug 1 24 (17.9%) 32 (23.9%) 34 (25.8%) \nNo. of patients with dose of study drug 1 modified/interrupted due to AE related to study drug 2 24 (17.9%) 32 (23.9%) 34 (25.8%) \nNo. of patients with treatment received for AE related to study drug 1 53 (39.6%) 58 (43.3%) 60 (45.5%) \nNo. of patients with serious AE related to study drug 1 64 (47.8%) 52 (38.8%) 64 (48.5%) \nTotal number of patients with at least one AE related to study drug 2 86 (64.2%) 85 (63.4%) 92 (69.7%) \nNo. of patients with study drug 2 withdrawn due to AE related to study drug 1 5 (3.7%) 10 (7.5%) 7 (5.3%) \nNo. of patients with study drug 2 withdrawn due to AE related to study drug 2 5 (3.7%) 10 (7.5%) 7 (5.3%) \nNo. of patients with dose of study drug 2 modified/interrupted due to AE related to study drug 1 24 (17.9%) 32 (23.9%) 34 (25.8%) \nNo. of patients with dose of study drug 2 modified/interrupted due to AE related to study drug 2 24 (17.9%) 32 (23.9%) 34 (25.8%) \nNo. of patients with treatment received for AE related to study drug 2 53 (39.6%) 58 (43.3%) 60 (45.5%) \nNo. of patients with serious AE related to study drug 2 64 (47.8%) 52 (38.8%) 64 (48.5%) \n\n\n\n\n\nCodeadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nadsl <- filter(adsl, SAFFL == \"Y\")\nadae <- filter(adae, ANL01FL == \"Y\" & SAFFL == \"Y\")\n\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\nstack_adae_by_smq <- function(adae, smq) {\n adae_labels <- c(var_labels(adae), \"Standardized MedDRA Query\")\n l_df <- lapply(smq, function(ae_grp) {\n ae_scope <- str_replace(ae_grp, \"NAM\", \"SC\")\n keep <- adae[[ae_grp]] != \"<Missing>\"\n df <- adae[keep, ]\n if (substr(ae_grp, 1, 3) == \"SMQ\") {\n df[[\"SMQ\"]] <- aesi_label(as.character(df[[ae_grp]]), scope = as.character(df[[ae_scope]]))\n } else {\n df[[\"SMQ\"]] <- df[[ae_grp]]\n }\n df\n })\n result <- do.call(rbind, l_df)\n var_labels(result) <- adae_labels\n result\n}\n\nadae_smq <- stack_adae_by_smq(adae, c(\"SMQ01NAM\", \"SMQ02NAM\", \"CQ01NAM\"))\n\nnot_resolved <- adae_smq %>%\n filter(!(AEOUT %in% c(\"RECOVERED/RESOLVED\", \"FATAL\", \"RECOVERED/RESOLVED WITH SEQUELAE\"))) %>%\n distinct(USUBJID) %>%\n mutate(\n NOT_RESOLVED = \"Y\"\n )\n\nadae_smq <- adae_smq %>%\n left_join(not_resolved, by = c(\"USUBJID\")) %>%\n mutate(\n ALL_RESOLVED = is.na(NOT_RESOLVED),\n NOT_RESOLVED = !is.na(NOT_RESOLVED)\n ) %>%\n var_relabel(\n ALL_RESOLVED = \"Total number of patients with all non-fatal AEs resolved\",\n NOT_RESOLVED = \"Total number of patients with at least one non-fatal unresolved or ongoing AE\"\n )\n\nadae_smq <- adae_smq %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n WD = AEACN == \"DRUG WITHDRAWN\",\n DSM = AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n CONTRT = AECONTRT == \"Y\",\n SER = AESER == \"Y\",\n REL = AEREL == \"Y\",\n ALL_RESOLVED_WD = WD == TRUE & ALL_RESOLVED == TRUE,\n ALL_RESOLVED_DSM = DSM == TRUE & ALL_RESOLVED == TRUE,\n ALL_RESOLVED_CONTRT = CONTRT == TRUE & ALL_RESOLVED == TRUE,\n NOT_RESOLVED_WD = WD == TRUE & NOT_RESOLVED == TRUE,\n NOT_RESOLVED_DSM = DSM == TRUE & NOT_RESOLVED == TRUE,\n NOT_RESOLVED_CONTRT = CONTRT == TRUE & NOT_RESOLVED == TRUE,\n SERWD = AESER == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n SERCONTRT = AECONTRT == \"Y\" & AESER == \"Y\",\n SERDSM = AESER == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n RELWD = AEREL == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n RELDSM = AEREL == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n RELCONTRT = AECONTRT == \"Y\" & AEREL == \"Y\",\n RELSER = AESER == \"Y\" & AEREL == \"Y\"\n ) %>%\n var_relabel(\n WD = \"Total number of patients with study drug withdrawn due to AE\",\n DSM = \"Total number of patients with dose modified/interrupted due to AE\",\n CONTRT = \"Total number of patients with treatment received for AE\",\n SER = \"Total number of patients with at least one serious AE\",\n REL = \"Total number of patients with at least one related AE\",\n ALL_RESOLVED_WD = \" No. of patients with study drug withdrawn due to resolved AE\",\n ALL_RESOLVED_DSM = \" No. of patients with dose modified/interrupted due to resolved AE\",\n ALL_RESOLVED_CONTRT = \" No. of patients with treatment received for resolved AE\",\n NOT_RESOLVED_WD = \" No. of patients with study drug withdrawn due to unresolved or ongoing AE\",\n NOT_RESOLVED_DSM = \" No. of patients with dose modified/interrupted due to unresolved or ongoing AE\",\n NOT_RESOLVED_CONTRT = \" No. of patients with treatment received for unresolved or ongoing AE\",\n SERWD = \" No. of patients with study drug withdrawn due to serious AE\",\n SERDSM = \" No. of patients with dose modified/interrupted due to serious AE\",\n SERCONTRT = \" No. of patients with treatment received for serious AE\",\n RELWD = \" No. of patients with study drug withdrawn due to related AE\",\n RELDSM = \" No. of patients with dose modified/interrupted due to related AE\",\n RELCONTRT = \" No. of patients with treatment received for related AE\",\n RELSER = \" No. of patients with serious, related AE\"\n )\n\nadae_smq <- adae_smq %>%\n mutate(\n AETOXGR = forcats::fct_recode(AETOXGR,\n \"Grade 1\" = \"1\",\n \"Grade 2\" = \"2\",\n \"Grade 3\" = \"3\",\n \"Grade 4\" = \"4\",\n \"Grade 5 (fatal outcome)\" = \"5\"\n )\n )\n\nsplit_fun <- remove_split_levels(\"<Missing>\")\naesi_vars <- c(\"WD\", \"DSM\", \"CONTRT\", \"ALL_RESOLVED\", \"NOT_RESOLVED\", \"SER\", \"REL\")\n\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"SMQ\",\n child_labels = \"visible\",\n nested = FALSE,\n indent_mod = -1L,\n split_fun = split_fun,\n split_label = \"Standardized MedDRA Query\",\n label_pos = \"topleft\"\n ) %>%\n count_patients_with_event(\n vars = \"USUBJID\",\n filters = c(\"STUDYID\" = as.character(unique(adae_smq$STUDYID))),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients with at least one AE\")\n ) %>%\n count_values(\n \"STUDYID\",\n values = as.character(unique(adae_smq$STUDYID)),\n .stats = \"count\",\n .labels = c(count = \"Total number of AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n var_labels = \"Total number of patients with at least one AE by worst grade\",\n .show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = var_labels(adae_smq[, aesi_vars]),\n denom = \"N_col\"\n )\nresult <- build_table(lyt_adae, df = adae_smq, alt_counts_df = adsl)\nresult\n\nStandardized MedDRA Query A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nC.1.1.1.3/B.2.2.3.1 AESI (BROAD) \nTotal number of patients with at least one AE 58 (43.3%) 60 (44.8%) 66 (50.0%) \nTotal number of AEs 97 106 122 \nTotal number of patients with at least one AE by worst grade \n Grade 1 22 (16.4%) 26 (19.4%) 30 (22.7%) \n Grade 2 0 0 0 \n Grade 3 0 0 0 \n Grade 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 5 (fatal outcome) 0 0 0 \nTotal number of patients with study drug withdrawn due to AE 5 (3.7%) 6 (4.5%) 9 (6.8%) \nTotal number of patients with dose modified/interrupted due to AE 21 (15.7%) 21 (15.7%) 24 (18.2%) \nTotal number of patients with treatment received for AE 32 (23.9%) 35 (26.1%) 44 (33.3%) \nTotal number of patients with all non-fatal AEs resolved 7 (5.2%) 9 (6.7%) 8 (6.1%) \nTotal number of patients with at least one non-fatal unresolved or ongoing AE 51 (38.1%) 51 (38.1%) 58 (43.9%) \nTotal number of patients with at least one serious AE 38 (28.4%) 40 (29.9%) 45 (34.1%) \nTotal number of patients with at least one related AE 36 (26.9%) 34 (25.4%) 36 (27.3%) \nD.2.1.5.3/A.1.1.1.1 AESI \nTotal number of patients with at least one AE 62 (46.3%) 61 (45.5%) 76 (57.6%) \nTotal number of AEs 106 100 139 \nTotal number of patients with at least one AE by worst grade \n Grade 1 62 (46.3%) 61 (45.5%) 76 (57.6%) \n Grade 2 0 0 0 \n Grade 3 0 0 0 \n Grade 4 0 0 0 \n Grade 5 (fatal outcome) 0 0 0 \nTotal number of patients with study drug withdrawn due to AE 6 (4.5%) 8 (6.0%) 4 (3.0%) \nTotal number of patients with dose modified/interrupted due to AE 23 (17.2%) 20 (14.9%) 26 (19.7%) \nTotal number of patients with treatment received for AE 33 (24.6%) 37 (27.6%) 33 (25.0%) \nTotal number of patients with all non-fatal AEs resolved 4 (3.0%) 5 (3.7%) 14 (10.6%) \nTotal number of patients with at least one non-fatal unresolved or ongoing AE 58 (43.3%) 56 (41.8%) 62 (47.0%) \nTotal number of patients with at least one serious AE 0 0 0 \nTotal number of patients with at least one related AE 37 (27.6%) 46 (34.3%) 50 (37.9%) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\nadae <- filter(adae, ANL01FL == \"Y\" & SAFFL == \"Y\")\n\nnot_resolved <- adae %>%\n filter(!(AEOUT %in% c(\"RECOVERED/RESOLVED\", \"FATAL\", \"RECOVERED/RESOLVED WITH SEQUELAE\"))) %>%\n distinct(USUBJID) %>%\n mutate(\n NOT_RESOLVED = \"Y\"\n )\n\nadae <- adae %>%\n left_join(not_resolved, by = c(\"USUBJID\")) %>%\n mutate(\n ALL_RESOLVED = is.na(NOT_RESOLVED),\n NOT_RESOLVED = !is.na(NOT_RESOLVED)\n ) %>%\n var_relabel(\n ALL_RESOLVED = \"All non-fatal AEs resolved\",\n NOT_RESOLVED = \"At least one non-fatal unresolved or ongoing AE\"\n )\n\nadae <- adae %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n WD = AEACN == \"DRUG WITHDRAWN\",\n DSM = AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n CONTRT = AECONTRT == \"Y\",\n SER = AESER == \"Y\",\n REL = AEREL == \"Y\",\n ALL_RESOLVED_WD = WD == TRUE & ALL_RESOLVED == TRUE,\n ALL_RESOLVED_DSM = DSM == TRUE & ALL_RESOLVED == TRUE,\n ALL_RESOLVED_CONTRT = CONTRT == TRUE & ALL_RESOLVED == TRUE,\n NOT_RESOLVED_WD = WD == TRUE & NOT_RESOLVED == TRUE,\n NOT_RESOLVED_DSM = DSM == TRUE & NOT_RESOLVED == TRUE,\n NOT_RESOLVED_CONTRT = CONTRT == TRUE & NOT_RESOLVED == TRUE,\n SERWD = AESER == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n SERCONTRT = AECONTRT == \"Y\" & AESER == \"Y\",\n SERDSM = AESER == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n RELWD = AEREL == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n RELDSM = AEREL == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n RELCONTRT = AECONTRT == \"Y\" & AEREL == \"Y\",\n RELSER = AESER == \"Y\" & AEREL == \"Y\"\n ) %>%\n var_relabel(\n WD = \"AE that led to study drug withdrawal\",\n DSM = \"AE that led to study drug dose modified/interrupted\",\n CONTRT = \"AE that required treatment\",\n SER = \"Serious AE\",\n REL = \"Related AE\",\n ALL_RESOLVED_WD = \"Resolved AE that led to study drug withdrawal\",\n ALL_RESOLVED_DSM = \"Resolved AE that led to study drug dose modified/interrupted\",\n ALL_RESOLVED_CONTRT = \"Resolved AE that required treatment\",\n NOT_RESOLVED_WD = \"Unresolved AE that led to study drug withdrawal\",\n NOT_RESOLVED_DSM = \"Unresolved AE that led to study drug dose modified/interrupted\",\n NOT_RESOLVED_CONTRT = \"Unresolved AE that required treatment\",\n SERWD = \"Serious AE that led to study drug withdrawal\",\n SERDSM = \"Serious AE that led to study drug dose modified/interrupted\",\n SERCONTRT = \"Serious AE that required treatment\",\n RELWD = \"Related AE that led to study drug withdrawal\",\n RELDSM = \"Related AE that led to study drug dose modified/interrupted\",\n RELCONTRT = \"Related AE that required treatment\",\n RELSER = \"Serious related AE\"\n )\n\naesi_vars <- c(\n \"WD\", \"DSM\", \"CONTRT\", \"ALL_RESOLVED_WD\", \"ALL_RESOLVED_DSM\", \"ALL_RESOLVED_CONTRT\",\n \"NOT_RESOLVED_WD\", \"NOT_RESOLVED_DSM\", \"NOT_RESOLVED_CONTRT\", \"SER\", \"SERWD\", \"SERDSM\",\n \"SERCONTRT\", \"REL\", \"RELWD\", \"RELDSM\", \"RELCONTRT\", \"RELSER\"\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADAE\", adae, code = 'ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n ADAE <- filter(ADAE, ANL01FL == \"Y\" & SAFFL == \"Y\")\n not_resolved <- ADAE %>%\n filter(!(AEOUT %in% c(\"RECOVERED/RESOLVED\", \"FATAL\", \"RECOVERED/RESOLVED WITH SEQUELAE\"))) %>%\n distinct(USUBJID) %>% mutate(\n NOT_RESOLVED = \"Y\"\n )\n\n ADAE <- ADAE %>%\n left_join(not_resolved, by = c(\"USUBJID\")) %>%\n mutate(\n ALL_RESOLVED = is.na(NOT_RESOLVED),\n NOT_RESOLVED = !is.na(NOT_RESOLVED)\n ) %>%\n var_relabel(\n ALL_RESOLVED = \"All non-fatal AEs resolved\",\n NOT_RESOLVED = \"At least one non-fatal unresolved or ongoing AE\"\n )\n\n ADAE <- ADAE %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n WD = AEACN == \"DRUG WITHDRAWN\",\n DSM = AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n CONTRT = AECONTRT == \"Y\",\n SER = AESER == \"Y\",\n REL = AEREL == \"Y\",\n ALL_RESOLVED_WD = WD == TRUE & ALL_RESOLVED == TRUE,\n ALL_RESOLVED_DSM = DSM == TRUE & ALL_RESOLVED == TRUE,\n ALL_RESOLVED_CONTRT = CONTRT == TRUE & ALL_RESOLVED == TRUE,\n NOT_RESOLVED_WD = WD == TRUE & NOT_RESOLVED == TRUE,\n NOT_RESOLVED_DSM = DSM == TRUE & NOT_RESOLVED == TRUE,\n NOT_RESOLVED_CONTRT = CONTRT == TRUE & NOT_RESOLVED == TRUE,\n SERWD = AESER == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n SERCONTRT = AECONTRT == \"Y\" & AESER == \"Y\",\n SERDSM = AESER == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n RELWD = AEREL == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n RELDSM = AEREL == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n RELCONTRT = AECONTRT == \"Y\" & AEREL == \"Y\",\n RELSER = AESER == \"Y\" & AEREL == \"Y\"\n ) %>%\n var_relabel(\n WD = \"AE that led to study drug withdrawal\",\n DSM = \"AE that led to study drug dose modified/interrupted\",\n CONTRT = \"AE that required treatment\",\n SER = \"Serious AE\",\n REL = \"Related AE\",\n ALL_RESOLVED_WD = \"Resolved AE that led to study drug withdrawal\",\n ALL_RESOLVED_DSM = \"Resolved AE that led to study drug dose modified/interrupted\",\n ALL_RESOLVED_CONTRT = \"Resolved AE that required treatment\",\n NOT_RESOLVED_WD = \"Unresolved AE that led to study drug withdrawal\",\n NOT_RESOLVED_DSM = \"Unresolved AE that led to study drug dose modified/interrupted\",\n NOT_RESOLVED_CONTRT = \"Unresolved AE that required treatment\",\n SERWD = \"Serious AE that led to study drug withdrawal\",\n SERDSM = \"Serious AE that led to study drug dose modified/interrupted\",\n SERCONTRT = \"Serious AE that required treatment\",\n RELWD = \"Related AE that led to study drug withdrawal\",\n RELDSM = \"Related AE that led to study drug dose modified/interrupted\",\n RELCONTRT = \"Related AE that required treatment\",\n RELSER = \"Serious related AE\"\n )'),\n check = TRUE\n ),\n modules = modules(\n tm_t_events_summary(\n label = \"Adverse Events Summary\",\n dataname = \"ADAE\",\n arm_var = choices_selected(\n choices = variable_choices(\"ADSL\", c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n flag_var_anl = choices_selected(\n choices = variable_choices(\"ADAE\", aesi_vars),\n selected = aesi_vars[1],\n keep_order = TRUE,\n fixed = FALSE\n ),\n add_total = TRUE\n )\n )\n)\n\n[INFO] 2023-08-04 15:08:43.7304 pid:10990 token:[] teal.modules.clinical Initializing tm_t_events_summary\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 stringr_1.5.0 \n [9] dplyr_1.1.2 tern_0.8.5.9006 \n[11] rtables_0.6.2.9001 magrittr_2.0.3 \n[13] formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] stringi_1.7.12 gtable_0.3.3 later_1.3.1 \n[61] shinycssloaders_1.0.0 munsell_0.5.0 tibble_3.2.1 \n[64] styler_1.10.1 logger_0.2.2 pillar_1.9.0 \n[67] htmltools_0.5.5 brio_1.1.3 R6_2.5.1 \n[70] Rdpack_2.4 evaluate_0.21 lattice_0.21-8 \n[73] R.methodsS3_1.8.2 rbibutils_2.2.13 backports_1.4.1 \n[76] memoise_2.0.1 broom_1.0.5 teal.reporter_0.1.1.9020\n[79] httpuv_1.6.11 bslib_0.5.0 Rcpp_1.0.11 \n[82] teal.code_0.3.0.9009 shinyvalidate_0.1.2 coda_0.19-4 \n[85] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[88] forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet01_aesi.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable with Optional Lines\nTable For Studies with Multiple Drugs\nTable of AEs by SMQ\nTeal\nSession Info\n\n\n\nTo illustrate, additional variables such as flags (TRUE/FALSE) for selected AEs of interest. Please consult your SAP on how to handle missing AE grades.\n\nCodelibrary(tern)\nlibrary(dplyr)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nadsl <- filter(adsl, SAFFL == \"Y\")\nadae <- filter(adae, ANL01FL == \"Y\" & SAFFL == \"Y\")\n\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\nnot_resolved <- adae %>%\n filter(!(AEOUT %in% c(\"RECOVERED/RESOLVED\", \"FATAL\", \"RECOVERED/RESOLVED WITH SEQUELAE\"))) %>%\n distinct(USUBJID) %>%\n mutate(NOT_RESOLVED = \"Y\")\n\nadae <- adae %>%\n left_join(not_resolved, by = c(\"USUBJID\")) %>%\n mutate(\n ALL_RESOLVED = with_label(is.na(NOT_RESOLVED), \"Total number of patients with all non-fatal AEs resolved\"),\n NOT_RESOLVED = with_label(!is.na(NOT_RESOLVED), \"Total number of patients with at least one unresolved or ongoing non-fatal AE\")\n )\n\nadae <- adae %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n WD = with_label(AEACN == \"DRUG WITHDRAWN\", \"Total number of patients with study drug withdrawn due to AE\"),\n DSM = with_label(\n AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"), \"Total number of patients with dose modified/interrupted due to AE\"\n ),\n CONTRT = with_label(AECONTRT == \"Y\", \"Total number of patients with treatment received for AE\"),\n SER = with_label(AESER == \"Y\", \"Total number of patients with at least one serious AE\"),\n REL = with_label(AEREL == \"Y\", \"Total number of patients with at least one related AE\"),\n ALL_RESOLVED_WD = with_label(WD == TRUE & ALL_RESOLVED == TRUE, \"No. of patients with study drug withdrawn due to resolved AE\"),\n ALL_RESOLVED_DSM = with_label(DSM == TRUE & ALL_RESOLVED == TRUE, \"No. of patients with dose modified/interrupted due to resolved AE\"),\n ALL_RESOLVED_CONTRT = with_label(CONTRT == TRUE & ALL_RESOLVED == TRUE, \"No. of patients with treatment received for resolved AE\"),\n NOT_RESOLVED_WD = with_label(WD == TRUE & NOT_RESOLVED == TRUE, \"No. of patients with study drug withdrawn due to unresolved or ongoing AE\"),\n NOT_RESOLVED_DSM = with_label(DSM == TRUE & NOT_RESOLVED == TRUE, \"No. of patients with dose modified/interrupted due to unresolved or ongoing AE\"),\n NOT_RESOLVED_CONTRT = with_label(CONTRT == TRUE & NOT_RESOLVED == TRUE, \"No. of patients with treatment received for unresolved or ongoing AE\"),\n SERWD = with_label(AESER == \"Y\" & AEACN == \"DRUG WITHDRAWN\", \"No. of patients with study drug withdrawn due to serious AE\"),\n SERCONTRT = with_label(AECONTRT == \"Y\" & AESER == \"Y\", \"No. of patients with dose modified/interrupted due to serious AE\"),\n SERDSM = with_label(\n AESER == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"), \"No. of patients with treatment received for serious AE\"\n ),\n RELWD = with_label(AEREL == \"Y\" & AEACN == \"DRUG WITHDRAWN\", \"No. of patients with study drug withdrawn due to related AE\"),\n RELDSM = with_label(\n AEREL == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"No. of patients with dose modified/interrupted due to related AE\"\n ),\n RELCONTRT = with_label(AECONTRT == \"Y\" & AEREL == \"Y\", \"No. of patients with treatment received for related AE\"),\n RELSER = with_label(AESER == \"Y\" & AEREL == \"Y\", \"No. of patients with serious, related AE\")\n )\n\nadae <- adae %>%\n mutate(\n AETOXGR = forcats::fct_recode(AETOXGR,\n \"Grade 1\" = \"1\",\n \"Grade 2\" = \"2\",\n \"Grade 3\" = \"3\",\n \"Grade 4\" = \"4\",\n \"Grade 5 (fatal outcome)\" = \"5\"\n )\n )\n\n\n\n\n\nCodeaesi_vars <- c(\"WD\", \"DSM\", \"CONTRT\", \"ALL_RESOLVED\", \"NOT_RESOLVED\", \"SER\", \"REL\")\n\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_patients_with_event(\n vars = \"USUBJID\",\n filters = c(\"ANL01FL\" = \"Y\"),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients with at least one AE\")\n ) %>%\n count_values(\n \"ANL01FL\",\n values = \"Y\",\n .stats = \"count\",\n .labels = c(count = \"Total number of AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n var_labels = \"Total number of patients with at least one AE by worst grade\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\"USUBJID\", flag_variables = aesi_vars, denom = \"N_col\")\n\nresult <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one AE 100 (74.6%) 98 (73.1%) 103 (78.0%) \nTotal number of AEs 502 480 604 \nTotal number of patients with at least one AE by worst grade \n Grade 1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n Grade 2 5 (3.7%) 8 (6.0%) 6 (4.5%) \n Grade 3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n Grade 4 13 (9.7%) 18 (13.4%) 15 (11.4%) \n Grade 5 (fatal outcome) 64 (47.8%) 52 (38.8%) 64 (48.5%) \nTotal number of patients with study drug withdrawn due to AE 22 (16.4%) 21 (15.7%) 28 (21.2%) \nTotal number of patients with dose modified/interrupted due to AE 55 (41.0%) 62 (46.3%) 64 (48.5%) \nTotal number of patients with treatment received for AE 80 (59.7%) 80 (59.7%) 89 (67.4%) \nTotal number of patients with all non-fatal AEs resolved 17 (12.7%) 12 (9.0%) 11 (8.3%) \nTotal number of patients with at least one unresolved or ongoing non-fatal AE 83 (61.9%) 86 (64.2%) 92 (69.7%) \nTotal number of patients with at least one serious AE 85 (63.4%) 80 (59.7%) 87 (65.9%) \nTotal number of patients with at least one related AE 86 (64.2%) 85 (63.4%) 92 (69.7%) \n\n\n\n\n\nCodeaesi_vars <- c(\"WD\", \"DSM\", \"CONTRT\")\naesi_resolved <- c(\"ALL_RESOLVED\", \"ALL_RESOLVED_WD\", \"ALL_RESOLVED_DSM\", \"ALL_RESOLVED_CONTRT\")\naesi_not_resolved <- c(\"NOT_RESOLVED\", \"NOT_RESOLVED_WD\", \"NOT_RESOLVED_DSM\", \"NOT_RESOLVED_CONTRT\")\naesi_ser <- c(\"SER\", \"SERWD\", \"SERDSM\", \"SERCONTRT\")\naesi_rel <- c(\"REL\", \"RELWD\", \"RELDSM\", \"RELCONTRT\", \"RELSER\")\n\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_patients_with_event(\n vars = \"USUBJID\",\n filters = c(\"ANL01FL\" = \"Y\"),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients with at least one AE\")\n ) %>%\n count_values(\n \"ANL01FL\",\n values = \"Y\",\n .stats = \"count\",\n .labels = c(count = \"Total number of AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n var_labels = \"Total number of patients with at least one AE by worst grade\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = c(aesi_vars, aesi_resolved[1]), denom = \"N_col\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_resolved[-1], denom = \"N_col\", .indent_mods = 1L, table_names = \"fl_res\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_not_resolved[1], denom = \"N_col\", table_names = \"fl_notres_main\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_not_resolved[-1], denom = \"N_col\", .indent_mods = 1L, table_names = \"fl_notres\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_ser[1], denom = \"N_col\", table_names = \"fl_ser_main\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_ser[-1], denom = \"N_col\", .indent_mods = 1L, table_names = \"fl_ser\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_rel[1], denom = \"N_col\", table_names = \"fl_rel_main\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_rel[-1], denom = \"N_col\", .indent_mods = 1L, table_names = \"fl_rel\"\n )\n\nresult <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one AE 100 (74.6%) 98 (73.1%) 103 (78.0%) \nTotal number of AEs 502 480 604 \nTotal number of patients with at least one AE by worst grade \n Grade 1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n Grade 2 5 (3.7%) 8 (6.0%) 6 (4.5%) \n Grade 3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n Grade 4 13 (9.7%) 18 (13.4%) 15 (11.4%) \n Grade 5 (fatal outcome) 64 (47.8%) 52 (38.8%) 64 (48.5%) \nTotal number of patients with study drug withdrawn due to AE 22 (16.4%) 21 (15.7%) 28 (21.2%) \nTotal number of patients with dose modified/interrupted due to AE 55 (41.0%) 62 (46.3%) 64 (48.5%) \nTotal number of patients with treatment received for AE 80 (59.7%) 80 (59.7%) 89 (67.4%) \nTotal number of patients with all non-fatal AEs resolved 17 (12.7%) 12 (9.0%) 11 (8.3%) \n No. of patients with study drug withdrawn due to resolved AE 0 1 (0.7%) 2 (1.5%) \n No. of patients with dose modified/interrupted due to resolved AE 3 (2.2%) 4 (3.0%) 2 (1.5%) \n No. of patients with treatment received for resolved AE 9 (6.7%) 7 (5.2%) 7 (5.3%) \nTotal number of patients with at least one unresolved or ongoing non-fatal AE 83 (61.9%) 86 (64.2%) 92 (69.7%) \n No. of patients with study drug withdrawn due to unresolved or ongoing AE 22 (16.4%) 20 (14.9%) 26 (19.7%) \n No. of patients with dose modified/interrupted due to unresolved or ongoing AE 52 (38.8%) 58 (43.3%) 62 (47.0%) \n No. of patients with treatment received for unresolved or ongoing AE 71 (53.0%) 73 (54.5%) 82 (62.1%) \nTotal number of patients with at least one serious AE 85 (63.4%) 80 (59.7%) 87 (65.9%) \n No. of patients with study drug withdrawn due to serious AE 9 (6.7%) 4 (3.0%) 10 (7.6%) \n No. of patients with treatment received for serious AE 21 (15.7%) 22 (16.4%) 28 (21.2%) \n No. of patients with dose modified/interrupted due to serious AE 59 (44.0%) 58 (43.3%) 53 (40.2%) \nTotal number of patients with at least one related AE 86 (64.2%) 85 (63.4%) 92 (69.7%) \n No. of patients with study drug withdrawn due to related AE 5 (3.7%) 10 (7.5%) 7 (5.3%) \n No. of patients with dose modified/interrupted due to related AE 24 (17.9%) 32 (23.9%) 34 (25.8%) \n No. of patients with treatment received for related AE 53 (39.6%) 58 (43.3%) 60 (45.5%) \n No. of patients with serious, related AE 64 (47.8%) 52 (38.8%) 64 (48.5%) \n\n\n\n\n\nCodeadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae_mult <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nadsl <- filter(adsl, SAFFL == \"Y\")\nadae_mult <- filter(adae_mult, ANL01FL == \"Y\" & SAFFL == \"Y\")\n\nadsl <- df_explicit_na(adsl)\nadae_mult <- df_explicit_na(adae_mult)\n\n# for illustration purposes only, create AEREL1, AEREL2, AEACN1, AEACN2 from respective variables\nadae_mult <- adae_mult %>%\n mutate(\n AEREL1 = AEREL,\n AEREL2 = AEREL,\n AEACN1 = AEACN,\n AEACN2 = AEACN\n )\n\nnot_resolved <- adae_mult %>%\n filter(!(AEOUT %in% c(\"RECOVERED/RESOLVED\", \"FATAL\", \"RECOVERED/RESOLVED WITH SEQUELAE\"))) %>%\n distinct(USUBJID) %>%\n mutate(NOT_RESOLVED = \"Y\")\n\nadae_mult <- adae_mult %>%\n left_join(not_resolved, by = c(\"USUBJID\")) %>%\n mutate(\n ALL_RESOLVED = with_label(is.na(NOT_RESOLVED), \"Total number of patients with all non-fatal AEs resolved\"),\n NOT_RESOLVED = with_label(!is.na(NOT_RESOLVED), \"Total number of patients with at least one non-fatal unresolved or ongoing AE\")\n )\n\nadae_mult <- adae_mult %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n WD1 = with_label(AEACN1 == \"DRUG WITHDRAWN\", \"Total number of patients with study drug 1 withdrawn due to AE\"),\n WD2 = with_label(AEACN2 == \"DRUG WITHDRAWN\", \"Total number of patients with study drug 2 withdrawn due to AE\"),\n DSM1 = with_label(\n AEACN1 %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"Total number of patients with dose of study drug 1 modified/interrupted due to AE\"\n ),\n DSM2 = with_label(\n AEACN2 %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"Total number of patients with dose of study drug 2 modified/interrupted due to AE\"\n ),\n CONTRT = with_label(AECONTRT == \"Y\", \"Total number of patients with treatment received for AE\"),\n SER = with_label(AESER == \"Y\", \"Total number of patients with at least one serious AE\"),\n REL1 = with_label(AEREL1 == \"Y\", \"Total number of patients with at least one AE related to study drug 1\"),\n REL2 = with_label(AEREL2 == \"Y\", \"Total number of patients with at least one AE related to study drug 2\"),\n ALL_RESOLVED_WD1 = with_label(WD1 == TRUE & ALL_RESOLVED == TRUE, \"No. of patients with study drug 1 withdrawn due to resolved AE\"),\n ALL_RESOLVED_DSM1 = with_label(\n DSM1 == TRUE & ALL_RESOLVED == TRUE, \"No. of patients with dose of study drug 1 modified/interrupted due to resolved AE\"\n ),\n ALL_RESOLVED_CONTRT = with_label(CONTRT == TRUE & ALL_RESOLVED == TRUE, \"No. of patients with treatment received for resolved AE\"),\n ALL_RESOLVED_WD2 = with_label(WD2 == TRUE & ALL_RESOLVED == TRUE, \"No. of patients with study drug 2 withdrawn due to resolved AE\"),\n ALL_RESOLVED_DSM2 = with_label(\n DSM2 == TRUE & ALL_RESOLVED == TRUE, \"No. of patients with dose of study drug 2 modified/interrupted due to resolved AE\"\n ),\n NOT_RESOLVED_WD1 = with_label(WD1 == TRUE & NOT_RESOLVED == TRUE, \"No. of patients with study drug 1 withdrawn due to unresolved or ongoing AE\"),\n NOT_RESOLVED_DSM1 = with_label(\n DSM1 == TRUE & NOT_RESOLVED == TRUE, \"No. of patients with dose of study drug 1 modified/interrupted due to unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_CONTRT = with_label(CONTRT == TRUE & NOT_RESOLVED == TRUE, \"No. of patients with treatment received for unresolved or ongoing AE\"),\n NOT_RESOLVED_WD2 = with_label(WD2 == TRUE & NOT_RESOLVED == TRUE, \"No. of patients with study drug 2 withdrawn due to unresolved or ongoing AE\"),\n NOT_RESOLVED_DSM2 = with_label(\n DSM2 == TRUE & NOT_RESOLVED == TRUE, \"No. of patients with dose of study drug 2 modified/interrupted due to unresolved or ongoing AE\"\n ),\n SERWD1 = with_label(AESER == \"Y\" & AEACN1 == \"DRUG WITHDRAWN\", \"No. of patients with study drug 1 withdrawn due to serious AE\"),\n SERWD2 = with_label(AESER == \"Y\" & AEACN2 == \"DRUG WITHDRAWN\", \"No. of patients with study drug 2 withdrawn due to serious AE\"),\n SERCONTRT = with_label(AECONTRT == \"Y\" & AESER == \"Y\", \"No. of patients with treatment received for serious AE\"),\n SERDSM1 = with_label(\n AESER == \"Y\" & AEACN1 %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"No. of patients with dose of study drug 1 modified/interrupted due to serious AE\"\n ),\n SERDSM2 = with_label(\n AESER == \"Y\" & AEACN2 %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"No. of patients with dose of study drug 2 modified/interrupted due to serious AE\"\n ),\n REL1WD1 = with_label(AEREL1 == \"Y\" & AEACN1 == \"DRUG WITHDRAWN\", \"No. of patients with study drug 1 withdrawn due to AE related to study drug 1\"),\n REL1WD2 = with_label(AEREL1 == \"Y\" & AEACN2 == \"DRUG WITHDRAWN\", \"No. of patients with study drug 1 withdrawn due to AE related to study drug 2\"),\n REL2WD1 = with_label(AEREL1 == \"Y\" & AEACN1 == \"DRUG WITHDRAWN\", \"No. of patients with study drug 2 withdrawn due to AE related to study drug 1\"),\n REL2WD2 = with_label(AEREL1 == \"Y\" & AEACN2 == \"DRUG WITHDRAWN\", \"No. of patients with study drug 2 withdrawn due to AE related to study drug 2\"),\n REL1DSM1 = with_label(\n AEREL1 == \"Y\" & AEACN1 %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"No. of patients with dose of study drug 1 modified/interrupted due to AE related to study drug 1\"\n ),\n REL2DSM1 = with_label(\n AEREL2 == \"Y\" & AEACN1 %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"No. of patients with dose of study drug 2 modified/interrupted due to AE related to study drug 1\"\n ),\n REL1DSM2 = with_label(\n AEREL1 == \"Y\" & AEACN2 %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"No. of patients with dose of study drug 1 modified/interrupted due to AE related to study drug 2\"\n ),\n REL2DSM2 = with_label(\n AEREL2 == \"Y\" & AEACN2 %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"No. of patients with dose of study drug 2 modified/interrupted due to AE related to study drug 2\"\n ),\n REL1CONTRT = with_label(AECONTRT == \"Y\" & AEREL1 == \"Y\", \"No. of patients with treatment received for AE related to study drug 1\"),\n REL2CONTRT = with_label(AECONTRT == \"Y\" & AEREL2 == \"Y\", \"No. of patients with treatment received for AE related to study drug 2\"),\n REL1SER = with_label(AESER == \"Y\" & AEREL1 == \"Y\", \"No. of patients with serious AE related to study drug 1\"),\n REL2SER = with_label(AESER == \"Y\" & AEREL2 == \"Y\", \"No. of patients with serious AE related to study drug 2\")\n )\n\nadae_mult <- adae_mult %>%\n mutate(AETOXGR = forcats::fct_recode(\n AETOXGR,\n \"Grade 1\" = \"1\",\n \"Grade 2\" = \"2\",\n \"Grade 3\" = \"3\",\n \"Grade 4\" = \"4\",\n \"Grade 5 (fatal outcome)\" = \"5\"\n ))\n\naesi_vars <- c(\"WD1\", \"WD2\", \"DSM1\", \"DSM2\", \"CONTRT\")\naesi_res <- c(\"ALL_RESOLVED\", \"ALL_RESOLVED_WD1\", \"ALL_RESOLVED_WD2\", \"ALL_RESOLVED_DSM1\", \"ALL_RESOLVED_DSM2\", \"ALL_RESOLVED_CONTRT\")\naesi_not_res <- c(\"NOT_RESOLVED\", \"NOT_RESOLVED_WD1\", \"NOT_RESOLVED_WD2\", \"NOT_RESOLVED_DSM1\", \"NOT_RESOLVED_DSM2\", \"NOT_RESOLVED_CONTRT\")\naesi_ser <- c(\"SER\", \"SERWD1\", \"SERWD2\", \"SERDSM1\", \"SERDSM2\", \"SERCONTRT\")\naesi_rel1 <- c(\"REL1\", \"REL1WD1\", \"REL1WD2\", \"REL1DSM1\", \"REL1DSM2\", \"REL1CONTRT\", \"REL1SER\")\naesi_rel2 <- c(\"REL2\", \"REL2WD1\", \"REL2WD2\", \"REL2DSM1\", \"REL2DSM2\", \"REL2CONTRT\", \"REL2SER\")\n\nlyt_adae_mult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_patients_with_event(\n vars = \"USUBJID\",\n filters = c(\"ANL01FL\" = \"Y\"),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients with at least one AE\")\n ) %>%\n count_values(\n \"ANL01FL\",\n values = \"Y\",\n .stats = \"count\",\n .labels = c(count = \"Total number of AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n var_labels = \"Total number of patients with at least one AE by worst grade\",\n show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = c(aesi_vars, aesi_res[1]), denom = \"N_col\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_res[-1], denom = \"N_col\", .indent_mods = 1L, table_names = \"fl_res\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_not_res[1], denom = \"N_col\", table_names = \"fl_notres_main\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_not_res[-1], denom = \"N_col\", .indent_mods = 1L, table_names = \"fl_notres\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_ser[1], denom = \"N_col\", table_names = \"fl_ser_main\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_ser[-1], denom = \"N_col\", .indent_mods = 1L, table_names = \"fl_ser\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_rel1[1], denom = \"N_col\", table_names = \"fl_rel1_main\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_rel1[-1], denom = \"N_col\", .indent_mods = 1L, table_names = \"fl_rel1\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_rel2[1], denom = \"N_col\", table_names = \"fl_rel2_main\"\n ) %>%\n count_patients_with_flags(\n \"USUBJID\",\n flag_variables = aesi_rel2[-1], denom = \"N_col\", .indent_mods = 1L, table_names = \"fl_rel2\"\n )\n\nresult <- build_table(lyt_adae_mult, df = adae_mult, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one AE 100 (74.6%) 98 (73.1%) 103 (78.0%) \nTotal number of AEs 502 480 604 \nTotal number of patients with at least one AE by worst grade \n Grade 1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n Grade 2 5 (3.7%) 8 (6.0%) 6 (4.5%) \n Grade 3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n Grade 4 13 (9.7%) 18 (13.4%) 15 (11.4%) \n Grade 5 (fatal outcome) 64 (47.8%) 52 (38.8%) 64 (48.5%) \nTotal number of patients with study drug 1 withdrawn due to AE 22 (16.4%) 21 (15.7%) 28 (21.2%) \nTotal number of patients with study drug 2 withdrawn due to AE 22 (16.4%) 21 (15.7%) 28 (21.2%) \nTotal number of patients with dose of study drug 1 modified/interrupted due to AE 55 (41.0%) 62 (46.3%) 64 (48.5%) \nTotal number of patients with dose of study drug 2 modified/interrupted due to AE 55 (41.0%) 62 (46.3%) 64 (48.5%) \nTotal number of patients with treatment received for AE 80 (59.7%) 80 (59.7%) 89 (67.4%) \nTotal number of patients with all non-fatal AEs resolved 17 (12.7%) 12 (9.0%) 11 (8.3%) \n No. of patients with study drug 1 withdrawn due to resolved AE 0 1 (0.7%) 2 (1.5%) \n No. of patients with study drug 2 withdrawn due to resolved AE 0 1 (0.7%) 2 (1.5%) \n No. of patients with dose of study drug 1 modified/interrupted due to resolved AE 3 (2.2%) 4 (3.0%) 2 (1.5%) \n No. of patients with dose of study drug 2 modified/interrupted due to resolved AE 3 (2.2%) 4 (3.0%) 2 (1.5%) \n No. of patients with treatment received for resolved AE 9 (6.7%) 7 (5.2%) 7 (5.3%) \nTotal number of patients with at least one non-fatal unresolved or ongoing AE 83 (61.9%) 86 (64.2%) 92 (69.7%) \n No. of patients with study drug 1 withdrawn due to unresolved or ongoing AE 22 (16.4%) 20 (14.9%) 26 (19.7%) \n No. of patients with study drug 2 withdrawn due to unresolved or ongoing AE 22 (16.4%) 20 (14.9%) 26 (19.7%) \n No. of patients with dose of study drug 1 modified/interrupted due to unresolved or ongoing AE 52 (38.8%) 58 (43.3%) 62 (47.0%) \n No. of patients with dose of study drug 2 modified/interrupted due to unresolved or ongoing AE 52 (38.8%) 58 (43.3%) 62 (47.0%) \n No. of patients with treatment received for unresolved or ongoing AE 71 (53.0%) 73 (54.5%) 82 (62.1%) \nTotal number of patients with at least one serious AE 85 (63.4%) 80 (59.7%) 87 (65.9%) \n No. of patients with study drug 1 withdrawn due to serious AE 9 (6.7%) 4 (3.0%) 10 (7.6%) \n No. of patients with study drug 2 withdrawn due to serious AE 9 (6.7%) 4 (3.0%) 10 (7.6%) \n No. of patients with dose of study drug 1 modified/interrupted due to serious AE 21 (15.7%) 22 (16.4%) 28 (21.2%) \n No. of patients with dose of study drug 2 modified/interrupted due to serious AE 21 (15.7%) 22 (16.4%) 28 (21.2%) \n No. of patients with treatment received for serious AE 59 (44.0%) 58 (43.3%) 53 (40.2%) \nTotal number of patients with at least one AE related to study drug 1 86 (64.2%) 85 (63.4%) 92 (69.7%) \n No. of patients with study drug 1 withdrawn due to AE related to study drug 1 5 (3.7%) 10 (7.5%) 7 (5.3%) \n No. of patients with study drug 1 withdrawn due to AE related to study drug 2 5 (3.7%) 10 (7.5%) 7 (5.3%) \n No. of patients with dose of study drug 1 modified/interrupted due to AE related to study drug 1 24 (17.9%) 32 (23.9%) 34 (25.8%) \n No. of patients with dose of study drug 1 modified/interrupted due to AE related to study drug 2 24 (17.9%) 32 (23.9%) 34 (25.8%) \n No. of patients with treatment received for AE related to study drug 1 53 (39.6%) 58 (43.3%) 60 (45.5%) \n No. of patients with serious AE related to study drug 1 64 (47.8%) 52 (38.8%) 64 (48.5%) \nTotal number of patients with at least one AE related to study drug 2 86 (64.2%) 85 (63.4%) 92 (69.7%) \n No. of patients with study drug 2 withdrawn due to AE related to study drug 1 5 (3.7%) 10 (7.5%) 7 (5.3%) \n No. of patients with study drug 2 withdrawn due to AE related to study drug 2 5 (3.7%) 10 (7.5%) 7 (5.3%) \n No. of patients with dose of study drug 2 modified/interrupted due to AE related to study drug 1 24 (17.9%) 32 (23.9%) 34 (25.8%) \n No. of patients with dose of study drug 2 modified/interrupted due to AE related to study drug 2 24 (17.9%) 32 (23.9%) 34 (25.8%) \n No. of patients with treatment received for AE related to study drug 2 53 (39.6%) 58 (43.3%) 60 (45.5%) \n No. of patients with serious AE related to study drug 2 64 (47.8%) 52 (38.8%) 64 (48.5%) \n\n\n\n\n\nCodeadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nadsl <- filter(adsl, SAFFL == \"Y\")\nadae <- filter(adae, ANL01FL == \"Y\" & SAFFL == \"Y\")\n\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\nstack_adae_by_smq <- function(adae, smq) {\n adae_labels <- c(var_labels(adae), \"Standardized MedDRA Query\")\n l_df <- lapply(smq, function(ae_grp) {\n ae_scope <- gsub(\"NAM\", \"SC\", ae_grp)\n keep <- adae[[ae_grp]] != \"<Missing>\"\n df <- adae[keep, ]\n if (substr(ae_grp, 1, 3) == \"SMQ\") {\n df[[\"SMQ\"]] <- aesi_label(as.character(df[[ae_grp]]), scope = as.character(df[[ae_scope]]))\n } else {\n df[[\"SMQ\"]] <- df[[ae_grp]]\n }\n df\n })\n result <- do.call(rbind, l_df)\n var_labels(result) <- adae_labels\n result\n}\n\nadae_smq <- stack_adae_by_smq(adae, c(\"SMQ01NAM\", \"SMQ02NAM\", \"CQ01NAM\"))\n\nnot_resolved <- adae_smq %>%\n filter(!(AEOUT %in% c(\"RECOVERED/RESOLVED\", \"FATAL\", \"RECOVERED/RESOLVED WITH SEQUELAE\"))) %>%\n distinct(USUBJID) %>%\n mutate(NOT_RESOLVED = \"Y\")\n\nadae_smq <- adae_smq %>%\n left_join(not_resolved, by = c(\"USUBJID\")) %>%\n mutate(\n ALL_RESOLVED = with_label(is.na(NOT_RESOLVED), \"Total number of patients with all non-fatal AEs resolved\"),\n NOT_RESOLVED = with_label(!is.na(NOT_RESOLVED), \"Total number of patients with at least one non-fatal unresolved or ongoing AE\")\n )\n\nadae_smq <- adae_smq %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n WD = with_label(AEACN == \"DRUG WITHDRAWN\", \"Total number of patients with study drug withdrawn due to AE\"),\n DSM = with_label(\n AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"), \"Total number of patients with dose modified/interrupted due to AE\"\n ),\n CONTRT = with_label(AECONTRT == \"Y\", \"Total number of patients with treatment received for AE\"),\n SER = with_label(AESER == \"Y\", \"Total number of patients with at least one serious AE\"),\n REL = with_label(AEREL == \"Y\", \"Total number of patients with at least one related AE\"),\n ALL_RESOLVED_WD = with_label(WD == TRUE & ALL_RESOLVED == TRUE, \"No. of patients with study drug withdrawn due to resolved AE\"),\n ALL_RESOLVED_DSM = with_label(DSM == TRUE & ALL_RESOLVED == TRUE, \"No. of patients with dose modified/interrupted due to resolved AE\"),\n ALL_RESOLVED_CONTRT = with_label(CONTRT == TRUE & ALL_RESOLVED == TRUE, \"No. of patients with treatment received for resolved AE\"),\n NOT_RESOLVED_WD = with_label(WD == TRUE & NOT_RESOLVED == TRUE, \"No. of patients with study drug withdrawn due to unresolved or ongoing AE\"),\n NOT_RESOLVED_DSM = with_label(DSM == TRUE & NOT_RESOLVED == TRUE, \"No. of patients with dose modified/interrupted due to unresolved or ongoing AE\"),\n NOT_RESOLVED_CONTRT = with_label(CONTRT == TRUE & NOT_RESOLVED == TRUE, \"No. of patients with treatment received for unresolved or ongoing AE\"),\n SERWD = with_label(AESER == \"Y\" & AEACN == \"DRUG WITHDRAWN\", \"No. of patients with study drug withdrawn due to serious AE\"),\n SERCONTRT = with_label(AECONTRT == \"Y\" & AESER == \"Y\", \"No. of patients with treatment received for serious AE\"),\n SERDSM = with_label(\n AESER == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"No. of patients with dose modified/interrupted due to serious AE\"\n ),\n RELWD = with_label(AEREL == \"Y\" & AEACN == \"DRUG WITHDRAWN\", \"No. of patients with study drug withdrawn due to related AE\"),\n RELDSM = with_label(\n AEREL == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"No. of patients with dose modified/interrupted due to related AE\"\n ),\n RELCONTRT = with_label(AECONTRT == \"Y\" & AEREL == \"Y\", \"No. of patients with treatment received for related AE\"),\n RELSER = with_label(AESER == \"Y\" & AEREL == \"Y\", \"No. of patients with serious, related AE\")\n )\n\nadae_smq <- adae_smq %>%\n mutate(\n AETOXGR = forcats::fct_recode(AETOXGR,\n \"Grade 1\" = \"1\",\n \"Grade 2\" = \"2\",\n \"Grade 3\" = \"3\",\n \"Grade 4\" = \"4\",\n \"Grade 5 (fatal outcome)\" = \"5\"\n )\n )\n\nsplit_fun <- remove_split_levels(\"<Missing>\")\naesi_vars <- c(\"WD\", \"DSM\", \"CONTRT\", \"ALL_RESOLVED\", \"NOT_RESOLVED\", \"SER\", \"REL\")\n\nlyt_adae <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n \"SMQ\",\n child_labels = \"visible\",\n split_fun = split_fun,\n split_label = \"Standardized MedDRA Query\",\n label_pos = \"topleft\"\n ) %>%\n count_patients_with_event(\n vars = \"USUBJID\",\n filters = c(\"ANL01FL\" = \"Y\"),\n denom = \"N_col\",\n .labels = c(count_fraction = \"Total number of patients with at least one AE\")\n ) %>%\n count_values(\n \"ANL01FL\",\n values = \"Y\",\n .stats = \"count\",\n .labels = c(count = \"Total number of AEs\"),\n table_names = \"total_aes\"\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n var_labels = \"Total number of patients with at least one AE by worst grade\",\n .show_labels = \"visible\"\n ) %>%\n count_patients_with_flags(\"USUBJID\", flag_variables = aesi_vars, denom = \"N_col\")\n\nresult <- build_table(lyt_adae, df = adae_smq, alt_counts_df = adsl)\nresult\n\nStandardized MedDRA Query A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nC.1.1.1.3/B.2.2.3.1 AESI (BROAD) \n Total number of patients with at least one AE 58 (43.3%) 60 (44.8%) 66 (50.0%) \n Total number of AEs 97 106 122 \n Total number of patients with at least one AE by worst grade \n Grade 1 22 (16.4%) 26 (19.4%) 30 (22.7%) \n Grade 2 0 0 0 \n Grade 3 0 0 0 \n Grade 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 5 (fatal outcome) 0 0 0 \n Total number of patients with study drug withdrawn due to AE 5 (3.7%) 6 (4.5%) 9 (6.8%) \n Total number of patients with dose modified/interrupted due to AE 21 (15.7%) 21 (15.7%) 24 (18.2%) \n Total number of patients with treatment received for AE 32 (23.9%) 35 (26.1%) 44 (33.3%) \n Total number of patients with all non-fatal AEs resolved 7 (5.2%) 9 (6.7%) 8 (6.1%) \n Total number of patients with at least one non-fatal unresolved or ongoing AE 51 (38.1%) 51 (38.1%) 58 (43.9%) \n Total number of patients with at least one serious AE 38 (28.4%) 40 (29.9%) 45 (34.1%) \n Total number of patients with at least one related AE 36 (26.9%) 34 (25.4%) 36 (27.3%) \nD.2.1.5.3/A.1.1.1.1 AESI \n Total number of patients with at least one AE 62 (46.3%) 61 (45.5%) 76 (57.6%) \n Total number of AEs 106 100 139 \n Total number of patients with at least one AE by worst grade \n Grade 1 62 (46.3%) 61 (45.5%) 76 (57.6%) \n Grade 2 0 0 0 \n Grade 3 0 0 0 \n Grade 4 0 0 0 \n Grade 5 (fatal outcome) 0 0 0 \n Total number of patients with study drug withdrawn due to AE 6 (4.5%) 8 (6.0%) 4 (3.0%) \n Total number of patients with dose modified/interrupted due to AE 23 (17.2%) 20 (14.9%) 26 (19.7%) \n Total number of patients with treatment received for AE 33 (24.6%) 37 (27.6%) 33 (25.0%) \n Total number of patients with all non-fatal AEs resolved 4 (3.0%) 5 (3.7%) 14 (10.6%) \n Total number of patients with at least one non-fatal unresolved or ongoing AE 58 (43.3%) 56 (41.8%) 62 (47.0%) \n Total number of patients with at least one serious AE 0 0 0 \n Total number of patients with at least one related AE 37 (27.6%) 46 (34.3%) 50 (37.9%) \n\n\n\n\n\nCodelibrary(teal.modules.clinical)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\nadae <- filter(adae, ANL01FL == \"Y\" & SAFFL == \"Y\")\n\nnot_resolved <- adae %>%\n filter(!(AEOUT %in% c(\"RECOVERED/RESOLVED\", \"FATAL\", \"RECOVERED/RESOLVED WITH SEQUELAE\"))) %>%\n distinct(USUBJID) %>%\n mutate(NOT_RESOLVED = \"Y\")\n\nadae <- adae %>%\n left_join(not_resolved, by = c(\"USUBJID\")) %>%\n mutate(\n ALL_RESOLVED = with_label(is.na(NOT_RESOLVED), \"All non-fatal AEs resolved\"),\n NOT_RESOLVED = with_label(!is.na(NOT_RESOLVED), \"At least one non-fatal unresolved or ongoing AE\")\n )\n\nadae <- adae %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n WD = with_label(AEACN == \"DRUG WITHDRAWN\", \"AE that led to study drug withdrawal\"),\n DSM = with_label(AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"), \"AE that led to study drug dose modified/interrupted\"),\n CONTRT = with_label(AECONTRT == \"Y\", \"AE that required treatment\"),\n SER = with_label(AESER == \"Y\", \"Serious AE\"),\n REL = with_label(AEREL == \"Y\", \"Related AE\"),\n ALL_RESOLVED_WD = with_label(WD == TRUE & ALL_RESOLVED == TRUE, \"Resolved AE that led to study drug withdrawal\"),\n ALL_RESOLVED_DSM = with_label(DSM == TRUE & ALL_RESOLVED == TRUE, \"Resolved AE that led to study drug dose modified/interrupted\"),\n ALL_RESOLVED_CONTRT = with_label(CONTRT == TRUE & ALL_RESOLVED == TRUE, \"Resolved AE that required treatment\"),\n NOT_RESOLVED_WD = with_label(WD == TRUE & NOT_RESOLVED == TRUE, \"Unresolved AE that led to study drug withdrawal\"),\n NOT_RESOLVED_DSM = with_label(DSM == TRUE & NOT_RESOLVED == TRUE, \"Unresolved AE that led to study drug dose modified/interrupted\"),\n NOT_RESOLVED_CONTRT = with_label(CONTRT == TRUE & NOT_RESOLVED == TRUE, \"Unresolved AE that required treatment\"),\n SERWD = with_label(AESER == \"Y\" & AEACN == \"DRUG WITHDRAWN\", \"Serious AE that led to study drug withdrawal\"),\n SERCONTRT = with_label(AECONTRT == \"Y\" & AESER == \"Y\", \"Serious AE that required treatment\"),\n SERDSM = with_label(\n AESER == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"), \"Serious AE that led to study drug dose modified/interrupted\"\n ),\n RELWD = with_label(\n AEREL == \"Y\" & AEACN == \"DRUG WITHDRAWN\", \"Related AE that led to study drug withdrawal\"\n ),\n RELDSM = with_label(\n AEREL == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"), \"Related AE that led to study drug dose modified/interrupted\"\n ),\n RELCONTRT = with_label(AECONTRT == \"Y\" & AEREL == \"Y\", \"Related AE that required treatment\"),\n RELSER = with_label(AESER == \"Y\" & AEREL == \"Y\", \"Serious related AE\")\n )\n\naesi_vars <- c(\n \"WD\", \"DSM\", \"CONTRT\", \"ALL_RESOLVED_WD\", \"ALL_RESOLVED_DSM\", \"ALL_RESOLVED_CONTRT\",\n \"NOT_RESOLVED_WD\", \"NOT_RESOLVED_DSM\", \"NOT_RESOLVED_CONTRT\", \"SER\", \"SERWD\", \"SERDSM\",\n \"SERCONTRT\", \"REL\", \"RELWD\", \"RELDSM\", \"RELCONTRT\", \"RELSER\"\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADAE\", adae, code = 'ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n ADAE <- filter(ADAE, ANL01FL == \"Y\" & SAFFL == \"Y\")\n not_resolved <- ADAE %>%\n filter(!(AEOUT %in% c(\"RECOVERED/RESOLVED\", \"FATAL\", \"RECOVERED/RESOLVED WITH SEQUELAE\"))) %>%\n distinct(USUBJID) %>% mutate(NOT_RESOLVED = \"Y\")\n\n ADAE <- ADAE %>%\n left_join(not_resolved, by = c(\"USUBJID\")) %>%\n mutate(\n ALL_RESOLVED = with_label(is.na(NOT_RESOLVED), \"All non-fatal AEs resolved\"),\n NOT_RESOLVED = with_label(!is.na(NOT_RESOLVED), \"At least one non-fatal unresolved or ongoing AE\")\n )\n\n ADAE <- ADAE %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n WD = with_label(AEACN == \"DRUG WITHDRAWN\", \"AE that led to study drug withdrawal\"),\n DSM = with_label(AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"), \"AE that led to study drug dose modified/interrupted\"),\n CONTRT = with_label(AECONTRT == \"Y\", \"AE that required treatment\"),\n SER = with_label(AESER == \"Y\", \"Serious AE\"),\n REL = with_label(AEREL == \"Y\", \"Related AE\"),\n ALL_RESOLVED_WD = with_label(WD == TRUE & ALL_RESOLVED == TRUE, \"Resolved AE that led to study drug withdrawal\"),\n ALL_RESOLVED_DSM = with_label(DSM == TRUE & ALL_RESOLVED == TRUE, \"Resolved AE that led to study drug dose modified/interrupted\"),\n ALL_RESOLVED_CONTRT = with_label(CONTRT == TRUE & ALL_RESOLVED == TRUE, \"Resolved AE that required treatment\"),\n NOT_RESOLVED_WD = with_label(WD == TRUE & NOT_RESOLVED == TRUE, \"Unresolved AE that led to study drug withdrawal\"),\n NOT_RESOLVED_DSM = with_label(DSM == TRUE & NOT_RESOLVED == TRUE, \"Unresolved AE that led to study drug dose modified/interrupted\"),\n NOT_RESOLVED_CONTRT = with_label(CONTRT == TRUE & NOT_RESOLVED == TRUE, \"Unresolved AE that required treatment\"),\n SERWD = with_label(AESER == \"Y\" & AEACN == \"DRUG WITHDRAWN\", \"Serious AE that led to study drug withdrawal\"),\n SERCONTRT = with_label(AECONTRT == \"Y\" & AESER == \"Y\", \"Serious AE that required treatment\"),\n SERDSM = with_label(\n AESER == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"), \"Serious AE that led to study drug dose modified/interrupted\"\n ),\n RELWD = with_label(\n AEREL == \"Y\" & AEACN == \"DRUG WITHDRAWN\", \"Related AE that led to study drug withdrawal\"\n ),\n RELDSM = with_label(\n AEREL == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"), \"Related AE that led to study drug dose modified/interrupted\"\n ),\n RELCONTRT = with_label(AECONTRT == \"Y\" & AEREL == \"Y\", \"Related AE that required treatment\"),\n RELSER = with_label(AESER == \"Y\" & AEREL == \"Y\", \"Serious related AE\")\n )'),\n check = TRUE\n ),\n modules = modules(\n tm_t_events_summary(\n label = \"Adverse Events Summary\",\n dataname = \"ADAE\",\n arm_var = choices_selected(\n choices = variable_choices(\"ADSL\", c(\"ARM\", \"ARMCD\")),\n selected = \"ARM\"\n ),\n flag_var_anl = choices_selected(\n choices = variable_choices(\"ADAE\", aesi_vars),\n selected = aesi_vars[1],\n keep_order = TRUE,\n fixed = FALSE\n ),\n add_total = TRUE\n )\n )\n)\n\n[INFO] 2023-08-04 15:26:52.2093 pid:10993 token:[] teal.modules.clinical Initializing tm_t_events_summary\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 dplyr_1.1.2 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet01_aesi.lock'.\n\n\nDownload" }, { "objectID": "tables/adverse-events/aet05.html", "href": "tables/adverse-events/aet05.html", "title": "AET05", "section": "", - "text": "Data Setup\nStandard Table\nTable Setting Type of Confidence Interval\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadaette <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadaette <- df_explicit_na(adaette)\n\nanl <- adaette %>%\n dplyr::filter(PARAM == \"Time to first occurrence of any adverse event\") %>%\n dplyr::mutate(is_event = CNSR == 0) %>%\n dplyr::mutate(n_events = as.integer(is_event))\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n estimate_incidence_rate(\n vars = \"AVAL\",\n n_events = \"n_events\",\n control = control_incidence_rate(time_unit_output = 100)\n )\n\nWarning: The `time_unit_output` argument of `control_incidence_rate()` is deprecated as\nof tern 0.8.3.\nℹ Please use the `num_pt_year` argument instead.\n\nCoderesult <- build_table(\n lyt,\n anl,\n alt_counts_df = adsl\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————\nTotal patient-years at risk 162.4 103.9 172.6 \nNumber of adverse events observed 78 104 67 \nAE rate per 100 patient-years 48.03 100.14 38.82 \n95% CI (37.37, 58.69) (80.89, 119.38) (29.53, 48.12)\n\n\n\n\nThe type of confidence interval can be specified through the conf_type argument.\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n estimate_incidence_rate(\n vars = \"AVAL\",\n n_events = \"n_events\",\n control = control_incidence_rate(\n conf_level = 0.95,\n conf_type = \"exact\",\n time_unit_output = 100\n )\n )\n\nresult <- build_table(\n lyt,\n anl,\n alt_counts_df = adsl\n)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————\nTotal patient-years at risk 162.4 103.9 172.6 \nNumber of adverse events observed 78 104 67 \nAE rate per 100 patient-years 48.03 100.14 38.82 \n95% CI (37.97, 59.94) (81.82, 121.34) (30.09, 49.30)\n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadaette <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadaette <- df_explicit_na(adaette)\n\nadaette <- adaette %>%\n dplyr::filter(PARAMCD %in% c(\"AETTE1\", \"AETTE2\", \"AETTE3\")) %>%\n dplyr::mutate(is_event = CNSR == 0) %>%\n dplyr::mutate(n_events = as.integer(is_event))\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n cdisc_dataset(\"ADAETTE\", adaette),\n code =\n 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))\n ADAETTE <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adaette\"))\n ADAETTE <- ADAETTE %>%\n dplyr::filter(PARAMCD %in% c(\"AETTE1\", \"AETTE2\", \"AETTE3\")) %>%\n dplyr::mutate(is_event = CNSR == 0) %>%\n dplyr::mutate(n_events = as.integer(is_event))',\n check = TRUE\n ),\n modules = modules(\n tm_t_events_patyear(\n label = \"AE rate adjusted for patient-years at risk Table\",\n dataname = \"ADAETTE\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARMCD\"\n ),\n paramcd = choices_selected(\n choices = value_choices(adaette, \"PARAMCD\", \"PARAM\"),\n selected = \"AETTE1\"\n ),\n events_var = choices_selected(\n choices = variable_choices(adaette, \"n_events\"),\n selected = \"n_events\",\n fixed = TRUE\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:09:45.1020 pid:11202 token:[] teal.modules.clinical Initializing tm_t_events_patyear\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] scda_0.1.6.9010 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet05.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable Setting Type of Confidence Interval\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadaette <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadaette <- df_explicit_na(adaette)\n\nanl <- adaette %>%\n dplyr::filter(PARAM == \"Time to first occurrence of any adverse event\") %>%\n dplyr::mutate(is_event = CNSR == 0) %>%\n dplyr::mutate(n_events = as.integer(is_event))\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n estimate_incidence_rate(\n vars = \"AVAL\",\n n_events = \"n_events\",\n control = control_incidence_rate(num_pt_year = 100)\n )\n\nresult <- build_table(lyt, anl, alt_counts_df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————\nTotal patient-years at risk 162.4 103.9 172.6 \nNumber of adverse events observed 78 104 67 \nAE rate per 100 patient-years 48.03 100.14 38.82 \n95% CI (37.37, 58.69) (80.89, 119.38) (29.53, 48.12)\n\n\n\n\nThe type of confidence interval can be specified through the conf_type argument.\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n estimate_incidence_rate(\n vars = \"AVAL\",\n n_events = \"n_events\",\n control = control_incidence_rate(\n conf_level = 0.95,\n conf_type = \"exact\",\n num_pt_year = 100\n )\n )\n\nresult <- build_table(lyt, anl, alt_counts_df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————\nTotal patient-years at risk 162.4 103.9 172.6 \nNumber of adverse events observed 78 104 67 \nAE rate per 100 patient-years 48.03 100.14 38.82 \n95% CI (37.97, 59.94) (81.82, 121.34) (30.09, 49.30)\n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadaette <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadaette <- df_explicit_na(adaette)\n\nadaette <- adaette %>%\n dplyr::filter(PARAMCD %in% c(\"AETTE1\", \"AETTE2\", \"AETTE3\")) %>%\n dplyr::mutate(is_event = CNSR == 0) %>%\n dplyr::mutate(n_events = as.integer(is_event))\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n cdisc_dataset(\"ADAETTE\", adaette),\n code =\n 'ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))\n ADAETTE <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adaette\"))\n ADAETTE <- ADAETTE %>%\n dplyr::filter(PARAMCD %in% c(\"AETTE1\", \"AETTE2\", \"AETTE3\")) %>%\n dplyr::mutate(is_event = CNSR == 0) %>%\n dplyr::mutate(n_events = as.integer(is_event))',\n check = TRUE\n ),\n modules = modules(\n tm_t_events_patyear(\n label = \"AE rate adjusted for patient-years at risk Table\",\n dataname = \"ADAETTE\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, c(\"ARM\", \"ARMCD\")),\n selected = \"ARMCD\"\n ),\n paramcd = choices_selected(\n choices = value_choices(adaette, \"PARAMCD\", \"PARAM\"),\n selected = \"AETTE1\"\n ),\n events_var = choices_selected(\n choices = variable_choices(adaette, \"n_events\"),\n selected = \"n_events\",\n fixed = TRUE\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:27:58.2826 pid:11205 token:[] teal.modules.clinical Initializing tm_t_events_patyear\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] scda_0.1.6.9010 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet05.lock'.\n\n\nDownload" }, { "objectID": "tables/adverse-events/aet02_smq.html", "href": "tables/adverse-events/aet02_smq.html", "title": "AET02_SMQ", "section": "", - "text": "Data Setup\nStandard Table\nTable with Customized Queries\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\nlibrary(stringr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\n# Simulate a random AAG dataset.\naag <- data.frame(\n NAMVAR = c(\"SMQ01NAM\", \"SMQ01NAM\", \"SMQ02NAM\", \"CQ01NAM\", \"CQ01NAM\"),\n SRCVAR = rep(\"AEDECOD\", 5),\n GRPTYPE = c(\"SMQ\", \"SMQ\", \"SMQ\", \"CUSTOM\", \"CUSTOM\"),\n REFID = c(1, 1, 2, 3, 3),\n REFNAME = c(rep(\"C.1.1.1.3/B.2.2.3.1 AESI\", 2), \"non observed SMQ02NAM level\", rep(\"D.2.1.5.3/A.1.1.1.1 AESI\", 2)),\n SCOPE = c(\"BROAD\", \"BROAD\", \"BROAD\", \"\", \"\"),\n REFTERM = c(\"C.1.1.1.3\", \"B.2.2.3.1\", \"Z.9.9.9.9\", \"D.2.1.5.3\", \"A.1.1.1.1\"),\n stringsAsFactors = FALSE\n)\n\n# Create summary AAG dataset (used for labelling).\n# Note it's important to incorporate SCOPE into the basket names for SMQs so as to\n# match the flags present in ADAE.\naag_summary <- aag %>%\n select(NAMVAR, REFNAME, SCOPE) %>%\n unique() %>%\n mutate(\n REFNAME_SCOPE = ifelse(SCOPE == \"\", REFNAME, paste0(REFNAME, \"(\", SCOPE, \")\"))\n ) %>%\n rename(basket = NAMVAR, basket_name = REFNAME_SCOPE) %>%\n select(basket, basket_name)\n\n# Make a summary of the full ADAE based on AAG by using h_stack_by_baskets helper function\nadae_smq_all <- h_stack_by_baskets(df = adae, aag_summary = aag_summary, keys = c(\"STUDYID\", \"USUBJID\", \"ACTARMCD\", \"AEDECOD\"))\n\n# Post-process adae_smq_all to keep only certain baskets of interest for variant 1\n# Not need to drop baskets for variant 2 as all baskets will be considered.\nbaskets_to_drop_variant <- aag_summary$basket_name[!aag_summary$basket %in% c(\"SMQ01NAM\")]\n\n# Adjust the analysis dataset based on basket subset for variant 1.\nadae_smq_1 <- adae_smq_all %>%\n filter(!adae_smq_all$SMQ %in% baskets_to_drop_variant) %>%\n mutate(\n SMQ = tern::fct_discard(SMQ, discard = baskets_to_drop_variant)\n )\n\n\n\n\n\nCodecriteria_fun <- function(tr) !is(tr, \"ContentRow\") && all_zero_or_na(tr)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\"\n )\n ) %>%\n split_rows_by(\n \"SMQ\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = trim_levels_in_group(\"AEDECOD\", drop_outlevs = FALSE),\n label_pos = \"topleft\",\n split_label = \"Standardized MedDRA Query\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = -1L,\n drop = FALSE\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt,\n df = adae_smq_1,\n alt_counts_df = adsl\n) %>%\n sort_at_path(path = c(\"SMQ\"), scorefun = cont_n_allcols) %>%\n sort_at_path(path = c(\"SMQ\", \"*\", \"AEDECOD\"), scorefun = score_occurrences, na.pos = \"last\") %>%\n trim_rows(criteria = criteria_fun)\n\nresult\n\nStandardized MedDRA Query ARM A ARM B ARM C \n Dictionary-Derived Term (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 72 (53.7%) 79 (59.0%) 75 (56.8%)\nC.1.1.1.3/B.2.2.3.1 AESI(BROAD) \n Total number of patients with at least one adverse event 72 (53.7%) 79 (59.0%) 75 (56.8%)\n Total number of events 119 139 141 \n dcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%)\n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%)\n\n\n\n\n\nCodecriteria_fun <- function(tr) !is(tr, \"ContentRow\") && all_zero_or_na(tr)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\"\n )\n ) %>%\n split_rows_by(\n \"SMQ\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = trim_levels_in_group(\"AEDECOD\", drop_outlevs = FALSE),\n label_pos = \"topleft\",\n split_label = \"Standardized MedDRA Query\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = -1L,\n drop = FALSE\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt,\n df = adae_smq_all,\n alt_counts_df = adsl\n) %>%\n sort_at_path(path = c(\"SMQ\"), scorefun = cont_n_allcols) %>%\n sort_at_path(path = c(\"SMQ\", \"*\", \"AEDECOD\"), scorefun = score_occurrences, na.pos = \"last\") %>%\n trim_rows(criteria = criteria_fun)\n\nresult\n\nStandardized MedDRA Query ARM A ARM B ARM C \n Dictionary-Derived Term (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 95 (70.9%) 103 (76.9%) 108 (81.8%)\nD.2.1.5.3/A.1.1.1.1 AESI \n Total number of patients with at least one adverse event 74 (55.2%) 80 (59.7%) 87 (65.9%) \n Total number of events 126 134 162 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) \n dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) \nC.1.1.1.3/B.2.2.3.1 AESI(BROAD) \n Total number of patients with at least one adverse event 72 (53.7%) 79 (59.0%) 75 (56.8%) \n Total number of events 119 139 141 \n dcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%) \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) \nnon observed SMQ02NAM level(BROAD) \n Total number of patients with at least one adverse event 0 0 0 \n Total number of events 0 0 0 \n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nnames_baskets <- grep(\"^(SMQ|CQ).*NAM$\", names(adae), value = TRUE)\nnames_scopes <- grep(\"^SMQ.*SC$\", names(adae), value = TRUE)\n\ncs_baskets <- choices_selected(\n choices = variable_choices(adae, subset = names_baskets),\n selected = names_baskets\n)\ncs_scopes <- choices_selected(\n choices = variable_choices(adae, subset = names_scopes),\n selected = names_scopes,\n fixed = TRUE\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'\n ),\n cdisc_dataset(\"ADAE\", adae,\n code = 'ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_smq(\n label = \"Adverse events by `SMQ` Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"SEX\")),\n selected = \"ARM\"\n ),\n add_total = FALSE,\n baskets = cs_baskets,\n scopes = cs_scopes,\n llt = choices_selected(\n choices = variable_choices(adae, subset = c(\"AEDECOD\")),\n selected = \"AEDECOD\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:10:44.4953 pid:11416 token:[] teal.modules.clinical Initializing tm_t_smq\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] stringr_1.5.0 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n[13] dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] stringi_1.7.12 gtable_0.3.3 later_1.3.1 \n[61] shinycssloaders_1.0.0 munsell_0.5.0 tibble_3.2.1 \n[64] styler_1.10.1 logger_0.2.2 pillar_1.9.0 \n[67] htmltools_0.5.5 brio_1.1.3 R6_2.5.1 \n[70] Rdpack_2.4 evaluate_0.21 lattice_0.21-8 \n[73] R.methodsS3_1.8.2 rbibutils_2.2.13 backports_1.4.1 \n[76] memoise_2.0.1 broom_1.0.5 teal.reporter_0.1.1.9020\n[79] httpuv_1.6.11 bslib_0.5.0 Rcpp_1.0.11 \n[82] teal.code_0.3.0.9009 shinyvalidate_0.1.2 coda_0.19-4 \n[85] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[88] forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet02_smq.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable with Customized Queries\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\nlibrary(stringr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\n# Simulate a random AAG dataset.\naag <- data.frame(\n NAMVAR = c(\"SMQ01NAM\", \"SMQ01NAM\", \"SMQ02NAM\", \"CQ01NAM\", \"CQ01NAM\"),\n SRCVAR = rep(\"AEDECOD\", 5),\n GRPTYPE = c(\"SMQ\", \"SMQ\", \"SMQ\", \"CUSTOM\", \"CUSTOM\"),\n REFID = c(1, 1, 2, 3, 3),\n REFNAME = c(rep(\"C.1.1.1.3/B.2.2.3.1 AESI\", 2), \"non observed SMQ02NAM level\", rep(\"D.2.1.5.3/A.1.1.1.1 AESI\", 2)),\n SCOPE = c(\"BROAD\", \"BROAD\", \"BROAD\", \"\", \"\"),\n REFTERM = c(\"C.1.1.1.3\", \"B.2.2.3.1\", \"Z.9.9.9.9\", \"D.2.1.5.3\", \"A.1.1.1.1\"),\n stringsAsFactors = FALSE\n)\n\n# Create summary AAG dataset (used for labelling).\n# Note it's important to incorporate SCOPE into the basket names for SMQs so as to\n# match the flags present in ADAE.\naag_summary <- aag %>%\n select(NAMVAR, REFNAME, SCOPE) %>%\n unique() %>%\n mutate(\n REFNAME_SCOPE = ifelse(SCOPE == \"\", REFNAME, paste0(REFNAME, \"(\", SCOPE, \")\"))\n ) %>%\n rename(basket = NAMVAR, basket_name = REFNAME_SCOPE) %>%\n select(basket, basket_name)\n\n# Make a summary of the full ADAE based on AAG by using h_stack_by_baskets helper function\nadae_smq_all <- h_stack_by_baskets(df = adae, aag_summary = aag_summary, keys = c(\"STUDYID\", \"USUBJID\", \"ACTARMCD\", \"AEDECOD\"))\n\n# Post-process adae_smq_all to keep only certain baskets of interest for variant 1\n# Not need to drop baskets for variant 2 as all baskets will be considered.\nbaskets_to_drop_variant <- aag_summary$basket_name[!aag_summary$basket %in% c(\"SMQ01NAM\")]\n\n# Adjust the analysis dataset based on basket subset for variant 1.\nadae_smq_1 <- adae_smq_all %>%\n filter(!adae_smq_all$SMQ %in% baskets_to_drop_variant) %>%\n mutate(\n SMQ = tern::fct_discard(SMQ, discard = baskets_to_drop_variant)\n )\n\n\n\n\n\nCodecriteria_fun <- function(tr) !is(tr, \"ContentRow\") && all_zero_or_na(tr)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\"\n )\n ) %>%\n split_rows_by(\n \"SMQ\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = trim_levels_in_group(\"AEDECOD\", drop_outlevs = FALSE),\n label_pos = \"topleft\",\n split_label = \"Standardized MedDRA Query\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = -1L,\n drop = FALSE\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt,\n df = adae_smq_1,\n alt_counts_df = adsl\n) %>%\n sort_at_path(path = c(\"SMQ\"), scorefun = cont_n_allcols) %>%\n sort_at_path(path = c(\"SMQ\", \"*\", \"AEDECOD\"), scorefun = score_occurrences, na.pos = \"last\") %>%\n trim_rows(criteria = criteria_fun)\n\nresult\n\nStandardized MedDRA Query ARM A ARM B ARM C \n Dictionary-Derived Term (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 72 (53.7%) 79 (59.0%) 75 (56.8%)\nC.1.1.1.3/B.2.2.3.1 AESI(BROAD) \n Total number of patients with at least one adverse event 72 (53.7%) 79 (59.0%) 75 (56.8%)\n Total number of events 119 139 141 \n dcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%)\n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%)\n\n\n\n\n\nCodecriteria_fun <- function(tr) !is(tr, \"ContentRow\") && all_zero_or_na(tr)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\"\n )\n ) %>%\n split_rows_by(\n \"SMQ\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = trim_levels_in_group(\"AEDECOD\", drop_outlevs = FALSE),\n label_pos = \"topleft\",\n split_label = \"Standardized MedDRA Query\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = -1L,\n drop = FALSE\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt,\n df = adae_smq_all,\n alt_counts_df = adsl\n) %>%\n sort_at_path(path = c(\"SMQ\"), scorefun = cont_n_allcols) %>%\n sort_at_path(path = c(\"SMQ\", \"*\", \"AEDECOD\"), scorefun = score_occurrences, na.pos = \"last\") %>%\n trim_rows(criteria = criteria_fun)\n\nresult\n\nStandardized MedDRA Query ARM A ARM B ARM C \n Dictionary-Derived Term (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 95 (70.9%) 103 (76.9%) 108 (81.8%)\nD.2.1.5.3/A.1.1.1.1 AESI \n Total number of patients with at least one adverse event 74 (55.2%) 80 (59.7%) 87 (65.9%) \n Total number of events 126 134 162 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%) \n dcd A.1.1.1.1 50 (37.3%) 45 (33.6%) 63 (47.7%) \nC.1.1.1.3/B.2.2.3.1 AESI(BROAD) \n Total number of patients with at least one adverse event 72 (53.7%) 79 (59.0%) 75 (56.8%) \n Total number of events 119 139 141 \n dcd B.2.2.3.1 48 (35.8%) 54 (40.3%) 51 (38.6%) \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%) \nnon observed SMQ02NAM level(BROAD) \n Total number of patients with at least one adverse event 0 0 0 \n Total number of events 0 0 0 \n\n\n\n\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nnames_baskets <- grep(\"^(SMQ|CQ).*NAM$\", names(adae), value = TRUE)\nnames_scopes <- grep(\"^SMQ.*SC$\", names(adae), value = TRUE)\n\ncs_baskets <- choices_selected(\n choices = variable_choices(adae, subset = names_baskets),\n selected = names_baskets\n)\ncs_scopes <- choices_selected(\n choices = variable_choices(adae, subset = names_scopes),\n selected = names_scopes,\n fixed = TRUE\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'\n ),\n cdisc_dataset(\"ADAE\", adae,\n code = 'ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_smq(\n label = \"Adverse events by `SMQ` Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"SEX\")),\n selected = \"ARM\"\n ),\n add_total = FALSE,\n baskets = cs_baskets,\n scopes = cs_scopes,\n llt = choices_selected(\n choices = variable_choices(adae, subset = c(\"AEDECOD\")),\n selected = \"AEDECOD\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:29:02.4574 pid:11419 token:[] teal.modules.clinical Initializing tm_t_smq\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] stringr_1.5.0 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n[13] dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] stringi_1.7.12 gtable_0.3.3 later_1.3.1 \n[61] shinycssloaders_1.0.0 munsell_0.5.0 tibble_3.2.1 \n[64] styler_1.10.1 logger_0.2.2 pillar_1.9.0 \n[67] htmltools_0.5.5 brio_1.1.3 R6_2.5.1 \n[70] Rdpack_2.4 evaluate_0.21 lattice_0.21-8 \n[73] R.methodsS3_1.8.2 rbibutils_2.2.13 backports_1.4.1 \n[76] memoise_2.0.1 broom_1.0.5 teal.reporter_0.1.1.9020\n[79] httpuv_1.6.11 bslib_0.5.0 Rcpp_1.0.11 \n[82] teal.code_0.3.0.9009 shinyvalidate_0.1.2 coda_0.19-4 \n[85] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[88] forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet02_smq.lock'.\n\n\nDownload" }, { "objectID": "tables/adverse-events/aet09_smq.html", "href": "tables/adverse-events/aet09_smq.html", "title": "AET09_SMQ", "section": "", - "text": "Data Setup\nStandard Table\nTable with Customized Queries\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\nlibrary(stringr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing\n# levels. For details, refer to Teal and Study Data article.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\n# AEs are filtered for relatedness to study drug.\nadae_rel <- adae %>% filter(AEREL == \"Y\")\n\n# Simulate a random AAG dataset.\naag <- data.frame(\n NAMVAR = c(\"SMQ01NAM\", \"SMQ01NAM\", \"SMQ02NAM\", \"CQ01NAM\", \"CQ01NAM\"),\n SRCVAR = rep(\"AEDECOD\", 5),\n GRPTYPE = c(\"SMQ\", \"SMQ\", \"SMQ\", \"CUSTOM\", \"CUSTOM\"),\n REFID = c(1, 1, 2, 3, 3),\n REFNAME = c(rep(\"C.1.1.1.3/B.2.2.3.1 AESI\", 2), \"non observed SMQ02NAM level\", rep(\"D.2.1.5.3/A.1.1.1.1 AESI\", 2)),\n SCOPE = c(\"BROAD\", \"BROAD\", \"BROAD\", \"\", \"\"),\n REFTERM = c(\"C.1.1.1.3\", \"B.2.2.3.1\", \"Z.9.9.9.9\", \"D.2.1.5.3\", \"A.1.1.1.1\"),\n stringsAsFactors = FALSE\n)\n\n# Create summary AAG dataset (used for labelling).\n# Note it's important to incorporate SCOPE into the basket names for SMQs so as to\n# match the flags present in ADAE.\naag_summary <- aag %>%\n select(NAMVAR, REFNAME, SCOPE) %>%\n unique() %>%\n mutate(\n REFNAME_SCOPE = ifelse(SCOPE == \"\", REFNAME, paste0(REFNAME, \"(\", SCOPE, \")\"))\n ) %>%\n rename(basket = NAMVAR, basket_name = REFNAME_SCOPE) %>%\n select(basket, basket_name)\n\n# Make a summary of the full ADAE based on AAG by using h_stack_by_baskets helper function\nadae_smq_all <- h_stack_by_baskets(df = adae_rel, aag_summary = aag_summary, keys = c(\"STUDYID\", \"USUBJID\", \"ACTARMCD\", \"AEDECOD\"))\n\n# Post-process adae_smq_all to keep only certain baskets of interest for variant 1\n# Not need to drop baskets for variant 2 as all baskets will be considered.\nbaskets_to_drop_variant <- aag_summary$basket_name[!aag_summary$basket %in% c(\"SMQ01NAM\")]\n\n# Adjust the analysis dataset based on basket subset for variant 1.\nadae_smq_1 <- adae_smq_all %>%\n filter(!adae_smq_all$SMQ %in% baskets_to_drop_variant) %>%\n mutate(\n SMQ = tern::fct_discard(SMQ, discard = baskets_to_drop_variant)\n )\n\n\n\n\n\nCodecriteria_fun <- function(tr) !is(tr, \"ContentRow\") && all_zero_or_na(tr)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\"\n )\n ) %>%\n split_rows_by(\n \"SMQ\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = trim_levels_in_group(\"AEDECOD\", drop_outlevs = FALSE),\n label_pos = \"topleft\",\n split_label = \"Standardized MedDRA Query\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = -1L,\n drop = FALSE\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt,\n df = adae_smq_1,\n alt_counts_df = adsl\n) %>%\n sort_at_path(path = c(\"SMQ\"), scorefun = cont_n_allcols) %>%\n sort_at_path(path = c(\"SMQ\", \"*\", \"AEDECOD\"), scorefun = score_occurrences, na.pos = \"last\") %>%\n trim_rows(criteria = criteria_fun)\n\nresult\n\nStandardized MedDRA Query ARM A ARM B ARM C \n Dictionary-Derived Term (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 43 (32.1%) 46 (34.3%) 43 (32.6%)\nC.1.1.1.3/B.2.2.3.1 AESI(BROAD) \n Total number of patients with at least one adverse event 43 (32.1%) 46 (34.3%) 43 (32.6%)\n Total number of events 55 63 64 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%)\n\n\n\n\n\nCodecriteria_fun <- function(tr) !is(tr, \"ContentRow\") && all_zero_or_na(tr)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\"\n )\n ) %>%\n split_rows_by(\n \"SMQ\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = trim_levels_in_group(\"AEDECOD\", drop_outlevs = FALSE),\n label_pos = \"topleft\",\n split_label = \"Standardized MedDRA Query\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = -1L,\n drop = FALSE\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt,\n df = adae_smq_all,\n alt_counts_df = adsl\n) %>%\n sort_at_path(path = c(\"SMQ\"), scorefun = cont_n_allcols) %>%\n sort_at_path(path = c(\"SMQ\", \"*\", \"AEDECOD\"), scorefun = score_occurrences, na.pos = \"last\") %>%\n trim_rows(criteria = criteria_fun)\n\nresult\n\nStandardized MedDRA Query ARM A ARM B ARM C \n Dictionary-Derived Term (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 69 (51.5%) 78 (58.2%) 77 (58.3%)\nD.2.1.5.3/A.1.1.1.1 AESI \n Total number of patients with at least one adverse event 47 (35.1%) 58 (43.3%) 57 (43.2%)\n Total number of events 62 72 74 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%)\nC.1.1.1.3/B.2.2.3.1 AESI(BROAD) \n Total number of patients with at least one adverse event 43 (32.1%) 46 (34.3%) 43 (32.6%)\n Total number of events 55 63 64 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%)\nnon observed SMQ02NAM level(BROAD) \n Total number of patients with at least one adverse event 0 0 0 \n Total number of events 0 0 0 \n\n\n\n\nNote that filtering AEs for relatedness to study drug is not a necessary data pre-processing step for the module. It can be achieved using the teal module filter panel. The example here pre-sets the filters using AEREL = \"Y\" in adae.\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nnames_baskets <- grep(\"^(SMQ|CQ).*NAM$\", names(adae), value = TRUE)\nnames_scopes <- grep(\"^SMQ.*SC$\", names(adae), value = TRUE)\n\ncs_baskets <- choices_selected(\n choices = variable_choices(adae, subset = names_baskets),\n selected = names_baskets\n)\ncs_scopes <- choices_selected(\n choices = variable_choices(adae, subset = names_scopes),\n selected = names_scopes,\n fixed = TRUE\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'\n ),\n cdisc_dataset(\"ADAE\", adae,\n code = 'ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_smq(\n label = \"Adverse Events by SMQ Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"SEX\")),\n selected = \"ARM\"\n ),\n add_total = FALSE,\n baskets = cs_baskets,\n scopes = cs_scopes,\n llt = choices_selected(\n choices = variable_choices(adae, subset = c(\"AEDECOD\")),\n selected = \"AEDECOD\"\n )\n )\n ),\n filter = list(ADAE = list(AEREL = \"Y\"))\n)\n\n[INFO] 2023-08-04 15:11:53.8350 pid:11628 token:[] teal.modules.clinical Initializing tm_t_smq\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] stringr_1.5.0 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n[13] dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] stringi_1.7.12 gtable_0.3.3 later_1.3.1 \n[61] shinycssloaders_1.0.0 munsell_0.5.0 tibble_3.2.1 \n[64] styler_1.10.1 logger_0.2.2 pillar_1.9.0 \n[67] htmltools_0.5.5 brio_1.1.3 R6_2.5.1 \n[70] Rdpack_2.4 evaluate_0.21 lattice_0.21-8 \n[73] R.methodsS3_1.8.2 rbibutils_2.2.13 backports_1.4.1 \n[76] memoise_2.0.1 broom_1.0.5 teal.reporter_0.1.1.9020\n[79] httpuv_1.6.11 bslib_0.5.0 Rcpp_1.0.11 \n[82] teal.code_0.3.0.9009 shinyvalidate_0.1.2 coda_0.19-4 \n[85] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[88] forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet09_smq.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable with Customized Queries\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\nlibrary(stringr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing\n# levels. For details, refer to Teal and Study Data article.\nadsl <- df_explicit_na(adsl)\nadae <- df_explicit_na(adae)\n\n# AEs are filtered for relatedness to study drug.\nadae_rel <- adae %>% filter(AEREL == \"Y\")\n\n# Simulate a random AAG dataset.\naag <- data.frame(\n NAMVAR = c(\"SMQ01NAM\", \"SMQ01NAM\", \"SMQ02NAM\", \"CQ01NAM\", \"CQ01NAM\"),\n SRCVAR = rep(\"AEDECOD\", 5),\n GRPTYPE = c(\"SMQ\", \"SMQ\", \"SMQ\", \"CUSTOM\", \"CUSTOM\"),\n REFID = c(1, 1, 2, 3, 3),\n REFNAME = c(rep(\"C.1.1.1.3/B.2.2.3.1 AESI\", 2), \"non observed SMQ02NAM level\", rep(\"D.2.1.5.3/A.1.1.1.1 AESI\", 2)),\n SCOPE = c(\"BROAD\", \"BROAD\", \"BROAD\", \"\", \"\"),\n REFTERM = c(\"C.1.1.1.3\", \"B.2.2.3.1\", \"Z.9.9.9.9\", \"D.2.1.5.3\", \"A.1.1.1.1\"),\n stringsAsFactors = FALSE\n)\n\n# Create summary AAG dataset (used for labelling).\n# Note it's important to incorporate SCOPE into the basket names for SMQs so as to\n# match the flags present in ADAE.\naag_summary <- aag %>%\n select(NAMVAR, REFNAME, SCOPE) %>%\n unique() %>%\n mutate(\n REFNAME_SCOPE = ifelse(SCOPE == \"\", REFNAME, paste0(REFNAME, \"(\", SCOPE, \")\"))\n ) %>%\n rename(basket = NAMVAR, basket_name = REFNAME_SCOPE) %>%\n select(basket, basket_name)\n\n# Make a summary of the full ADAE based on AAG by using h_stack_by_baskets helper function\nadae_smq_all <- h_stack_by_baskets(df = adae_rel, aag_summary = aag_summary, keys = c(\"STUDYID\", \"USUBJID\", \"ACTARMCD\", \"AEDECOD\"))\n\n# Post-process adae_smq_all to keep only certain baskets of interest for variant 1\n# Not need to drop baskets for variant 2 as all baskets will be considered.\nbaskets_to_drop_variant <- aag_summary$basket_name[!aag_summary$basket %in% c(\"SMQ01NAM\")]\n\n# Adjust the analysis dataset based on basket subset for variant 1.\nadae_smq_1 <- adae_smq_all %>%\n filter(!adae_smq_all$SMQ %in% baskets_to_drop_variant) %>%\n mutate(\n SMQ = tern::fct_discard(SMQ, discard = baskets_to_drop_variant)\n )\n\n\n\n\n\nCodecriteria_fun <- function(tr) !is(tr, \"ContentRow\") && all_zero_or_na(tr)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\"\n )\n ) %>%\n split_rows_by(\n \"SMQ\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = trim_levels_in_group(\"AEDECOD\", drop_outlevs = FALSE),\n label_pos = \"topleft\",\n split_label = \"Standardized MedDRA Query\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = -1L,\n drop = FALSE\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt,\n df = adae_smq_1,\n alt_counts_df = adsl\n) %>%\n sort_at_path(path = c(\"SMQ\"), scorefun = cont_n_allcols) %>%\n sort_at_path(path = c(\"SMQ\", \"*\", \"AEDECOD\"), scorefun = score_occurrences, na.pos = \"last\") %>%\n trim_rows(criteria = criteria_fun)\n\nresult\n\nStandardized MedDRA Query ARM A ARM B ARM C \n Dictionary-Derived Term (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 43 (32.1%) 46 (34.3%) 43 (32.6%)\nC.1.1.1.3/B.2.2.3.1 AESI(BROAD) \n Total number of patients with at least one adverse event 43 (32.1%) 46 (34.3%) 43 (32.6%)\n Total number of events 55 63 64 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%)\n\n\n\n\n\nCodecriteria_fun <- function(tr) !is(tr, \"ContentRow\") && all_zero_or_na(tr)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n analyze_num_patients(\n vars = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\"\n )\n ) %>%\n split_rows_by(\n \"SMQ\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = trim_levels_in_group(\"AEDECOD\", drop_outlevs = FALSE),\n label_pos = \"topleft\",\n split_label = \"Standardized MedDRA Query\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\", \"nonunique\"),\n .labels = c(\n unique = \"Total number of patients with at least one adverse event\",\n nonunique = \"Total number of events\"\n )\n ) %>%\n count_occurrences(\n vars = \"AEDECOD\",\n .indent_mods = -1L,\n drop = FALSE\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nresult <- build_table(\n lyt,\n df = adae_smq_all,\n alt_counts_df = adsl\n) %>%\n sort_at_path(path = c(\"SMQ\"), scorefun = cont_n_allcols) %>%\n sort_at_path(path = c(\"SMQ\", \"*\", \"AEDECOD\"), scorefun = score_occurrences, na.pos = \"last\") %>%\n trim_rows(criteria = criteria_fun)\n\nresult\n\nStandardized MedDRA Query ARM A ARM B ARM C \n Dictionary-Derived Term (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one adverse event 69 (51.5%) 78 (58.2%) 77 (58.3%)\nD.2.1.5.3/A.1.1.1.1 AESI \n Total number of patients with at least one adverse event 47 (35.1%) 58 (43.3%) 57 (43.2%)\n Total number of events 62 72 74 \n dcd D.2.1.5.3 47 (35.1%) 58 (43.3%) 57 (43.2%)\nC.1.1.1.3/B.2.2.3.1 AESI(BROAD) \n Total number of patients with at least one adverse event 43 (32.1%) 46 (34.3%) 43 (32.6%)\n Total number of events 55 63 64 \n dcd C.1.1.1.3 43 (32.1%) 46 (34.3%) 43 (32.6%)\nnon observed SMQ02NAM level(BROAD) \n Total number of patients with at least one adverse event 0 0 0 \n Total number of events 0 0 0 \n\n\n\n\nNote that filtering AEs for relatedness to study drug is not a necessary data pre-processing step for the module. It can be achieved using the teal module filter panel. The example here pre-sets the filters using AEREL = \"Y\" in adae.\n\nCodelibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nnames_baskets <- grep(\"^(SMQ|CQ).*NAM$\", names(adae), value = TRUE)\nnames_scopes <- grep(\"^SMQ.*SC$\", names(adae), value = TRUE)\n\ncs_baskets <- choices_selected(\n choices = variable_choices(adae, subset = names_baskets),\n selected = names_baskets\n)\ncs_scopes <- choices_selected(\n choices = variable_choices(adae, subset = names_scopes),\n selected = names_scopes,\n fixed = TRUE\n)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl,\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'\n ),\n cdisc_dataset(\"ADAE\", adae,\n code = 'ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")'\n ),\n check = TRUE\n ),\n modules = modules(\n tm_t_smq(\n label = \"Adverse Events by SMQ Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(\n choices = variable_choices(adsl, subset = c(\"ARM\", \"SEX\")),\n selected = \"ARM\"\n ),\n add_total = FALSE,\n baskets = cs_baskets,\n scopes = cs_scopes,\n llt = choices_selected(\n choices = variable_choices(adae, subset = c(\"AEDECOD\")),\n selected = \"AEDECOD\"\n )\n )\n ),\n filter = list(ADAE = list(AEREL = \"Y\"))\n)\n\n[INFO] 2023-08-04 15:30:17.1725 pid:11632 token:[] teal.modules.clinical Initializing tm_t_smq\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] stringr_1.5.0 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n[13] dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] stringi_1.7.12 gtable_0.3.3 later_1.3.1 \n[61] shinycssloaders_1.0.0 munsell_0.5.0 tibble_3.2.1 \n[64] styler_1.10.1 logger_0.2.2 pillar_1.9.0 \n[67] htmltools_0.5.5 brio_1.1.3 R6_2.5.1 \n[70] Rdpack_2.4 evaluate_0.21 lattice_0.21-8 \n[73] R.methodsS3_1.8.2 rbibutils_2.2.13 backports_1.4.1 \n[76] memoise_2.0.1 broom_1.0.5 teal.reporter_0.1.1.9020\n[79] httpuv_1.6.11 bslib_0.5.0 Rcpp_1.0.11 \n[82] teal.code_0.3.0.9009 shinyvalidate_0.1.2 coda_0.19-4 \n[85] nlme_3.1-162 checkmate_2.2.0 xfun_0.39 \n[88] forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet09_smq.lock'.\n\n\nDownload" }, { "objectID": "tables/adverse-events/aet04.html", "href": "tables/adverse-events/aet04.html", "title": "AET04", "section": "", - "text": "Data Setup\nStandard Table\nTable with Fill-In of Treatment Groups\nTable with Fill-In of Grades\nTable with Collapsing of Grades\nTable Using Worst Grade Flags from ADAE\nTable with an Incidence Rate \\(\\geq\\) 40%, Totals Restricted\nTable with an Incidence Rate \\(\\geq\\) X%, Totals Unrestricted\nTable with an Incidence Rate \\(\\geq\\) 58 Patients\nTable with a Difference in Incidence Rate \\(\\geq\\) 10%\nTable with an Incidence Rate \\(\\geq\\) 5%, SOCs < 5% Removed\nTable with an Incidence Rate \\(\\geq\\) 40%, All SOCs w/o Preferred Terms Removed\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl) %>% dplyr::filter(TRT01A != \"<Missing>\")\nadae <- df_explicit_na(adae) %>% dplyr::filter(ANL01FL == \"Y\")\n\n# Pre-Processing\n\ngr_grp <- list(\n \"- Any Grade -\" = c(\"1\", \"2\", \"3\", \"4\", \"5\"),\n \"Grade 1-2\" = c(\"1\", \"2\"),\n \"Grade 3-4\" = c(\"3\", \"4\"),\n \"Grade 5\" = \"5\"\n)\n\n# Raw table used by variant 8/10\nraw_table <- basic_table() %>%\n split_cols_by(\"ACTARM\") %>%\n add_colcounts() %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp\n ) %>%\n split_rows_by(\"AEBODSYS\",\n split_fun = trim_levels_in_group(\"AETOXGR\"),\n child_labels = \"visible\", nested = TRUE\n ) %>%\n summarize_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp\n ) %>%\n split_rows_by(\"AEDECOD\",\n split_fun = trim_levels_in_group(\"AETOXGR\"),\n child_labels = \"visible\", nested = TRUE\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\"\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp[-1],\n .indent_mods = -1L\n ) %>%\n build_table(adae, alt_counts_df = adsl) %>%\n sort_at_path(\n path = \"AEBODSYS\",\n scorefun = cont_n_allcols,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = cont_n_allcols,\n decreasing = TRUE\n )\n\n# Helper function to avoid filtering also the first part of the table, where general information is given.\nmy_row_condition <- function(row_fnc_condition) {\n function(table_row) {\n if (indent_mod(table_row) == 0) {\n return(TRUE)\n } else {\n row_fnc_condition(table_row)\n }\n }\n}\n\n\n\n\n\nCodesplit_fun <- trim_levels_in_group\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun(\"AETOXGR\"),\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp\n ) %>%\n split_rows_by(\n \"AEDECOD\",\n child_labels = \"visible\",\n nested = TRUE,\n indent_mod = -1L,\n split_fun = split_fun(\"AETOXGR\"),\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEDECOD)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\"\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp[-1],\n .indent_mods = -1L\n ) %>%\n append_varlabels(adae, \"AETOXGR\", indent = 2L)\n\nresult <- lyt %>%\n build_table(adae, alt_counts_df = adsl) %>%\n sort_at_path(\n path = \"AEBODSYS\",\n scorefun = cont_n_allcols,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = cont_n_allcols,\n decreasing = TRUE\n )\n\nresult\n\nBody System or Organ Class \n Dictionary-Derived Term A: Drug X B: Placebo C: Combination\n Analysis Toxicity Grade (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————\n- Any Grade - 100 (74.6%) 98 (73.1%) 103 (78.0%) \nGrade 1-2 10 (7.5%) 15 (11.2%) 10 (7.6%) \n1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n2 5 (3.7%) 8 (6.0%) 6 (4.5%) \nGrade 3-4 26 (19.4%) 31 (23.1%) 29 (22.0%) \n3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n4 13 (9.7%) 18 (13.4%) 15 (11.4%) \nGrade 5 64 (47.8%) 52 (38.8%) 64 (48.5%) \ncl A.1 \n - Any Grade - 68 (50.7%) 58 (43.3%) 76 (57.6%) \n Grade 1-2 68 (50.7%) 58 (43.3%) 76 (57.6%) \n 1 27 (20.1%) 19 (14.2%) 34 (25.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n dcd A.1.1.1.1 \n - Any Grade - 45 (33.6%) 31 (23.1%) 52 (39.4%) \n Grade 1-2 45 (33.6%) 31 (23.1%) 52 (39.4%) \n 1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 \n - Any Grade - 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 1-2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n - Any Grade - 62 (46.3%) 56 (41.8%) 74 (56.1%) \n Grade 1-2 23 (17.2%) 22 (16.4%) 28 (21.2%) \n 1 23 (17.2%) 22 (16.4%) 28 (21.2%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \n dcd B.2.2.3.1 \n - Any Grade - 38 (28.4%) 40 (29.9%) 45 (34.1%) \n Grade 1-2 38 (28.4%) 40 (29.9%) 45 (34.1%) \n 1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 \n - Any Grade - 39 (29.1%) 34 (25.4%) 46 (34.8%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n - Any Grade - 64 (47.8%) 54 (40.3%) 68 (51.5%) \n Grade 3-4 22 (16.4%) 22 (16.4%) 22 (16.7%) \n 3 22 (16.4%) 22 (16.4%) 22 (16.7%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.1.1 \n - Any Grade - 42 (31.3%) 32 (23.9%) 46 (34.8%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 \n - Any Grade - 38 (28.4%) 34 (25.4%) 40 (30.3%) \n Grade 3-4 38 (28.4%) 34 (25.4%) 40 (30.3%) \n 3 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \n dcd D.2.1.5.3 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n dcd C.2.1.2.1 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n dcd B.1.1.1.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n dcd C.1.1.1.3 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCodeadae2 <- adae %>%\n dplyr::filter(ACTARM == \"A: Drug X\")\n\nsplit_fun <- trim_levels_in_group\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun(\"AETOXGR\"),\n label_pos = \"topleft\",\n split_label = obj_label(adae2$AEBODSYS)\n ) %>%\n summarize_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp\n ) %>%\n split_rows_by(\n \"AEDECOD\",\n child_labels = \"visible\",\n nested = TRUE,\n indent_mod = -1L,\n split_fun = split_fun(\"AETOXGR\"),\n label_pos = \"topleft\",\n split_label = obj_label(adae2$AEDECOD)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\"\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp[-1],\n .indent_mods = -1L\n ) %>%\n append_varlabels(adae, \"AETOXGR\", indent = 2L)\n\nresult <- lyt %>%\n build_table(adae2, alt_counts_df = adsl) %>%\n sort_at_path(\n path = \"AEBODSYS\",\n scorefun = cont_n_allcols,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = cont_n_allcols,\n decreasing = TRUE\n )\n\nresult\n\nBody System or Organ Class \n Dictionary-Derived Term A: Drug X B: Placebo C: Combination\n Analysis Toxicity Grade (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————\n- Any Grade - 100 (74.6%) 0 0 \nGrade 1-2 10 (7.5%) 0 0 \n1 5 (3.7%) 0 0 \n2 5 (3.7%) 0 0 \nGrade 3-4 26 (19.4%) 0 0 \n3 13 (9.7%) 0 0 \n4 13 (9.7%) 0 0 \nGrade 5 64 (47.8%) 0 0 \ncl A.1 \n - Any Grade - 68 (50.7%) 0 0 \n Grade 1-2 68 (50.7%) 0 0 \n 1 27 (20.1%) 0 0 \n 2 41 (30.6%) 0 0 \n dcd A.1.1.1.1 \n - Any Grade - 45 (33.6%) 0 0 \n Grade 1-2 45 (33.6%) 0 0 \n 1 45 (33.6%) 0 0 \n dcd A.1.1.1.2 \n - Any Grade - 41 (30.6%) 0 0 \n Grade 1-2 41 (30.6%) 0 0 \n 2 41 (30.6%) 0 0 \ncl D.1 \n - Any Grade - 64 (47.8%) 0 0 \n Grade 3-4 22 (16.4%) 0 0 \n 3 22 (16.4%) 0 0 \n Grade 5 42 (31.3%) 0 0 \n dcd D.1.1.1.1 \n - Any Grade - 42 (31.3%) 0 0 \n Grade 5 42 (31.3%) 0 0 \n dcd D.1.1.4.2 \n - Any Grade - 38 (28.4%) 0 0 \n Grade 3-4 38 (28.4%) 0 0 \n 3 38 (28.4%) 0 0 \ncl B.2 \n - Any Grade - 62 (46.3%) 0 0 \n Grade 1-2 23 (17.2%) 0 0 \n 1 23 (17.2%) 0 0 \n Grade 3-4 39 (29.1%) 0 0 \n 3 39 (29.1%) 0 0 \n dcd B.2.1.2.1 \n - Any Grade - 39 (29.1%) 0 0 \n Grade 3-4 39 (29.1%) 0 0 \n 3 39 (29.1%) 0 0 \n dcd B.2.2.3.1 \n - Any Grade - 38 (28.4%) 0 0 \n Grade 1-2 38 (28.4%) 0 0 \n 1 38 (28.4%) 0 0 \ncl B.1 \n - Any Grade - 38 (28.4%) 0 0 \n Grade 5 38 (28.4%) 0 0 \n dcd B.1.1.1.1 \n - Any Grade - 38 (28.4%) 0 0 \n Grade 5 38 (28.4%) 0 0 \ncl D.2 \n - Any Grade - 37 (27.6%) 0 0 \n Grade 1-2 37 (27.6%) 0 0 \n 1 37 (27.6%) 0 0 \n dcd D.2.1.5.3 \n - Any Grade - 37 (27.6%) 0 0 \n Grade 1-2 37 (27.6%) 0 0 \n 1 37 (27.6%) 0 0 \ncl C.1 \n - Any Grade - 36 (26.9%) 0 0 \n Grade 3-4 36 (26.9%) 0 0 \n 4 36 (26.9%) 0 0 \n dcd C.1.1.1.3 \n - Any Grade - 36 (26.9%) 0 0 \n Grade 3-4 36 (26.9%) 0 0 \n 4 36 (26.9%) 0 0 \ncl C.2 \n - Any Grade - 28 (20.9%) 0 0 \n Grade 1-2 28 (20.9%) 0 0 \n 2 28 (20.9%) 0 0 \n dcd C.2.1.2.1 \n - Any Grade - 28 (20.9%) 0 0 \n Grade 1-2 28 (20.9%) 0 0 \n 2 28 (20.9%) 0 0 \n\n\n\n\n\nCodesplit_fun <- drop_split_levels\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp\n ) %>%\n split_rows_by(\n \"AEDECOD\",\n child_labels = \"visible\",\n nested = TRUE,\n indent_mod = -1L,\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEDECOD)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\"\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp[-1],\n .indent_mods = -1L\n ) %>%\n append_varlabels(adae, \"AETOXGR\", indent = 2L)\n\nresult <- lyt %>%\n build_table(adae, alt_counts_df = adsl) %>%\n sort_at_path(\n path = \"AEBODSYS\",\n scorefun = cont_n_allcols,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = cont_n_allcols,\n decreasing = TRUE\n )\n\nresult\n\nBody System or Organ Class \n Dictionary-Derived Term A: Drug X B: Placebo C: Combination\n Analysis Toxicity Grade (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————\n- Any Grade - 100 (74.6%) 98 (73.1%) 103 (78.0%) \nGrade 1-2 10 (7.5%) 15 (11.2%) 10 (7.6%) \n1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n2 5 (3.7%) 8 (6.0%) 6 (4.5%) \nGrade 3-4 26 (19.4%) 31 (23.1%) 29 (22.0%) \n3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n4 13 (9.7%) 18 (13.4%) 15 (11.4%) \nGrade 5 64 (47.8%) 52 (38.8%) 64 (48.5%) \ncl A.1 \n - Any Grade - 68 (50.7%) 58 (43.3%) 76 (57.6%) \n Grade 1-2 68 (50.7%) 58 (43.3%) 76 (57.6%) \n 1 27 (20.1%) 19 (14.2%) 34 (25.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 0 0 0 \n dcd A.1.1.1.1 \n - Any Grade - 45 (33.6%) 31 (23.1%) 52 (39.4%) \n Grade 1-2 45 (33.6%) 31 (23.1%) 52 (39.4%) \n 1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n 2 0 0 0 \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 0 0 0 \n dcd A.1.1.1.2 \n - Any Grade - 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 1-2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n 1 0 0 0 \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 0 0 0 \ncl B.2 \n - Any Grade - 62 (46.3%) 56 (41.8%) 74 (56.1%) \n Grade 1-2 23 (17.2%) 22 (16.4%) 28 (21.2%) \n 1 23 (17.2%) 22 (16.4%) 28 (21.2%) \n 2 0 0 0 \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 4 0 0 0 \n Grade 5 0 0 0 \n dcd B.2.2.3.1 \n - Any Grade - 38 (28.4%) 40 (29.9%) 45 (34.1%) \n Grade 1-2 38 (28.4%) 40 (29.9%) 45 (34.1%) \n 1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n 2 0 0 0 \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 0 0 0 \n dcd B.2.1.2.1 \n - Any Grade - 39 (29.1%) 34 (25.4%) 46 (34.8%) \n Grade 1-2 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 4 0 0 0 \n Grade 5 0 0 0 \ncl D.1 \n - Any Grade - 64 (47.8%) 54 (40.3%) 68 (51.5%) \n Grade 1-2 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n Grade 3-4 22 (16.4%) 22 (16.4%) 22 (16.7%) \n 3 22 (16.4%) 22 (16.4%) 22 (16.7%) \n 4 0 0 0 \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.1.1 \n - Any Grade - 42 (31.3%) 32 (23.9%) 46 (34.8%) \n Grade 1-2 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 \n - Any Grade - 38 (28.4%) 34 (25.4%) 40 (30.3%) \n Grade 1-2 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n Grade 3-4 38 (28.4%) 34 (25.4%) 40 (30.3%) \n 3 38 (28.4%) 34 (25.4%) 40 (30.3%) \n 4 0 0 0 \n Grade 5 0 0 0 \ncl D.2 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 2 0 0 0 \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 0 0 0 \n dcd D.2.1.5.3 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 2 0 0 0 \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 0 0 0 \ncl C.2 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 1 0 0 0 \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 0 0 0 \n dcd C.2.1.2.1 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 1 0 0 0 \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 0 0 0 \ncl B.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 1-2 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n dcd B.1.1.1.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 1-2 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 1-2 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 3 0 0 0 \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 5 0 0 0 \n dcd C.1.1.1.3 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 1-2 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 3 0 0 0 \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 5 0 0 0 \n\n\n\n\n\nCodegr_grp1 <- list(\n \"- Any Grade -\" = c(\"1\", \"2\", \"3\", \"4\", \"5\"),\n \"Grade 1-2\" = c(\"1\", \"2\"),\n \"Grade 3-5\" = c(\"3\", \"4\", \"5\")\n)\n\nsplit_fun <- trim_levels_in_group\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp1\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun(\"AETOXGR\"),\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEBODSYS)\n ) %>%\n summarize_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp1\n ) %>%\n split_rows_by(\n \"AEDECOD\",\n child_labels = \"visible\",\n nested = TRUE,\n indent_mod = -1L,\n split_fun = split_fun(\"AETOXGR\"),\n label_pos = \"topleft\",\n split_label = obj_label(adae$AEDECOD)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\"\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp1[-1],\n .indent_mods = -1L\n ) %>%\n append_varlabels(adae, \"AETOXGR\", indent = 2L)\n\nresult <- lyt %>%\n build_table(adae, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = \"AEBODSYS\",\n scorefun = cont_n_allcols,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = cont_n_allcols,\n decreasing = TRUE\n )\n\nresult\n\nBody System or Organ Class \n Dictionary-Derived Term A: Drug X B: Placebo C: Combination\n Analysis Toxicity Grade (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————\n- Any Grade - 100 (74.6%) 98 (73.1%) 103 (78.0%) \nGrade 1-2 10 (7.5%) 15 (11.2%) 10 (7.6%) \n1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n2 5 (3.7%) 8 (6.0%) 6 (4.5%) \nGrade 3-5 90 (67.2%) 83 (61.9%) 93 (70.5%) \n3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n4 13 (9.7%) 18 (13.4%) 15 (11.4%) \n5 64 (47.8%) 52 (38.8%) 64 (48.5%) \ncl A.1 \n - Any Grade - 68 (50.7%) 58 (43.3%) 76 (57.6%) \n Grade 1-2 68 (50.7%) 58 (43.3%) 76 (57.6%) \n 1 27 (20.1%) 19 (14.2%) 34 (25.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n dcd A.1.1.1.1 \n - Any Grade - 45 (33.6%) 31 (23.1%) 52 (39.4%) \n Grade 1-2 45 (33.6%) 31 (23.1%) 52 (39.4%) \n 1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 \n - Any Grade - 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 1-2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n - Any Grade - 62 (46.3%) 56 (41.8%) 74 (56.1%) \n Grade 1-2 23 (17.2%) 22 (16.4%) 28 (21.2%) \n 1 23 (17.2%) 22 (16.4%) 28 (21.2%) \n Grade 3-5 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \n dcd B.2.2.3.1 \n - Any Grade - 38 (28.4%) 40 (29.9%) 45 (34.1%) \n Grade 1-2 38 (28.4%) 40 (29.9%) 45 (34.1%) \n 1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 \n - Any Grade - 39 (29.1%) 34 (25.4%) 46 (34.8%) \n Grade 3-5 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n - Any Grade - 64 (47.8%) 54 (40.3%) 68 (51.5%) \n Grade 3-5 64 (47.8%) 54 (40.3%) 68 (51.5%) \n 3 22 (16.4%) 22 (16.4%) 22 (16.7%) \n 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.1.1 \n - Any Grade - 42 (31.3%) 32 (23.9%) 46 (34.8%) \n Grade 3-5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 \n - Any Grade - 38 (28.4%) 34 (25.4%) 40 (30.3%) \n Grade 3-5 38 (28.4%) 34 (25.4%) 40 (30.3%) \n 3 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \n dcd D.2.1.5.3 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n dcd C.2.1.2.1 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 3-5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n dcd B.1.1.1.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 3-5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-5 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n dcd C.1.1.1.3 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-5 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCode# No Worst Grade Flags found in the ADAE data set.\n\n\n\n\n\nCode# Simple wrapper to return subset ADAE to a threshold of xx%.\nget_adae_trimmed <- function(adsl, adae, cutoff_rate) {\n n_per_arm <- adsl %>%\n dplyr::count(ACTARM)\n\n anl_terms <- adae %>%\n dplyr::group_by(ACTARM, AEBODSYS, AEDECOD) %>%\n dplyr::count(\n unique_terms = n_distinct(USUBJID)\n ) %>%\n dplyr::select(-n) %>%\n dplyr::ungroup()\n\n anl_terms <- dplyr::left_join(\n anl_terms,\n n_per_arm,\n by = \"ACTARM\"\n ) %>%\n dplyr::mutate(\n ae_rate = unique_terms / n\n ) %>%\n dplyr::filter(ae_rate >= cutoff_rate) %>%\n dplyr::select(AEDECOD) %>%\n unique()\n\n anl <- dplyr::left_join(\n anl_terms,\n adae,\n by = \"AEDECOD\"\n )\n anl\n}\n\nadae6 <- get_adae_trimmed(adsl, adae, cutoff_rate = 0.4)\n\nsplit_fun <- trim_levels_in_group\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = TRUE,\n split_fun = split_fun(\"AETOXGR\"),\n label_pos = \"topleft\",\n split_label = obj_label(adae6$AEBODSYS)\n ) %>%\n summarize_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp\n ) %>%\n split_rows_by(\n \"AEDECOD\",\n child_labels = \"visible\",\n nested = TRUE,\n indent_mod = -1L,\n split_fun = split_fun(\"AETOXGR\"),\n label_pos = \"topleft\",\n split_label = obj_label(adae6$AEDECOD)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\"\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = gr_grp[-1],\n .indent_mods = -1L\n ) %>%\n append_varlabels(adae, \"AETOXGR\", indent = 2L)\n\nresult <- lyt %>%\n build_table(adae6, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = \"AEBODSYS\",\n scorefun = cont_n_allcols,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = cont_n_allcols,\n decreasing = TRUE\n )\n\nresult\n\nBody System or Organ Class \n Dictionary-Derived Term A: Drug X B: Placebo C: Combination\n Analysis Toxicity Grade (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————\n- Any Grade - 100 (74.6%) 98 (73.1%) 103 (78.0%) \nGrade 1-2 10 (7.5%) 15 (11.2%) 10 (7.6%) \n1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n2 5 (3.7%) 8 (6.0%) 6 (4.5%) \nGrade 3-4 26 (19.4%) 31 (23.1%) 29 (22.0%) \n3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n4 13 (9.7%) 18 (13.4%) 15 (11.4%) \nGrade 5 64 (47.8%) 52 (38.8%) 64 (48.5%) \ncl A.1 \n - Any Grade - 68 (50.7%) 58 (43.3%) 76 (57.6%) \n Grade 1-2 68 (50.7%) 58 (43.3%) 76 (57.6%) \n 1 27 (20.1%) 19 (14.2%) 34 (25.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n dcd A.1.1.1.1 \n - Any Grade - 45 (33.6%) 31 (23.1%) 52 (39.4%) \n Grade 1-2 45 (33.6%) 31 (23.1%) 52 (39.4%) \n 1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 \n - Any Grade - 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 1-2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n - Any Grade - 62 (46.3%) 56 (41.8%) 74 (56.1%) \n Grade 1-2 23 (17.2%) 22 (16.4%) 28 (21.2%) \n 1 23 (17.2%) 22 (16.4%) 28 (21.2%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \n dcd B.2.2.3.1 \n - Any Grade - 38 (28.4%) 40 (29.9%) 45 (34.1%) \n Grade 1-2 38 (28.4%) 40 (29.9%) 45 (34.1%) \n 1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 \n - Any Grade - 39 (29.1%) 34 (25.4%) 46 (34.8%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n - Any Grade - 64 (47.8%) 54 (40.3%) 68 (51.5%) \n Grade 3-4 22 (16.4%) 22 (16.4%) 22 (16.7%) \n 3 22 (16.4%) 22 (16.4%) 22 (16.7%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.1.1 \n - Any Grade - 42 (31.3%) 32 (23.9%) 46 (34.8%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 \n - Any Grade - 38 (28.4%) 34 (25.4%) 40 (30.3%) \n Grade 3-4 38 (28.4%) 34 (25.4%) 40 (30.3%) \n 3 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \n dcd D.2.1.5.3 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n dcd C.2.1.2.1 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n dcd B.1.1.1.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n dcd C.1.1.1.3 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCode# Variant 7 was not created.\n# With this variant, the SOC level is not trimmed (even if there are no terms left).\n\n\n\n\n\nCodecutoff <- 58L\nrow_condition <- has_count_in_any_col(atleast = cutoff, col_names = levels(adsl$ACTARM))\n\nresult <- prune_table(raw_table, keep_content_rows(my_row_condition(row_condition)))\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————\n- Any Grade - 100 (74.6%) 98 (73.1%) 103 (78.0%) \nGrade 1-2 10 (7.5%) 15 (11.2%) 10 (7.6%) \n1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n2 5 (3.7%) 8 (6.0%) 6 (4.5%) \nGrade 3-4 26 (19.4%) 31 (23.1%) 29 (22.0%) \n3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n4 13 (9.7%) 18 (13.4%) 15 (11.4%) \nGrade 5 64 (47.8%) 52 (38.8%) 64 (48.5%) \ncl A.1 \n - Any Grade - 68 (50.7%) 58 (43.3%) 76 (57.6%) \n Grade 1-2 68 (50.7%) 58 (43.3%) 76 (57.6%) \n 1 27 (20.1%) 19 (14.2%) 34 (25.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n dcd A.1.1.1.1 \n - Any Grade - 45 (33.6%) 31 (23.1%) 52 (39.4%) \n Grade 1-2 45 (33.6%) 31 (23.1%) 52 (39.4%) \n 1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 \n - Any Grade - 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 1-2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n - Any Grade - 62 (46.3%) 56 (41.8%) 74 (56.1%) \n Grade 1-2 23 (17.2%) 22 (16.4%) 28 (21.2%) \n 1 23 (17.2%) 22 (16.4%) 28 (21.2%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \n dcd B.2.2.3.1 \n - Any Grade - 38 (28.4%) 40 (29.9%) 45 (34.1%) \n Grade 1-2 38 (28.4%) 40 (29.9%) 45 (34.1%) \n 1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 \n - Any Grade - 39 (29.1%) 34 (25.4%) 46 (34.8%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n - Any Grade - 64 (47.8%) 54 (40.3%) 68 (51.5%) \n Grade 3-4 22 (16.4%) 22 (16.4%) 22 (16.7%) \n 3 22 (16.4%) 22 (16.4%) 22 (16.7%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.1.1 \n - Any Grade - 42 (31.3%) 32 (23.9%) 46 (34.8%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 \n - Any Grade - 38 (28.4%) 34 (25.4%) 40 (30.3%) \n Grade 3-4 38 (28.4%) 34 (25.4%) 40 (30.3%) \n 3 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \n dcd D.2.1.5.3 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n dcd C.2.1.2.1 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n dcd B.1.1.1.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n dcd C.1.1.1.3 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCodecutoff <- 0.1\nrow_condition <- has_fractions_difference(atleast = cutoff, col_names = levels(adsl$ACTARM))\n\nresult <- prune_table(raw_table, keep_content_rows(my_row_condition(row_condition)))\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————\n- Any Grade - 100 (74.6%) 98 (73.1%) 103 (78.0%) \nGrade 1-2 10 (7.5%) 15 (11.2%) 10 (7.6%) \n1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n2 5 (3.7%) 8 (6.0%) 6 (4.5%) \nGrade 3-4 26 (19.4%) 31 (23.1%) 29 (22.0%) \n3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n4 13 (9.7%) 18 (13.4%) 15 (11.4%) \nGrade 5 64 (47.8%) 52 (38.8%) 64 (48.5%) \ncl A.1 \n - Any Grade - 68 (50.7%) 58 (43.3%) 76 (57.6%) \n Grade 1-2 68 (50.7%) 58 (43.3%) 76 (57.6%) \n 1 27 (20.1%) 19 (14.2%) 34 (25.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n dcd A.1.1.1.1 \n - Any Grade - 45 (33.6%) 31 (23.1%) 52 (39.4%) \n Grade 1-2 45 (33.6%) 31 (23.1%) 52 (39.4%) \n 1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 \n - Any Grade - 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 1-2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n - Any Grade - 62 (46.3%) 56 (41.8%) 74 (56.1%) \n Grade 1-2 23 (17.2%) 22 (16.4%) 28 (21.2%) \n 1 23 (17.2%) 22 (16.4%) 28 (21.2%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \n dcd B.2.2.3.1 \n - Any Grade - 38 (28.4%) 40 (29.9%) 45 (34.1%) \n Grade 1-2 38 (28.4%) 40 (29.9%) 45 (34.1%) \n 1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 \n - Any Grade - 39 (29.1%) 34 (25.4%) 46 (34.8%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n - Any Grade - 64 (47.8%) 54 (40.3%) 68 (51.5%) \n Grade 3-4 22 (16.4%) 22 (16.4%) 22 (16.7%) \n 3 22 (16.4%) 22 (16.4%) 22 (16.7%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.1.1 \n - Any Grade - 42 (31.3%) 32 (23.9%) 46 (34.8%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 \n - Any Grade - 38 (28.4%) 34 (25.4%) 40 (30.3%) \n Grade 3-4 38 (28.4%) 34 (25.4%) 40 (30.3%) \n 3 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \n dcd D.2.1.5.3 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n dcd C.2.1.2.1 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n dcd B.1.1.1.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n dcd C.1.1.1.3 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCode# Variant 10 was not done\n# With this variant, SOC levels above the threshold are still in the table even if\n# there are no terms left.\n\n\n\n\n\nCodecutoff <- 0.4\nrow_condition <- has_fraction_in_any_col(atleast = cutoff, col_names = levels(adsl$ACTARM))\n\nresult <- prune_table(raw_table, keep_content_rows(my_row_condition(row_condition)))\n\nresult\n\n A: Drug X B: Placebo C: Combination\n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————\n- Any Grade - 100 (74.6%) 98 (73.1%) 103 (78.0%) \nGrade 1-2 10 (7.5%) 15 (11.2%) 10 (7.6%) \n1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n2 5 (3.7%) 8 (6.0%) 6 (4.5%) \nGrade 3-4 26 (19.4%) 31 (23.1%) 29 (22.0%) \n3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n4 13 (9.7%) 18 (13.4%) 15 (11.4%) \nGrade 5 64 (47.8%) 52 (38.8%) 64 (48.5%) \ncl A.1 \n - Any Grade - 68 (50.7%) 58 (43.3%) 76 (57.6%) \n Grade 1-2 68 (50.7%) 58 (43.3%) 76 (57.6%) \n 1 27 (20.1%) 19 (14.2%) 34 (25.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n dcd A.1.1.1.1 \n - Any Grade - 45 (33.6%) 31 (23.1%) 52 (39.4%) \n Grade 1-2 45 (33.6%) 31 (23.1%) 52 (39.4%) \n 1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 \n - Any Grade - 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 1-2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n - Any Grade - 62 (46.3%) 56 (41.8%) 74 (56.1%) \n Grade 1-2 23 (17.2%) 22 (16.4%) 28 (21.2%) \n 1 23 (17.2%) 22 (16.4%) 28 (21.2%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \n dcd B.2.2.3.1 \n - Any Grade - 38 (28.4%) 40 (29.9%) 45 (34.1%) \n Grade 1-2 38 (28.4%) 40 (29.9%) 45 (34.1%) \n 1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 \n - Any Grade - 39 (29.1%) 34 (25.4%) 46 (34.8%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n - Any Grade - 64 (47.8%) 54 (40.3%) 68 (51.5%) \n Grade 3-4 22 (16.4%) 22 (16.4%) 22 (16.7%) \n 3 22 (16.4%) 22 (16.4%) 22 (16.7%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.1.1 \n - Any Grade - 42 (31.3%) 32 (23.9%) 46 (34.8%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 \n - Any Grade - 38 (28.4%) 34 (25.4%) 40 (30.3%) \n Grade 3-4 38 (28.4%) 34 (25.4%) 40 (30.3%) \n 3 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \n dcd D.2.1.5.3 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n dcd C.2.1.2.1 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n dcd B.1.1.1.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n dcd C.1.1.1.3 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n cdisc_dataset(\"ADAE\", adae),\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")',\n check = TRUE\n ),\n modules = modules(\n tm_t_events_by_grade(\n label = \"Adverse Events by Grade Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\")),\n selected = c(\"AEDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(adae, c(\"AEBODSYS\", \"AESOC\")),\n selected = \"AEBODSYS\"\n ),\n grade = choices_selected(\n choices = variable_choices(adae, c(\"AETOXGR\", \"AESEV\")),\n selected = \"AETOXGR\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:12:54.1524 pid:11842 token:[] teal.modules.clinical Initializing tm_t_events_by_grade\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet04.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable with Fill-In of Treatment Groups\nTable with Fill-In of Grades\nTable with Collapsing of Grades\nTable Using Worst Grade Flags from ADAE\nTable with an Incidence Rate \\(\\geq\\) 40%, Totals Restricted\nTable with an Incidence Rate \\(\\geq\\) X%, Totals Unrestricted\nTable with an Incidence Rate \\(\\geq\\) 58 Patients\nTable with a Difference in Incidence Rate \\(\\geq\\) 10%\nTable with an Incidence Rate \\(\\geq\\) 5%, SOCs < 5% Removed\nTable with an Incidence Rate \\(\\geq\\) 40%, All SOCs w/o Preferred Terms Removed\nTeal\nSession Info\n\n\n\n\nCodelibrary(dplyr)\nlibrary(tern)\nlibrary(scda)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl) %>% filter(TRT01A != \"<Missing>\")\nadae <- df_explicit_na(adae) %>%\n var_relabel(\n AEBODSYS = \"MedDRA System Organ Class\",\n AEDECOD = \"MedDRA Preferred Term\"\n ) %>%\n filter(\n ANL01FL == \"Y\",\n AETOXGR != \"<Missing>\"\n )\n\n# Pre-Processing\ngrade_groups <- list(\n \"Grade 1-2\" = c(\"1\", \"2\"),\n \"Grade 3-4\" = c(\"3\", \"4\"),\n \"Grade 5\" = \"5\"\n)\nadae$TOTAL_VAR <- \"- Any adverse events - \"\n\n# Helper function to avoid filtering also the first part of the table, where general information is given.\nmy_row_condition <- function(row_fnc_condition) {\n function(table_row) {\n if (indent_mod(table_row) == 0) {\n return(TRUE)\n } else {\n row_fnc_condition(table_row)\n }\n }\n}\n\n# Helper function to calculate sum from first nested row\nscore_all_sum <- function(tt) {\n cleaf <- collect_leaves(tt)[[1]]\n if (NROW(cleaf) == 0) {\n stop(\"score_all_sum score function used at subtable [\", obj_name(tt), \"] that has no content.\")\n }\n sum(sapply(row_values(cleaf), function(cv) cv[1]))\n}\n\n# Raw table used by variant 8/10\nraw_table <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n var = \"TOTAL_VAR\",\n label_pos = \"hidden\",\n child_labels = \"visible\",\n indent_mod = -1L\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\",\n .indent_mods = 7L\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = grade_groups,\n .indent_mods = 6L\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = drop_split_levels,\n split_label = var_labels(adae)[[\"AEBODSYS\"]],\n label_pos = \"topleft\"\n ) %>%\n split_rows_by(\n \"AEDECOD\",\n child_labels = \"visible\",\n split_fun = add_overall_level(\"- Overall -\", trim = TRUE),\n split_label = var_labels(adae)[[\"AEDECOD\"]],\n label_pos = \"topleft\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\",\n .indent_mods = 6L\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = grade_groups,\n .indent_mods = 5L\n ) %>%\n append_topleft(\" Grade\") %>%\n build_table(adae, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = \"AEBODSYS\",\n scorefun = score_all_sum,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_all_sum,\n decreasing = TRUE\n )\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n var = \"TOTAL_VAR\",\n label_pos = \"hidden\",\n child_labels = \"visible\",\n indent_mod = -1L\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\",\n .indent_mods = 7L\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = grade_groups,\n .indent_mods = 6L\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = drop_split_levels,\n split_label = var_labels(adae)[[\"AEBODSYS\"]],\n label_pos = \"topleft\"\n ) %>%\n split_rows_by(\n \"AEDECOD\",\n child_labels = \"visible\",\n split_fun = add_overall_level(\"- Overall -\", trim = TRUE),\n split_label = var_labels(adae)[[\"AEDECOD\"]],\n label_pos = \"topleft\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\",\n .indent_mods = 6L\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = grade_groups,\n .indent_mods = 5L\n ) %>%\n append_topleft(\" Grade\")\n\nresult <- lyt %>%\n build_table(adae, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = \"AEBODSYS\",\n scorefun = score_all_sum,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_all_sum,\n decreasing = TRUE\n )\n\nresult\n\nMedDRA System Organ Class \n MedDRA Preferred Term A: Drug X B: Placebo C: Combination\n Grade (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————\n- Any adverse events - \n - Any Grade - 100 (74.6%) 98 (73.1%) 103 (78.0%) \n Grade 1-2 10 (7.5%) 15 (11.2%) 10 (7.6%) \n 1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n 2 5 (3.7%) 8 (6.0%) 6 (4.5%) \n Grade 3-4 26 (19.4%) 31 (23.1%) 29 (22.0%) \n 3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n 4 13 (9.7%) 18 (13.4%) 15 (11.4%) \n Grade 5 64 (47.8%) 52 (38.8%) 64 (48.5%) \ncl A.1 \n - Overall - \n - Any Grade - 68 (50.7%) 58 (43.3%) 76 (57.6%) \n Grade 1-2 68 (50.7%) 58 (43.3%) 76 (57.6%) \n 1 27 (20.1%) 19 (14.2%) 34 (25.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n dcd A.1.1.1.1 \n - Any Grade - 45 (33.6%) 31 (23.1%) 52 (39.4%) \n Grade 1-2 45 (33.6%) 31 (23.1%) 52 (39.4%) \n 1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 \n - Any Grade - 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 1-2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n - Overall - \n - Any Grade - 62 (46.3%) 56 (41.8%) 74 (56.1%) \n Grade 1-2 23 (17.2%) 22 (16.4%) 28 (21.2%) \n 1 23 (17.2%) 22 (16.4%) 28 (21.2%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \n dcd B.2.2.3.1 \n - Any Grade - 38 (28.4%) 40 (29.9%) 45 (34.1%) \n Grade 1-2 38 (28.4%) 40 (29.9%) 45 (34.1%) \n 1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 \n - Any Grade - 39 (29.1%) 34 (25.4%) 46 (34.8%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n - Overall - \n - Any Grade - 64 (47.8%) 54 (40.3%) 68 (51.5%) \n Grade 3-4 22 (16.4%) 22 (16.4%) 22 (16.7%) \n 3 22 (16.4%) 22 (16.4%) 22 (16.7%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.1.1 \n - Any Grade - 42 (31.3%) 32 (23.9%) 46 (34.8%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 \n - Any Grade - 38 (28.4%) 34 (25.4%) 40 (30.3%) \n Grade 3-4 38 (28.4%) 34 (25.4%) 40 (30.3%) \n 3 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n - Overall - \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \n dcd D.2.1.5.3 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n - Overall - \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n dcd C.2.1.2.1 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n - Overall - \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n dcd B.1.1.1.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n - Overall - \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n dcd C.1.1.1.3 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCodeadae2 <- adae %>% filter(ACTARM == \"A: Drug X\")\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n var = \"TOTAL_VAR\",\n label_pos = \"hidden\",\n child_labels = \"visible\",\n indent_mod = -1L\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\",\n .indent_mods = 7L\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = grade_groups,\n .indent_mods = 6L\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = drop_split_levels,\n split_label = var_labels(adae)[[\"AEBODSYS\"]],\n label_pos = \"topleft\"\n ) %>%\n split_rows_by(\n \"AEDECOD\",\n child_labels = \"visible\",\n split_fun = add_overall_level(\"- Overall -\", trim = TRUE),\n split_label = var_labels(adae)[[\"AEDECOD\"]],\n label_pos = \"topleft\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\",\n .indent_mods = 6L\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = grade_groups,\n .indent_mods = 5L\n ) %>%\n append_topleft(\" Grade\")\n\nresult <- lyt %>%\n build_table(adae2, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = \"AEBODSYS\",\n scorefun = score_all_sum,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_all_sum,\n decreasing = TRUE\n )\n\nresult\n\nMedDRA System Organ Class \n MedDRA Preferred Term A: Drug X B: Placebo C: Combination\n Grade (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————\n- Any adverse events - \n - Any Grade - 100 (74.6%) 0 0 \n Grade 1-2 10 (7.5%) 0 0 \n 1 5 (3.7%) 0 0 \n 2 5 (3.7%) 0 0 \n Grade 3-4 26 (19.4%) 0 0 \n 3 13 (9.7%) 0 0 \n 4 13 (9.7%) 0 0 \n Grade 5 64 (47.8%) 0 0 \ncl A.1 \n - Overall - \n - Any Grade - 68 (50.7%) 0 0 \n Grade 1-2 68 (50.7%) 0 0 \n 1 27 (20.1%) 0 0 \n 2 41 (30.6%) 0 0 \n dcd A.1.1.1.1 \n - Any Grade - 45 (33.6%) 0 0 \n Grade 1-2 45 (33.6%) 0 0 \n 1 45 (33.6%) 0 0 \n dcd A.1.1.1.2 \n - Any Grade - 41 (30.6%) 0 0 \n Grade 1-2 41 (30.6%) 0 0 \n 2 41 (30.6%) 0 0 \ncl D.1 \n - Overall - \n - Any Grade - 64 (47.8%) 0 0 \n Grade 3-4 22 (16.4%) 0 0 \n 3 22 (16.4%) 0 0 \n Grade 5 42 (31.3%) 0 0 \n dcd D.1.1.1.1 \n - Any Grade - 42 (31.3%) 0 0 \n Grade 5 42 (31.3%) 0 0 \n dcd D.1.1.4.2 \n - Any Grade - 38 (28.4%) 0 0 \n Grade 3-4 38 (28.4%) 0 0 \n 3 38 (28.4%) 0 0 \ncl B.2 \n - Overall - \n - Any Grade - 62 (46.3%) 0 0 \n Grade 1-2 23 (17.2%) 0 0 \n 1 23 (17.2%) 0 0 \n Grade 3-4 39 (29.1%) 0 0 \n 3 39 (29.1%) 0 0 \n dcd B.2.1.2.1 \n - Any Grade - 39 (29.1%) 0 0 \n Grade 3-4 39 (29.1%) 0 0 \n 3 39 (29.1%) 0 0 \n dcd B.2.2.3.1 \n - Any Grade - 38 (28.4%) 0 0 \n Grade 1-2 38 (28.4%) 0 0 \n 1 38 (28.4%) 0 0 \ncl B.1 \n - Overall - \n - Any Grade - 38 (28.4%) 0 0 \n Grade 5 38 (28.4%) 0 0 \n dcd B.1.1.1.1 \n - Any Grade - 38 (28.4%) 0 0 \n Grade 5 38 (28.4%) 0 0 \ncl D.2 \n - Overall - \n - Any Grade - 37 (27.6%) 0 0 \n Grade 1-2 37 (27.6%) 0 0 \n 1 37 (27.6%) 0 0 \n dcd D.2.1.5.3 \n - Any Grade - 37 (27.6%) 0 0 \n Grade 1-2 37 (27.6%) 0 0 \n 1 37 (27.6%) 0 0 \ncl C.1 \n - Overall - \n - Any Grade - 36 (26.9%) 0 0 \n Grade 3-4 36 (26.9%) 0 0 \n 4 36 (26.9%) 0 0 \n dcd C.1.1.1.3 \n - Any Grade - 36 (26.9%) 0 0 \n Grade 3-4 36 (26.9%) 0 0 \n 4 36 (26.9%) 0 0 \ncl C.2 \n - Overall - \n - Any Grade - 28 (20.9%) 0 0 \n Grade 1-2 28 (20.9%) 0 0 \n 2 28 (20.9%) 0 0 \n dcd C.2.1.2.1 \n - Any Grade - 28 (20.9%) 0 0 \n Grade 1-2 28 (20.9%) 0 0 \n 2 28 (20.9%) 0 0 \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n var = \"TOTAL_VAR\",\n label_pos = \"hidden\",\n child_labels = \"visible\",\n indent_mod = -1L\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\",\n .indent_mods = 7L\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = grade_groups,\n .indent_mods = 6L\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = drop_split_levels,\n split_label = var_labels(adae)[[\"AEBODSYS\"]],\n label_pos = \"topleft\"\n ) %>%\n split_rows_by(\n \"AEDECOD\",\n child_labels = \"visible\",\n split_fun = add_overall_level(\"- Overall -\", trim = TRUE),\n split_label = var_labels(adae)[[\"AEDECOD\"]],\n label_pos = \"topleft\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\",\n .indent_mods = 6L\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = grade_groups,\n .indent_mods = 5L\n ) %>%\n append_topleft(\" Grade\")\n\nresult <- lyt %>%\n build_table(adae, alt_counts_df = adsl) %>%\n sort_at_path(\n path = \"AEBODSYS\",\n scorefun = score_all_sum,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_all_sum,\n decreasing = TRUE\n )\n\nresult\n\nMedDRA System Organ Class \n MedDRA Preferred Term A: Drug X B: Placebo C: Combination\n Grade (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————\n- Any adverse events - \n - Any Grade - 100 (74.6%) 98 (73.1%) 103 (78.0%) \n Grade 1-2 10 (7.5%) 15 (11.2%) 10 (7.6%) \n 1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n 2 5 (3.7%) 8 (6.0%) 6 (4.5%) \n Grade 3-4 26 (19.4%) 31 (23.1%) 29 (22.0%) \n 3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n 4 13 (9.7%) 18 (13.4%) 15 (11.4%) \n Grade 5 64 (47.8%) 52 (38.8%) 64 (48.5%) \ncl A.1 \n - Overall - \n - Any Grade - 68 (50.7%) 58 (43.3%) 76 (57.6%) \n Grade 1-2 68 (50.7%) 58 (43.3%) 76 (57.6%) \n 1 27 (20.1%) 19 (14.2%) 34 (25.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 0 0 0 \n dcd A.1.1.1.1 \n - Any Grade - 45 (33.6%) 31 (23.1%) 52 (39.4%) \n Grade 1-2 45 (33.6%) 31 (23.1%) 52 (39.4%) \n 1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n 2 0 0 0 \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 0 0 0 \n dcd A.1.1.1.2 \n - Any Grade - 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 1-2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n 1 0 0 0 \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 0 0 0 \ncl B.2 \n - Overall - \n - Any Grade - 62 (46.3%) 56 (41.8%) 74 (56.1%) \n Grade 1-2 23 (17.2%) 22 (16.4%) 28 (21.2%) \n 1 23 (17.2%) 22 (16.4%) 28 (21.2%) \n 2 0 0 0 \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 4 0 0 0 \n Grade 5 0 0 0 \n dcd B.2.2.3.1 \n - Any Grade - 38 (28.4%) 40 (29.9%) 45 (34.1%) \n Grade 1-2 38 (28.4%) 40 (29.9%) 45 (34.1%) \n 1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n 2 0 0 0 \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 0 0 0 \n dcd B.2.1.2.1 \n - Any Grade - 39 (29.1%) 34 (25.4%) 46 (34.8%) \n Grade 1-2 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 4 0 0 0 \n Grade 5 0 0 0 \ncl D.1 \n - Overall - \n - Any Grade - 64 (47.8%) 54 (40.3%) 68 (51.5%) \n Grade 1-2 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n Grade 3-4 22 (16.4%) 22 (16.4%) 22 (16.7%) \n 3 22 (16.4%) 22 (16.4%) 22 (16.7%) \n 4 0 0 0 \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.1.1 \n - Any Grade - 42 (31.3%) 32 (23.9%) 46 (34.8%) \n Grade 1-2 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 \n - Any Grade - 38 (28.4%) 34 (25.4%) 40 (30.3%) \n Grade 1-2 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n Grade 3-4 38 (28.4%) 34 (25.4%) 40 (30.3%) \n 3 38 (28.4%) 34 (25.4%) 40 (30.3%) \n 4 0 0 0 \n Grade 5 0 0 0 \ncl D.2 \n - Overall - \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 2 0 0 0 \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 0 0 0 \n dcd D.2.1.5.3 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 2 0 0 0 \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 0 0 0 \ncl C.2 \n - Overall - \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 1 0 0 0 \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 0 0 0 \n dcd C.2.1.2.1 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 1 0 0 0 \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 0 0 0 \ncl B.1 \n - Overall - \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 1-2 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n dcd B.1.1.1.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 1-2 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n Grade 3-4 0 0 0 \n 3 0 0 0 \n 4 0 0 0 \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n - Overall - \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 1-2 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 3 0 0 0 \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 5 0 0 0 \n dcd C.1.1.1.3 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 1-2 0 0 0 \n 1 0 0 0 \n 2 0 0 0 \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 3 0 0 0 \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 5 0 0 0 \n\n\n\n\n\nCodegrade_groups_1 <- list(\n \"Grade 1-2\" = c(\"1\", \"2\"),\n \"Grade 3-5\" = c(\"3\", \"4\", \"5\")\n)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n var = \"TOTAL_VAR\",\n label_pos = \"hidden\",\n child_labels = \"visible\",\n indent_mod = -1L\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\",\n .indent_mods = 7L\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = grade_groups_1,\n .indent_mods = 6L\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = drop_split_levels,\n split_label = var_labels(adae)[[\"AEBODSYS\"]],\n label_pos = \"topleft\"\n ) %>%\n split_rows_by(\n \"AEDECOD\",\n child_labels = \"visible\",\n split_fun = add_overall_level(\"- Overall -\", trim = TRUE),\n split_label = var_labels(adae)[[\"AEDECOD\"]],\n label_pos = \"topleft\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\",\n .indent_mods = 6L\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = grade_groups_1,\n .indent_mods = 5L\n ) %>%\n append_topleft(\" Grade\")\n\nresult <- lyt %>%\n build_table(adae, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = \"AEBODSYS\",\n scorefun = score_all_sum,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_all_sum,\n decreasing = TRUE\n )\n\nresult\n\nMedDRA System Organ Class \n MedDRA Preferred Term A: Drug X B: Placebo C: Combination\n Grade (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————\n- Any adverse events - \n - Any Grade - 100 (74.6%) 98 (73.1%) 103 (78.0%) \n Grade 1-2 10 (7.5%) 15 (11.2%) 10 (7.6%) \n 1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n 2 5 (3.7%) 8 (6.0%) 6 (4.5%) \n Grade 3-5 90 (67.2%) 83 (61.9%) 93 (70.5%) \n 3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n 4 13 (9.7%) 18 (13.4%) 15 (11.4%) \n 5 64 (47.8%) 52 (38.8%) 64 (48.5%) \ncl A.1 \n - Overall - \n - Any Grade - 68 (50.7%) 58 (43.3%) 76 (57.6%) \n Grade 1-2 68 (50.7%) 58 (43.3%) 76 (57.6%) \n 1 27 (20.1%) 19 (14.2%) 34 (25.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n dcd A.1.1.1.1 \n - Any Grade - 45 (33.6%) 31 (23.1%) 52 (39.4%) \n Grade 1-2 45 (33.6%) 31 (23.1%) 52 (39.4%) \n 1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 \n - Any Grade - 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 1-2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n - Overall - \n - Any Grade - 62 (46.3%) 56 (41.8%) 74 (56.1%) \n Grade 1-2 23 (17.2%) 22 (16.4%) 28 (21.2%) \n 1 23 (17.2%) 22 (16.4%) 28 (21.2%) \n Grade 3-5 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \n dcd B.2.2.3.1 \n - Any Grade - 38 (28.4%) 40 (29.9%) 45 (34.1%) \n Grade 1-2 38 (28.4%) 40 (29.9%) 45 (34.1%) \n 1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 \n - Any Grade - 39 (29.1%) 34 (25.4%) 46 (34.8%) \n Grade 3-5 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n - Overall - \n - Any Grade - 64 (47.8%) 54 (40.3%) 68 (51.5%) \n Grade 3-5 64 (47.8%) 54 (40.3%) 68 (51.5%) \n 3 22 (16.4%) 22 (16.4%) 22 (16.7%) \n 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.1.1 \n - Any Grade - 42 (31.3%) 32 (23.9%) 46 (34.8%) \n Grade 3-5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 \n - Any Grade - 38 (28.4%) 34 (25.4%) 40 (30.3%) \n Grade 3-5 38 (28.4%) 34 (25.4%) 40 (30.3%) \n 3 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n - Overall - \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \n dcd D.2.1.5.3 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n - Overall - \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n dcd C.2.1.2.1 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n - Overall - \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 3-5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n dcd B.1.1.1.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 3-5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n - Overall - \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-5 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n dcd C.1.1.1.3 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-5 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCode# No Worst Grade Flags found in the ADAE data set.\n\n\n\n\n\nCode# Simple wrapper to return subset ADAE to a threshold of xx%.\nget_adae_trimmed <- function(adsl, adae, cutoff_rate) {\n n_per_arm <- adsl %>%\n dplyr::count(ACTARM)\n\n anl_terms <- adae %>%\n dplyr::group_by(ACTARM, AEBODSYS, AEDECOD) %>%\n dplyr::count(\n unique_terms = n_distinct(USUBJID)\n ) %>%\n dplyr::select(-n) %>%\n dplyr::ungroup()\n\n anl_terms <- dplyr::left_join(\n anl_terms,\n n_per_arm,\n by = \"ACTARM\"\n ) %>%\n dplyr::mutate(\n ae_rate = unique_terms / n\n ) %>%\n dplyr::filter(ae_rate >= cutoff_rate) %>%\n dplyr::select(AEDECOD) %>%\n unique()\n\n anl <- dplyr::left_join(\n anl_terms,\n adae,\n by = \"AEDECOD\"\n )\n anl\n}\n\nadae6 <- get_adae_trimmed(adsl, adae, cutoff_rate = 0.4)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\") %>%\n split_rows_by(\n var = \"TOTAL_VAR\",\n label_pos = \"hidden\",\n child_labels = \"visible\",\n indent_mod = -1L\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\",\n .indent_mods = 7L\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = grade_groups,\n .indent_mods = 6L\n ) %>%\n split_rows_by(\n \"AEBODSYS\",\n child_labels = \"visible\",\n nested = FALSE,\n split_fun = drop_split_levels,\n split_label = var_labels(adae)[[\"AEBODSYS\"]],\n label_pos = \"topleft\"\n ) %>%\n split_rows_by(\n \"AEDECOD\",\n child_labels = \"visible\",\n split_fun = add_overall_level(\"- Overall -\", trim = TRUE),\n split_label = var_labels(adae)[[\"AEDECOD\"]],\n label_pos = \"topleft\"\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"- Any Grade -\",\n .indent_mods = 6L\n ) %>%\n count_occurrences_by_grade(\n var = \"AETOXGR\",\n grade_groups = grade_groups,\n .indent_mods = 5L\n ) %>%\n append_topleft(\" Grade\")\n\nresult <- lyt %>%\n build_table(adae6, alt_counts_df = adsl) %>%\n prune_table() %>%\n sort_at_path(\n path = \"AEBODSYS\",\n scorefun = score_all_sum,\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_all_sum,\n decreasing = TRUE\n )\n\nresult\n\nMedDRA System Organ Class \n MedDRA Preferred Term A: Drug X B: Placebo C: Combination\n Grade (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————\n- Any adverse events - \n - Any Grade - 100 (74.6%) 98 (73.1%) 103 (78.0%) \n Grade 1-2 10 (7.5%) 15 (11.2%) 10 (7.6%) \n 1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n 2 5 (3.7%) 8 (6.0%) 6 (4.5%) \n Grade 3-4 26 (19.4%) 31 (23.1%) 29 (22.0%) \n 3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n 4 13 (9.7%) 18 (13.4%) 15 (11.4%) \n Grade 5 64 (47.8%) 52 (38.8%) 64 (48.5%) \ncl A.1 \n - Overall - \n - Any Grade - 68 (50.7%) 58 (43.3%) 76 (57.6%) \n Grade 1-2 68 (50.7%) 58 (43.3%) 76 (57.6%) \n 1 27 (20.1%) 19 (14.2%) 34 (25.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n dcd A.1.1.1.1 \n - Any Grade - 45 (33.6%) 31 (23.1%) 52 (39.4%) \n Grade 1-2 45 (33.6%) 31 (23.1%) 52 (39.4%) \n 1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 \n - Any Grade - 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 1-2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n - Overall - \n - Any Grade - 62 (46.3%) 56 (41.8%) 74 (56.1%) \n Grade 1-2 23 (17.2%) 22 (16.4%) 28 (21.2%) \n 1 23 (17.2%) 22 (16.4%) 28 (21.2%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \n dcd B.2.2.3.1 \n - Any Grade - 38 (28.4%) 40 (29.9%) 45 (34.1%) \n Grade 1-2 38 (28.4%) 40 (29.9%) 45 (34.1%) \n 1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 \n - Any Grade - 39 (29.1%) 34 (25.4%) 46 (34.8%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n - Overall - \n - Any Grade - 64 (47.8%) 54 (40.3%) 68 (51.5%) \n Grade 3-4 22 (16.4%) 22 (16.4%) 22 (16.7%) \n 3 22 (16.4%) 22 (16.4%) 22 (16.7%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.1.1 \n - Any Grade - 42 (31.3%) 32 (23.9%) 46 (34.8%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 \n - Any Grade - 38 (28.4%) 34 (25.4%) 40 (30.3%) \n Grade 3-4 38 (28.4%) 34 (25.4%) 40 (30.3%) \n 3 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n - Overall - \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \n dcd D.2.1.5.3 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n - Overall - \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n dcd C.2.1.2.1 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n - Overall - \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n dcd B.1.1.1.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n - Overall - \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n dcd C.1.1.1.3 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCode# Variant 7 was not created.\n# With this variant, the SOC level is not trimmed (even if there are no terms left).\n\n\n\n\n\nCodecutoff <- 58L\nrow_condition <- has_count_in_any_col(atleast = cutoff, col_names = levels(adsl$ACTARM))\n\nresult <- prune_table(raw_table, keep_content_rows(my_row_condition(row_condition)))\n\nresult\n\nMedDRA System Organ Class \n MedDRA Preferred Term A: Drug X B: Placebo C: Combination\n Grade (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————\n- Any adverse events - \n - Any Grade - 100 (74.6%) 98 (73.1%) 103 (78.0%) \n Grade 1-2 10 (7.5%) 15 (11.2%) 10 (7.6%) \n 1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n 2 5 (3.7%) 8 (6.0%) 6 (4.5%) \n Grade 3-4 26 (19.4%) 31 (23.1%) 29 (22.0%) \n 3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n 4 13 (9.7%) 18 (13.4%) 15 (11.4%) \n Grade 5 64 (47.8%) 52 (38.8%) 64 (48.5%) \ncl A.1 \n - Overall - \n - Any Grade - 68 (50.7%) 58 (43.3%) 76 (57.6%) \n Grade 1-2 68 (50.7%) 58 (43.3%) 76 (57.6%) \n 1 27 (20.1%) 19 (14.2%) 34 (25.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n dcd A.1.1.1.1 \n - Any Grade - 45 (33.6%) 31 (23.1%) 52 (39.4%) \n Grade 1-2 45 (33.6%) 31 (23.1%) 52 (39.4%) \n 1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 \n - Any Grade - 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 1-2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n - Overall - \n - Any Grade - 62 (46.3%) 56 (41.8%) 74 (56.1%) \n Grade 1-2 23 (17.2%) 22 (16.4%) 28 (21.2%) \n 1 23 (17.2%) 22 (16.4%) 28 (21.2%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \n dcd B.2.2.3.1 \n - Any Grade - 38 (28.4%) 40 (29.9%) 45 (34.1%) \n Grade 1-2 38 (28.4%) 40 (29.9%) 45 (34.1%) \n 1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 \n - Any Grade - 39 (29.1%) 34 (25.4%) 46 (34.8%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n - Overall - \n - Any Grade - 64 (47.8%) 54 (40.3%) 68 (51.5%) \n Grade 3-4 22 (16.4%) 22 (16.4%) 22 (16.7%) \n 3 22 (16.4%) 22 (16.4%) 22 (16.7%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.1.1 \n - Any Grade - 42 (31.3%) 32 (23.9%) 46 (34.8%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 \n - Any Grade - 38 (28.4%) 34 (25.4%) 40 (30.3%) \n Grade 3-4 38 (28.4%) 34 (25.4%) 40 (30.3%) \n 3 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n - Overall - \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \n dcd D.2.1.5.3 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n - Overall - \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n dcd C.2.1.2.1 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n - Overall - \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n dcd B.1.1.1.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n - Overall - \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n dcd C.1.1.1.3 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCodecutoff <- 0.1\nrow_condition <- has_fractions_difference(atleast = cutoff, col_names = levels(adsl$ACTARM))\n\nresult <- prune_table(raw_table, keep_content_rows(my_row_condition(row_condition)))\n\nresult\n\nMedDRA System Organ Class \n MedDRA Preferred Term A: Drug X B: Placebo C: Combination\n Grade (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————\n- Any adverse events - \n - Any Grade - 100 (74.6%) 98 (73.1%) 103 (78.0%) \n Grade 1-2 10 (7.5%) 15 (11.2%) 10 (7.6%) \n 1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n 2 5 (3.7%) 8 (6.0%) 6 (4.5%) \n Grade 3-4 26 (19.4%) 31 (23.1%) 29 (22.0%) \n 3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n 4 13 (9.7%) 18 (13.4%) 15 (11.4%) \n Grade 5 64 (47.8%) 52 (38.8%) 64 (48.5%) \ncl A.1 \n - Overall - \n - Any Grade - 68 (50.7%) 58 (43.3%) 76 (57.6%) \n Grade 1-2 68 (50.7%) 58 (43.3%) 76 (57.6%) \n 1 27 (20.1%) 19 (14.2%) 34 (25.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n dcd A.1.1.1.1 \n - Any Grade - 45 (33.6%) 31 (23.1%) 52 (39.4%) \n Grade 1-2 45 (33.6%) 31 (23.1%) 52 (39.4%) \n 1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 \n - Any Grade - 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 1-2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n - Overall - \n - Any Grade - 62 (46.3%) 56 (41.8%) 74 (56.1%) \n Grade 1-2 23 (17.2%) 22 (16.4%) 28 (21.2%) \n 1 23 (17.2%) 22 (16.4%) 28 (21.2%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \n dcd B.2.2.3.1 \n - Any Grade - 38 (28.4%) 40 (29.9%) 45 (34.1%) \n Grade 1-2 38 (28.4%) 40 (29.9%) 45 (34.1%) \n 1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 \n - Any Grade - 39 (29.1%) 34 (25.4%) 46 (34.8%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n - Overall - \n - Any Grade - 64 (47.8%) 54 (40.3%) 68 (51.5%) \n Grade 3-4 22 (16.4%) 22 (16.4%) 22 (16.7%) \n 3 22 (16.4%) 22 (16.4%) 22 (16.7%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.1.1 \n - Any Grade - 42 (31.3%) 32 (23.9%) 46 (34.8%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 \n - Any Grade - 38 (28.4%) 34 (25.4%) 40 (30.3%) \n Grade 3-4 38 (28.4%) 34 (25.4%) 40 (30.3%) \n 3 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n - Overall - \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \n dcd D.2.1.5.3 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n - Overall - \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n dcd C.2.1.2.1 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n - Overall - \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n dcd B.1.1.1.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n - Overall - \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n dcd C.1.1.1.3 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCode# Variant 10 was not done\n# With this variant, SOC levels above the threshold are still in the table even if\n# there are no terms left.\n\n\n\n\n\nCodecutoff <- 0.4\nrow_condition <- has_fraction_in_any_col(atleast = cutoff, col_names = levels(adsl$ACTARM))\n\nresult <- prune_table(raw_table, keep_content_rows(my_row_condition(row_condition)))\n\nresult\n\nMedDRA System Organ Class \n MedDRA Preferred Term A: Drug X B: Placebo C: Combination\n Grade (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————\n- Any adverse events - \n - Any Grade - 100 (74.6%) 98 (73.1%) 103 (78.0%) \n Grade 1-2 10 (7.5%) 15 (11.2%) 10 (7.6%) \n 1 5 (3.7%) 7 (5.2%) 4 (3.0%) \n 2 5 (3.7%) 8 (6.0%) 6 (4.5%) \n Grade 3-4 26 (19.4%) 31 (23.1%) 29 (22.0%) \n 3 13 (9.7%) 13 (9.7%) 14 (10.6%) \n 4 13 (9.7%) 18 (13.4%) 15 (11.4%) \n Grade 5 64 (47.8%) 52 (38.8%) 64 (48.5%) \ncl A.1 \n - Overall - \n - Any Grade - 68 (50.7%) 58 (43.3%) 76 (57.6%) \n Grade 1-2 68 (50.7%) 58 (43.3%) 76 (57.6%) \n 1 27 (20.1%) 19 (14.2%) 34 (25.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n dcd A.1.1.1.1 \n - Any Grade - 45 (33.6%) 31 (23.1%) 52 (39.4%) \n Grade 1-2 45 (33.6%) 31 (23.1%) 52 (39.4%) \n 1 45 (33.6%) 31 (23.1%) 52 (39.4%) \n dcd A.1.1.1.2 \n - Any Grade - 41 (30.6%) 39 (29.1%) 42 (31.8%) \n Grade 1-2 41 (30.6%) 39 (29.1%) 42 (31.8%) \n 2 41 (30.6%) 39 (29.1%) 42 (31.8%) \ncl B.2 \n - Overall - \n - Any Grade - 62 (46.3%) 56 (41.8%) 74 (56.1%) \n Grade 1-2 23 (17.2%) 22 (16.4%) 28 (21.2%) \n 1 23 (17.2%) 22 (16.4%) 28 (21.2%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \n dcd B.2.2.3.1 \n - Any Grade - 38 (28.4%) 40 (29.9%) 45 (34.1%) \n Grade 1-2 38 (28.4%) 40 (29.9%) 45 (34.1%) \n 1 38 (28.4%) 40 (29.9%) 45 (34.1%) \n dcd B.2.1.2.1 \n - Any Grade - 39 (29.1%) 34 (25.4%) 46 (34.8%) \n Grade 3-4 39 (29.1%) 34 (25.4%) 46 (34.8%) \n 3 39 (29.1%) 34 (25.4%) 46 (34.8%) \ncl D.1 \n - Overall - \n - Any Grade - 64 (47.8%) 54 (40.3%) 68 (51.5%) \n Grade 3-4 22 (16.4%) 22 (16.4%) 22 (16.7%) \n 3 22 (16.4%) 22 (16.4%) 22 (16.7%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.1.1 \n - Any Grade - 42 (31.3%) 32 (23.9%) 46 (34.8%) \n Grade 5 42 (31.3%) 32 (23.9%) 46 (34.8%) \n dcd D.1.1.4.2 \n - Any Grade - 38 (28.4%) 34 (25.4%) 40 (30.3%) \n Grade 3-4 38 (28.4%) 34 (25.4%) 40 (30.3%) \n 3 38 (28.4%) 34 (25.4%) 40 (30.3%) \ncl D.2 \n - Overall - \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \n dcd D.2.1.5.3 \n - Any Grade - 37 (27.6%) 46 (34.3%) 50 (37.9%) \n Grade 1-2 37 (27.6%) 46 (34.3%) 50 (37.9%) \n 1 37 (27.6%) 46 (34.3%) 50 (37.9%) \ncl C.2 \n - Overall - \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n dcd C.2.1.2.1 \n - Any Grade - 28 (20.9%) 36 (26.9%) 48 (36.4%) \n Grade 1-2 28 (20.9%) 36 (26.9%) 48 (36.4%) \n 2 28 (20.9%) 36 (26.9%) 48 (36.4%) \ncl B.1 \n - Overall - \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \n dcd B.1.1.1.1 \n - Any Grade - 38 (28.4%) 37 (27.6%) 36 (27.3%) \n Grade 5 38 (28.4%) 37 (27.6%) 36 (27.3%) \ncl C.1 \n - Overall - \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n dcd C.1.1.1.3 \n - Any Grade - 36 (26.9%) 34 (25.4%) 36 (27.3%) \n Grade 3-4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n 4 36 (26.9%) 34 (25.4%) 36 (27.3%) \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n cdisc_dataset(\"ADAE\", adae),\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")',\n check = TRUE\n ),\n modules = modules(\n tm_t_events_by_grade(\n label = \"Adverse Events by Grade Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n llt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\")),\n selected = c(\"AEDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(adae, c(\"AEBODSYS\", \"AESOC\")),\n selected = \"AEBODSYS\"\n ),\n grade = choices_selected(\n choices = variable_choices(adae, c(\"AETOXGR\", \"AESEV\")),\n selected = \"AETOXGR\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:31:27.0470 pid:11846 token:[] teal.modules.clinical Initializing tm_t_events_by_grade\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] scda_0.1.6.9010 tern_0.8.5.9006 \n [9] rtables_0.6.2.9001 magrittr_2.0.3 \n[11] formatters_0.5.1.9001 dplyr_1.1.2 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet04.lock'.\n\n\nDownload" }, { "objectID": "tables/adverse-events/aet04_pi.html", "href": "tables/adverse-events/aet04_pi.html", "title": "AET04_PI", "section": "", - "text": "Data Setup\nStandard Table\nTable with Patients Treated with a Particular Treatment by Highest NCI CTCAE Grade (specifying a treatment for selecting preferred terms)\nAdverse Events Reported in \\(\\geq\\) 5% of Patients by Highest NCI CTCAE Grade (changing the threshold)\nAdverse Events Reported in \\(\\geq\\) 5% of Patients and \\(\\geq\\) 2% Difference Between Treatments by Highest NCI CTCAE Grade (using more than one condition)\nAdverse Events Reported in \\(\\geq\\) 10% of Patients for Any Grade or \\(\\geq\\) 5% of Patients for Grade 3-4 by Highest NCI CTCAE Grade (using different condition depending on the grade)\nStandard Table with Modified Grade Grouping\nStandard Table with Overlapping Grade Groupings\nStandard Table without SOCs\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\npreprocess_adae <- function(adae) {\n adae %>%\n dplyr::group_by(ACTARM, USUBJID, AEBODSYS, AEDECOD) %>%\n dplyr::summarize(\n MAXAETOXGR = max(as.numeric(AETOXGR)),\n .groups = \"drop\"\n ) %>%\n dplyr::ungroup() %>%\n dplyr::mutate(\n MAXAETOXGR = factor(MAXAETOXGR),\n AEDECOD = droplevels(as.factor(AEDECOD))\n )\n}\n\nfull_table_aet04_pi <- function(adsl, adae_max) {\n grade_groups <- list(\n \"Any Grade (%)\" = c(\"1\", \"2\", \"3\", \"4\", \"5\"),\n \"Grade 3-4 (%)\" = c(\"3\", \"4\"),\n \"Grade 5 (%)\" = \"5\"\n )\n\n col_counts <- rep(table(adsl$ACTARM), each = length(grade_groups))\n basic_table() %>%\n split_cols_by(\"ACTARM\") %>%\n split_cols_by_groups(\"MAXAETOXGR\", groups = grade_groups) %>%\n split_rows_by(\"AEBODSYS\",\n child_labels = \"visible\", nested = FALSE, indent_mod = -1L,\n split_fun = trim_levels_in_group(\"AEDECOD\")\n ) %>%\n append_topleft(\"MedDRA System Organ Class\") %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n summarize_vars(\n \"AEDECOD\",\n na.rm = FALSE,\n denom = \"N_col\",\n .stats = \"count_fraction\",\n .formats = c(count_fraction = format_fraction_threshold(0.01))\n ) %>%\n append_topleft(\" MedDRA Preferred Term\") %>%\n build_table(adae_max, col_counts = col_counts)\n}\n\ncriteria_fun <- function(tr) {\n is(tr, \"ContentRow\")\n}\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae_max <- synthetic_cdisc_dataset(\"latest\", \"adae\") %>%\n preprocess_adae() %>%\n df_explicit_na()\n\n\n\n\n\nCodefull_table <- full_table_aet04_pi(adsl, adae_max) %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = score_occurrences_cont_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n )\n\nat_least_10percent_any <- has_fraction_in_any_col(atleast = 0.1, col_indices = c(1, 4, 7))\n\nresult <- full_table %>%\n trim_rows(criteria = criteria_fun) %>%\n prune_table(keep_rows(at_least_10percent_any))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination \n MedDRA Preferred Term Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\ncl A.1 \ndcd A.1.1.1.1 37 0 0 34 0 0 48 0 0 \ndcd A.1.1.1.2 36 0 0 36 0 0 38 0 0 \ncl B.2 \ndcd B.2.2.3.1 36 0 0 40 0 0 39 0 0 \ndcd B.2.1.2.1 37 37 0 33 33 0 39 39 0 \ncl D.1 \ndcd D.1.1.1.1 37 0 37 31 0 31 39 0 39 \ndcd D.1.1.4.2 36 36 0 31 31 0 38 38 0 \ncl D.2 \ndcd D.2.1.5.3 35 0 0 43 0 0 43 0 0 \ncl B.1 \ndcd B.1.1.1.1 35 0 35 37 0 37 33 0 33 \ncl C.2 \ndcd C.2.1.2.1 26 0 0 36 0 0 42 0 0 \ncl C.1 \ndcd C.1.1.1.3 32 32 0 34 34 0 33 33 0 \n\n\n\n\nNote: User needs to specify the column index for filtering the table. The current example uses the “Any Grade” column for treatment A: Drug X with a filtering threshold at 0.37; AEs reported in greater than 37% of patients in treatment A: Drug X are shown. This can be changed by varying the parameter values in the has_fraction_in_cols function.\n\nCodefull_table <- full_table_aet04_pi(adsl, adae_max) %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = score_occurrences_cont_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n )\n\nat_least_37percent_any_drugx <- has_fraction_in_cols(atleast = 0.37, col_indices = 1)\n\nresult <- full_table %>%\n trim_rows(criteria = criteria_fun) %>%\n prune_table(keep_rows(at_least_37percent_any_drugx))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination \n MedDRA Preferred Term Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\ncl A.1 \ndcd A.1.1.1.1 37 0 0 34 0 0 48 0 0 \ncl D.1 \ndcd D.1.1.1.1 37 0 37 31 0 31 39 0 39 \n\n\n\n\nNote: User needs to specify the column index for filtering the table. The current example uses column indices 1, 4, and 7 with a filtering threshold at 0.40 to demonstrate the filtering ability; AEs reported in greater than 40% of patients are shown. This can be changed by varying the parameter values in the has_fraction_in_any_col function.\n\nCodefull_table <- full_table_aet04_pi(adsl, adae_max) %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = score_occurrences_cont_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n )\n\nat_least_40percent_any <- has_fraction_in_any_col(atleast = 0.40, col_indices = c(1, 4, 7))\n\nresult <- full_table %>%\n trim_rows(criteria = criteria_fun) %>%\n prune_table(keep_rows(at_least_40percent_any))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination \n MedDRA Preferred Term Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\ncl A.1 \ndcd A.1.1.1.1 37 0 0 34 0 0 48 0 0 \ncl B.2 \ndcd B.2.2.3.1 36 0 0 40 0 0 39 0 0 \ncl D.2 \ndcd D.2.1.5.3 35 0 0 43 0 0 43 0 0 \ncl C.2 \ndcd C.2.1.2.1 26 0 0 36 0 0 42 0 0 \n\n\n\n\nNote: User needs to specify the column index for filtering the table. The current example uses column indices 1, 4, and 7 to filter for AEs reported in \\(\\geq\\) 30% of patients and AEs reported with a \\(\\geq\\) 15% difference between treatments to demonstrate the filtering ability; this can be changed by varying the parameter values in the has_fraction_in_any_col and has_fractions_difference functions.\n\nCodefull_table <- full_table_aet04_pi(adsl, adae_max) %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = score_occurrences_cont_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n )\n\nat_least_30percent_any <- has_fraction_in_any_col(atleast = 0.3, col_indices = c(1, 4, 7))\n\nat_least_15percent_diff <- has_fractions_difference(atleast = 0.15, col_indices = c(1, 4, 7))\n\nresult <- full_table %>%\n trim_rows(criteria = criteria_fun) %>%\n prune_table(keep_rows(at_least_30percent_any & at_least_15percent_diff))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination \n MedDRA Preferred Term Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\ncl C.2 \ndcd C.2.1.2.1 26 0 0 36 0 0 42 0 0 \n\n\n\n\nNote: User needs to specify the column index for filtering the table. The current example filters using column indices 1, 4, and 7 to include AEs reported in \\(\\geq\\) 40% of patients and using column indices 2, 5, and 8 to include grade 3-4 AEs reported in \\(\\geq\\) 20% of patients. These thresholds are chosen to demonstrate the filtering ability; they can be changed by varying parameter values in the has_fraction_in_any_col function.\n\nCodefull_table <- full_table_aet04_pi(adsl, adae_max) %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = score_occurrences_cont_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n )\n\nat_least_40percent_any <- has_fraction_in_any_col(atleast = 0.4, col_indices = c(1, 4, 7))\n\nat_least_20percent_g34 <- has_fraction_in_any_col(atleast = 0.20, col_indices = c(2, 5, 8))\n\nresult <- full_table %>%\n trim_rows(criteria = criteria_fun) %>%\n prune_table(keep_rows(at_least_40percent_any | at_least_20percent_g34))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination \n MedDRA Preferred Term Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\ncl A.1 \ndcd A.1.1.1.1 37 0 0 34 0 0 48 0 0 \ncl B.2 \ndcd B.2.2.3.1 36 0 0 40 0 0 39 0 0 \ndcd B.2.1.2.1 37 37 0 33 33 0 39 39 0 \ncl D.1 \ndcd D.1.1.4.2 36 36 0 31 31 0 38 38 0 \ncl D.2 \ndcd D.2.1.5.3 35 0 0 43 0 0 43 0 0 \ncl C.2 \ndcd C.2.1.2.1 26 0 0 36 0 0 42 0 0 \ncl C.1 \ndcd C.1.1.1.3 32 32 0 34 34 0 33 33 0 \n\n\n\n\nNote: User can specify/modify the grouping of grades, as shown in this example. In addition, the user needs to specify the column index for filtering the table. The current example uses the “Any Grade” columns with a filtering threshold at 0.40; this can be changed by varying the parameter values in the has_fraction_in_any_col function.\n\nCodegrade_groups <- list(\n \"Any Grade (%)\" = c(\"1\", \"2\", \"3\", \"4\", \"5\"),\n \"Grade 1-2 (%)\" = c(\"1\", \"2\"),\n \"Grade 3-4 (%)\" = c(\"3\", \"4\"),\n \"Grade 5 (%)\" = \"5\"\n)\n\ncol_counts <- rep(table(adsl$ACTARM), each = length(grade_groups))\n\nfull_table <- basic_table() %>%\n split_cols_by(\"ACTARM\") %>%\n split_cols_by_groups(\"MAXAETOXGR\", groups = grade_groups) %>%\n split_rows_by(\"AEBODSYS\",\n child_labels = \"visible\", nested = FALSE, indent_mod = -1L,\n split_fun = trim_levels_in_group(\"AEDECOD\")\n ) %>%\n append_topleft(\"MedDRA System Organ Class\") %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n summarize_vars(\n \"AEDECOD\",\n na.rm = FALSE,\n denom = \"N_col\",\n .stats = \"count_fraction\",\n .formats = c(count_fraction = format_fraction_threshold(0.01))\n ) %>%\n append_topleft(\" MedDRA Preferred Term\") %>%\n build_table(adae_max, col_counts = col_counts) %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = score_occurrences_cont_cols(col_indices = c(1, 5, 9)),\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences_cols(col_indices = c(1, 5, 9)),\n decreasing = TRUE\n )\n\nat_least_40percent_any <- has_fraction_in_any_col(atleast = 0.4, col_indices = c(1, 5, 9))\n\nresult <- full_table %>%\n trim_rows(criteria = criteria_fun) %>%\n prune_table(keep_rows(at_least_40percent_any))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination \n MedDRA Preferred Term Any Grade (%) Grade 1-2 (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 1-2 (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 1-2 (%) Grade 3-4 (%) Grade 5 (%)\n (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\ncl A.1 \ndcd A.1.1.1.1 37 37 0 0 34 34 0 0 48 48 0 0 \ncl B.2 \ndcd B.2.2.3.1 36 36 0 0 40 40 0 0 39 39 0 0 \ncl D.2 \ndcd D.2.1.5.3 35 35 0 0 43 43 0 0 43 43 0 0 \ncl C.2 \ndcd C.2.1.2.1 26 26 0 0 36 36 0 0 42 42 0 0 \n\n\n\n\nNote: User needs to specify the column index for filtering the table. The current example uses column indices 1, 5, and 9 with a filtering threshold at 0.40 to demonstrate the filtering ability; any grade AEs reported in greater than 40% of patients are shown. This can be changed by varying the parameter values in the has_fraction_in_any_col function.\n\nCodegrade_groups <- list(\n \"Any Grade (%)\" = c(\"1\", \"2\", \"3\", \"4\", \"5\"),\n \"Grade 3-4 (%)\" = c(\"3\", \"4\"),\n \"Grade 3-5 (%)\" = c(\"3\", \"4\", \"5\"),\n \"Grade 5 (%)\" = \"5\"\n)\n\ncol_counts <- rep(table(adsl$ACTARM), each = length(grade_groups))\nfull_table <- basic_table() %>%\n split_cols_by(\"ACTARM\") %>%\n split_cols_by_groups(\"MAXAETOXGR\", groups = grade_groups) %>%\n split_rows_by(\"AEBODSYS\",\n child_labels = \"visible\", nested = FALSE, indent_mod = -1L,\n split_fun = trim_levels_in_group(\"AEDECOD\")\n ) %>%\n append_topleft(\"MedDRA System Organ Class\") %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n summarize_vars(\n \"AEDECOD\",\n na.rm = FALSE,\n denom = \"N_col\",\n .stats = \"count_fraction\",\n .formats = c(count_fraction = format_fraction_threshold(0.01))\n ) %>%\n append_topleft(\" MedDRA Preferred Term\") %>%\n build_table(adae_max, col_counts = col_counts) %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = score_occurrences_cont_cols(col_indices = c(1, 5, 9)),\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences_cols(col_indices = c(1, 5, 9)),\n decreasing = TRUE\n )\n\nat_least_40percent_any <- has_fraction_in_any_col(atleast = 0.4, col_indices = c(1, 5, 9))\n\nresult <- full_table %>%\n trim_rows(criteria = criteria_fun) %>%\n prune_table(keep_rows(at_least_40percent_any))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination \n MedDRA Preferred Term Any Grade (%) Grade 3-4 (%) Grade 3-5 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 3-5 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 3-5 (%) Grade 5 (%)\n (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\ncl A.1 \ndcd A.1.1.1.1 37 0 0 0 34 0 0 0 48 0 0 0 \ncl B.2 \ndcd B.2.2.3.1 36 0 0 0 40 0 0 0 39 0 0 0 \ncl D.2 \ndcd D.2.1.5.3 35 0 0 0 43 0 0 0 43 0 0 0 \ncl C.2 \ndcd C.2.1.2.1 26 0 0 0 36 0 0 0 42 0 0 0 \n\n\n\n\nNote: User needs to specify the column index for filtering the table. The current example uses column indices 1, 4, and 7 with a filtering threshold at 0.20 to demonstrate the filtering ability; any grade AEs (Preferred Terms Only) reported in greater than 20% of patients are shown. This can be changed by varying the parameter values in the has_fraction_in_any_col function.\n\nCodegrade_groups <- list(\n \"Any Grade (%)\" = c(\"1\", \"2\", \"3\", \"4\", \"5\"),\n \"Grade 3-4 (%)\" = c(\"3\", \"4\"),\n \"Grade 5 (%)\" = \"5\"\n)\n\ncol_counts <- rep(table(adsl$ACTARM), each = length(grade_groups))\n\nfull_table <- basic_table() %>%\n split_cols_by(\"ACTARM\") %>%\n split_cols_by_groups(\"MAXAETOXGR\", groups = grade_groups) %>%\n summarize_vars(\n \"AEDECOD\",\n na.rm = FALSE,\n denom = \"N_col\",\n .stats = \"count_fraction\",\n .formats = c(count_fraction = format_fraction_threshold(0.01))\n ) %>%\n append_topleft(\"MedDRA Preferred Term\") %>%\n build_table(adae_max, col_counts = col_counts)\n\nat_least_20percent_any <- has_fraction_in_any_col(atleast = 0.2, col_indices = c(1, 4, 7))\n\nresult <- full_table %>%\n prune_table(keep_rows(at_least_20percent_any)) %>%\n sort_at_path(\n path = c(\"AEDECOD\"),\n scorefun = score_occurrences_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n )\n\nresult\n\nMedDRA Preferred Term A: Drug X B: Placebo C: Combination \n Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\ndcd D.2.1.5.3 35 0 0 43 0 0 43 0 0 \ndcd A.1.1.1.1 37 0 0 34 0 0 48 0 0 \ndcd B.2.2.3.1 36 0 0 40 0 0 39 0 0 \ndcd A.1.1.1.2 36 0 0 36 0 0 38 0 0 \ndcd B.2.1.2.1 37 37 0 33 33 0 39 39 0 \ndcd D.1.1.1.1 37 0 37 31 0 31 39 0 39 \ndcd D.1.1.4.2 36 36 0 31 31 0 38 38 0 \ndcd B.1.1.1.1 35 0 35 37 0 37 33 0 33 \ndcd C.2.1.2.1 26 0 0 36 0 0 42 0 0 \ndcd C.1.1.1.3 32 32 0 34 34 0 33 33 0 \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n cdisc_dataset(\"ADAE\", adae),\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")',\n check = TRUE\n ),\n modules = modules(\n tm_t_events_by_grade(\n label = \"Adverse Events by Grade Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n col_by_grade = TRUE,\n llt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\")),\n selected = c(\"AEDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(adae, c(\"AEBODSYS\", \"AESOC\")),\n selected = \"AEBODSYS\"\n ),\n grade = choices_selected(\n choices = variable_choices(adae, c(\"AETOXGR\", \"AESEV\")),\n selected = \"AETOXGR\"\n ),\n # List of column groups for grades used when `col_by_grade` = TRUE.\n grading_groups = list(\n `Any Grade (%)` = c(\"1\", \"2\", \"3\", \"4\", \"5\"),\n `Grade 3-4 (%)` = c(\"3\", \"4\"),\n `Grade 5 (%)` = \"5\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:14:06.4444 pid:12055 token:[] teal.modules.clinical Initializing tm_t_events_by_grade\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] dplyr_1.1.2 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet04_pi.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable with Patients Treated with a Particular Treatment by Highest NCI CTCAE Grade (specifying a treatment for selecting preferred terms)\nAdverse Events Reported in \\(\\geq\\) 5% of Patients by Highest NCI CTCAE Grade (changing the threshold)\nAdverse Events Reported in \\(\\geq\\) 5% of Patients and \\(\\geq\\) 2% Difference Between Treatments by Highest NCI CTCAE Grade (using more than one condition)\nAdverse Events Reported in \\(\\geq\\) 10% of Patients for Any Grade or \\(\\geq\\) 5% of Patients for Grade 3-4 by Highest NCI CTCAE Grade (using different condition depending on the grade)\nStandard Table with Modified Grade Grouping\nStandard Table with Overlapping Grade Groupings\nStandard Table without SOCs\nTeal\nSession Info\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\npreprocess_adae <- function(adae) {\n adae %>%\n dplyr::group_by(ACTARM, USUBJID, AEBODSYS, AEDECOD) %>%\n dplyr::summarize(\n MAXAETOXGR = max(as.numeric(AETOXGR)),\n .groups = \"drop\"\n ) %>%\n dplyr::ungroup() %>%\n dplyr::mutate(\n MAXAETOXGR = factor(MAXAETOXGR),\n AEDECOD = droplevels(as.factor(AEDECOD))\n )\n}\n\nfull_table_aet04_pi <- function(adsl, adae_max) {\n grade_groups <- list(\n \"Any Grade (%)\" = c(\"1\", \"2\", \"3\", \"4\", \"5\"),\n \"Grade 3-4 (%)\" = c(\"3\", \"4\"),\n \"Grade 5 (%)\" = \"5\"\n )\n\n col_counts <- rep(table(adsl$ACTARM), each = length(grade_groups))\n basic_table() %>%\n split_cols_by(\"ACTARM\") %>%\n split_cols_by_groups(\"MAXAETOXGR\", groups = grade_groups) %>%\n split_rows_by(\"AEBODSYS\",\n child_labels = \"visible\", nested = FALSE, indent_mod = -1L,\n split_fun = trim_levels_in_group(\"AEDECOD\")\n ) %>%\n append_topleft(\"MedDRA System Organ Class\") %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n summarize_vars(\n \"AEDECOD\",\n na.rm = FALSE,\n denom = \"N_col\",\n .stats = \"count_fraction\",\n .formats = c(count_fraction = format_fraction_threshold(0.01))\n ) %>%\n append_topleft(\" MedDRA Preferred Term\") %>%\n build_table(adae_max, col_counts = col_counts)\n}\n\ncriteria_fun <- function(tr) {\n is(tr, \"ContentRow\")\n}\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae_max <- synthetic_cdisc_dataset(\"latest\", \"adae\") %>%\n preprocess_adae() %>%\n df_explicit_na()\n\n\n\n\n\nCodefull_table <- full_table_aet04_pi(adsl, adae_max) %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = score_occurrences_cont_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n )\n\nat_least_10percent_any <- has_fraction_in_any_col(atleast = 0.1, col_indices = c(1, 4, 7))\n\nresult <- full_table %>%\n trim_rows(criteria = criteria_fun) %>%\n prune_table(keep_rows(at_least_10percent_any))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination \n MedDRA Preferred Term Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\ncl A.1 \ndcd A.1.1.1.1 37 0 0 34 0 0 48 0 0 \ndcd A.1.1.1.2 36 0 0 36 0 0 38 0 0 \ncl B.2 \ndcd B.2.2.3.1 36 0 0 40 0 0 39 0 0 \ndcd B.2.1.2.1 37 37 0 33 33 0 39 39 0 \ncl D.1 \ndcd D.1.1.1.1 37 0 37 31 0 31 39 0 39 \ndcd D.1.1.4.2 36 36 0 31 31 0 38 38 0 \ncl D.2 \ndcd D.2.1.5.3 35 0 0 43 0 0 43 0 0 \ncl B.1 \ndcd B.1.1.1.1 35 0 35 37 0 37 33 0 33 \ncl C.2 \ndcd C.2.1.2.1 26 0 0 36 0 0 42 0 0 \ncl C.1 \ndcd C.1.1.1.3 32 32 0 34 34 0 33 33 0 \n\n\n\n\nNote: User needs to specify the column index for filtering the table. The current example uses the “Any Grade” column for treatment A: Drug X with a filtering threshold at 0.37; AEs reported in greater than 37% of patients in treatment A: Drug X are shown. This can be changed by varying the parameter values in the has_fraction_in_cols function.\n\nCodefull_table <- full_table_aet04_pi(adsl, adae_max) %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = score_occurrences_cont_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n )\n\nat_least_37percent_any_drugx <- has_fraction_in_cols(atleast = 0.37, col_indices = 1)\n\nresult <- full_table %>%\n trim_rows(criteria = criteria_fun) %>%\n prune_table(keep_rows(at_least_37percent_any_drugx))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination \n MedDRA Preferred Term Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\ncl A.1 \ndcd A.1.1.1.1 37 0 0 34 0 0 48 0 0 \ncl D.1 \ndcd D.1.1.1.1 37 0 37 31 0 31 39 0 39 \n\n\n\n\nNote: User needs to specify the column index for filtering the table. The current example uses column indices 1, 4, and 7 with a filtering threshold at 0.40 to demonstrate the filtering ability; AEs reported in greater than 40% of patients are shown. This can be changed by varying the parameter values in the has_fraction_in_any_col function.\n\nCodefull_table <- full_table_aet04_pi(adsl, adae_max) %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = score_occurrences_cont_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n )\n\nat_least_40percent_any <- has_fraction_in_any_col(atleast = 0.40, col_indices = c(1, 4, 7))\n\nresult <- full_table %>%\n trim_rows(criteria = criteria_fun) %>%\n prune_table(keep_rows(at_least_40percent_any))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination \n MedDRA Preferred Term Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\ncl A.1 \ndcd A.1.1.1.1 37 0 0 34 0 0 48 0 0 \ncl B.2 \ndcd B.2.2.3.1 36 0 0 40 0 0 39 0 0 \ncl D.2 \ndcd D.2.1.5.3 35 0 0 43 0 0 43 0 0 \ncl C.2 \ndcd C.2.1.2.1 26 0 0 36 0 0 42 0 0 \n\n\n\n\nNote: User needs to specify the column index for filtering the table. The current example uses column indices 1, 4, and 7 to filter for AEs reported in \\(\\geq\\) 30% of patients and AEs reported with a \\(\\geq\\) 15% difference between treatments to demonstrate the filtering ability; this can be changed by varying the parameter values in the has_fraction_in_any_col and has_fractions_difference functions.\n\nCodefull_table <- full_table_aet04_pi(adsl, adae_max) %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = score_occurrences_cont_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n )\n\nat_least_30percent_any <- has_fraction_in_any_col(atleast = 0.3, col_indices = c(1, 4, 7))\n\nat_least_15percent_diff <- has_fractions_difference(atleast = 0.15, col_indices = c(1, 4, 7))\n\nresult <- full_table %>%\n trim_rows(criteria = criteria_fun) %>%\n prune_table(keep_rows(at_least_30percent_any & at_least_15percent_diff))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination \n MedDRA Preferred Term Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\ncl C.2 \ndcd C.2.1.2.1 26 0 0 36 0 0 42 0 0 \n\n\n\n\nNote: User needs to specify the column index for filtering the table. The current example filters using column indices 1, 4, and 7 to include AEs reported in \\(\\geq\\) 40% of patients and using column indices 2, 5, and 8 to include grade 3-4 AEs reported in \\(\\geq\\) 20% of patients. These thresholds are chosen to demonstrate the filtering ability; they can be changed by varying parameter values in the has_fraction_in_any_col function.\n\nCodefull_table <- full_table_aet04_pi(adsl, adae_max) %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = score_occurrences_cont_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n )\n\nat_least_40percent_any <- has_fraction_in_any_col(atleast = 0.4, col_indices = c(1, 4, 7))\n\nat_least_20percent_g34 <- has_fraction_in_any_col(atleast = 0.20, col_indices = c(2, 5, 8))\n\nresult <- full_table %>%\n trim_rows(criteria = criteria_fun) %>%\n prune_table(keep_rows(at_least_40percent_any | at_least_20percent_g34))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination \n MedDRA Preferred Term Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\ncl A.1 \ndcd A.1.1.1.1 37 0 0 34 0 0 48 0 0 \ncl B.2 \ndcd B.2.2.3.1 36 0 0 40 0 0 39 0 0 \ndcd B.2.1.2.1 37 37 0 33 33 0 39 39 0 \ncl D.1 \ndcd D.1.1.4.2 36 36 0 31 31 0 38 38 0 \ncl D.2 \ndcd D.2.1.5.3 35 0 0 43 0 0 43 0 0 \ncl C.2 \ndcd C.2.1.2.1 26 0 0 36 0 0 42 0 0 \ncl C.1 \ndcd C.1.1.1.3 32 32 0 34 34 0 33 33 0 \n\n\n\n\nNote: User can specify/modify the grouping of grades, as shown in this example. In addition, the user needs to specify the column index for filtering the table. The current example uses the “Any Grade” columns with a filtering threshold at 0.40; this can be changed by varying the parameter values in the has_fraction_in_any_col function.\n\nCodegrade_groups <- list(\n \"Any Grade (%)\" = c(\"1\", \"2\", \"3\", \"4\", \"5\"),\n \"Grade 1-2 (%)\" = c(\"1\", \"2\"),\n \"Grade 3-4 (%)\" = c(\"3\", \"4\"),\n \"Grade 5 (%)\" = \"5\"\n)\n\ncol_counts <- rep(table(adsl$ACTARM), each = length(grade_groups))\n\nfull_table <- basic_table() %>%\n split_cols_by(\"ACTARM\") %>%\n split_cols_by_groups(\"MAXAETOXGR\", groups = grade_groups) %>%\n split_rows_by(\"AEBODSYS\",\n child_labels = \"visible\", nested = FALSE, indent_mod = -1L,\n split_fun = trim_levels_in_group(\"AEDECOD\")\n ) %>%\n append_topleft(\"MedDRA System Organ Class\") %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n summarize_vars(\n \"AEDECOD\",\n na.rm = FALSE,\n denom = \"N_col\",\n .stats = \"count_fraction\",\n .formats = c(count_fraction = format_fraction_threshold(0.01))\n ) %>%\n append_topleft(\" MedDRA Preferred Term\") %>%\n build_table(adae_max, col_counts = col_counts) %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = score_occurrences_cont_cols(col_indices = c(1, 5, 9)),\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences_cols(col_indices = c(1, 5, 9)),\n decreasing = TRUE\n )\n\nat_least_40percent_any <- has_fraction_in_any_col(atleast = 0.4, col_indices = c(1, 5, 9))\n\nresult <- full_table %>%\n trim_rows(criteria = criteria_fun) %>%\n prune_table(keep_rows(at_least_40percent_any))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination \n MedDRA Preferred Term Any Grade (%) Grade 1-2 (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 1-2 (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 1-2 (%) Grade 3-4 (%) Grade 5 (%)\n (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\ncl A.1 \ndcd A.1.1.1.1 37 37 0 0 34 34 0 0 48 48 0 0 \ncl B.2 \ndcd B.2.2.3.1 36 36 0 0 40 40 0 0 39 39 0 0 \ncl D.2 \ndcd D.2.1.5.3 35 35 0 0 43 43 0 0 43 43 0 0 \ncl C.2 \ndcd C.2.1.2.1 26 26 0 0 36 36 0 0 42 42 0 0 \n\n\n\n\nNote: User needs to specify the column index for filtering the table. The current example uses column indices 1, 5, and 9 with a filtering threshold at 0.40 to demonstrate the filtering ability; any grade AEs reported in greater than 40% of patients are shown. This can be changed by varying the parameter values in the has_fraction_in_any_col function.\n\nCodegrade_groups <- list(\n \"Any Grade (%)\" = c(\"1\", \"2\", \"3\", \"4\", \"5\"),\n \"Grade 3-4 (%)\" = c(\"3\", \"4\"),\n \"Grade 3-5 (%)\" = c(\"3\", \"4\", \"5\"),\n \"Grade 5 (%)\" = \"5\"\n)\n\ncol_counts <- rep(table(adsl$ACTARM), each = length(grade_groups))\nfull_table <- basic_table() %>%\n split_cols_by(\"ACTARM\") %>%\n split_cols_by_groups(\"MAXAETOXGR\", groups = grade_groups) %>%\n split_rows_by(\"AEBODSYS\",\n child_labels = \"visible\", nested = FALSE, indent_mod = -1L,\n split_fun = trim_levels_in_group(\"AEDECOD\")\n ) %>%\n append_topleft(\"MedDRA System Organ Class\") %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = \"unique\",\n .labels = \"Total number of patients with at least one adverse event\"\n ) %>%\n summarize_vars(\n \"AEDECOD\",\n na.rm = FALSE,\n denom = \"N_col\",\n .stats = \"count_fraction\",\n .formats = c(count_fraction = format_fraction_threshold(0.01))\n ) %>%\n append_topleft(\" MedDRA Preferred Term\") %>%\n build_table(adae_max, col_counts = col_counts) %>%\n sort_at_path(\n path = c(\"AEBODSYS\"),\n scorefun = score_occurrences_cont_cols(col_indices = c(1, 5, 9)),\n decreasing = TRUE\n ) %>%\n sort_at_path(\n path = c(\"AEBODSYS\", \"*\", \"AEDECOD\"),\n scorefun = score_occurrences_cols(col_indices = c(1, 5, 9)),\n decreasing = TRUE\n )\n\nat_least_40percent_any <- has_fraction_in_any_col(atleast = 0.4, col_indices = c(1, 5, 9))\n\nresult <- full_table %>%\n trim_rows(criteria = criteria_fun) %>%\n prune_table(keep_rows(at_least_40percent_any))\n\nresult\n\nMedDRA System Organ Class A: Drug X B: Placebo C: Combination \n MedDRA Preferred Term Any Grade (%) Grade 3-4 (%) Grade 3-5 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 3-5 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 3-5 (%) Grade 5 (%)\n (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\ncl A.1 \ndcd A.1.1.1.1 37 0 0 0 34 0 0 0 48 0 0 0 \ncl B.2 \ndcd B.2.2.3.1 36 0 0 0 40 0 0 0 39 0 0 0 \ncl D.2 \ndcd D.2.1.5.3 35 0 0 0 43 0 0 0 43 0 0 0 \ncl C.2 \ndcd C.2.1.2.1 26 0 0 0 36 0 0 0 42 0 0 0 \n\n\n\n\nNote: User needs to specify the column index for filtering the table. The current example uses column indices 1, 4, and 7 with a filtering threshold at 0.20 to demonstrate the filtering ability; any grade AEs (Preferred Terms Only) reported in greater than 20% of patients are shown. This can be changed by varying the parameter values in the has_fraction_in_any_col function.\n\nCodegrade_groups <- list(\n \"Any Grade (%)\" = c(\"1\", \"2\", \"3\", \"4\", \"5\"),\n \"Grade 3-4 (%)\" = c(\"3\", \"4\"),\n \"Grade 5 (%)\" = \"5\"\n)\n\ncol_counts <- rep(table(adsl$ACTARM), each = length(grade_groups))\n\nfull_table <- basic_table() %>%\n split_cols_by(\"ACTARM\") %>%\n split_cols_by_groups(\"MAXAETOXGR\", groups = grade_groups) %>%\n summarize_vars(\n \"AEDECOD\",\n na.rm = FALSE,\n denom = \"N_col\",\n .stats = \"count_fraction\",\n .formats = c(count_fraction = format_fraction_threshold(0.01))\n ) %>%\n append_topleft(\"MedDRA Preferred Term\") %>%\n build_table(adae_max, col_counts = col_counts)\n\nat_least_20percent_any <- has_fraction_in_any_col(atleast = 0.2, col_indices = c(1, 4, 7))\n\nresult <- full_table %>%\n prune_table(keep_rows(at_least_20percent_any)) %>%\n sort_at_path(\n path = c(\"AEDECOD\"),\n scorefun = score_occurrences_cols(col_indices = c(1, 4, 7)),\n decreasing = TRUE\n )\n\nresult\n\nMedDRA Preferred Term A: Drug X B: Placebo C: Combination \n Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n (N=134) (N=134) (N=134) (N=134) (N=134) (N=134) (N=132) (N=132) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\ndcd D.2.1.5.3 35 0 0 43 0 0 43 0 0 \ndcd A.1.1.1.1 37 0 0 34 0 0 48 0 0 \ndcd B.2.2.3.1 36 0 0 40 0 0 39 0 0 \ndcd A.1.1.1.2 36 0 0 36 0 0 38 0 0 \ndcd B.2.1.2.1 37 37 0 33 33 0 39 39 0 \ndcd D.1.1.1.1 37 0 37 31 0 31 39 0 39 \ndcd D.1.1.4.2 36 36 0 31 31 0 38 38 0 \ndcd B.1.1.1.1 35 0 35 37 0 37 33 0 33 \ndcd C.2.1.2.1 26 0 0 36 0 0 42 0 0 \ndcd C.1.1.1.3 32 32 0 34 34 0 33 33 0 \n\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(teal.modules.clinical)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl),\n cdisc_dataset(\"ADAE\", adae),\n code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")',\n check = TRUE\n ),\n modules = modules(\n tm_t_events_by_grade(\n label = \"Adverse Events by Grade Table\",\n dataname = \"ADAE\",\n arm_var = choices_selected(c(\"ARM\", \"ARMCD\"), \"ARM\"),\n col_by_grade = TRUE,\n llt = choices_selected(\n choices = variable_choices(adae, c(\"AETERM\", \"AEDECOD\")),\n selected = c(\"AEDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(adae, c(\"AEBODSYS\", \"AESOC\")),\n selected = \"AEBODSYS\"\n ),\n grade = choices_selected(\n choices = variable_choices(adae, c(\"AETOXGR\", \"AESEV\")),\n selected = \"AETOXGR\"\n ),\n # List of column groups for grades used when `col_by_grade` = TRUE.\n grading_groups = list(\n `Any Grade (%)` = c(\"1\", \"2\", \"3\", \"4\", \"5\"),\n `Grade 3-4 (%)` = c(\"3\", \"4\"),\n `Grade 5 (%)` = \"5\"\n )\n )\n )\n)\n\n[INFO] 2023-08-04 15:32:46.0341 pid:12059 token:[] teal.modules.clinical Initializing tm_t_events_by_grade\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] tern_0.8.5.9006 rtables_0.6.2.9001 \n [9] magrittr_2.0.3 formatters_0.5.1.9001 \n[11] dplyr_1.1.2 scda_0.1.6.9010 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/adverse-events/aet04_pi.lock'.\n\n\nDownload" }, { "objectID": "tables/other/rmpt01.html", "href": "tables/other/rmpt01.html", "title": "RMPT01", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadex <- df_explicit_na(adex)\n\n# Simulate ADEX records with PARAMCD == \"TDURD\" as they are not in sample scda dataset.\nset.seed(1, kind = \"Mersenne-Twister\")\nadex2 <- adex %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE)\n ) %>%\n bind_rows(adex)\n\n# Now pre-processing steps are carried out.\nanl <- adex2 %>%\n filter(\n PARAMCD == \"TDURD\",\n PARCAT2 == \"Drug A\",\n SAFFL == \"Y\"\n ) %>%\n mutate(\n aval_months = day2month(AVAL),\n aval_months_cat = factor(case_when(\n aval_months < 1 ~ \"< 1 month\",\n aval_months >= 1 & aval_months < 3 ~ \"1 to <3 months\",\n aval_months >= 3 & aval_months < 6 ~ \"3 to <6 months\",\n TRUE ~ \">=6 months\"\n ), levels = c(\"< 1 month\", \"1 to <3 months\", \"3 to <6 months\", \">=6 months\"))\n )\n\nadsl_f <- adsl %>% filter(adsl$SAFFL == \"Y\")\n\n\n\n\n\nCodelyt <- basic_table(\n title = \"Duration of Exposure: Safety-Evaluable Patients\",\n main_footer = \"* Patient Time is the sum of exposure across all patients in days.\",\n show_colcounts = TRUE\n) %>%\n summarize_patients_exposure_in_cols(\n var = \"AVAL\", col_split = TRUE,\n .labels = c(n_patients = \"Number of Patients\", sum_exposure = \"Patient Time*\"),\n custom_label = \"Total Number of Patients and Patient Time\"\n ) %>%\n analyze_patients_exposure_in_cols(\n var = \"aval_months_cat\",\n col_split = FALSE\n ) %>%\n append_topleft(c(\"\", \"Duration of exposure\"))\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_f)\nresult\n\nDuration of Exposure: Safety-Evaluable Patients\n\n——————————————————————————————————————————————————————————————————————————————\n Number of Patients Patient Time*\nDuration of exposure (N=400) (N=400) \n——————————————————————————————————————————————————————————————————————————————\nTotal Number of Patients and Patient Time 217 (54.2%) 20641 \n < 1 month 28 (7.0%) 504 \n 1 to <3 months 79 (19.8%) 4727 \n 3 to <6 months 101 (25.2%) 13690 \n >=6 months 9 (2.2%) 1720 \n——————————————————————————————————————————————————————————————————————————————\n\n* Patient Time is the sum of exposure across all patients in days.\n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\nlabels <- var_labels(adex)\nset.seed(1, kind = \"Mersenne-Twister\")\nadex <- adex %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE),\n AVALU = \"Days\"\n ) %>%\n bind_rows(adex)\n\nadex <- adex %>%\n mutate(\n aval_months = day2month(AVAL),\n aval_months_cat = factor(case_when(\n aval_months < 1 ~ \"< 1 month\",\n aval_months >= 1 & aval_months < 3 ~ \"1 to <3 months\",\n aval_months >= 3 & aval_months < 6 ~ \"3 to <6 months\",\n TRUE ~ \">=6 months\"\n ), levels = c(\"< 1 month\", \"1 to <3 months\", \"3 to <6 months\", \">=6 months\"))\n ) %>%\n select(-aval_months)\n\nvar_labels(adex) <- c(labels, \"Overall duration\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADEX\", adex, code = 'ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n labels <- var_labels(ADEX)\n set.seed(1, kind = \"Mersenne-Twister\")\n ADEX <- ADEX %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(\n x = seq(1, 200), size = n(), replace = TRUE\n ),\n AVALU = \"Days\") %>%\n bind_rows(ADEX)\n\n ADEX <-ADEX %>%\n mutate(\n aval_months = day2month(AVAL),\n aval_months_cat = factor(case_when(\n aval_months < 1 ~ \"< 1 month\",\n aval_months >= 1 & aval_months < 3 ~ \"1 to <3 months\",\n aval_months >= 3 & aval_months < 6 ~ \"3 to <6 months\",\n TRUE ~ \">=6 months\"\n ), levels = c(\"< 1 month\", \"1 to <3 months\", \"3 to <6 months\", \">=6 months\"))) %>%\n select(-aval_months)\n\n var_labels(ADEX) <- c(labels, \"Overall duration\")'),\n check = TRUE\n ),\n modules = modules(\n tm_t_exposure(\n label = \"Duration of Exposure Table\",\n dataname = \"ADEX\",\n paramcd = choices_selected(\n choices = value_choices(adex, \"PARAMCD\", \"PARAM\"),\n selected = \"TDURD\"\n ),\n col_by_var = choices_selected(\n choices = variable_choices(adex, subset = c(\"SEX\", \"ARM\")),\n selected = NULL\n ),\n row_by_var = choices_selected(\n choices = variable_choices(adex, subset = c(\"aval_months_cat\", \"RACE\", \"STRATA1\", \"SEX\")),\n selected = \"aval_months_cat\"\n ),\n parcat = choices_selected(\n choices = value_choices(adex, \"PARCAT2\"),\n selected = \"Drug A\"\n ),\n add_total = FALSE\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\")\n )\n)\n\n[INFO] 2023-08-04 15:15:04.5028 pid:12267 token:[] teal.modules.clinical Initializing tm_t_exposure\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/other/rmpt01.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadex <- df_explicit_na(adex)\n\n# Simulate ADEX records with PARAMCD == \"TDURD\" as they are not in sample scda dataset.\nset.seed(1, kind = \"Mersenne-Twister\")\nadex2 <- adex %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE)\n ) %>%\n bind_rows(adex)\n\n# Now pre-processing steps are carried out.\nanl <- adex2 %>%\n filter(\n PARAMCD == \"TDURD\",\n PARCAT2 == \"Drug A\",\n SAFFL == \"Y\"\n ) %>%\n mutate(\n aval_months = day2month(AVAL),\n aval_months_cat = factor(case_when(\n aval_months < 1 ~ \"< 1 month\",\n aval_months >= 1 & aval_months < 3 ~ \"1 to <3 months\",\n aval_months >= 3 & aval_months < 6 ~ \"3 to <6 months\",\n TRUE ~ \">=6 months\"\n ), levels = c(\"< 1 month\", \"1 to <3 months\", \"3 to <6 months\", \">=6 months\"))\n )\n\nadsl_f <- adsl %>% filter(adsl$SAFFL == \"Y\")\n\n\n\n\n\nCodelyt <- basic_table(\n title = \"Duration of Exposure: Safety-Evaluable Patients\",\n main_footer = \"* Patient Time is the sum of exposure across all patients in days.\",\n show_colcounts = TRUE\n) %>%\n summarize_patients_exposure_in_cols(\n var = \"AVAL\", col_split = TRUE,\n .labels = c(n_patients = \"Number of Patients\", sum_exposure = \"Patient Time*\"),\n custom_label = \"Total Number of Patients and Patient Time\"\n ) %>%\n analyze_patients_exposure_in_cols(\n var = \"aval_months_cat\",\n col_split = FALSE\n ) %>%\n append_topleft(c(\"\", \"Duration of exposure\"))\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_f)\nresult\n\nDuration of Exposure: Safety-Evaluable Patients\n\n——————————————————————————————————————————————————————————————————————————————\n Number of Patients Patient Time*\nDuration of exposure (N=400) (N=400) \n——————————————————————————————————————————————————————————————————————————————\nTotal Number of Patients and Patient Time 217 (54.2%) 20641 \n < 1 month 28 (7.0%) 504 \n 1 to <3 months 79 (19.8%) 4727 \n 3 to <6 months 101 (25.2%) 13690 \n >=6 months 9 (2.2%) 1720 \n——————————————————————————————————————————————————————————————————————————————\n\n* Patient Time is the sum of exposure across all patients in days.\n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\nlabels <- var_labels(adex)\nset.seed(1, kind = \"Mersenne-Twister\")\nadex <- adex %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE),\n AVALU = \"Days\"\n ) %>%\n bind_rows(adex)\n\nadex <- adex %>%\n mutate(\n aval_months = day2month(AVAL),\n aval_months_cat = factor(case_when(\n aval_months < 1 ~ \"< 1 month\",\n aval_months >= 1 & aval_months < 3 ~ \"1 to <3 months\",\n aval_months >= 3 & aval_months < 6 ~ \"3 to <6 months\",\n TRUE ~ \">=6 months\"\n ), levels = c(\"< 1 month\", \"1 to <3 months\", \"3 to <6 months\", \">=6 months\"))\n ) %>%\n select(-aval_months)\n\nvar_labels(adex) <- c(labels, \"Overall duration\")\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADEX\", adex, code = 'ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n labels <- var_labels(ADEX)\n set.seed(1, kind = \"Mersenne-Twister\")\n ADEX <- ADEX %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(\n x = seq(1, 200), size = n(), replace = TRUE\n ),\n AVALU = \"Days\") %>%\n bind_rows(ADEX)\n\n ADEX <-ADEX %>%\n mutate(\n aval_months = day2month(AVAL),\n aval_months_cat = factor(case_when(\n aval_months < 1 ~ \"< 1 month\",\n aval_months >= 1 & aval_months < 3 ~ \"1 to <3 months\",\n aval_months >= 3 & aval_months < 6 ~ \"3 to <6 months\",\n TRUE ~ \">=6 months\"\n ), levels = c(\"< 1 month\", \"1 to <3 months\", \"3 to <6 months\", \">=6 months\"))) %>%\n select(-aval_months)\n\n var_labels(ADEX) <- c(labels, \"Overall duration\")'),\n check = TRUE\n ),\n modules = modules(\n tm_t_exposure(\n label = \"Duration of Exposure Table\",\n dataname = \"ADEX\",\n paramcd = choices_selected(\n choices = value_choices(adex, \"PARAMCD\", \"PARAM\"),\n selected = \"TDURD\"\n ),\n col_by_var = choices_selected(\n choices = variable_choices(adex, subset = c(\"SEX\", \"ARM\")),\n selected = NULL\n ),\n row_by_var = choices_selected(\n choices = variable_choices(adex, subset = c(\"aval_months_cat\", \"RACE\", \"STRATA1\", \"SEX\")),\n selected = \"aval_months_cat\"\n ),\n parcat = choices_selected(\n choices = value_choices(adex, \"PARCAT2\"),\n selected = \"Drug A\"\n ),\n add_total = FALSE\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\")\n )\n)\n\n[INFO] 2023-08-04 15:33:48.1648 pid:12271 token:[] teal.modules.clinical Initializing tm_t_exposure\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/other/rmpt01.lock'.\n\n\nDownload" }, { "objectID": "tables/other/disclosurest01.html", @@ -977,20 +977,20 @@ "href": "tables/other/rmpt04.html", "title": "RMPT04", "section": "", - "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadex <- df_explicit_na(adex)\n\n# Simulate ADEX records with PARAMCD == \"TDURD\" as they are not in sample scda dataset.\nset.seed(1, kind = \"Mersenne-Twister\")\nadex2 <- adex %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE)\n ) %>%\n bind_rows(adex)\n\n\n# Now pre-processing steps are carried out.\nanl <- adex2 %>%\n filter(\n PARAMCD == \"TDURD\",\n PARCAT2 == \"Drug A\",\n SAFFL == \"Y\"\n )\n\nadsl_f <- adsl %>% filter(adsl$SAFFL == \"Y\")\n\n\n\n\n\nCodelyt <- basic_table(\n title = \"Extent of Exposure by Ethnic Origin: Safety-Evaluable Patients\",\n main_footer = \"* Patient Time is the sum of exposure across all patients in days.\",\n show_colcounts = TRUE\n) %>%\n analyze_patients_exposure_in_cols(\n var = \"ETHNIC\",\n col_split = TRUE,\n add_total_level = TRUE,\n custom_label = \"Total\"\n ) %>%\n append_topleft(c(\"\", \"Ethnicity\"))\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_f)\nresult\n\nExtent of Exposure by Ethnic Origin: Safety-Evaluable Patients\n\n——————————————————————————————————————————————————\n Patients Person time\nEthnicity (N=400) (N=400) \n——————————————————————————————————————————————————\nNOT REPORTED 18 (4.5%) 2085 \nHISPANIC OR LATINO 28 (7.0%) 2423 \nNOT HISPANIC OR LATINO 165 (41.2%) 15570 \nUNKNOWN 6 (1.5%) 563 \nTotal 217 (54.2%) 20641 \n——————————————————————————————————————————————————\n\n* Patient Time is the sum of exposure across all patients in days.\n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\nset.seed(1, kind = \"Mersenne-Twister\")\nadex <- adex %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE),\n AVALU = \"Days\"\n ) %>%\n bind_rows(adex)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADEX\", adex, code = 'ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n set.seed(1, kind = \"Mersenne-Twister\")\n ADEX <- ADEX %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE),\n AVALU = \"Days\") %>%\n bind_rows(ADEX)'),\n check = TRUE\n ),\n modules = modules(\n tm_t_exposure(\n label = \"Duration of Exposure Table\",\n dataname = \"ADEX\",\n paramcd = choices_selected(\n choices = value_choices(adex, \"PARAMCD\", \"PARAM\"),\n selected = \"TDURD\"\n ),\n col_by_var = choices_selected(\n choices = variable_choices(adex, subset = c(\"ARM\")),\n selected = NULL\n ),\n row_by_var = choices_selected(\n choices = variable_choices(adex, subset = c(\"ETHNIC\", \"SEX\")),\n selected = \"ETHNIC\"\n ),\n parcat = choices_selected(\n choices = value_choices(adex, \"PARCAT2\"),\n selected = \"Drug A\"\n ),\n add_total = FALSE\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\")\n )\n)\n\n[INFO] 2023-08-04 15:16:50.2029 pid:12686 token:[] teal.modules.clinical Initializing tm_t_exposure\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/other/rmpt04.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadex <- df_explicit_na(adex)\n\n# Simulate ADEX records with PARAMCD == \"TDURD\" as they are not in sample scda dataset.\nset.seed(1, kind = \"Mersenne-Twister\")\nadex2 <- adex %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE)\n ) %>%\n bind_rows(adex)\n\n\n# Now pre-processing steps are carried out.\nanl <- adex2 %>%\n filter(\n PARAMCD == \"TDURD\",\n PARCAT2 == \"Drug A\",\n SAFFL == \"Y\"\n )\n\nadsl_f <- adsl %>% filter(adsl$SAFFL == \"Y\")\n\n\n\n\n\nCodelyt <- basic_table(\n title = \"Extent of Exposure by Ethnic Origin: Safety-Evaluable Patients\",\n main_footer = \"* Patient Time is the sum of exposure across all patients in days.\",\n show_colcounts = TRUE\n) %>%\n analyze_patients_exposure_in_cols(\n var = \"ETHNIC\",\n col_split = TRUE,\n add_total_level = TRUE,\n custom_label = \"Total\"\n ) %>%\n append_topleft(c(\"\", \"Ethnicity\"))\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_f)\nresult\n\nExtent of Exposure by Ethnic Origin: Safety-Evaluable Patients\n\n——————————————————————————————————————————————————\n Patients Person time\nEthnicity (N=400) (N=400) \n——————————————————————————————————————————————————\nNOT REPORTED 18 (4.5%) 2085 \nHISPANIC OR LATINO 28 (7.0%) 2423 \nNOT HISPANIC OR LATINO 165 (41.2%) 15570 \nUNKNOWN 6 (1.5%) 563 \nTotal 217 (54.2%) 20641 \n——————————————————————————————————————————————————\n\n* Patient Time is the sum of exposure across all patients in days.\n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\nset.seed(1, kind = \"Mersenne-Twister\")\nadex <- adex %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE),\n AVALU = \"Days\"\n ) %>%\n bind_rows(adex)\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")'),\n cdisc_dataset(\"ADEX\", adex, code = 'ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n set.seed(1, kind = \"Mersenne-Twister\")\n ADEX <- ADEX %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE),\n AVALU = \"Days\") %>%\n bind_rows(ADEX)'),\n check = TRUE\n ),\n modules = modules(\n tm_t_exposure(\n label = \"Duration of Exposure Table\",\n dataname = \"ADEX\",\n paramcd = choices_selected(\n choices = value_choices(adex, \"PARAMCD\", \"PARAM\"),\n selected = \"TDURD\"\n ),\n col_by_var = choices_selected(\n choices = variable_choices(adex, subset = c(\"ARM\")),\n selected = NULL\n ),\n row_by_var = choices_selected(\n choices = variable_choices(adex, subset = c(\"ETHNIC\", \"SEX\")),\n selected = \"ETHNIC\"\n ),\n parcat = choices_selected(\n choices = value_choices(adex, \"PARCAT2\"),\n selected = \"Drug A\"\n ),\n add_total = FALSE\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\")\n )\n)\n\n[INFO] 2023-08-04 15:35:46.1658 pid:12690 token:[] teal.modules.clinical Initializing tm_t_exposure\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/other/rmpt04.lock'.\n\n\nDownload" }, { "objectID": "tables/other/rmpt03.html", "href": "tables/other/rmpt03.html", "title": "RMPT03", "section": "", - "text": "Data Setup\nStandard Table\nTable Excluding Empty Age Groups\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadex <- df_explicit_na(adex)\n\n# Simulate ADEX records with PARAMCD == \"TDURD\" as they are not in sample scda dataset.\nset.seed(1, kind = \"Mersenne-Twister\")\nadex2 <- adex %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE)\n ) %>%\n bind_rows(adex)\n\n# Now pre-processing steps are carried out.\nanl <- adex2 %>%\n filter(\n PARAMCD == \"TDURD\",\n PARCAT2 == \"Drug A\",\n SAFFL == \"Y\"\n ) %>%\n mutate(\n AGEGR1 = factor(ifelse(AGE < 65, \"<65\", \">=65\")),\n AGEGR2 = factor(case_when(\n AGE < 18 ~ \"< 18\",\n AGE >= 18 & AGE <= 40 ~ \"18 - 40\",\n AGE > 40 & AGE <= 64 ~ \"41 - 64\",\n TRUE ~ \">=65\"\n ), levels = c(\"< 18\", \"18 - 40\", \"41 - 64\", \">=65\")),\n SEX = factor(case_when(\n SEX == \"F\" ~ \"Female\",\n SEX == \"M\" ~ \"Male\"\n ))\n )\n\nadsl_f <- adsl %>%\n filter(adsl$SAFFL == \"Y\") %>%\n mutate(SEX = factor(case_when(\n SEX == \"F\" ~ \"Female\",\n SEX == \"M\" ~ \"Male\"\n )))\n\n\n\n\n\nCodelyt <- basic_table(\n title = \"Extent of Exposure by Age Group and Gender: Safety-Evaluable Patients\",\n main_footer = \"* Patient Time is the sum of exposure across all patients in days.\"\n) %>%\n split_cols_by(\"SEX\", split_fun = add_overall_level(\"Total\", first = FALSE)) %>%\n summarize_patients_exposure_in_cols(\n var = \"AVAL\", col_split = TRUE,\n .labels = c(n_patients = \"Number of Patients\", sum_exposure = \"Patient Time*\"),\n custom_label = \"Total Number of Patients and Patient Time\"\n ) %>%\n analyze_patients_exposure_in_cols(\n var = \"AGEGR1\",\n col_split = FALSE\n ) %>%\n append_topleft(c(\"\", \"Age group (years)\"))\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_f)\nresult\n\nExtent of Exposure by Age Group and Gender: Safety-Evaluable Patients\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Female Male Total \nAge group (years) Number of Patients Patient Time* Number of Patients Patient Time* Number of Patients Patient Time*\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal Number of Patients and Patient Time 134 (58.0%) 12591 83 (49.1%) 8050 217 (54.2%) 20641 \n <65 134 (58.0%) 12591 82 (48.5%) 7970 216 (54.0%) 20561 \n >=65 0 (0.0%) 0 1 (0.6%) 80 1 (0.2%) 80 \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\n* Patient Time is the sum of exposure across all patients in days.\n\n\n\n\n\nCodelyt <- basic_table(\n title = \"Duration of Exposure: Safety-Evaluable Patients\",\n main_footer = \"* Patient Time is the sum of exposure across all patients in days.\"\n) %>%\n split_cols_by(\"SEX\", split_fun = add_overall_level(\"Total\", first = FALSE)) %>%\n summarize_patients_exposure_in_cols(\n var = \"AVAL\", col_split = TRUE,\n .labels = c(n_patients = \"Number of Patients\", sum_exposure = \"Patient Time*\"),\n custom_label = \"Total Number of Patients and Patient Time\"\n ) %>%\n analyze_patients_exposure_in_cols(\n var = \"AGEGR2\",\n col_split = FALSE\n ) %>%\n append_topleft(c(\"\", \"Age group (years)\"))\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_f) %>%\n prune_table()\nresult\n\nDuration of Exposure: Safety-Evaluable Patients\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Female Male Total \nAge group (years) Number of Patients Patient Time* Number of Patients Patient Time* Number of Patients Patient Time*\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal Number of Patients and Patient Time 134 (58.0%) 12591 83 (49.1%) 8050 217 (54.2%) 20641 \n 18 - 40 118 (51.1%) 11203 60 (35.5%) 5787 178 (44.5%) 16990 \n 41 - 64 16 (6.9%) 1388 22 (13.0%) 2183 38 (9.5%) 3571 \n >=65 0 (0.0%) 0 1 (0.6%) 80 1 (0.2%) 80 \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\n* Patient Time is the sum of exposure across all patients in days.\n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\nset.seed(1, kind = \"Mersenne-Twister\")\n\nlabels <- var_labels(adex)\nadex <- adex %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE),\n AVALU = \"Days\"\n ) %>%\n bind_rows(adex)\n\nadex <- adex %>%\n mutate(\n AGEGR1 = factor(ifelse(AGE < 65, \"<65\", \">=65\")),\n AGEGR2 = factor(case_when(\n AGE < 18 ~ \"< 18\",\n AGE >= 18 & AGE <= 40 ~ \"18 - 40\",\n AGE > 40 & AGE <= 64 ~ \"41 - 64\",\n TRUE ~ \">=65\"\n ), levels = c(\"< 18\", \"18 - 40\", \"41 - 64\", \">=65\")),\n SEX = factor(case_when(\n SEX == \"F\" ~ \"Female\",\n SEX == \"M\" ~ \"Male\"\n ))\n )\n\nvar_labels(adex) <- c(labels, \"Age group (years)\", \"Age group (years)\")\n\nadsl <- adsl %>%\n mutate(SEX = factor(case_when(\n SEX == \"F\" ~ \"Female\",\n SEX == \"M\" ~ \"Male\"\n )))\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- ADSL %>% filter(ADSL$SAFFL == \"Y\") %>%\n mutate(SEX = factor(case_when(\n SEX == \"F\" ~ \"Female\",\n SEX == \"M\" ~ \"Male\"\n )))'),\n cdisc_dataset(\"ADEX\", adex, code = 'ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n set.seed(1, kind = \"Mersenne-Twister\")\n labels <- var_labels(ADEX)\n ADEX <- ADEX %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE),\n AVALU = \"Days\") %>%\n bind_rows(ADEX)\n\n ADEX <- ADEX %>%\n mutate(\n AGEGR1 = factor(ifelse(AGE < 65, \"<65\", \">=65\")),\n AGEGR2 = factor(case_when(\n AGE < 18 ~ \"< 18\",\n AGE >= 18 & AGE <= 40 ~ \"18 - 40\",\n AGE > 40 & AGE <= 64 ~ \"41 - 64\",\n TRUE ~ \">=65\"\n ), levels = c(\"< 18\", \"18 - 40\", \"41 - 64\", \">=65\")),\n SEX = factor(case_when(\n SEX == \"F\" ~ \"Female\",\n SEX == \"M\" ~ \"Male\"\n )))\n var_labels(ADEX) <- c(labels, \"Age group (years)\", \"Age group (years)\")'),\n check = TRUE\n ),\n modules = modules(\n tm_t_exposure(\n label = \"Duration of Exposure Table\",\n dataname = \"ADEX\",\n paramcd = choices_selected(\n choices = value_choices(adex, \"PARAMCD\", \"PARAM\"),\n selected = \"TDURD\"\n ),\n col_by_var = choices_selected(\n choices = variable_choices(adex, subset = c(\"SEX\", \"ARM\")),\n selected = \"SEX\"\n ),\n row_by_var = choices_selected(\n choices = variable_choices(adex, subset = c(\"AGEGR1\", \"AGEGR2\")),\n selected = \"AGEGR1\"\n ),\n parcat = choices_selected(\n choices = value_choices(adex, \"PARCAT2\"),\n selected = \"Drug A\"\n ),\n add_total = FALSE\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\")\n )\n)\n\n[INFO] 2023-08-04 15:17:39.9889 pid:12896 token:[] teal.modules.clinical Initializing tm_t_exposure\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/other/rmpt03.lock'.\n\n\nDownload" + "text": "Data Setup\nStandard Table\nTable Excluding Empty Age Groups\nTeal\nSession Info\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nadex <- df_explicit_na(adex)\n\n# Simulate ADEX records with PARAMCD == \"TDURD\" as they are not in sample scda dataset.\nset.seed(1, kind = \"Mersenne-Twister\")\nadex2 <- adex %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE)\n ) %>%\n bind_rows(adex)\n\n# Now pre-processing steps are carried out.\nanl <- adex2 %>%\n filter(\n PARAMCD == \"TDURD\",\n PARCAT2 == \"Drug A\",\n SAFFL == \"Y\"\n ) %>%\n mutate(\n AGEGR1 = factor(ifelse(AGE < 65, \"<65\", \">=65\")),\n AGEGR2 = factor(case_when(\n AGE < 18 ~ \"< 18\",\n AGE >= 18 & AGE <= 40 ~ \"18 - 40\",\n AGE > 40 & AGE <= 64 ~ \"41 - 64\",\n TRUE ~ \">=65\"\n ), levels = c(\"< 18\", \"18 - 40\", \"41 - 64\", \">=65\")),\n SEX = factor(case_when(\n SEX == \"F\" ~ \"Female\",\n SEX == \"M\" ~ \"Male\"\n ))\n )\n\nadsl_f <- adsl %>%\n filter(adsl$SAFFL == \"Y\") %>%\n mutate(SEX = factor(case_when(\n SEX == \"F\" ~ \"Female\",\n SEX == \"M\" ~ \"Male\"\n )))\n\n\n\n\n\nCodelyt <- basic_table(\n title = \"Extent of Exposure by Age Group and Gender: Safety-Evaluable Patients\",\n main_footer = \"* Patient Time is the sum of exposure across all patients in days.\"\n) %>%\n split_cols_by(\"SEX\", split_fun = add_overall_level(\"Total\", first = FALSE)) %>%\n summarize_patients_exposure_in_cols(\n var = \"AVAL\", col_split = TRUE,\n .labels = c(n_patients = \"Number of Patients\", sum_exposure = \"Patient Time*\"),\n custom_label = \"Total Number of Patients and Patient Time\"\n ) %>%\n analyze_patients_exposure_in_cols(\n var = \"AGEGR1\",\n col_split = FALSE\n ) %>%\n append_topleft(c(\"\", \"Age group (years)\"))\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_f)\nresult\n\nExtent of Exposure by Age Group and Gender: Safety-Evaluable Patients\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Female Male Total \nAge group (years) Number of Patients Patient Time* Number of Patients Patient Time* Number of Patients Patient Time*\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal Number of Patients and Patient Time 134 (58.0%) 12591 83 (49.1%) 8050 217 (54.2%) 20641 \n <65 134 (58.0%) 12591 82 (48.5%) 7970 216 (54.0%) 20561 \n >=65 0 (0.0%) 0 1 (0.6%) 80 1 (0.2%) 80 \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\n* Patient Time is the sum of exposure across all patients in days.\n\n\n\n\n\nCodelyt <- basic_table(\n title = \"Duration of Exposure: Safety-Evaluable Patients\",\n main_footer = \"* Patient Time is the sum of exposure across all patients in days.\"\n) %>%\n split_cols_by(\"SEX\", split_fun = add_overall_level(\"Total\", first = FALSE)) %>%\n summarize_patients_exposure_in_cols(\n var = \"AVAL\", col_split = TRUE,\n .labels = c(n_patients = \"Number of Patients\", sum_exposure = \"Patient Time*\"),\n custom_label = \"Total Number of Patients and Patient Time\"\n ) %>%\n analyze_patients_exposure_in_cols(\n var = \"AGEGR2\",\n col_split = FALSE\n ) %>%\n append_topleft(c(\"\", \"Age group (years)\"))\n\nresult <- build_table(lyt, df = anl, alt_counts_df = adsl_f) %>%\n prune_table()\nresult\n\nDuration of Exposure: Safety-Evaluable Patients\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Female Male Total \nAge group (years) Number of Patients Patient Time* Number of Patients Patient Time* Number of Patients Patient Time*\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal Number of Patients and Patient Time 134 (58.0%) 12591 83 (49.1%) 8050 217 (54.2%) 20641 \n 18 - 40 118 (51.1%) 11203 60 (35.5%) 5787 178 (44.5%) 16990 \n 41 - 64 16 (6.9%) 1388 22 (13.0%) 2183 38 (9.5%) 3571 \n >=65 0 (0.0%) 0 1 (0.6%) 80 1 (0.2%) 80 \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\n* Patient Time is the sum of exposure across all patients in days.\n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(teal.modules.clinical)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\nset.seed(1, kind = \"Mersenne-Twister\")\n\nlabels <- var_labels(adex)\nadex <- adex %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(\n PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE),\n AVALU = \"Days\"\n ) %>%\n bind_rows(adex)\n\nadex <- adex %>%\n mutate(\n AGEGR1 = factor(ifelse(AGE < 65, \"<65\", \">=65\")),\n AGEGR2 = factor(case_when(\n AGE < 18 ~ \"< 18\",\n AGE >= 18 & AGE <= 40 ~ \"18 - 40\",\n AGE > 40 & AGE <= 64 ~ \"41 - 64\",\n TRUE ~ \">=65\"\n ), levels = c(\"< 18\", \"18 - 40\", \"41 - 64\", \">=65\")),\n SEX = factor(case_when(\n SEX == \"F\" ~ \"Female\",\n SEX == \"M\" ~ \"Male\"\n ))\n )\n\nvar_labels(adex) <- c(labels, \"Age group (years)\", \"Age group (years)\")\n\nadsl <- adsl %>%\n mutate(SEX = factor(case_when(\n SEX == \"F\" ~ \"Female\",\n SEX == \"M\" ~ \"Male\"\n )))\n\napp <- init(\n data = cdisc_data(\n cdisc_dataset(\"ADSL\", adsl, code = 'ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- ADSL %>% filter(ADSL$SAFFL == \"Y\") %>%\n mutate(SEX = factor(case_when(\n SEX == \"F\" ~ \"Female\",\n SEX == \"M\" ~ \"Male\"\n )))'),\n cdisc_dataset(\"ADEX\", adex, code = 'ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n set.seed(1, kind = \"Mersenne-Twister\")\n labels <- var_labels(ADEX)\n ADEX <- ADEX %>%\n distinct(USUBJID, .keep_all = TRUE) %>%\n mutate(PARAMCD = \"TDURD\",\n PARAM = \"Overall duration (days)\",\n AVAL = sample(x = seq(1, 200), size = n(), replace = TRUE),\n AVALU = \"Days\") %>%\n bind_rows(ADEX)\n\n ADEX <- ADEX %>%\n mutate(\n AGEGR1 = factor(ifelse(AGE < 65, \"<65\", \">=65\")),\n AGEGR2 = factor(case_when(\n AGE < 18 ~ \"< 18\",\n AGE >= 18 & AGE <= 40 ~ \"18 - 40\",\n AGE > 40 & AGE <= 64 ~ \"41 - 64\",\n TRUE ~ \">=65\"\n ), levels = c(\"< 18\", \"18 - 40\", \"41 - 64\", \">=65\")),\n SEX = factor(case_when(\n SEX == \"F\" ~ \"Female\",\n SEX == \"M\" ~ \"Male\"\n )))\n var_labels(ADEX) <- c(labels, \"Age group (years)\", \"Age group (years)\")'),\n check = TRUE\n ),\n modules = modules(\n tm_t_exposure(\n label = \"Duration of Exposure Table\",\n dataname = \"ADEX\",\n paramcd = choices_selected(\n choices = value_choices(adex, \"PARAMCD\", \"PARAM\"),\n selected = \"TDURD\"\n ),\n col_by_var = choices_selected(\n choices = variable_choices(adex, subset = c(\"SEX\", \"ARM\")),\n selected = \"SEX\"\n ),\n row_by_var = choices_selected(\n choices = variable_choices(adex, subset = c(\"AGEGR1\", \"AGEGR2\")),\n selected = \"AGEGR1\"\n ),\n parcat = choices_selected(\n choices = value_choices(adex, \"PARCAT2\"),\n selected = \"Drug A\"\n ),\n add_total = FALSE\n )\n ),\n filter = list(\n ADSL = list(SAFFL = \"Y\")\n )\n)\n\n[INFO] 2023-08-04 15:36:39.8738 pid:12900 token:[] teal.modules.clinical Initializing tm_t_exposure\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n [1] teal.modules.clinical_0.8.15.9013 teal_0.13.0.9024 \n [3] teal.transform_0.3.0.9009 teal.slice_0.3.0.9028 \n [5] teal.data_0.2.0.9007 shiny_1.7.4.1 \n [7] dplyr_1.1.2 scda_0.1.6.9010 \n [9] tern_0.8.5.9006 rtables_0.6.2.9001 \n[11] magrittr_2.0.3 formatters_0.5.1.9001 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.0 R.utils_2.12.2 fastmap_1.1.1 \n [4] promises_1.2.0.1 shinyjs_2.1.0 digest_0.6.33 \n [7] estimability_1.4.1 mime_0.12 tern.gee_0.1.0.9006 \n[10] lifecycle_1.0.3 ellipsis_0.3.2 processx_3.8.2 \n[13] survival_3.5-5 compiler_4.3.1 rlang_1.1.1 \n[16] sass_0.4.7 tools_4.3.1 utf8_1.2.3 \n[19] yaml_2.3.7 knitr_1.43 htmlwidgets_1.6.2 \n[22] R.cache_0.16.0 withr_2.5.0 purrr_1.0.1 \n[25] R.oo_1.25.0 shinyWidgets_0.7.6 geepack_1.3.9 \n[28] grid_4.3.1 fansi_1.0.4 teal.logger_0.1.1.9009 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.4.2 \n[34] emmeans_1.8.7 scales_1.2.1 MASS_7.3-60 \n[37] cli_3.6.1 mvtnorm_1.2-2 rmarkdown_2.23 \n[40] generics_0.1.3 rstudioapi_0.15.0 cachem_1.0.8 \n[43] splines_4.3.1 assertthat_0.2.1 vctrs_0.6.3 \n[46] webshot_0.5.5 Matrix_1.6-0 jsonlite_1.8.7 \n[49] callr_3.7.3 teal.widgets_0.3.0.9007 testthat_3.1.10 \n[52] fontawesome_0.5.1 tidyr_1.3.0 jquerylib_0.1.4 \n[55] glue_1.6.2 ps_1.7.5 codetools_0.2-19 \n[58] gtable_0.3.3 later_1.3.1 shinycssloaders_1.0.0 \n[61] munsell_0.5.0 tibble_3.2.1 styler_1.10.1 \n[64] logger_0.2.2 pillar_1.9.0 htmltools_0.5.5 \n[67] brio_1.1.3 R6_2.5.1 Rdpack_2.4 \n[70] evaluate_0.21 lattice_0.21-8 R.methodsS3_1.8.2 \n[73] rbibutils_2.2.13 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.1.1.9020 httpuv_1.6.11 \n[79] bslib_0.5.0 Rcpp_1.0.11 teal.code_0.3.0.9009 \n[82] shinyvalidate_0.1.2 coda_0.19-4 nlme_3.1-162 \n[85] checkmate_2.2.0 xfun_0.39 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- anytime [* -> 0.3.9]\n- askpass [* -> 1.1]\n- assertive.base [* -> 0.0-9]\n- assertive.properties [* -> 0.0-5]\n- assertive.types [* -> 0.0-3]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- bit [* -> 4.0.5]\n- bit64 [* -> 4.0.5]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- clipr [* -> 0.8.0]\n- codetools [* -> 0.2-19]\n- colorspace [* -> 2.1-0]\n- commonmark [* -> 1.9.0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- crosstalk [* -> 1.2.0]\n- curl [* -> 5.0.1]\n- data.table [* -> 1.14.8]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- DT [* -> 0.28]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- foreach [* -> 1.5.2]\n- fs [* -> 1.6.3]\n- geeasy [* -> 0.1.1]\n- geeM [* -> 0.10.1]\n- geepack [* -> 1.3.9]\n- generics [* -> 0.1.3]\n- ggforce [* -> 0.4.1]\n- ggformula [* -> 0.10.4]\n- ggplot2 [* -> 3.4.2]\n- ggrepel [* -> 0.9.3]\n- ggridges [* -> 0.5.4]\n- ggstance [* -> 0.3.6]\n- glmnet [* -> 4.1-7]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- haven [* -> 2.5.3]\n- highr [* -> 0.10]\n- hms [* -> 1.1.3]\n- htmltools [* -> 0.5.5]\n- htmlwidgets [* -> 1.6.2]\n- httpuv [* -> 1.6.11]\n- httr [* -> 1.4.6]\n- isoband [* -> 0.2.7]\n- iterators [* -> 1.0.14]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- kinship2 [* -> 1.9.6]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- labelled [* -> 2.12.0]\n- later [* -> 1.3.1]\n- lattice [* -> 0.21-8]\n- lazyeval [* -> 0.2.2]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- logger [* -> 0.2.2]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- memoise [* -> 2.0.1]\n- MESS [* -> 0.5.9]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- mosaicCore [* -> 0.9.2.1]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- openssl [* -> 2.1.0]\n- parallelly [* -> 1.36.0]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- plotly [* -> 4.10.2]\n- plyr [* -> 1.8.8]\n- polyclip [* -> 1.10-4]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- progress [* -> 1.2.2]\n- promises [* -> 1.2.0.1]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quadprog [* -> 1.5-8]\n- quantreg [* -> 5.96]\n- R.cache [* -> 0.16.0]\n- R.methodsS3 [* -> 1.8.2]\n- R.oo [* -> 1.25.0]\n- R.utils [* -> 2.12.2]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppArmadillo [* -> 0.12.4.1.0]\n- RcppEigen [* -> 0.3.3.9.3]\n- Rdpack [* -> 2.4]\n- readr [* -> 2.1.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- shape [* -> 1.4.6]\n- shiny [* -> 1.7.4.1]\n- shinycssloaders [* -> 1.0.0]\n- shinyjs [* -> 2.1.0]\n- shinyvalidate [* -> 0.1.2]\n- shinyWidgets [* -> 0.7.6]\n- sourcetools [* -> 0.1.7-1]\n- SparseM [* -> 1.81]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- styler [* -> 1.10.1]\n- survival [* -> 3.5-5]\n- sys [* -> 3.4.2]\n- systemfonts [* -> 1.0.4]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- tweenr [* -> 2.0.2]\n- tzdb [* -> 0.4.0]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- vistime [* -> 1.2.3]\n- vroom [* -> 1.6.3]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- xtable [* -> 1.8-4]\n- yaml [* -> 2.3.7]\n- zip [* -> 2.3.0]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- scda [* -> 0.1.6.9010]\n- teal [* -> 0.13.0.9024]\n- teal.code [* -> 0.3.0.9009]\n- teal.data [* -> 0.2.0.9007]\n- teal.logger [* -> 0.1.1.9009]\n- teal.modules.clinical [* -> 0.8.15.9013]\n- teal.reporter [* -> 0.1.1.9020]\n- teal.slice [* -> 0.3.0.9028]\n- teal.transform [* -> 0.3.0.9009]\n- teal.widgets [* -> 0.3.0.9007]\n- tern [* -> 0.8.5.9006]\n- tern.gee [* -> 0.1.0.9006]\n- tern.mmrm [* -> 0.2.2.9005]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/other/rmpt03.lock'.\n\n\nDownload" }, { "objectID": "tables/other/rbmit01.html", "href": "tables/other/rbmit01.html", "title": "RBMIT01", "section": "", - "text": "Data Setup\nDraws\nImpute\nAnalyze\nPool\nCreate Output\nSession Info\n\n\n\nWe use a publicly available example dataset from an antidepressant clinical trial of an active drug versus placebo from the rbmi package. The relevant endpoint is the Hamilton 17-item depression rating scale (HAMD17) which was assessed at baseline and at weeks 1, 2, 4, and 6. Study drug discontinuation occurred in 24% of subjects from the active drug and 26% of subjects from placebo. All data after study drug discontinuation are missing and there is a single additional intermittent missing observation.\n\nCodelibrary(tern.rbmi)\nlibrary(dplyr)\nset.seed(123)\n\ndata <- antidepressant_data\nlevels(data$THERAPY) <- c(\"PLACEBO\", \"DRUG\") # This is important! The order defines the computation order later\n\nmissing_var <- \"CHANGE\"\nvars <- list(\n id = \"PATIENT\",\n visit = \"VISIT\",\n expand_vars = c(\"BASVAL\", \"THERAPY\"),\n group = \"THERAPY\"\n)\ncovariates <- list(\n draws = c(\"BASVAL*VISIT\", \"THERAPY*VISIT\"),\n analyse = c(\"BASVAL\")\n)\n\ndata <- data %>%\n dplyr::select(PATIENT, THERAPY, VISIT, BASVAL, THERAPY, CHANGE) %>%\n dplyr::mutate(dplyr::across(.cols = vars$id, ~ as.factor(.x))) %>%\n dplyr::arrange(dplyr::across(.cols = c(vars$id, vars$visit)))\n\n# Use expand_locf to add rows corresponding to visits with missing outcomes to the dataset\ndata_full <- do.call(\n expand_locf,\n args = list(\n data = data,\n vars = c(vars$expand_vars, vars$group),\n group = vars$id,\n order = c(vars$id, vars$visit)\n ) %>%\n append(lapply(data[c(vars$id, vars$visit)], levels))\n)\n\ndata_full <- data_full %>%\n dplyr::group_by(dplyr::across(vars$id)) %>%\n dplyr::mutate(!!vars$group := Filter(Negate(is.na), .data[[vars$group]])[1])\n\n# there are duplicates - use first value\ndata_full <- data_full %>%\n dplyr::group_by(dplyr::across(c(vars$id, vars$group, vars$visit))) %>%\n dplyr::slice(1) %>%\n dplyr::ungroup()\n# need to have a single ID column\ndata_full <- data_full %>%\n tidyr::unite(\"TMP_ID\", dplyr::all_of(vars$id), sep = \"_#_\", remove = FALSE) %>%\n dplyr::mutate(TMP_ID = as.factor(TMP_ID))\n\n\nCreating Intercurrent Event Data\nSet the imputation strategy to \"MAR\" for each patient with at least one missing observation.\n\nCodedata_ice <- data_full %>%\n dplyr::arrange(dplyr::across(.cols = c(\"TMP_ID\", vars$visit))) %>%\n dplyr::filter(is.na(.data[[missing_var]])) %>%\n dplyr::group_by(TMP_ID) %>%\n dplyr::slice(1) %>%\n dplyr::ungroup() %>%\n dplyr::select(all_of(c(\"TMP_ID\", vars$visit))) %>%\n dplyr::mutate(strategy = \"MAR\")\n\n\n\n\n\nThe rbmi::draws() function fits the imputation models and stores the corresponding parameter estimates or Bayesian posterior parameter draws. The three main inputs to the rbmi::draws() function are:\n\n\ndata - The primary longitudinal data.frame containing the outcome variable and all covariates.\n\ndata_ice - A data.frame which specifies the first visit affected by an intercurrent event (ICE) and the imputation strategy for handling missing outcome data after the ICE. At most one ICE which is to be imputed by a non-MAR strategy is allowed per subject.\n\nmethod - The statistical method used to fit the imputation models and to create imputed datasets.\n\nDefine Key Variables\nDefine the names of key variables in our dataset and the covariates included in the imputation model using rbmi::set_vars(). Note that the covariates argument can also include interaction terms.\n\nCodedebug_mode <- FALSE\n\ndraws_vars <- rbmi::set_vars(\n outcome = missing_var,\n visit = vars$visit,\n group = vars$group,\n covariates = covariates$draws\n)\ndraws_vars$subjid <- \"TMP_ID\"\n\n\nDefine which imputation method to use, then create samples for the imputation parameters by running the draws() function.\n\nCodedraws_method <- method_bayes()\n\ndraws_obj <- rbmi::draws(\n data = data_full,\n data_ice = data_ice,\n vars = draws_vars,\n method = draws_method\n)\n\n\nSAMPLING FOR MODEL 'MMRM' NOW (CHAIN 1).\nChain 1: \nChain 1: Gradient evaluation took 0.000408 seconds\nChain 1: 1000 transitions using 10 leapfrog steps per transition would take 4.08 seconds.\nChain 1: Adjust your expectations accordingly!\nChain 1: \nChain 1: \nChain 1: Iteration: 1 / 1200 [ 0%] (Warmup)\nChain 1: Iteration: 120 / 1200 [ 10%] (Warmup)\nChain 1: Iteration: 201 / 1200 [ 16%] (Sampling)\nChain 1: Iteration: 320 / 1200 [ 26%] (Sampling)\nChain 1: Iteration: 440 / 1200 [ 36%] (Sampling)\nChain 1: Iteration: 560 / 1200 [ 46%] (Sampling)\nChain 1: Iteration: 680 / 1200 [ 56%] (Sampling)\nChain 1: Iteration: 800 / 1200 [ 66%] (Sampling)\nChain 1: Iteration: 920 / 1200 [ 76%] (Sampling)\nChain 1: Iteration: 1040 / 1200 [ 86%] (Sampling)\nChain 1: Iteration: 1160 / 1200 [ 96%] (Sampling)\nChain 1: Iteration: 1200 / 1200 [100%] (Sampling)\nChain 1: \nChain 1: Elapsed Time: 0.692 seconds (Warm-up)\nChain 1: 2.284 seconds (Sampling)\nChain 1: 2.976 seconds (Total)\nChain 1: \n\n\n\n\n\nThe next step is to use the parameters from the imputation model to generate the imputed datasets. This is done via the rbmi::impute() function. The function only has two key inputs: the imputation model output from rbmi::draws() and the reference groups relevant to reference-based imputation methods. It’s usage is thus:\n\nCodeimpute_references <- c(\"DRUG\" = \"PLACEBO\", \"PLACEBO\" = \"PLACEBO\")\n\nimpute_obj <- rbmi::impute(\n draws_obj,\n references = impute_references\n)\n\n\n\n\nThe next step is to run the analysis model on each imputed dataset. This is done by defining an analysis function and then calling rbmi::analyse() to apply this function to each imputed dataset.\n\nCode# Define analysis model\nanalyse_fun <- ancova\n\nref_levels <- levels(impute_obj$data$group[[1]])\nnames(ref_levels) <- c(\"ref\", \"alt\")\n\nanalyse_obj <- rbmi::analyse(\n imputations = impute_obj,\n fun = analyse_fun,\n vars = rbmi::set_vars(\n subjid = \"TMP_ID\",\n outcome = missing_var,\n visit = vars$visit,\n group = vars$group,\n covariates = covariates$analyse\n )\n)\n\n\n\n\nThe rbmi::pool() function can be used to summarize the analysis results across multiple imputed datasets to provide an overall statistic with a standard error, confidence intervals and a p-value for the hypothesis test of the null hypothesis that the effect is equal to 0. Using the broom::tidy() function the rbmi final results are reshaped.\n\nCodelibrary(broom)\n\npool_obj <- rbmi::pool(\n results = analyse_obj,\n conf.level = 0.95,\n alternative = c(\"two.sided\", \"less\", \"greater\"),\n type = c(\"percentile\", \"normal\")\n)\n\ndf <- tidy(pool_obj)\ndf\n\n group est se_est lower_cl_est upper_cl_est est_contr se_contr\n1 ref -1.615820 0.4862316 -2.575771 -0.6558685 NA NA\n2 alt -1.707626 0.4749573 -2.645319 -0.7699335 -0.09180645 0.6826279\n3 ref -4.259215 0.6512947 -5.545482 -2.9729489 NA NA\n4 alt -2.803091 0.6401567 -4.067559 -1.5386238 1.45612388 0.9134765\n5 ref -6.387805 0.7157832 -7.803078 -4.9725331 NA NA\n6 alt -4.109707 0.6921316 -5.477690 -2.7417237 2.27809862 1.0002177\n7 ref -7.693888 0.8014324 -9.280710 -6.1070669 NA NA\n8 alt -4.794189 0.7518189 -6.280149 -3.3082297 2.89969888 1.0969392\n lower_cl_contr upper_cl_contr p_value relative_reduc visit conf_level\n1 NA NA NA NA 4 0.95\n2 -1.4394968 1.255884 0.89317724 0.05681725 4 0.95\n3 NA NA NA NA 5 0.95\n4 -0.3478941 3.260142 0.11289798 -0.34187609 5 0.95\n5 NA NA NA NA 6 0.95\n6 0.3007916 4.255406 0.02424954 -0.35663244 6 0.95\n7 NA NA NA NA 7 0.95\n8 0.7303454 5.069052 0.00917510 -0.37688341 7 0.95\n\n\n\n\nFinally, use functions from the rtables and tern packages to generate a nicely formatted rtable object.\n\nCoderesult <- basic_table() %>%\n split_cols_by(\"group\", ref_group = levels(df$group)[1]) %>%\n split_rows_by(\"visit\", split_label = \"Visit\", label_pos = \"topleft\") %>%\n summarize_rbmi() %>%\n build_table(df)\nresult\n\nVisit ref alt \n—————————————————————————————————————————————————————————————————————————\n4 \n Adjusted Mean (SE) -1.616 (0.486) -1.708 (0.475) \n 95% CI (-2.576, -0.656) (-2.645, -0.770)\n Difference in Adjusted Means (SE) -0.092 (0.683) \n 95% CI (-1.439, 1.256) \n Relative Reduction (%) 5.7% \n p-value (RBMI) 0.8932 \n5 \n Adjusted Mean (SE) -4.259 (0.651) -2.803 (0.640) \n 95% CI (-5.545, -2.973) (-4.068, -1.539)\n Difference in Adjusted Means (SE) 1.456 (0.913) \n 95% CI (-0.348, 3.260) \n Relative Reduction (%) -34.2% \n p-value (RBMI) 0.1129 \n6 \n Adjusted Mean (SE) -6.388 (0.716) -4.110 (0.692) \n 95% CI (-7.803, -4.973) (-5.478, -2.742)\n Difference in Adjusted Means (SE) 2.278 (1.000) \n 95% CI (0.301, 4.255) \n Relative Reduction (%) -35.7% \n p-value (RBMI) 0.0242 \n7 \n Adjusted Mean (SE) -7.694 (0.801) -4.794 (0.752) \n 95% CI (-9.281, -6.107) (-6.280, -3.308)\n Difference in Adjusted Means (SE) 2.900 (1.097) \n 95% CI (0.730, 5.069) \n Relative Reduction (%) -37.7% \n p-value (RBMI) 0.0092 \n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] broom_1.0.5 dplyr_1.1.2 tern.rbmi_0.1.2.9007 \n[4] tern_0.8.5.9006 rtables_0.6.2.9001 magrittr_2.0.3 \n[7] formatters_0.5.1.9001 rbmi_1.2.3 \n\nloaded via a namespace (and not attached):\n [1] gtable_0.3.3 TMB_1.9.5 xfun_0.39 \n [4] ggplot2_3.4.2 htmlwidgets_1.6.2 processx_3.8.2 \n [7] inline_0.3.19 lattice_0.21-8 callr_3.7.3 \n[10] numDeriv_2016.8-1.1 vctrs_0.6.3 tools_4.3.1 \n[13] Rdpack_2.4 ps_1.7.5 generics_0.1.3 \n[16] stats4_4.3.1 parallel_4.3.1 tibble_3.2.1 \n[19] mmrm_0.2.2 fansi_1.0.4 pkgconfig_2.0.3 \n[22] Matrix_1.6-0 checkmate_2.2.0 RcppParallel_5.1.7 \n[25] assertthat_0.2.1 lifecycle_1.0.3 compiler_4.3.1 \n[28] stringr_1.5.0 brio_1.1.3 munsell_0.5.0 \n[31] codetools_0.2-19 htmltools_0.5.5 yaml_2.3.7 \n[34] tidyr_1.3.0 pillar_1.9.0 crayon_1.5.2 \n[37] StanHeaders_2.26.27 nlme_3.1-162 rstan_2.21.8 \n[40] tidyselect_1.2.0 digest_0.6.33 mvtnorm_1.2-2 \n[43] stringi_1.7.12 purrr_1.0.1 splines_4.3.1 \n[46] fastmap_1.1.1 grid_4.3.1 colorspace_2.1-0 \n[49] cli_3.6.1 loo_2.6.0 survival_3.5-5 \n[52] pkgbuild_1.4.2 utf8_1.2.3 withr_2.5.0 \n[55] prettyunits_1.1.1 scales_1.2.1 backports_1.4.1 \n[58] estimability_1.4.1 rmarkdown_2.23 emmeans_1.8.7 \n[61] matrixStats_1.0.0 gridExtra_2.3 coda_0.19-4 \n[64] evaluate_0.21 knitr_1.43 rbibutils_2.2.13 \n[67] testthat_3.1.10 rlang_1.1.1 Rcpp_1.0.11 \n[70] xtable_1.8-4 glue_1.6.2 rstudioapi_0.15.0 \n[73] jsonlite_1.8.7 R6_2.5.1 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- colorspace [* -> 2.1-0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- fs [* -> 1.6.3]\n- generics [* -> 0.1.3]\n- ggplot2 [* -> 3.4.2]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- highr [* -> 0.10]\n- htmltools [* -> 0.5.5]\n- inline [* -> 0.3.19]\n- isoband [* -> 0.2.7]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- lattice [* -> 0.21-8]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- loo [* -> 2.6.0]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- matrixStats [* -> 1.0.0]\n- memoise [* -> 2.0.1]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgbuild [* -> 1.4.2]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quantreg [* -> 5.96]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- rbmi [* -> 1.2.3]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppEigen [* -> 0.3.3.9.3]\n- RcppParallel [* -> 5.1.7]\n- Rdpack [* -> 2.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- rstan [* -> 2.21.8]\n- rstantools [* -> 2.3.1.1]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- SparseM [* -> 1.81]\n- StanHeaders [* -> 2.26.27]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- survival [* -> 3.5-5]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- yaml [* -> 2.3.7]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- tern [* -> 0.8.5.9006]\n- tern.rbmi [* -> 0.1.2.9007]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/other/rbmit01.lock'.\n\n\nDownload" + "text": "Data Setup\nDraws\nImpute\nAnalyze\nPool\nCreate Output\nSession Info\n\n\n\nWe use a publicly available example dataset from an antidepressant clinical trial of an active drug versus placebo from the rbmi package. The relevant endpoint is the Hamilton 17-item depression rating scale (HAMD17) which was assessed at baseline and at weeks 1, 2, 4, and 6. Study drug discontinuation occurred in 24% of subjects from the active drug and 26% of subjects from placebo. All data after study drug discontinuation are missing and there is a single additional intermittent missing observation.\n\nCodelibrary(tern.rbmi)\nlibrary(dplyr)\nset.seed(123)\n\ndata <- antidepressant_data\nlevels(data$THERAPY) <- c(\"PLACEBO\", \"DRUG\") # This is important! The order defines the computation order later\n\nmissing_var <- \"CHANGE\"\nvars <- list(\n id = \"PATIENT\",\n visit = \"VISIT\",\n expand_vars = c(\"BASVAL\", \"THERAPY\"),\n group = \"THERAPY\"\n)\ncovariates <- list(\n draws = c(\"BASVAL*VISIT\", \"THERAPY*VISIT\"),\n analyse = c(\"BASVAL\")\n)\n\ndata <- data %>%\n dplyr::select(PATIENT, THERAPY, VISIT, BASVAL, THERAPY, CHANGE) %>%\n dplyr::mutate(dplyr::across(.cols = vars$id, ~ as.factor(.x))) %>%\n dplyr::arrange(dplyr::across(.cols = c(vars$id, vars$visit)))\n\n# Use expand_locf to add rows corresponding to visits with missing outcomes to the dataset\ndata_full <- do.call(\n expand_locf,\n args = list(\n data = data,\n vars = c(vars$expand_vars, vars$group),\n group = vars$id,\n order = c(vars$id, vars$visit)\n ) %>%\n append(lapply(data[c(vars$id, vars$visit)], levels))\n)\n\ndata_full <- data_full %>%\n dplyr::group_by(dplyr::across(vars$id)) %>%\n dplyr::mutate(!!vars$group := Filter(Negate(is.na), .data[[vars$group]])[1])\n\n# there are duplicates - use first value\ndata_full <- data_full %>%\n dplyr::group_by(dplyr::across(c(vars$id, vars$group, vars$visit))) %>%\n dplyr::slice(1) %>%\n dplyr::ungroup()\n# need to have a single ID column\ndata_full <- data_full %>%\n tidyr::unite(\"TMP_ID\", dplyr::all_of(vars$id), sep = \"_#_\", remove = FALSE) %>%\n dplyr::mutate(TMP_ID = as.factor(TMP_ID))\n\n\nCreating Intercurrent Event Data\nSet the imputation strategy to \"MAR\" for each patient with at least one missing observation.\n\nCodedata_ice <- data_full %>%\n dplyr::arrange(dplyr::across(.cols = c(\"TMP_ID\", vars$visit))) %>%\n dplyr::filter(is.na(.data[[missing_var]])) %>%\n dplyr::group_by(TMP_ID) %>%\n dplyr::slice(1) %>%\n dplyr::ungroup() %>%\n dplyr::select(all_of(c(\"TMP_ID\", vars$visit))) %>%\n dplyr::mutate(strategy = \"MAR\")\n\n\n\n\n\nThe rbmi::draws() function fits the imputation models and stores the corresponding parameter estimates or Bayesian posterior parameter draws. The three main inputs to the rbmi::draws() function are:\n\n\ndata - The primary longitudinal data.frame containing the outcome variable and all covariates.\n\ndata_ice - A data.frame which specifies the first visit affected by an intercurrent event (ICE) and the imputation strategy for handling missing outcome data after the ICE. At most one ICE which is to be imputed by a non-MAR strategy is allowed per subject.\n\nmethod - The statistical method used to fit the imputation models and to create imputed datasets.\n\nDefine Key Variables\nDefine the names of key variables in our dataset and the covariates included in the imputation model using rbmi::set_vars(). Note that the covariates argument can also include interaction terms.\n\nCodedebug_mode <- FALSE\n\ndraws_vars <- rbmi::set_vars(\n outcome = missing_var,\n visit = vars$visit,\n group = vars$group,\n covariates = covariates$draws\n)\ndraws_vars$subjid <- \"TMP_ID\"\n\n\nDefine which imputation method to use, then create samples for the imputation parameters by running the draws() function.\n\nCodedraws_method <- method_bayes()\n\ndraws_obj <- rbmi::draws(\n data = data_full,\n data_ice = data_ice,\n vars = draws_vars,\n method = draws_method\n)\n\n\nSAMPLING FOR MODEL 'MMRM' NOW (CHAIN 1).\nChain 1: \nChain 1: Gradient evaluation took 0.000441 seconds\nChain 1: 1000 transitions using 10 leapfrog steps per transition would take 4.41 seconds.\nChain 1: Adjust your expectations accordingly!\nChain 1: \nChain 1: \nChain 1: Iteration: 1 / 1200 [ 0%] (Warmup)\nChain 1: Iteration: 120 / 1200 [ 10%] (Warmup)\nChain 1: Iteration: 201 / 1200 [ 16%] (Sampling)\nChain 1: Iteration: 320 / 1200 [ 26%] (Sampling)\nChain 1: Iteration: 440 / 1200 [ 36%] (Sampling)\nChain 1: Iteration: 560 / 1200 [ 46%] (Sampling)\nChain 1: Iteration: 680 / 1200 [ 56%] (Sampling)\nChain 1: Iteration: 800 / 1200 [ 66%] (Sampling)\nChain 1: Iteration: 920 / 1200 [ 76%] (Sampling)\nChain 1: Iteration: 1040 / 1200 [ 86%] (Sampling)\nChain 1: Iteration: 1160 / 1200 [ 96%] (Sampling)\nChain 1: Iteration: 1200 / 1200 [100%] (Sampling)\nChain 1: \nChain 1: Elapsed Time: 0.83 seconds (Warm-up)\nChain 1: 2.727 seconds (Sampling)\nChain 1: 3.557 seconds (Total)\nChain 1: \n\n\n\n\n\nThe next step is to use the parameters from the imputation model to generate the imputed datasets. This is done via the rbmi::impute() function. The function only has two key inputs: the imputation model output from rbmi::draws() and the reference groups relevant to reference-based imputation methods. It’s usage is thus:\n\nCodeimpute_references <- c(\"DRUG\" = \"PLACEBO\", \"PLACEBO\" = \"PLACEBO\")\n\nimpute_obj <- rbmi::impute(\n draws_obj,\n references = impute_references\n)\n\n\n\n\nThe next step is to run the analysis model on each imputed dataset. This is done by defining an analysis function and then calling rbmi::analyse() to apply this function to each imputed dataset.\n\nCode# Define analysis model\nanalyse_fun <- ancova\n\nref_levels <- levels(impute_obj$data$group[[1]])\nnames(ref_levels) <- c(\"ref\", \"alt\")\n\nanalyse_obj <- rbmi::analyse(\n imputations = impute_obj,\n fun = analyse_fun,\n vars = rbmi::set_vars(\n subjid = \"TMP_ID\",\n outcome = missing_var,\n visit = vars$visit,\n group = vars$group,\n covariates = covariates$analyse\n )\n)\n\n\n\n\nThe rbmi::pool() function can be used to summarize the analysis results across multiple imputed datasets to provide an overall statistic with a standard error, confidence intervals and a p-value for the hypothesis test of the null hypothesis that the effect is equal to 0. Using the broom::tidy() function the rbmi final results are reshaped.\n\nCodelibrary(broom)\n\npool_obj <- rbmi::pool(\n results = analyse_obj,\n conf.level = 0.95,\n alternative = c(\"two.sided\", \"less\", \"greater\"),\n type = c(\"percentile\", \"normal\")\n)\n\ndf <- tidy(pool_obj)\ndf\n\n group est se_est lower_cl_est upper_cl_est est_contr se_contr\n1 ref -1.615820 0.4862316 -2.575771 -0.6558685 NA NA\n2 alt -1.707626 0.4749573 -2.645319 -0.7699335 -0.09180645 0.6826279\n3 ref -4.259215 0.6512947 -5.545482 -2.9729489 NA NA\n4 alt -2.803091 0.6401567 -4.067559 -1.5386238 1.45612388 0.9134765\n5 ref -6.387805 0.7157832 -7.803078 -4.9725331 NA NA\n6 alt -4.109707 0.6921316 -5.477690 -2.7417237 2.27809862 1.0002177\n7 ref -7.693888 0.8014324 -9.280710 -6.1070669 NA NA\n8 alt -4.794189 0.7518189 -6.280149 -3.3082297 2.89969888 1.0969392\n lower_cl_contr upper_cl_contr p_value relative_reduc visit conf_level\n1 NA NA NA NA 4 0.95\n2 -1.4394968 1.255884 0.89317724 0.05681725 4 0.95\n3 NA NA NA NA 5 0.95\n4 -0.3478941 3.260142 0.11289798 -0.34187609 5 0.95\n5 NA NA NA NA 6 0.95\n6 0.3007916 4.255406 0.02424954 -0.35663244 6 0.95\n7 NA NA NA NA 7 0.95\n8 0.7303454 5.069052 0.00917510 -0.37688341 7 0.95\n\n\n\n\nFinally, use functions from the rtables and tern packages to generate a nicely formatted rtable object.\n\nCoderesult <- basic_table() %>%\n split_cols_by(\"group\", ref_group = levels(df$group)[1]) %>%\n split_rows_by(\"visit\", split_label = \"Visit\", label_pos = \"topleft\") %>%\n summarize_rbmi() %>%\n build_table(df)\nresult\n\nVisit ref alt \n—————————————————————————————————————————————————————————————————————————\n4 \n Adjusted Mean (SE) -1.616 (0.486) -1.708 (0.475) \n 95% CI (-2.576, -0.656) (-2.645, -0.770)\n Difference in Adjusted Means (SE) -0.092 (0.683) \n 95% CI (-1.439, 1.256) \n Relative Reduction (%) 5.7% \n p-value (RBMI) 0.8932 \n5 \n Adjusted Mean (SE) -4.259 (0.651) -2.803 (0.640) \n 95% CI (-5.545, -2.973) (-4.068, -1.539)\n Difference in Adjusted Means (SE) 1.456 (0.913) \n 95% CI (-0.348, 3.260) \n Relative Reduction (%) -34.2% \n p-value (RBMI) 0.1129 \n6 \n Adjusted Mean (SE) -6.388 (0.716) -4.110 (0.692) \n 95% CI (-7.803, -4.973) (-5.478, -2.742)\n Difference in Adjusted Means (SE) 2.278 (1.000) \n 95% CI (0.301, 4.255) \n Relative Reduction (%) -35.7% \n p-value (RBMI) 0.0242 \n7 \n Adjusted Mean (SE) -7.694 (0.801) -4.794 (0.752) \n 95% CI (-9.281, -6.107) (-6.280, -3.308)\n Difference in Adjusted Means (SE) 2.900 (1.097) \n 95% CI (0.730, 5.069) \n Relative Reduction (%) -37.7% \n p-value (RBMI) 0.0092 \n\n\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.1 (2023-06-16)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.2 LTS\n\nMatrix products: default\nBLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 \nLAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0\n\nlocale:\n [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C \n [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 \n [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 \n [7] LC_PAPER=en_US.UTF-8 LC_NAME=C \n [9] LC_ADDRESS=C LC_TELEPHONE=C \n[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C \n\ntime zone: Etc/UTC\ntzcode source: system (glibc)\n\nattached base packages:\n[1] stats graphics grDevices utils datasets methods base \n\nother attached packages:\n[1] broom_1.0.5 dplyr_1.1.2 tern.rbmi_0.1.2.9007 \n[4] tern_0.8.5.9006 rtables_0.6.2.9001 magrittr_2.0.3 \n[7] formatters_0.5.1.9001 rbmi_1.2.3 \n\nloaded via a namespace (and not attached):\n [1] gtable_0.3.3 TMB_1.9.5 xfun_0.39 \n [4] ggplot2_3.4.2 htmlwidgets_1.6.2 processx_3.8.2 \n [7] inline_0.3.19 lattice_0.21-8 callr_3.7.3 \n[10] numDeriv_2016.8-1.1 vctrs_0.6.3 tools_4.3.1 \n[13] Rdpack_2.4 ps_1.7.5 generics_0.1.3 \n[16] stats4_4.3.1 parallel_4.3.1 tibble_3.2.1 \n[19] mmrm_0.2.2 fansi_1.0.4 pkgconfig_2.0.3 \n[22] Matrix_1.6-0 checkmate_2.2.0 RcppParallel_5.1.7 \n[25] assertthat_0.2.1 lifecycle_1.0.3 compiler_4.3.1 \n[28] stringr_1.5.0 brio_1.1.3 munsell_0.5.0 \n[31] codetools_0.2-19 htmltools_0.5.5 yaml_2.3.7 \n[34] tidyr_1.3.0 pillar_1.9.0 crayon_1.5.2 \n[37] StanHeaders_2.26.27 nlme_3.1-162 rstan_2.21.8 \n[40] tidyselect_1.2.0 digest_0.6.33 mvtnorm_1.2-2 \n[43] stringi_1.7.12 purrr_1.0.1 splines_4.3.1 \n[46] fastmap_1.1.1 grid_4.3.1 colorspace_2.1-0 \n[49] cli_3.6.1 loo_2.6.0 survival_3.5-5 \n[52] pkgbuild_1.4.2 utf8_1.2.3 withr_2.5.0 \n[55] prettyunits_1.1.1 scales_1.2.1 backports_1.4.1 \n[58] estimability_1.4.1 rmarkdown_2.23 emmeans_1.8.7 \n[61] matrixStats_1.0.0 gridExtra_2.3 coda_0.19-4 \n[64] evaluate_0.21 knitr_1.43 rbibutils_2.2.13 \n[67] testthat_3.1.10 rlang_1.1.1 Rcpp_1.0.11 \n[70] xtable_1.8-4 glue_1.6.2 rstudioapi_0.15.0 \n[73] jsonlite_1.8.7 R6_2.5.1 \n\n\n\nrenv.lock file\n\nCodeparent_file_path <- knitr::current_input(dir = TRUE)\n\nbook_root_dir <- parent_file_path\nwhile (!file.exists(file.path(book_root_dir, \"_quarto.yml\"))) book_root_dir <- dirname(book_root_dir)\n\nlock_path <- file.path(\"../../assets/www/lock\", paste0(gsub(file.path(book_root_dir, \"\"), \"\", gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE))), \".lock\"))\n\nrenv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n\nThe following package(s) will be updated in the lockfile:\n\n# Bioconductor ---------------------------------------------------------------\n- BiocVersion [* -> 3.17.1]\n\n# CRAN -----------------------------------------------------------------------\n- abind [* -> 1.4-5]\n- assertthat [* -> 0.2.1]\n- backports [* -> 1.4.1]\n- base64enc [* -> 0.1-3]\n- BH [* -> 1.81.0-1]\n- BiocManager [* -> 1.30.21.1]\n- boot [* -> 1.3-28.1]\n- brio [* -> 1.1.3]\n- broom [* -> 1.0.5]\n- bslib [* -> 0.5.0]\n- cachem [* -> 1.0.8]\n- callr [* -> 3.7.3]\n- car [* -> 3.1-2]\n- carData [* -> 3.0-5]\n- checkmate [* -> 2.2.0]\n- cli [* -> 3.6.1]\n- colorspace [* -> 2.1-0]\n- cowplot [* -> 1.1.1]\n- cpp11 [* -> 0.4.5]\n- crayon [* -> 1.5.2]\n- desc [* -> 1.4.2]\n- diffobj [* -> 0.3.5]\n- digest [* -> 0.6.33]\n- dplyr [* -> 1.1.2]\n- ellipsis [* -> 0.3.2]\n- emmeans [* -> 1.8.7]\n- estimability [* -> 1.4.1]\n- evaluate [* -> 0.21]\n- fansi [* -> 1.0.4]\n- farver [* -> 2.1.1]\n- fastmap [* -> 1.1.1]\n- fontawesome [* -> 0.5.1]\n- forcats [* -> 1.0.0]\n- fs [* -> 1.6.3]\n- generics [* -> 0.1.3]\n- ggplot2 [* -> 3.4.2]\n- glue [* -> 1.6.2]\n- gridExtra [* -> 2.3]\n- gtable [* -> 0.3.3]\n- highr [* -> 0.10]\n- htmltools [* -> 0.5.5]\n- inline [* -> 0.3.19]\n- isoband [* -> 0.2.7]\n- jquerylib [* -> 0.1.4]\n- jsonlite [* -> 1.8.7]\n- knitr [* -> 1.43]\n- labeling [* -> 0.4.2]\n- lattice [* -> 0.21-8]\n- lifecycle [* -> 1.0.3]\n- lme4 [* -> 1.1-34]\n- loo [* -> 2.6.0]\n- magrittr [* -> 2.0.3]\n- MASS [* -> 7.3-60]\n- Matrix [* -> 1.6-0]\n- MatrixModels [* -> 0.5-2]\n- matrixStats [* -> 1.0.0]\n- memoise [* -> 2.0.1]\n- mgcv [* -> 1.9-0]\n- mime [* -> 0.12]\n- minqa [* -> 1.2.5]\n- mmrm [* -> 0.2.2]\n- munsell [* -> 0.5.0]\n- mvtnorm [* -> 1.2-2]\n- nlme [* -> 3.1-162]\n- nloptr [* -> 2.0.3]\n- nnet [* -> 7.3-19]\n- numDeriv [* -> 2016.8-1.1]\n- pbkrtest [* -> 0.5.2]\n- pillar [* -> 1.9.0]\n- pkgbuild [* -> 1.4.2]\n- pkgconfig [* -> 2.0.3]\n- pkgload [* -> 1.3.2.1]\n- praise [* -> 1.0.0]\n- prettyunits [* -> 1.1.1]\n- processx [* -> 3.8.2]\n- ps [* -> 1.7.5]\n- purrr [* -> 1.0.1]\n- quantreg [* -> 5.96]\n- R6 [* -> 2.5.1]\n- rappdirs [* -> 0.3.3]\n- rbibutils [* -> 2.2.13]\n- rbmi [* -> 1.2.3]\n- RColorBrewer [* -> 1.1-3]\n- Rcpp [* -> 1.0.11]\n- RcppEigen [* -> 0.3.3.9.3]\n- RcppParallel [* -> 5.1.7]\n- Rdpack [* -> 2.4]\n- rematch2 [* -> 2.1.2]\n- renv [* -> 1.0.0]\n- rlang [* -> 1.1.1]\n- rmarkdown [* -> 2.23]\n- rprojroot [* -> 2.0.3]\n- rstan [* -> 2.21.8]\n- rstantools [* -> 2.3.1.1]\n- sass [* -> 0.4.7]\n- scales [* -> 1.2.1]\n- SparseM [* -> 1.81]\n- StanHeaders [* -> 2.26.27]\n- stringi [* -> 1.7.12]\n- stringr [* -> 1.5.0]\n- survival [* -> 3.5-5]\n- testthat [* -> 3.1.10]\n- tibble [* -> 3.2.1]\n- tidyr [* -> 1.3.0]\n- tidyselect [* -> 1.2.0]\n- tinytex [* -> 0.45]\n- TMB [* -> 1.9.5]\n- utf8 [* -> 1.2.3]\n- vctrs [* -> 0.6.3]\n- viridisLite [* -> 0.4.2]\n- waldo [* -> 0.5.1]\n- withr [* -> 2.5.0]\n- xfun [* -> 0.39]\n- yaml [* -> 2.3.7]\n\n# Git ------------------------------------------------------------------------\n- formatters [* -> 0.5.1.9001]\n- rtables [* -> 0.6.2.9001]\n- tern [* -> 0.8.5.9006]\n- tern.rbmi [* -> 0.1.2.9007]\n\nThe version of R recorded in the lockfile will be updated:\n- R [* -> 4.3.1]\n\n- Lockfile written to '../../assets/www/lock/tables/other/rbmit01.lock'.\n\n\nDownload" } ] \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index da1f590eaf..96bde868bd 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2,570 +2,570 @@ https://insightsengineering.github.io/tlg-catalog/tlg-index.html - 2023-08-04T15:18:56.152Z + 2023-08-04T15:38:02.412Z https://insightsengineering.github.io/tlg-catalog/tables/other/aovt02.html - 2023-08-04T15:18:36.912Z + 2023-08-04T15:37:39.936Z https://insightsengineering.github.io/tlg-catalog/tables/other/rmpt05.html - 2023-08-04T15:17:34.804Z + 2023-08-04T15:36:33.847Z https://insightsengineering.github.io/tlg-catalog/tables/other/rmpt06.html - 2023-08-04T15:16:45.663Z + 2023-08-04T15:35:40.771Z https://insightsengineering.github.io/tlg-catalog/tables/other/aovt03.html - 2023-08-04T15:16:28.403Z + 2023-08-04T15:35:20.702Z https://insightsengineering.github.io/tlg-catalog/tables/other/cmht01.html - 2023-08-04T15:16:05.511Z + 2023-08-04T15:34:53.854Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet09.html - 2023-08-04T15:14:59.886Z + 2023-08-04T15:33:42.741Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet06.html - 2023-08-04T15:13:51.541Z + 2023-08-04T15:32:28.692Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet07.html - 2023-08-04T15:12:37.908Z + 2023-08-04T15:31:04.223Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet03.html - 2023-08-04T15:11:48.600Z + 2023-08-04T15:30:11.043Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet02.html - 2023-08-04T15:10:39.171Z + 2023-08-04T15:28:56.334Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet06_smq.html - 2023-08-04T15:09:40.062Z + 2023-08-04T15:27:52.725Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet10.html - 2023-08-04T15:08:36.286Z + 2023-08-04T15:26:43.156Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet01.html - 2023-08-04T15:07:37.437Z + 2023-08-04T15:25:40.867Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/adat02.html - 2023-08-04T15:07:01.245Z + 2023-08-04T15:25:01.671Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkpt04.html - 2023-08-04T15:06:46.057Z + 2023-08-04T15:24:44.271Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkct01.html - 2023-08-04T15:06:30.485Z + 2023-08-04T15:24:26.331Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/adat03.html - 2023-08-04T15:06:15.264Z + 2023-08-04T15:24:08.898Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkpt11.html - 2023-08-04T15:05:59.948Z + 2023-08-04T15:23:50.930Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkpt08.html - 2023-08-04T15:05:44.736Z + 2023-08-04T15:23:33.250Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkpt07.html - 2023-08-04T15:05:29.824Z + 2023-08-04T15:23:15.946Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt10.html - 2023-08-04T15:04:47.103Z + 2023-08-04T15:22:30.285Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt03.html - 2023-08-04T15:04:29.523Z + 2023-08-04T15:22:09.901Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt13.html - 2023-08-04T15:03:42.027Z + 2023-08-04T15:21:18.496Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt10_bl.html - 2023-08-04T15:02:15.594Z + 2023-08-04T15:19:45.939Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt08.html - 2023-08-04T15:01:31.373Z + 2023-08-04T15:18:58.243Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt12.html - 2023-08-04T15:01:16.949Z + 2023-08-04T15:18:41.018Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt09.html - 2023-08-04T15:00:32.645Z + 2023-08-04T15:17:53.230Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt05.html - 2023-08-04T14:59:49.600Z + 2023-08-04T15:17:06.905Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt14.html - 2023-08-04T14:59:05.944Z + 2023-08-04T15:16:20.249Z https://insightsengineering.github.io/tlg-catalog/tables/safety/cmt01b.html - 2023-08-04T14:57:54.243Z + 2023-08-04T15:15:02.652Z https://insightsengineering.github.io/tlg-catalog/tables/safety/enrollment01.html - 2023-08-04T14:56:48.806Z + 2023-08-04T15:13:52.759Z https://insightsengineering.github.io/tlg-catalog/tables/safety/pdt01.html - 2023-08-04T14:55:34.146Z + 2023-08-04T15:12:32.622Z https://insightsengineering.github.io/tlg-catalog/tables/safety/egt05_qtcat.html - 2023-08-04T14:54:40.077Z + 2023-08-04T15:11:34.113Z https://insightsengineering.github.io/tlg-catalog/tables/safety/egt04.html - 2023-08-04T14:53:24.412Z + 2023-08-04T15:10:14.820Z https://insightsengineering.github.io/tlg-catalog/tables/safety/vst02.html - 2023-08-04T14:53:09.852Z + 2023-08-04T15:09:58.064Z https://insightsengineering.github.io/tlg-catalog/tables/safety/vst01.html - 2023-08-04T14:52:36.472Z + 2023-08-04T15:09:21.816Z https://insightsengineering.github.io/tlg-catalog/tables/safety/mht01.html - 2023-08-04T14:51:12.947Z + 2023-08-04T15:07:53.999Z https://insightsengineering.github.io/tlg-catalog/tables/safety/egt02.html - 2023-08-04T14:50:21.954Z + 2023-08-04T15:06:59.110Z https://insightsengineering.github.io/tlg-catalog/tables/safety/pdt02.html - 2023-08-04T14:49:24.386Z + 2023-08-04T15:05:56.597Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/dort01.html - 2023-08-04T14:49:09.557Z + 2023-08-04T15:05:39.441Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/ttet01.html - 2023-08-04T14:47:41.781Z + 2023-08-04T15:04:05.684Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/coxt02.html - 2023-08-04T14:46:16.340Z + 2023-08-04T15:02:34.427Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/mmrmt01.html - 2023-08-04T14:44:53.015Z + 2023-08-04T15:01:07.962Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/lgrt02.html - 2023-08-04T14:43:25.522Z + 2023-08-04T14:59:36.037Z https://insightsengineering.github.io/tlg-catalog/graphs/other/mmrmg02.html - 2023-08-04T14:42:12.029Z + 2023-08-04T14:58:18.812Z https://insightsengineering.github.io/tlg-catalog/graphs/other/mng01.html - 2023-08-04T14:40:48.396Z + 2023-08-04T14:56:47.523Z https://insightsengineering.github.io/tlg-catalog/graphs/other/ltg01.html - 2023-08-04T14:39:46.179Z + 2023-08-04T14:55:42.090Z https://insightsengineering.github.io/tlg-catalog/graphs/other/fstg02.html - 2023-08-04T14:39:04.823Z + 2023-08-04T14:54:55.157Z https://insightsengineering.github.io/tlg-catalog/graphs/other/kmg01.html - 2023-08-04T14:37:36.830Z + 2023-08-04T14:53:21.908Z https://insightsengineering.github.io/tlg-catalog/graphs/other/cig01.html - 2023-08-04T14:36:06.801Z + 2023-08-04T14:51:43.567Z https://insightsengineering.github.io/tlg-catalog/graphs/pharmacokinetic/pkcg01.html - 2023-08-04T14:35:31.761Z + 2023-08-04T14:51:06.659Z https://insightsengineering.github.io/tlg-catalog/graphs/pharmacokinetic/pkcg02.html - 2023-08-04T14:35:05.481Z + 2023-08-04T14:50:36.810Z https://insightsengineering.github.io/tlg-catalog/graphs/pharmacokinetic/pkpg01.html - 2023-08-04T14:34:43.368Z + 2023-08-04T14:50:12.070Z https://insightsengineering.github.io/tlg-catalog/graphs/pharmacokinetic/pkpg03.html - 2023-08-04T14:34:21.544Z + 2023-08-04T14:49:47.746Z https://insightsengineering.github.io/tlg-catalog/test-utils/envir_hook.html - 2023-08-04T14:34:09.384Z + 2023-08-04T14:49:34.318Z https://insightsengineering.github.io/tlg-catalog/index.html - 2023-08-04T14:33:45.388Z + 2023-08-04T14:49:07.377Z https://insightsengineering.github.io/tlg-catalog/listings/other/exl01.html - 2023-08-04T14:33:43.512Z + 2023-08-04T14:49:05.129Z https://insightsengineering.github.io/tlg-catalog/listings/other/lbl02b.html - 2023-08-04T14:33:34.660Z + 2023-08-04T14:48:55.037Z https://insightsengineering.github.io/tlg-catalog/listings/other/cml01.html - 2023-08-04T14:33:25.439Z + 2023-08-04T14:48:44.473Z https://insightsengineering.github.io/tlg-catalog/listings/other/lbl01.html - 2023-08-04T14:33:17.211Z + 2023-08-04T14:48:35.141Z https://insightsengineering.github.io/tlg-catalog/listings/other/ael04.html - 2023-08-04T14:33:08.275Z + 2023-08-04T14:48:24.993Z https://insightsengineering.github.io/tlg-catalog/listings/other/egl01.html - 2023-08-04T14:32:59.707Z + 2023-08-04T14:48:15.337Z https://insightsengineering.github.io/tlg-catalog/listings/other/lbl02a.html - 2023-08-04T14:32:50.455Z + 2023-08-04T14:48:04.932Z https://insightsengineering.github.io/tlg-catalog/listings/other/cml02a_gl.html - 2023-08-04T14:32:41.959Z + 2023-08-04T14:47:55.312Z https://insightsengineering.github.io/tlg-catalog/listings/other/dsl01.html - 2023-08-04T14:32:33.907Z + 2023-08-04T14:47:46.024Z https://insightsengineering.github.io/tlg-catalog/listings/other/dsl02.html - 2023-08-04T14:32:25.599Z + 2023-08-04T14:47:36.708Z https://insightsengineering.github.io/tlg-catalog/listings/other/mhl01.html - 2023-08-04T14:32:17.359Z + 2023-08-04T14:47:27.304Z https://insightsengineering.github.io/tlg-catalog/listings/pharmacokinetic/pkpl01.html - 2023-08-04T14:32:09.235Z + 2023-08-04T14:47:17.948Z https://insightsengineering.github.io/tlg-catalog/listings/pharmacokinetic/adal02.html - 2023-08-04T14:31:59.991Z + 2023-08-04T14:47:07.384Z https://insightsengineering.github.io/tlg-catalog/listings/pharmacokinetic/pkcl02.html - 2023-08-04T14:31:51.495Z + 2023-08-04T14:46:57.536Z https://insightsengineering.github.io/tlg-catalog/listings/pharmacokinetic/pkpl02.html - 2023-08-04T14:31:45.462Z + 2023-08-04T14:46:50.784Z https://insightsengineering.github.io/tlg-catalog/listings/pharmacokinetic/pkcl01.html - 2023-08-04T14:31:55.735Z + 2023-08-04T14:47:02.504Z https://insightsengineering.github.io/tlg-catalog/listings/pharmacokinetic/pkpl04.html - 2023-08-04T14:32:04.619Z + 2023-08-04T14:47:12.692Z https://insightsengineering.github.io/tlg-catalog/listings/other/ael01_nollt.html - 2023-08-04T14:32:13.139Z + 2023-08-04T14:47:22.512Z https://insightsengineering.github.io/tlg-catalog/listings/other/ael03.html - 2023-08-04T14:32:21.559Z + 2023-08-04T14:47:32.080Z https://insightsengineering.github.io/tlg-catalog/listings/other/ael02.html - 2023-08-04T14:32:29.795Z + 2023-08-04T14:47:41.416Z https://insightsengineering.github.io/tlg-catalog/listings/other/cml02b_gl.html - 2023-08-04T14:32:37.919Z + 2023-08-04T14:47:50.680Z https://insightsengineering.github.io/tlg-catalog/listings/other/dsur4.html - 2023-08-04T14:32:46.027Z + 2023-08-04T14:47:59.936Z https://insightsengineering.github.io/tlg-catalog/listings/other/ael02_ed.html - 2023-08-04T14:32:54.955Z + 2023-08-04T14:48:10.049Z https://insightsengineering.github.io/tlg-catalog/listings/other/lbl01_rls.html - 2023-08-04T14:33:04.135Z + 2023-08-04T14:48:20.377Z https://insightsengineering.github.io/tlg-catalog/listings/other/oncl01.html - 2023-08-04T14:33:12.771Z + 2023-08-04T14:48:30.053Z https://insightsengineering.github.io/tlg-catalog/listings/other/ael01.html - 2023-08-04T14:33:21.135Z + 2023-08-04T14:48:39.637Z https://insightsengineering.github.io/tlg-catalog/listings/other/vsl01.html - 2023-08-04T14:33:30.288Z + 2023-08-04T14:48:49.985Z https://insightsengineering.github.io/tlg-catalog/listings/other/lbl02a_rls.html - 2023-08-04T14:33:39.280Z + 2023-08-04T14:49:00.329Z https://insightsengineering.github.io/tlg-catalog/si.html - 2023-08-04T14:33:44.848Z + 2023-08-04T14:49:06.725Z https://insightsengineering.github.io/tlg-catalog/appendix/session.html - 2023-08-04T14:34:07.524Z + 2023-08-04T14:49:32.162Z https://insightsengineering.github.io/tlg-catalog/test-utils/save_results.html - 2023-08-04T14:34:11.216Z + 2023-08-04T14:49:36.390Z https://insightsengineering.github.io/tlg-catalog/graphs/pharmacokinetic/pkpg04.html - 2023-08-04T14:34:32.520Z + 2023-08-04T14:49:59.954Z https://insightsengineering.github.io/tlg-catalog/graphs/pharmacokinetic/pkpg02.html - 2023-08-04T14:34:54.788Z + 2023-08-04T14:50:25.006Z https://insightsengineering.github.io/tlg-catalog/graphs/pharmacokinetic/pkpg06.html - 2023-08-04T14:35:18.029Z + 2023-08-04T14:50:51.139Z https://insightsengineering.github.io/tlg-catalog/graphs/pharmacokinetic/pkcg03.html - 2023-08-04T14:35:42.553Z + 2023-08-04T14:51:18.779Z https://insightsengineering.github.io/tlg-catalog/graphs/other/bwg01.html - 2023-08-04T14:36:41.434Z + 2023-08-04T14:52:21.836Z https://insightsengineering.github.io/tlg-catalog/graphs/other/mmrmg01.html - 2023-08-04T14:38:20.323Z + 2023-08-04T14:54:08.169Z https://insightsengineering.github.io/tlg-catalog/graphs/other/brg01.html - 2023-08-04T14:39:19.927Z + 2023-08-04T14:55:12.162Z https://insightsengineering.github.io/tlg-catalog/graphs/other/ippg01.html - 2023-08-04T14:40:18.804Z + 2023-08-04T14:56:16.306Z https://insightsengineering.github.io/tlg-catalog/graphs/other/fstg01.html - 2023-08-04T14:41:31.097Z + 2023-08-04T14:57:32.939Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/onct05.html - 2023-08-04T14:42:52.782Z + 2023-08-04T14:59:01.108Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/rspt01.html - 2023-08-04T14:44:03.634Z + 2023-08-04T15:00:14.849Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/coxt01.html - 2023-08-04T14:45:29.511Z + 2023-08-04T15:01:45.554Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/aovt01.html - 2023-08-04T14:46:57.328Z + 2023-08-04T15:03:17.379Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/cfbt01.html - 2023-08-04T14:48:15.337Z + 2023-08-04T15:04:41.432Z https://insightsengineering.github.io/tlg-catalog/tables/safety/dtht01.html - 2023-08-04T14:49:17.690Z + 2023-08-04T15:05:48.965Z https://insightsengineering.github.io/tlg-catalog/tables/safety/cmt01.html - 2023-08-04T14:49:47.998Z + 2023-08-04T15:06:23.290Z https://insightsengineering.github.io/tlg-catalog/tables/safety/ext01.html - 2023-08-04T14:50:46.898Z + 2023-08-04T15:07:26.026Z https://insightsengineering.github.io/tlg-catalog/tables/safety/egt01.html - 2023-08-04T14:51:46.487Z + 2023-08-04T15:08:29.379Z https://insightsengineering.github.io/tlg-catalog/tables/safety/eudrat02.html - 2023-08-04T14:52:43.564Z + 2023-08-04T15:09:29.956Z https://insightsengineering.github.io/tlg-catalog/tables/safety/eudrat01.html - 2023-08-04T14:53:17.204Z + 2023-08-04T15:10:06.536Z https://insightsengineering.github.io/tlg-catalog/tables/safety/dst01.html - 2023-08-04T14:53:59.541Z + 2023-08-04T15:10:51.489Z https://insightsengineering.github.io/tlg-catalog/tables/safety/cmt01a.html - 2023-08-04T14:55:08.465Z + 2023-08-04T15:12:04.638Z https://insightsengineering.github.io/tlg-catalog/tables/safety/cmt02_pt.html - 2023-08-04T14:56:12.854Z + 2023-08-04T15:13:13.119Z https://insightsengineering.github.io/tlg-catalog/tables/safety/dmt01.html - 2023-08-04T14:57:25.395Z + 2023-08-04T15:14:31.519Z https://insightsengineering.github.io/tlg-catalog/tables/safety/egt03.html - 2023-08-04T14:58:25.455Z + 2023-08-04T15:15:36.964Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt04.html - 2023-08-04T14:59:40.728Z + 2023-08-04T15:16:56.653Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt01.html - 2023-08-04T15:00:23.393Z + 2023-08-04T15:17:42.658Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt11.html - 2023-08-04T15:01:09.705Z + 2023-08-04T15:18:32.482Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt12_bl.html - 2023-08-04T15:01:24.149Z + 2023-08-04T15:18:49.567Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt11_bl.html - 2023-08-04T15:02:08.118Z + 2023-08-04T15:19:37.239Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt15.html - 2023-08-04T15:02:42.910Z + 2023-08-04T15:20:15.136Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt02.html - 2023-08-04T15:04:05.411Z + 2023-08-04T15:21:43.901Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt06.html - 2023-08-04T15:04:39.711Z + 2023-08-04T15:22:21.637Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt07.html - 2023-08-04T15:05:22.460Z + 2023-08-04T15:23:07.574Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/adat04b.html - 2023-08-04T15:05:37.704Z + 2023-08-04T15:23:25.102Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/adat01.html - 2023-08-04T15:05:52.720Z + 2023-08-04T15:23:42.490Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkpt03.html - 2023-08-04T15:06:07.640Z + 2023-08-04T15:23:59.882Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkpt06.html - 2023-08-04T15:06:22.428Z + 2023-08-04T15:24:17.138Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkpt05.html - 2023-08-04T15:06:38.457Z + 2023-08-04T15:24:35.423Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/adat04a.html - 2023-08-04T15:06:54.173Z + 2023-08-04T15:24:53.579Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkpt02.html - 2023-08-04T15:07:08.733Z + 2023-08-04T15:25:10.171Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet05_all.html - 2023-08-04T15:08:01.657Z + 2023-08-04T15:26:06.808Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet01_aesi.html - 2023-08-04T15:09:04.870Z + 2023-08-04T15:27:15.557Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet05.html - 2023-08-04T15:10:02.159Z + 2023-08-04T15:28:16.525Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet02_smq.html - 2023-08-04T15:11:12.979Z + 2023-08-04T15:29:33.334Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet09_smq.html - 2023-08-04T15:12:15.620Z + 2023-08-04T15:30:40.007Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet04.html - 2023-08-04T15:13:16.609Z + 2023-08-04T15:31:50.840Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet04_pi.html - 2023-08-04T15:14:28.354Z + 2023-08-04T15:33:09.065Z https://insightsengineering.github.io/tlg-catalog/tables/other/rmpt01.html - 2023-08-04T15:15:24.490Z + 2023-08-04T15:34:09.289Z https://insightsengineering.github.io/tlg-catalog/tables/other/disclosurest01.html - 2023-08-04T15:16:15.527Z + 2023-08-04T15:35:05.434Z https://insightsengineering.github.io/tlg-catalog/tables/other/ratet01.html - 2023-08-04T15:16:36.583Z + 2023-08-04T15:35:30.210Z https://insightsengineering.github.io/tlg-catalog/tables/other/rmpt04.html - 2023-08-04T15:17:10.039Z + 2023-08-04T15:36:07.203Z https://insightsengineering.github.io/tlg-catalog/tables/other/rmpt03.html - 2023-08-04T15:18:00.432Z + 2023-08-04T15:37:01.360Z https://insightsengineering.github.io/tlg-catalog/tables/other/rbmit01.html - 2023-08-04T15:18:54.748Z + 2023-08-04T15:38:00.696Z diff --git a/tables/adverse-events/aet01.html b/tables/adverse-events/aet01.html index 4ae68b951a..be67724d20 100644 --- a/tables/adverse-events/aet01.html +++ b/tables/adverse-events/aet01.html @@ -1200,7 +1200,7 @@

    To illustrate, additional variables such as flags (TRUE/FALSE) for select AEs of interest and select AE baskets are added to the adae dataset.

    -
    +
    Code
    library(tern)
     library(dplyr)
     library(scda)
    @@ -1219,313 +1219,292 @@
     
     adae <- adae %>%
       mutate(
    -    AEDECOD = as.character(AEDECOD),
    -    AESDTH = sample(c("N", "Y"), size = nrow(adae), replace = TRUE, prob = c(0.99, 0.01)),
    -    AEACN = sample(
    +    AEDECOD = with_label(as.character(AEDECOD), "Dictionary-Derived Term"),
    +    AESDTH = with_label(sample(c("N", "Y"), size = nrow(adae), replace = TRUE, prob = c(0.99, 0.01)), "Results in Death"),
    +    AEACN = with_label(sample(
           c("DOSE NOT CHANGED", "DOSE INCREASED", "DRUG INTERRUPTED", "DRUG WITHDRAWN"),
           size = nrow(adae),
           replace = TRUE, prob = c(0.68, 0.02, 0.25, 0.05)
    -    ),
    -    FATAL = AESDTH == "Y",
    -    SER = AESER == "Y",
    -    SERWD = AESER == "Y" & AEACN == "DRUG WITHDRAWN",
    -    SERDSM = AESER == "Y" & AEACN %in% c("DRUG INTERRUPTED", "DOSE INCREASED", "DOSE REDUCED"),
    -    RELSER = AESER == "Y" & AEREL == "Y",
    -    WD = AEACN == "DRUG WITHDRAWN",
    -    DSM = AEACN %in% c("DRUG INTERRUPTED", "DOSE INCREASED", "DOSE REDUCED"),
    -    REL = AEREL == "Y",
    -    RELWD = AEREL == "Y" & AEACN == "DRUG WITHDRAWN",
    -    RELDSM = AEREL == "Y" & AEACN %in% c("DRUG INTERRUPTED", "DOSE INCREASED", "DOSE REDUCED"),
    -    CTC35 = AETOXGR %in% c("3", "4", "5"),
    -    CTC45 = AETOXGR %in% c("4", "5"),
    -    SMQ01 = SMQ01NAM != "",
    -    SMQ02 = SMQ02NAM != "",
    -    CQ01 = CQ01NAM != "",
    -    USUBJID_AESEQ = paste(USUBJID, AESEQ, sep = "@@") # Create unique ID per AE in dataset.
    -  ) %>%
    -  var_relabel(
    -    AEDECOD = "Dictionary-Derived Term",
    -    AESDTH = "Results in Death",
    -    AEACN = "Action Taken with Study Treatment",
    -    FATAL = "AE with fatal outcome",
    -    SER = "Serious AE",
    -    SERWD = "Serious AE leading to withdrawal from treatment",
    -    SERDSM = "Serious AE leading to dose modification/interruption",
    -    RELSER = "Related Serious AE",
    -    WD = "AE leading to withdrawal from treatment",
    -    DSM = "AE leading to dose modification/interruption",
    -    REL = "Related AE",
    -    RELWD = "Related AE leading to withdrawal from treatment",
    -    RELDSM = "Related AE leading to dose modification/interruption",
    -    CTC35 = "Grade 3-5 AE",
    -    CTC45 = "Grade 4/5 AE",
    -    SMQ01 = aesi_label(adae$SMQ01NAM, adae$SMQ01SC),
    -    SMQ02 = aesi_label(adae$SMQ02NAM, adae$SMQ02SC),
    -    CQ01 = aesi_label(adae$CQ01NAM)
    -  )
    + ), "Action Taken with Study Treatment"), + FATAL = with_label(AESDTH == "Y", "AE with fatal outcome"), + SEV = with_label(AESEV == "SEVERE", "Severe AE (at greatest intensity)"), + SER = with_label(AESER == "Y", "Serious AE"), + SERWD = with_label(AESER == "Y" & AEACN == "DRUG WITHDRAWN", "Serious AE leading to withdrawal from treatment"), + SERDSM = with_label( + AESER == "Y" & AEACN %in% c("DRUG INTERRUPTED", "DOSE INCREASED", "DOSE REDUCED"), + "Serious AE leading to dose modification/interruption" + ), + RELSER = with_label(AESER == "Y" & AEREL == "Y", "Related Serious AE"), + WD = with_label(AEACN == "DRUG WITHDRAWN", "AE leading to withdrawal from treatment"), + DSM = with_label( + AEACN %in% c("DRUG INTERRUPTED", "DOSE INCREASED", "DOSE REDUCED"), "AE leading to dose modification/interruption" + ), + REL = with_label(AEREL == "Y", "Related AE"), + RELWD = with_label(AEREL == "Y" & AEACN == "DRUG WITHDRAWN", "Related AE leading to withdrawal from treatment"), + RELDSM = with_label( + AEREL == "Y" & AEACN %in% c("DRUG INTERRUPTED", "DOSE INCREASED", "DOSE REDUCED"), + "Related AE leading to dose modification/interruption" + ), + CTC35 = with_label(AETOXGR %in% c("3", "4", "5"), "Grade 3-5 AE"), + CTC45 = with_label(AETOXGR %in% c("4", "5"), "Grade 4/5 AE"), + SMQ01 = with_label(SMQ01NAM != "", aesi_label(adae$SMQ01NAM, adae$SMQ01SC)), + SMQ02 = with_label(SMQ02NAM != "", aesi_label(adae$SMQ02NAM, adae$SMQ02SC)), + CQ01 = with_label(CQ01NAM != "", aesi_label(adae$CQ01NAM)), + USUBJID_AESEQ = paste(USUBJID, AESEQ, sep = "@@") # Create unique ID per AE in dataset. + ) %>% + filter(ANL01FL == "Y")
    -
    -
    Code
    aesi_vars <- c("FATAL", "SER", "SERWD", "SERDSM", "RELSER", "WD", "DSM", "REL", "RELWD", "RELDSM", "CTC35")
    +
    +
    Code
    aesi_vars <- c("FATAL", "SER", "SERWD", "SERDSM", "RELSER", "WD", "DSM", "REL", "RELWD", "RELDSM", "SEV")
     
     # Layout for variables from adsl dataset.
     lyt_adsl <- basic_table(show_colcounts = TRUE) %>%
       split_cols_by("ACTARM") %>%
    -  count_values(
    -    "DTHFL",
    -    values = "Y",
    -    .labels = c(count_fraction = "Total number of deaths"),
    -    denom = "N_col"
    +  count_patients_with_event(
    +    "USUBJID",
    +    filters = c("DTHFL" = "Y"),
    +    denom = "N_col",
    +    .labels = c(count_fraction = "Total number of deaths")
       ) %>%
    -  count_values(
    -    "DCSREAS",
    -    values = "ADVERSE EVENT",
    -    .labels = c(count_fraction = "Total number of patients withdrawn from study due to an AE"),
    -    denom = "N_col"
    -  )
    -
    -result_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl)
    -
    -# Layout for variables from adae dataset.
    -lyt_adae <- basic_table(show_colcounts = TRUE) %>%
    -  split_cols_by("ACTARM") %>%
    -  count_patients_with_event(
    -    vars = "USUBJID",
    -    filters = c("STUDYID" = as.character(unique(adae$STUDYID))),
    -    denom = "N_col",
    -    .labels = c(count_fraction = "Total number of patients with at least one adverse event")
    -  ) %>%
    -  count_values(
    -    "STUDYID",
    -    values = as.character(unique(adae$STUDYID)),
    -    .stats = "count",
    -    .labels = c(count = "Total AEs"),
    -    table_names = "total_aes"
    -  ) %>%
    -  count_patients_with_flags(
    -    "USUBJID",
    -    flag_variables = var_labels(adae[, aesi_vars]),
    -    denom = "N_col",
    -    var_labels = "Total number of patients with at least one",
    -    show_labels = "visible"
    -  )
    +  count_patients_with_event(
    +    "USUBJID",
    +    filters = c("DCSREAS" = "ADVERSE EVENT"),
    +    denom = "N_col",
    +    .labels = c(count_fraction = "Total number of patients withdrawn from study due to an AE"),
    +    table_names = "tot_wd"
    +  )
    +
    +result_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl)
    +
    +# Layout for variables from adae dataset.
    +lyt_adae <- basic_table(show_colcounts = TRUE) %>%
    +  split_cols_by("ACTARM") %>%
    +  analyze_num_patients(
    +    vars = "USUBJID",
    +    .stats = c("unique", "nonunique"),
    +    .labels = c(
    +      unique = "Total number of patients with at least one AE",
    +      nonunique = "Total number of AEs"
    +    ),
    +    .formats = list(unique = format_count_fraction_fixed_dp, nonunique = "xx"),
    +    show_labels = "hidden"
    +  ) %>%
    +  count_patients_with_flags(
    +    "USUBJID",
    +    flag_variables = aesi_vars,
    +    denom = "N_col",
    +    var_labels = "Total number of patients with at least one",
    +    show_labels = "visible"
    +  )
    +
    +result_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)
     
    -result_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)
    -
    -# Combine tables.
    -col_info(result_adsl) <- col_info(result_adae)
    -result <- rbind(
    -  result_adae[1:2, ],
    -  result_adsl,
    -  result_adae[3:nrow(result_adae), ]
    -)
    -
    -result
    +# Combine tables. +col_info(result_adsl) <- col_info(result_adae) +result <- rbind( + result_adae[1:2, ], + result_adsl, + result_adae[3:nrow(result_adae), ] +) + +result
    -
                                                                  A: Drug X    B: Placebo    C: Combination
    -                                                               (N=134)       (N=134)        (N=132)    
    -———————————————————————————————————————————————————————————————————————————————————————————————————————
    -Total number of patients with at least one adverse event     122 (91.0%)   123 (91.8%)    120 (90.9%)  
    -Total AEs                                                        609           622            703      
    -Total number of deaths                                       25 (18.66%)   23 (17.16%)    22 (16.67%)  
    -Total number of patients withdrawn from study due to an AE    3 (2.24%)     6 (4.48%)      5 (3.79%)   
    -Total number of patients with at least one                                                             
    -  AE with fatal outcome                                       6 (4.5%)      9 (6.7%)        6 (4.5%)   
    -  Serious AE                                                 104 (77.6%)   101 (75.4%)     99 (75.0%)  
    -  Serious AE leading to withdrawal from treatment             7 (5.2%)     16 (11.9%)      11 (8.3%)   
    -  Serious AE leading to dose modification/interruption       43 (32.1%)    48 (35.8%)      52 (39.4%)  
    -  Related Serious AE                                         76 (56.7%)    70 (52.2%)      75 (56.8%)  
    -  AE leading to withdrawal from treatment                    25 (18.7%)    31 (23.1%)      31 (23.5%)  
    -  AE leading to dose modification/interruption               79 (59.0%)    89 (66.4%)      90 (68.2%)  
    -  Related AE                                                 105 (78.4%)   108 (80.6%)    109 (82.6%)  
    -  Related AE leading to withdrawal from treatment            14 (10.4%)    14 (10.4%)      15 (11.4%)  
    -  Related AE leading to dose modification/interruption       56 (41.8%)    56 (41.8%)      60 (45.5%)  
    -  Grade 3-5 AE                                               109 (81.3%)   104 (77.6%)    109 (82.6%)  
    +
                                                                  A: Drug X    B: Placebo   C: Combination
    +                                                               (N=134)      (N=134)        (N=132)    
    +——————————————————————————————————————————————————————————————————————————————————————————————————————
    +Total number of patients with at least one AE                100 (74.6%)   98 (73.1%)    103 (78.0%)  
    +Total number of AEs                                              502          480            604      
    +Total number of deaths                                       25 (18.7%)    23 (17.2%)     22 (16.7%)  
    +Total number of patients withdrawn from study due to an AE    3 (2.2%)      6 (4.5%)       5 (3.8%)   
    +Total number of patients with at least one                                                            
    +  AE with fatal outcome                                       5 (3.7%)      5 (3.7%)       6 (4.5%)   
    +  Serious AE                                                 85 (63.4%)    80 (59.7%)     87 (65.9%)  
    +  Serious AE leading to withdrawal from treatment             6 (4.5%)     12 (9.0%)       9 (6.8%)   
    +  Serious AE leading to dose modification/interruption       36 (26.9%)    40 (29.9%)     47 (35.6%)  
    +  Related Serious AE                                         64 (47.8%)    52 (38.8%)     64 (48.5%)  
    +  AE leading to withdrawal from treatment                    20 (14.9%)    24 (17.9%)     26 (19.7%)  
    +  AE leading to dose modification/interruption               63 (47.0%)    70 (52.2%)     77 (58.3%)  
    +  Related AE                                                 86 (64.2%)    85 (63.4%)     92 (69.7%)  
    +  Related AE leading to withdrawal from treatment             10 (7.5%)     9 (6.7%)      12 (9.1%)   
    +  Related AE leading to dose modification/interruption       44 (32.8%)    44 (32.8%)     51 (38.6%)  
    +  Severe AE (at greatest intensity)                          77 (57.5%)    70 (52.2%)     79 (59.8%)  
    -
    +
    Code
    aesi_vars <- c("FATAL", "SER", "SERWD", "SERDSM", "RELSER", "WD", "DSM", "REL", "RELWD", "RELDSM", "CTC35")
     basket_vars <- c("SMQ01", "SMQ02", "CQ01")
     
     # Layout for variables from adsl dataset.
     lyt_adsl <- basic_table(show_colcounts = TRUE) %>%
       split_cols_by("ACTARM") %>%
    -  count_values(
    -    "DTHFL",
    -    values = "Y",
    -    .labels = c(count_fraction = "Total number of deaths"),
    -    denom = "N_col"
    +  count_patients_with_event(
    +    "USUBJID",
    +    filters = c("DTHFL" = "Y"),
    +    denom = "N_col",
    +    .labels = c(count_fraction = "Total number of deaths")
       ) %>%
    -  count_values(
    -    "DCSREAS",
    -    values = "ADVERSE EVENT",
    -    .labels = c(count_fraction = "Total number of patients withdrawn from study due to an AE"),
    -    denom = "N_col"
    -  )
    -
    -result_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl)
    -
    -# Layout for variables from adae dataset.
    -lyt_adae <- basic_table(show_colcounts = TRUE) %>%
    -  split_cols_by("ACTARM") %>%
    -  count_patients_with_event(
    -    vars = "USUBJID",
    -    filters = c("STUDYID" = as.character(unique(adae$STUDYID))),
    -    denom = "N_col",
    -    .labels = c(count_fraction = "Total number of patients with at least one adverse event")
    -  ) %>%
    -  count_values(
    -    "STUDYID",
    -    values = as.character(unique(adae$STUDYID)),
    -    .stats = "count",
    -    .labels = c(count = "Total AEs"),
    -    denom = "N_col",
    -    table_names = "total_aes"
    -  ) %>%
    -  count_patients_with_flags(
    -    "USUBJID",
    -    flag_variables = var_labels(adae[, aesi_vars]),
    -    table_names = "table_ae",
    -    denom = "N_col",
    -    var_labels = "Total number of patients with at least one",
    -    show_labels = "visible"
    -  ) %>%
    -  count_patients_with_flags(
    -    "USUBJID",
    -    flag_variables = var_labels(adae[, basket_vars]),
    -    table_names = "table_aesi",
    -    denom = "N_col",
    -    var_labels = "Total number of patients with at least one",
    -    show_labels = "visible"
    -  )
    -
    -result_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)
    -
    -# Combine tables.
    -col_info(result_adsl) <- col_info(result_adae)
    -result <- rbind(
    -  result_adae[1:2, ],
    -  result_adsl,
    -  result_adae[3:nrow(result_adae), ]
    -)
    -
    -result
    + count_patients_with_event( + "USUBJID", + filters = c("DCSREAS" = "ADVERSE EVENT"), + denom = "N_col", + .labels = c(count_fraction = "Total number of patients withdrawn from study due to an AE"), + table_names = "tot_wd" + ) + +result_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl) + +# Layout for variables from adae dataset. +lyt_adae <- basic_table(show_colcounts = TRUE) %>% + split_cols_by("ACTARM") %>% + analyze_num_patients( + vars = "USUBJID", + .stats = c("unique", "nonunique"), + .labels = c( + unique = "Total number of patients with at least one AE", + nonunique = "Total number of AEs" + ), + .formats = list(unique = format_count_fraction_fixed_dp, nonunique = "xx"), + show_labels = "hidden" + ) %>% + count_patients_with_flags( + "USUBJID", + flag_variables = aesi_vars, + denom = "N_col", + var_labels = "Total number of patients with at least one", + show_labels = "visible" + ) %>% + count_patients_with_flags( + "USUBJID", + flag_variables = basket_vars, + table_names = "table_aesi", + denom = "N_col", + var_labels = "Total number of patients with at least one", + show_labels = "visible" + ) + +result_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl) + +# Combine tables. +col_info(result_adsl) <- col_info(result_adae) +result <- rbind( + result_adae[1:2, ], + result_adsl, + result_adae[3:nrow(result_adae), ] +) + +result
    -
                                                                  A: Drug X    B: Placebo    C: Combination
    -                                                               (N=134)       (N=134)        (N=132)    
    -———————————————————————————————————————————————————————————————————————————————————————————————————————
    -Total number of patients with at least one adverse event     122 (91.0%)   123 (91.8%)    120 (90.9%)  
    -Total AEs                                                        609           622            703      
    -Total number of deaths                                       25 (18.66%)   23 (17.16%)    22 (16.67%)  
    -Total number of patients withdrawn from study due to an AE    3 (2.24%)     6 (4.48%)      5 (3.79%)   
    -Total number of patients with at least one                                                             
    -  AE with fatal outcome                                       6 (4.5%)      9 (6.7%)        6 (4.5%)   
    -  Serious AE                                                 104 (77.6%)   101 (75.4%)     99 (75.0%)  
    -  Serious AE leading to withdrawal from treatment             7 (5.2%)     16 (11.9%)      11 (8.3%)   
    -  Serious AE leading to dose modification/interruption       43 (32.1%)    48 (35.8%)      52 (39.4%)  
    -  Related Serious AE                                         76 (56.7%)    70 (52.2%)      75 (56.8%)  
    -  AE leading to withdrawal from treatment                    25 (18.7%)    31 (23.1%)      31 (23.5%)  
    -  AE leading to dose modification/interruption               79 (59.0%)    89 (66.4%)      90 (68.2%)  
    -  Related AE                                                 105 (78.4%)   108 (80.6%)    109 (82.6%)  
    -  Related AE leading to withdrawal from treatment            14 (10.4%)    14 (10.4%)      15 (11.4%)  
    -  Related AE leading to dose modification/interruption       56 (41.8%)    56 (41.8%)      60 (45.5%)  
    -  Grade 3-5 AE                                               109 (81.3%)   104 (77.6%)    109 (82.6%)  
    -Total number of patients with at least one                                                             
    -  C.1.1.1.3/B.2.2.3.1 AESI (BROAD)                           72 (53.7%)    79 (59.0%)      75 (56.8%)  
    -  SMQ 02 Reference Name                                           0             0              0       
    -  D.2.1.5.3/A.1.1.1.1 AESI                                   74 (55.2%)    80 (59.7%)      87 (65.9%)  
    +
                                                                  A: Drug X    B: Placebo   C: Combination
    +                                                               (N=134)      (N=134)        (N=132)    
    +——————————————————————————————————————————————————————————————————————————————————————————————————————
    +Total number of patients with at least one AE                100 (74.6%)   98 (73.1%)    103 (78.0%)  
    +Total number of AEs                                              502          480            604      
    +Total number of deaths                                       25 (18.7%)    23 (17.2%)     22 (16.7%)  
    +Total number of patients withdrawn from study due to an AE    3 (2.2%)      6 (4.5%)       5 (3.8%)   
    +Total number of patients with at least one                                                            
    +  AE with fatal outcome                                       5 (3.7%)      5 (3.7%)       6 (4.5%)   
    +  Serious AE                                                 85 (63.4%)    80 (59.7%)     87 (65.9%)  
    +  Serious AE leading to withdrawal from treatment             6 (4.5%)     12 (9.0%)       9 (6.8%)   
    +  Serious AE leading to dose modification/interruption       36 (26.9%)    40 (29.9%)     47 (35.6%)  
    +  Related Serious AE                                         64 (47.8%)    52 (38.8%)     64 (48.5%)  
    +  AE leading to withdrawal from treatment                    20 (14.9%)    24 (17.9%)     26 (19.7%)  
    +  AE leading to dose modification/interruption               63 (47.0%)    70 (52.2%)     77 (58.3%)  
    +  Related AE                                                 86 (64.2%)    85 (63.4%)     92 (69.7%)  
    +  Related AE leading to withdrawal from treatment             10 (7.5%)     9 (6.7%)      12 (9.1%)   
    +  Related AE leading to dose modification/interruption       44 (32.8%)    44 (32.8%)     51 (38.6%)  
    +  Grade 3-5 AE                                               90 (67.2%)    83 (61.9%)     93 (70.5%)  
    +Total number of patients with at least one                                                            
    +  C.1.1.1.3/B.2.2.3.1 AESI (BROAD)                           58 (43.3%)    60 (44.8%)     66 (50.0%)  
    +  SMQ 02 Reference Name                                           0            0              0       
    +  D.2.1.5.3/A.1.1.1.1 AESI                                   62 (46.3%)    61 (45.5%)     76 (57.6%)  
    -
    +
    Code
    aesi_vars <- c("FATAL", "SER", "WD", "REL", "CTC35", "CTC45")
     # Layout for variables from adsl dataset.
     lyt_adsl <- basic_table(show_colcounts = TRUE) %>%
       split_cols_by("ACTARM") %>%
    -  count_values(
    -    "DTHFL",
    -    values = "Y",
    -    .labels = c(count_fraction = "Total number of deaths"),
    -    denom = "N_col"
    +  count_patients_with_event(
    +    "USUBJID",
    +    filters = c("DTHFL" = "Y"),
    +    denom = "N_col",
    +    .labels = c(count_fraction = "Total number of deaths")
       ) %>%
    -  count_values(
    -    "DCSREAS",
    -    values = "ADVERSE EVENT",
    -    .labels = c(count_fraction = "Total number of patients withdrawn from study due to an AE"),
    -    denom = "N_col",
    -    table_names = "tbl_dscsreas_ae"
    +  count_patients_with_event(
    +    "USUBJID",
    +    filters = c("DCSREAS" = "ADVERSE EVENT"),
    +    denom = "N_col",
    +    .labels = c(count_fraction = "Total number of patients withdrawn from study due to an AE"),
    +    table_names = "tot_wd"
       ) %>%
    -  count_values(
    -    "DCSREAS",
    -    values = "WITHDRAWAL BY SUBJECT",
    -    .labels = c(count_fraction = "Total number of patients withdrawn informed consent"),
    -    denom = "N_col",
    -    table_names = "tbl_dscsreas_wd"
    +  count_patients_with_event(
    +    "USUBJID",
    +    filters = c("DCSREAS" = "WITHDRAWAL BY SUBJECT"),
    +    denom = "N_col",
    +    .labels = c(count_fraction = "Total number of patients withdrawn informed consent"),
    +    table_names = "tot_dscsreas_wd"
       )
     result_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl)
     
     # Layout for variables from adae dataset.
     lyt_adae <- basic_table(show_colcounts = TRUE) %>%
       split_cols_by("ACTARM") %>%
    -  count_patients_with_event(
    +  analyze_num_patients(
         vars = "USUBJID",
    -    filters = c("STUDYID" = as.character(unique(adae$STUDYID))),
    -    denom = "N_col",
    -    .labels = c(count_fraction = "Total number of patients with at least one adverse event")
    -  ) %>%
    -  count_values(
    -    "STUDYID",
    -    values = as.character(unique(adae$STUDYID)),
    -    .stats = "count",
    -    .labels = c(count = "Total AEs"),
    -    denom = "N_col",
    -    table_names = "total_aes"
    -  ) %>%
    -  count_patients_with_flags(
    -    "USUBJID",
    -    flag_variables = var_labels(adae[, aesi_vars]),
    -    denom = "N_col",
    -    var_labels = "Total number of patients with at least one",
    -    show_labels = "visible"
    -  )
    -
    -result_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)
    -
    -# Combine tables.
    -col_info(result_adsl) <- col_info(result_adae)
    -result <- rbind(
    -  result_adae[1:2, ],
    -  result_adsl,
    -  result_adae[3:nrow(result_adae), ]
    -)
    -
    -result
    + .stats = c("unique", "nonunique"), + .labels = c( + unique = "Total number of patients with at least one AE", + nonunique = "Total number of AEs" + ), + .formats = list(unique = format_count_fraction_fixed_dp, nonunique = "xx"), + show_labels = "hidden" + ) %>% + count_patients_with_flags( + "USUBJID", + flag_variables = aesi_vars, + denom = "N_col", + var_labels = "Total number of patients with at least one", + show_labels = "visible" + ) +result_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl) + +# Combine tables. +col_info(result_adsl) <- col_info(result_adae) +result <- rbind( + result_adae[1:2, ], + result_adsl, + result_adae[3:nrow(result_adae), ] +) + +result
    -
                                                                  A: Drug X    B: Placebo    C: Combination
    -                                                               (N=134)       (N=134)        (N=132)    
    -———————————————————————————————————————————————————————————————————————————————————————————————————————
    -Total number of patients with at least one adverse event     122 (91.0%)   123 (91.8%)    120 (90.9%)  
    -Total AEs                                                        609           622            703      
    -Total number of deaths                                       25 (18.66%)   23 (17.16%)    22 (16.67%)  
    -Total number of patients withdrawn from study due to an AE    3 (2.24%)     6 (4.48%)      5 (3.79%)   
    -Total number of patients withdrawn informed consent           1 (0.75%)     1 (0.75%)      1 (0.76%)   
    -Total number of patients with at least one                                                             
    -  AE with fatal outcome                                       6 (4.5%)      9 (6.7%)        6 (4.5%)   
    -  Serious AE                                                 104 (77.6%)   101 (75.4%)     99 (75.0%)  
    -  AE leading to withdrawal from treatment                    25 (18.7%)    31 (23.1%)      31 (23.5%)  
    -  Related AE                                                 105 (78.4%)   108 (80.6%)    109 (82.6%)  
    -  Grade 3-5 AE                                               109 (81.3%)   104 (77.6%)    109 (82.6%)  
    -  Grade 4/5 AE                                               91 (67.9%)    90 (67.2%)      93 (70.5%)  
    +
                                                                  A: Drug X    B: Placebo   C: Combination
    +                                                               (N=134)      (N=134)        (N=132)    
    +——————————————————————————————————————————————————————————————————————————————————————————————————————
    +Total number of patients with at least one AE                100 (74.6%)   98 (73.1%)    103 (78.0%)  
    +Total number of AEs                                              502          480            604      
    +Total number of deaths                                       25 (18.7%)    23 (17.2%)     22 (16.7%)  
    +Total number of patients withdrawn from study due to an AE    3 (2.2%)      6 (4.5%)       5 (3.8%)   
    +Total number of patients withdrawn informed consent           1 (0.7%)      1 (0.7%)       1 (0.8%)   
    +Total number of patients with at least one                                                            
    +  AE with fatal outcome                                       5 (3.7%)      5 (3.7%)       6 (4.5%)   
    +  Serious AE                                                 85 (63.4%)    80 (59.7%)     87 (65.9%)  
    +  AE leading to withdrawal from treatment                    20 (14.9%)    24 (17.9%)     26 (19.7%)  
    +  Related AE                                                 86 (64.2%)    85 (63.4%)     92 (69.7%)  
    +  Grade 3-5 AE                                               90 (67.2%)    83 (61.9%)     93 (70.5%)  
    +  Grade 4/5 AE                                               77 (57.5%)    70 (52.2%)     79 (59.8%)  
    -
    +
    Code
    count_subj_vars <- c("FATAL", "SER", "WD", "DSM", "REL", "CTC35")
     count_term_vars <- c("SER", "DSM", "REL", "CTC35", "CTC45")
     count_ae_vars <- c("SER", "DSM", "REL", "CTC35", "CTC45")
    @@ -1533,103 +1512,99 @@
     # Layout for variables from adsl dataset.
     lyt_adsl <- basic_table(show_colcounts = TRUE) %>%
       split_cols_by("ACTARM") %>%
    -  count_values(
    -    "DTHFL",
    -    values = "Y",
    -    .labels = c(count_fraction = "Total number of deaths"),
    -    denom = "N_col"
    +  count_patients_with_event(
    +    "USUBJID",
    +    filters = c("DTHFL" = "Y"),
    +    denom = "N_col",
    +    .labels = c(count_fraction = "Total number of deaths")
       ) %>%
    -  count_values(
    -    "DCSREAS",
    -    values = "ADVERSE EVENT",
    -    .labels = c(count_fraction = "Total number of patients withdrawn from study due to an AE"),
    -    denom = "N_col"
    -  )
    -
    -result_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl)
    -
    -# Layout for variables from adae dataset.
    -lyt_adae <- basic_table(show_colcounts = TRUE) %>%
    -  split_cols_by("ACTARM") %>%
    -  count_patients_with_event(
    -    vars = "USUBJID",
    -    filters = c("STUDYID" = as.character(unique(adae$STUDYID))),
    -    denom = "N_col",
    -    .labels = c(count_fraction = "Total number of patients with at least one adverse event"),
    -    table_names = "total_subj"
    -  ) %>%
    -  count_values(
    -    "STUDYID",
    -    values = as.character(unique(adae$STUDYID)),
    -    .stats = "count",
    -    .labels = c(count = "Total AEs"),
    -    denom = "N_col",
    -    table_names = "total_aes"
    -  ) %>%
    -  count_patients_with_flags(
    -    "USUBJID",
    -    flag_variables = var_labels(adae[, count_subj_vars]),
    -    denom = "N_col",
    -    var_labels = "Total number of patients with at least one",
    -    show_labels = "visible"
    -  ) %>%
    -  count_patients_with_flags(
    -    "AEDECOD",
    -    flag_variables = var_labels(adae[, count_term_vars]),
    -    .stats = "count",
    -    .formats = c(count = "xx"),
    -    table_names = "table_term",
    -    var_labels = "Total number of unique preferred terms which are",
    -    show_labels = "visible"
    -  ) %>%
    -  count_patients_with_flags(
    -    "USUBJID_AESEQ",
    -    flag_variables = var_labels(adae[, count_ae_vars]),
    -    .stats = "count",
    -    .formats = c(count = "xx"),
    -    table_names = "table_ae",
    -    var_labels = "Total number of adverse events which are",
    -    show_labels = "visible"
    -  )
    -
    -result_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl)
    -
    -# Combine tables.
    -col_info(result_adsl) <- col_info(result_adae)
    -result <- rbind(
    -  result_adae[1:2, ],
    -  result_adsl,
    -  result_adae[3:nrow(result_adae), ]
    -)
    -
    -result
    + count_patients_with_event( + "USUBJID", + filters = c("DCSREAS" = "ADVERSE EVENT"), + denom = "N_col", + .labels = c(count_fraction = "Total number of patients withdrawn from study due to an AE"), + table_names = "tot_wd" + ) + +result_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl) + +# Layout for variables from adae dataset. +lyt_adae <- basic_table(show_colcounts = TRUE) %>% + split_cols_by("ACTARM") %>% + analyze_num_patients( + vars = "USUBJID", + .stats = c("unique", "nonunique"), + .labels = c( + unique = "Total number of patients with at least one AE", + nonunique = "Total number of AEs" + ), + .formats = list(unique = format_count_fraction_fixed_dp, nonunique = "xx"), + show_labels = "hidden" + ) %>% + count_patients_with_flags( + "USUBJID", + flag_variables = count_subj_vars, + denom = "N_col", + var_labels = "Total number of patients with at least one", + show_labels = "visible" + ) %>% + count_patients_with_flags( + "AEDECOD", + flag_variables = count_term_vars, + .stats = "count", + .formats = c(count = "xx"), + table_names = "table_term", + var_labels = "Total number of unique preferred terms which are", + show_labels = "visible" + ) %>% + count_patients_with_flags( + "USUBJID_AESEQ", + flag_variables = count_ae_vars, + .stats = "count", + .formats = c(count = "xx"), + table_names = "table_ae", + var_labels = "Total number of adverse events which are", + show_labels = "visible" + ) + +result_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl) + +# Combine tables. +col_info(result_adsl) <- col_info(result_adae) +result <- rbind( + result_adae[1:2, ], + result_adsl, + result_adae[3:nrow(result_adae), ] +) + +result
    -
                                                                  A: Drug X    B: Placebo    C: Combination
    -                                                               (N=134)       (N=134)        (N=132)    
    -———————————————————————————————————————————————————————————————————————————————————————————————————————
    -Total number of patients with at least one adverse event     122 (91.0%)   123 (91.8%)    120 (90.9%)  
    -Total AEs                                                        609           622            703      
    -Total number of deaths                                       25 (18.66%)   23 (17.16%)    22 (16.67%)  
    -Total number of patients withdrawn from study due to an AE    3 (2.24%)     6 (4.48%)      5 (3.79%)   
    -Total number of patients with at least one                                                             
    -  AE with fatal outcome                                       6 (4.5%)      9 (6.7%)        6 (4.5%)   
    -  Serious AE                                                 104 (77.6%)   101 (75.4%)     99 (75.0%)  
    -  AE leading to withdrawal from treatment                    25 (18.7%)    31 (23.1%)      31 (23.5%)  
    -  AE leading to dose modification/interruption               79 (59.0%)    89 (66.4%)      90 (68.2%)  
    -  Related AE                                                 105 (78.4%)   108 (80.6%)    109 (82.6%)  
    -  Grade 3-5 AE                                               109 (81.3%)   104 (77.6%)    109 (82.6%)  
    -Total number of unique preferred terms which are                                                       
    -  Serious AE                                                      4             4              4       
    -  AE leading to dose modification/interruption                   10            10              10      
    -  Related AE                                                      5             5              5       
    -  Grade 3-5 AE                                                    5             5              5       
    -  Grade 4/5 AE                                                    3             3              3       
    -Total number of adverse events which are                                                               
    -  Serious AE                                                     249           255            282      
    -  AE leading to dose modification/interruption                   150           167            187      
    -  Related AE                                                     282           299            336      
    -  Grade 3-5 AE                                                   303           291            327      
    -  Grade 4/5 AE                                                   172           174            197      
    +
                                                                  A: Drug X    B: Placebo   C: Combination
    +                                                               (N=134)      (N=134)        (N=132)    
    +——————————————————————————————————————————————————————————————————————————————————————————————————————
    +Total number of patients with at least one AE                100 (74.6%)   98 (73.1%)    103 (78.0%)  
    +Total number of AEs                                              502          480            604      
    +Total number of deaths                                       25 (18.7%)    23 (17.2%)     22 (16.7%)  
    +Total number of patients withdrawn from study due to an AE    3 (2.2%)      6 (4.5%)       5 (3.8%)   
    +Total number of patients with at least one                                                            
    +  AE with fatal outcome                                       5 (3.7%)      5 (3.7%)       6 (4.5%)   
    +  Serious AE                                                 85 (63.4%)    80 (59.7%)     87 (65.9%)  
    +  AE leading to withdrawal from treatment                    20 (14.9%)    24 (17.9%)     26 (19.7%)  
    +  AE leading to dose modification/interruption               63 (47.0%)    70 (52.2%)     77 (58.3%)  
    +  Related AE                                                 86 (64.2%)    85 (63.4%)     92 (69.7%)  
    +  Grade 3-5 AE                                               90 (67.2%)    83 (61.9%)     93 (70.5%)  
    +Total number of unique preferred terms which are                                                      
    +  Serious AE                                                      4            4              4       
    +  AE leading to dose modification/interruption                   10            10             10      
    +  Related AE                                                      5            5              5       
    +  Grade 3-5 AE                                                    5            5              5       
    +  Grade 4/5 AE                                                    3            3              3       
    +Total number of adverse events which are                                                              
    +  Serious AE                                                     204          194            245      
    +  AE leading to dose modification/interruption                   123          135            158      
    +  Related AE                                                     231          231            290      
    +  Grade 3-5 AE                                                   249          229            277      
    +  Grade 4/5 AE                                                   143          134            168      
    @@ -1719,7 +1694,7 @@ ) )
    -
    [INFO] 2023-08-04 15:07:15.5596 pid:10671 token:[] teal.modules.clinical Initializing tm_t_events_summary
    +
    [INFO] 2023-08-04 15:25:17.8600 pid:10674 token:[] teal.modules.clinical Initializing tm_t_events_summary
    Code
    shinyApp(app$ui, app$server)
    @@ -2461,427 +2436,402 @@ adae <- adae %>% mutate( - AEDECOD = as.character(AEDECOD), - AESDTH = sample(c("N", "Y"), size = nrow(adae), replace = TRUE, prob = c(0.99, 0.01)), - AEACN = sample( + AEDECOD = with_label(as.character(AEDECOD), "Dictionary-Derived Term"), + AESDTH = with_label(sample(c("N", "Y"), size = nrow(adae), replace = TRUE, prob = c(0.99, 0.01)), "Results in Death"), + AEACN = with_label(sample( c("DOSE NOT CHANGED", "DOSE INCREASED", "DRUG INTERRUPTED", "DRUG WITHDRAWN"), size = nrow(adae), replace = TRUE, prob = c(0.68, 0.02, 0.25, 0.05) - ), - FATAL = AESDTH == "Y", - SER = AESER == "Y", - SERWD = AESER == "Y" & AEACN == "DRUG WITHDRAWN", - SERDSM = AESER == "Y" & AEACN %in% c("DRUG INTERRUPTED", "DOSE INCREASED", "DOSE REDUCED"), - RELSER = AESER == "Y" & AEREL == "Y", - WD = AEACN == "DRUG WITHDRAWN", - DSM = AEACN %in% c("DRUG INTERRUPTED", "DOSE INCREASED", "DOSE REDUCED"), - REL = AEREL == "Y", - RELWD = AEREL == "Y" & AEACN == "DRUG WITHDRAWN", - RELDSM = AEREL == "Y" & AEACN %in% c("DRUG INTERRUPTED", "DOSE INCREASED", "DOSE REDUCED"), - CTC35 = AETOXGR %in% c("3", "4", "5"), - CTC45 = AETOXGR %in% c("4", "5"), - SMQ01 = SMQ01NAM != "", - SMQ02 = SMQ02NAM != "", - CQ01 = CQ01NAM != "", - USUBJID_AESEQ = paste(USUBJID, AESEQ, sep = "@@") # Create unique ID per AE in dataset. - ) %>% - var_relabel( - AEDECOD = "Dictionary-Derived Term", - AESDTH = "Results in Death", - AEACN = "Action Taken with Study Treatment", - FATAL = "AE with fatal outcome", - SER = "Serious AE", - SERWD = "Serious AE leading to withdrawal from treatment", - SERDSM = "Serious AE leading to dose modification/interruption", - RELSER = "Related Serious AE", - WD = "AE leading to withdrawal from treatment", - DSM = "AE leading to dose modification/interruption", - REL = "Related AE", - RELWD = "Related AE leading to withdrawal from treatment", - RELDSM = "Related AE leading to dose modification/interruption", - CTC35 = "Grade 3-5 AE", - CTC45 = "Grade 4/5 AE", - SMQ01 = aesi_label(adae$SMQ01NAM, adae$SMQ01SC), - SMQ02 = aesi_label(adae$SMQ02NAM, adae$SMQ02SC), - CQ01 = aesi_label(adae$CQ01NAM) - ) -``` - -## Standard Table - -```{r variant1, test = list(result_v1 = "result")} -aesi_vars <- c("FATAL", "SER", "SERWD", "SERDSM", "RELSER", "WD", "DSM", "REL", "RELWD", "RELDSM", "CTC35") - -# Layout for variables from adsl dataset. -lyt_adsl <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ACTARM") %>% - count_values( - "DTHFL", - values = "Y", - .labels = c(count_fraction = "Total number of deaths"), - denom = "N_col" - ) %>% - count_values( - "DCSREAS", - values = "ADVERSE EVENT", - .labels = c(count_fraction = "Total number of patients withdrawn from study due to an AE"), - denom = "N_col" - ) - -result_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl) - -# Layout for variables from adae dataset. -lyt_adae <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ACTARM") %>% - count_patients_with_event( - vars = "USUBJID", - filters = c("STUDYID" = as.character(unique(adae$STUDYID))), - denom = "N_col", - .labels = c(count_fraction = "Total number of patients with at least one adverse event") - ) %>% - count_values( - "STUDYID", - values = as.character(unique(adae$STUDYID)), - .stats = "count", - .labels = c(count = "Total AEs"), - table_names = "total_aes" - ) %>% - count_patients_with_flags( - "USUBJID", - flag_variables = var_labels(adae[, aesi_vars]), - denom = "N_col", - var_labels = "Total number of patients with at least one", - show_labels = "visible" - ) - -result_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl) - -# Combine tables. -col_info(result_adsl) <- col_info(result_adae) -result <- rbind( - result_adae[1:2, ], - result_adsl, - result_adae[3:nrow(result_adae), ] -) - -result -``` - -## Table with Medical <br/> Concepts Section - -```{r variant2, test = list(result_v2 = "result")} -aesi_vars <- c("FATAL", "SER", "SERWD", "SERDSM", "RELSER", "WD", "DSM", "REL", "RELWD", "RELDSM", "CTC35") -basket_vars <- c("SMQ01", "SMQ02", "CQ01") - -# Layout for variables from adsl dataset. -lyt_adsl <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ACTARM") %>% - count_values( - "DTHFL", - values = "Y", - .labels = c(count_fraction = "Total number of deaths"), - denom = "N_col" - ) %>% - count_values( - "DCSREAS", - values = "ADVERSE EVENT", - .labels = c(count_fraction = "Total number of patients withdrawn from study due to an AE"), - denom = "N_col" - ) - -result_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl) - -# Layout for variables from adae dataset. -lyt_adae <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ACTARM") %>% - count_patients_with_event( - vars = "USUBJID", - filters = c("STUDYID" = as.character(unique(adae$STUDYID))), - denom = "N_col", - .labels = c(count_fraction = "Total number of patients with at least one adverse event") + ), "Action Taken with Study Treatment"), + FATAL = with_label(AESDTH == "Y", "AE with fatal outcome"), + SEV = with_label(AESEV == "SEVERE", "Severe AE (at greatest intensity)"), + SER = with_label(AESER == "Y", "Serious AE"), + SERWD = with_label(AESER == "Y" & AEACN == "DRUG WITHDRAWN", "Serious AE leading to withdrawal from treatment"), + SERDSM = with_label( + AESER == "Y" & AEACN %in% c("DRUG INTERRUPTED", "DOSE INCREASED", "DOSE REDUCED"), + "Serious AE leading to dose modification/interruption" + ), + RELSER = with_label(AESER == "Y" & AEREL == "Y", "Related Serious AE"), + WD = with_label(AEACN == "DRUG WITHDRAWN", "AE leading to withdrawal from treatment"), + DSM = with_label( + AEACN %in% c("DRUG INTERRUPTED", "DOSE INCREASED", "DOSE REDUCED"), "AE leading to dose modification/interruption" + ), + REL = with_label(AEREL == "Y", "Related AE"), + RELWD = with_label(AEREL == "Y" & AEACN == "DRUG WITHDRAWN", "Related AE leading to withdrawal from treatment"), + RELDSM = with_label( + AEREL == "Y" & AEACN %in% c("DRUG INTERRUPTED", "DOSE INCREASED", "DOSE REDUCED"), + "Related AE leading to dose modification/interruption" + ), + CTC35 = with_label(AETOXGR %in% c("3", "4", "5"), "Grade 3-5 AE"), + CTC45 = with_label(AETOXGR %in% c("4", "5"), "Grade 4/5 AE"), + SMQ01 = with_label(SMQ01NAM != "", aesi_label(adae$SMQ01NAM, adae$SMQ01SC)), + SMQ02 = with_label(SMQ02NAM != "", aesi_label(adae$SMQ02NAM, adae$SMQ02SC)), + CQ01 = with_label(CQ01NAM != "", aesi_label(adae$CQ01NAM)), + USUBJID_AESEQ = paste(USUBJID, AESEQ, sep = "@@") # Create unique ID per AE in dataset. + ) %>% + filter(ANL01FL == "Y") +``` + +## Standard Table + +```{r variant1, test = list(result_v1 = "result")} +aesi_vars <- c("FATAL", "SER", "SERWD", "SERDSM", "RELSER", "WD", "DSM", "REL", "RELWD", "RELDSM", "SEV") + +# Layout for variables from adsl dataset. +lyt_adsl <- basic_table(show_colcounts = TRUE) %>% + split_cols_by("ACTARM") %>% + count_patients_with_event( + "USUBJID", + filters = c("DTHFL" = "Y"), + denom = "N_col", + .labels = c(count_fraction = "Total number of deaths") + ) %>% + count_patients_with_event( + "USUBJID", + filters = c("DCSREAS" = "ADVERSE EVENT"), + denom = "N_col", + .labels = c(count_fraction = "Total number of patients withdrawn from study due to an AE"), + table_names = "tot_wd" + ) + +result_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl) + +# Layout for variables from adae dataset. +lyt_adae <- basic_table(show_colcounts = TRUE) %>% + split_cols_by("ACTARM") %>% + analyze_num_patients( + vars = "USUBJID", + .stats = c("unique", "nonunique"), + .labels = c( + unique = "Total number of patients with at least one AE", + nonunique = "Total number of AEs" + ), + .formats = list(unique = format_count_fraction_fixed_dp, nonunique = "xx"), + show_labels = "hidden" + ) %>% + count_patients_with_flags( + "USUBJID", + flag_variables = aesi_vars, + denom = "N_col", + var_labels = "Total number of patients with at least one", + show_labels = "visible" + ) + +result_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl) + +# Combine tables. +col_info(result_adsl) <- col_info(result_adae) +result <- rbind( + result_adae[1:2, ], + result_adsl, + result_adae[3:nrow(result_adae), ] +) + +result +``` + +## Table with Medical <br/> Concepts Section + +```{r variant2, test = list(result_v2 = "result")} +aesi_vars <- c("FATAL", "SER", "SERWD", "SERDSM", "RELSER", "WD", "DSM", "REL", "RELWD", "RELDSM", "CTC35") +basket_vars <- c("SMQ01", "SMQ02", "CQ01") + +# Layout for variables from adsl dataset. +lyt_adsl <- basic_table(show_colcounts = TRUE) %>% + split_cols_by("ACTARM") %>% + count_patients_with_event( + "USUBJID", + filters = c("DTHFL" = "Y"), + denom = "N_col", + .labels = c(count_fraction = "Total number of deaths") + ) %>% + count_patients_with_event( + "USUBJID", + filters = c("DCSREAS" = "ADVERSE EVENT"), + denom = "N_col", + .labels = c(count_fraction = "Total number of patients withdrawn from study due to an AE"), + table_names = "tot_wd" + ) + +result_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl) + +# Layout for variables from adae dataset. +lyt_adae <- basic_table(show_colcounts = TRUE) %>% + split_cols_by("ACTARM") %>% + analyze_num_patients( + vars = "USUBJID", + .stats = c("unique", "nonunique"), + .labels = c( + unique = "Total number of patients with at least one AE", + nonunique = "Total number of AEs" + ), + .formats = list(unique = format_count_fraction_fixed_dp, nonunique = "xx"), + show_labels = "hidden" + ) %>% + count_patients_with_flags( + "USUBJID", + flag_variables = aesi_vars, + denom = "N_col", + var_labels = "Total number of patients with at least one", + show_labels = "visible" ) %>% - count_values( - "STUDYID", - values = as.character(unique(adae$STUDYID)), - .stats = "count", - .labels = c(count = "Total AEs"), - denom = "N_col", - table_names = "total_aes" - ) %>% - count_patients_with_flags( - "USUBJID", - flag_variables = var_labels(adae[, aesi_vars]), - table_names = "table_ae", - denom = "N_col", - var_labels = "Total number of patients with at least one", - show_labels = "visible" - ) %>% - count_patients_with_flags( - "USUBJID", - flag_variables = var_labels(adae[, basket_vars]), - table_names = "table_aesi", - denom = "N_col", - var_labels = "Total number of patients with at least one", - show_labels = "visible" - ) - -result_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl) - -# Combine tables. -col_info(result_adsl) <- col_info(result_adae) -result <- rbind( - result_adae[1:2, ], - result_adsl, - result_adae[3:nrow(result_adae), ] -) - -result -``` - -## Table with <br/> Modified Rows - -```{r variant3, test = list(result_v3 = "result")} -aesi_vars <- c("FATAL", "SER", "WD", "REL", "CTC35", "CTC45") -# Layout for variables from adsl dataset. -lyt_adsl <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ACTARM") %>% - count_values( - "DTHFL", - values = "Y", - .labels = c(count_fraction = "Total number of deaths"), - denom = "N_col" - ) %>% - count_values( - "DCSREAS", - values = "ADVERSE EVENT", - .labels = c(count_fraction = "Total number of patients withdrawn from study due to an AE"), - denom = "N_col", - table_names = "tbl_dscsreas_ae" - ) %>% - count_values( - "DCSREAS", - values = "WITHDRAWAL BY SUBJECT", - .labels = c(count_fraction = "Total number of patients withdrawn informed consent"), - denom = "N_col", - table_names = "tbl_dscsreas_wd" - ) -result_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl) - -# Layout for variables from adae dataset. -lyt_adae <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ACTARM") %>% - count_patients_with_event( - vars = "USUBJID", - filters = c("STUDYID" = as.character(unique(adae$STUDYID))), - denom = "N_col", - .labels = c(count_fraction = "Total number of patients with at least one adverse event") - ) %>% - count_values( - "STUDYID", - values = as.character(unique(adae$STUDYID)), - .stats = "count", - .labels = c(count = "Total AEs"), - denom = "N_col", - table_names = "total_aes" - ) %>% - count_patients_with_flags( - "USUBJID", - flag_variables = var_labels(adae[, aesi_vars]), - denom = "N_col", - var_labels = "Total number of patients with at least one", - show_labels = "visible" - ) - -result_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl) - -# Combine tables. -col_info(result_adsl) <- col_info(result_adae) -result <- rbind( - result_adae[1:2, ], - result_adsl, - result_adae[3:nrow(result_adae), ] -) - -result -``` - -## Table with Rows Counting <br/> Events & Additional Sections - -```{r variant4, test = list(result_v4 = "result")} -count_subj_vars <- c("FATAL", "SER", "WD", "DSM", "REL", "CTC35") -count_term_vars <- c("SER", "DSM", "REL", "CTC35", "CTC45") -count_ae_vars <- c("SER", "DSM", "REL", "CTC35", "CTC45") - -# Layout for variables from adsl dataset. -lyt_adsl <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ACTARM") %>% - count_values( - "DTHFL", - values = "Y", - .labels = c(count_fraction = "Total number of deaths"), - denom = "N_col" - ) %>% - count_values( - "DCSREAS", - values = "ADVERSE EVENT", - .labels = c(count_fraction = "Total number of patients withdrawn from study due to an AE"), - denom = "N_col" - ) - -result_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl) - -# Layout for variables from adae dataset. -lyt_adae <- basic_table(show_colcounts = TRUE) %>% - split_cols_by("ACTARM") %>% - count_patients_with_event( - vars = "USUBJID", - filters = c("STUDYID" = as.character(unique(adae$STUDYID))), - denom = "N_col", - .labels = c(count_fraction = "Total number of patients with at least one adverse event"), - table_names = "total_subj" - ) %>% - count_values( - "STUDYID", - values = as.character(unique(adae$STUDYID)), - .stats = "count", - .labels = c(count = "Total AEs"), - denom = "N_col", - table_names = "total_aes" - ) %>% - count_patients_with_flags( - "USUBJID", - flag_variables = var_labels(adae[, count_subj_vars]), - denom = "N_col", - var_labels = "Total number of patients with at least one", - show_labels = "visible" - ) %>% - count_patients_with_flags( - "AEDECOD", - flag_variables = var_labels(adae[, count_term_vars]), - .stats = "count", - .formats = c(count = "xx"), - table_names = "table_term", - var_labels = "Total number of unique preferred terms which are", - show_labels = "visible" - ) %>% - count_patients_with_flags( - "USUBJID_AESEQ", - flag_variables = var_labels(adae[, count_ae_vars]), - .stats = "count", - .formats = c(count = "xx"), - table_names = "table_ae", - var_labels = "Total number of adverse events which are", - show_labels = "visible" - ) - -result_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl) - -# Combine tables. -col_info(result_adsl) <- col_info(result_adae) -result <- rbind( - result_adae[1:2, ], - result_adsl, - result_adae[3:nrow(result_adae), ] -) - -result -``` - -{{< include ../../test-utils/save_results.qmd >}} - -## Teal - -```{r teal, message=FALSE, opts.label='skip_if_testing'} -#| screenshot.opts = list(delay = 12) -library(teal.modules.clinical) -library(scda) -library(dplyr) - -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") - -add_event_flags <- function(dat) { - dat %>% - dplyr::mutate( - TMPFL_SER = AESER == "Y", - TMPFL_REL = AEREL == "Y", - TMPFL_GR5 = AETOXGR == "5", - TMP_SMQ01 = !is.na(SMQ01NAM), - TMP_SMQ02 = !is.na(SMQ02NAM), - TMP_CQ01 = !is.na(CQ01NAM) - ) %>% - var_relabel( - TMPFL_SER = "Serious AE", - TMPFL_REL = "Related AE", - TMPFL_GR5 = "Grade 5 AE", - TMP_SMQ01 = aesi_label(dat[["SMQ01NAM"]], dat[["SMQ01SC"]]), - TMP_SMQ02 = aesi_label(dat[["SMQ02NAM"]], dat[["SMQ02SC"]]), - TMP_CQ01 = aesi_label(dat[["CQ01NAM"]]) - ) -} - -# Generating user-defined event flags. -adae <- adae %>% add_event_flags() - -ae_anl_vars <- names(adae)[startsWith(names(adae), "TMPFL_")] -aesi_vars <- names(adae)[startsWith(names(adae), "TMP_")] - -app <- init( - data = cdisc_data( - cdisc_dataset("ADSL", adsl, code = 'ADSL <- synthetic_cdisc_dataset("latest", "adsl")'), - cdisc_dataset("ADAE", adae, code = 'ADAE <- synthetic_cdisc_dataset("latest", "adae") - add_event_flags <- function(dat) { - dat %>% - dplyr::mutate( - TMPFL_SER = AESER == "Y", - TMPFL_REL = AEREL == "Y", - TMPFL_GR5 = AETOXGR == "5", - TMP_SMQ01 = !is.na(SMQ01NAM), - TMP_SMQ02 = !is.na(SMQ02NAM), - TMP_CQ01 = !is.na(CQ01NAM) - ) %>% - var_relabel( - TMPFL_SER = "Serious AE", - TMPFL_REL = "Related AE", - TMPFL_GR5 = "Grade 5 AE", - TMP_SMQ01 = aesi_label(dat[["SMQ01NAM"]], dat[["SMQ01SC"]]), - TMP_SMQ02 = aesi_label(dat[["SMQ02NAM"]], dat[["SMQ02SC"]]), - TMP_CQ01 = aesi_label(dat[["CQ01NAM"]]) - ) - } - ADAE <- ADAE %>% add_event_flags()'), - check = TRUE - ), - modules = modules( - tm_t_events_summary( - label = "Adverse Events Summary", - dataname = "ADAE", - arm_var = choices_selected( - choices = variable_choices("ADSL", c("ARM", "ARMCD")), - selected = "ARM" - ), - flag_var_anl = choices_selected( - choices = variable_choices("ADAE", ae_anl_vars), - selected = ae_anl_vars[1], - keep_order = TRUE, - fixed = FALSE - ), - flag_var_aesi = choices_selected( - choices = variable_choices("ADAE", aesi_vars), - selected = aesi_vars[1], - keep_order = TRUE, - fixed = FALSE - ), - add_total = TRUE - ) - ) -) - -shinyApp(app$ui, app$server) -``` - -{{< include ../../si.qmd >}} -:::
    + count_patients_with_flags( + "USUBJID", + flag_variables = basket_vars, + table_names = "table_aesi", + denom = "N_col", + var_labels = "Total number of patients with at least one", + show_labels = "visible" + ) + +result_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl) + +# Combine tables. +col_info(result_adsl) <- col_info(result_adae) +result <- rbind( + result_adae[1:2, ], + result_adsl, + result_adae[3:nrow(result_adae), ] +) + +result +``` + +## Table with <br/> Modified Rows + +```{r variant3, test = list(result_v3 = "result")} +aesi_vars <- c("FATAL", "SER", "WD", "REL", "CTC35", "CTC45") +# Layout for variables from adsl dataset. +lyt_adsl <- basic_table(show_colcounts = TRUE) %>% + split_cols_by("ACTARM") %>% + count_patients_with_event( + "USUBJID", + filters = c("DTHFL" = "Y"), + denom = "N_col", + .labels = c(count_fraction = "Total number of deaths") + ) %>% + count_patients_with_event( + "USUBJID", + filters = c("DCSREAS" = "ADVERSE EVENT"), + denom = "N_col", + .labels = c(count_fraction = "Total number of patients withdrawn from study due to an AE"), + table_names = "tot_wd" + ) %>% + count_patients_with_event( + "USUBJID", + filters = c("DCSREAS" = "WITHDRAWAL BY SUBJECT"), + denom = "N_col", + .labels = c(count_fraction = "Total number of patients withdrawn informed consent"), + table_names = "tot_dscsreas_wd" + ) +result_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl) + +# Layout for variables from adae dataset. +lyt_adae <- basic_table(show_colcounts = TRUE) %>% + split_cols_by("ACTARM") %>% + analyze_num_patients( + vars = "USUBJID", + .stats = c("unique", "nonunique"), + .labels = c( + unique = "Total number of patients with at least one AE", + nonunique = "Total number of AEs" + ), + .formats = list(unique = format_count_fraction_fixed_dp, nonunique = "xx"), + show_labels = "hidden" + ) %>% + count_patients_with_flags( + "USUBJID", + flag_variables = aesi_vars, + denom = "N_col", + var_labels = "Total number of patients with at least one", + show_labels = "visible" + ) +result_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl) + +# Combine tables. +col_info(result_adsl) <- col_info(result_adae) +result <- rbind( + result_adae[1:2, ], + result_adsl, + result_adae[3:nrow(result_adae), ] +) + +result +``` + +## Table with Rows Counting <br/> Events & Additional Sections + +```{r variant4, test = list(result_v4 = "result")} +count_subj_vars <- c("FATAL", "SER", "WD", "DSM", "REL", "CTC35") +count_term_vars <- c("SER", "DSM", "REL", "CTC35", "CTC45") +count_ae_vars <- c("SER", "DSM", "REL", "CTC35", "CTC45") + +# Layout for variables from adsl dataset. +lyt_adsl <- basic_table(show_colcounts = TRUE) %>% + split_cols_by("ACTARM") %>% + count_patients_with_event( + "USUBJID", + filters = c("DTHFL" = "Y"), + denom = "N_col", + .labels = c(count_fraction = "Total number of deaths") + ) %>% + count_patients_with_event( + "USUBJID", + filters = c("DCSREAS" = "ADVERSE EVENT"), + denom = "N_col", + .labels = c(count_fraction = "Total number of patients withdrawn from study due to an AE"), + table_names = "tot_wd" + ) + +result_adsl <- build_table(lyt_adsl, df = adsl, alt_counts_df = adsl) + +# Layout for variables from adae dataset. +lyt_adae <- basic_table(show_colcounts = TRUE) %>% + split_cols_by("ACTARM") %>% + analyze_num_patients( + vars = "USUBJID", + .stats = c("unique", "nonunique"), + .labels = c( + unique = "Total number of patients with at least one AE", + nonunique = "Total number of AEs" + ), + .formats = list(unique = format_count_fraction_fixed_dp, nonunique = "xx"), + show_labels = "hidden" + ) %>% + count_patients_with_flags( + "USUBJID", + flag_variables = count_subj_vars, + denom = "N_col", + var_labels = "Total number of patients with at least one", + show_labels = "visible" + ) %>% + count_patients_with_flags( + "AEDECOD", + flag_variables = count_term_vars, + .stats = "count", + .formats = c(count = "xx"), + table_names = "table_term", + var_labels = "Total number of unique preferred terms which are", + show_labels = "visible" + ) %>% + count_patients_with_flags( + "USUBJID_AESEQ", + flag_variables = count_ae_vars, + .stats = "count", + .formats = c(count = "xx"), + table_names = "table_ae", + var_labels = "Total number of adverse events which are", + show_labels = "visible" + ) + +result_adae <- build_table(lyt_adae, df = adae, alt_counts_df = adsl) + +# Combine tables. +col_info(result_adsl) <- col_info(result_adae) +result <- rbind( + result_adae[1:2, ], + result_adsl, + result_adae[3:nrow(result_adae), ] +) + +result +``` + +{{< include ../../test-utils/save_results.qmd >}} + +## Teal + +```{r teal, message=FALSE, opts.label='skip_if_testing'} +#| screenshot.opts = list(delay = 12) +library(teal.modules.clinical) +library(scda) +library(dplyr) + +adsl <- synthetic_cdisc_dataset("latest", "adsl") +adae <- synthetic_cdisc_dataset("latest", "adae") + +add_event_flags <- function(dat) { + dat %>% + dplyr::mutate( + TMPFL_SER = AESER == "Y", + TMPFL_REL = AEREL == "Y", + TMPFL_GR5 = AETOXGR == "5", + TMP_SMQ01 = !is.na(SMQ01NAM), + TMP_SMQ02 = !is.na(SMQ02NAM), + TMP_CQ01 = !is.na(CQ01NAM) + ) %>% + var_relabel( + TMPFL_SER = "Serious AE", + TMPFL_REL = "Related AE", + TMPFL_GR5 = "Grade 5 AE", + TMP_SMQ01 = aesi_label(dat[["SMQ01NAM"]], dat[["SMQ01SC"]]), + TMP_SMQ02 = aesi_label(dat[["SMQ02NAM"]], dat[["SMQ02SC"]]), + TMP_CQ01 = aesi_label(dat[["CQ01NAM"]]) + ) +} + +# Generating user-defined event flags. +adae <- adae %>% add_event_flags() + +ae_anl_vars <- names(adae)[startsWith(names(adae), "TMPFL_")] +aesi_vars <- names(adae)[startsWith(names(adae), "TMP_")] + +app <- init( + data = cdisc_data( + cdisc_dataset("ADSL", adsl, code = 'ADSL <- synthetic_cdisc_dataset("latest", "adsl")'), + cdisc_dataset("ADAE", adae, code = 'ADAE <- synthetic_cdisc_dataset("latest", "adae") + add_event_flags <- function(dat) { + dat %>% + dplyr::mutate( + TMPFL_SER = AESER == "Y", + TMPFL_REL = AEREL == "Y", + TMPFL_GR5 = AETOXGR == "5", + TMP_SMQ01 = !is.na(SMQ01NAM), + TMP_SMQ02 = !is.na(SMQ02NAM), + TMP_CQ01 = !is.na(CQ01NAM) + ) %>% + var_relabel( + TMPFL_SER = "Serious AE", + TMPFL_REL = "Related AE", + TMPFL_GR5 = "Grade 5 AE", + TMP_SMQ01 = aesi_label(dat[["SMQ01NAM"]], dat[["SMQ01SC"]]), + TMP_SMQ02 = aesi_label(dat[["SMQ02NAM"]], dat[["SMQ02SC"]]), + TMP_CQ01 = aesi_label(dat[["CQ01NAM"]]) + ) + } + ADAE <- ADAE %>% add_event_flags()'), + check = TRUE + ), + modules = modules( + tm_t_events_summary( + label = "Adverse Events Summary", + dataname = "ADAE", + arm_var = choices_selected( + choices = variable_choices("ADSL", c("ARM", "ARMCD")), + selected = "ARM" + ), + flag_var_anl = choices_selected( + choices = variable_choices("ADAE", ae_anl_vars), + selected = ae_anl_vars[1], + keep_order = TRUE, + fixed = FALSE + ), + flag_var_aesi = choices_selected( + choices = variable_choices("ADAE", aesi_vars), + selected = aesi_vars[1], + keep_order = TRUE, + fixed = FALSE + ), + add_total = TRUE + ) + ) +) + +shinyApp(app$ui, app$server) +``` + +{{< include ../../si.qmd >}} +:::