diff --git a/development/appendix/reproducibility.html b/development/appendix/reproducibility.html index 5dca8bcf0b..12866e667f 100644 --- a/development/appendix/reproducibility.html +++ b/development/appendix/reproducibility.html @@ -1476,7 +1476,7 @@ )

-NOTE: Dependency discovery took 11 seconds during snapshot.
+NOTE: Dependency discovery took 12 seconds during snapshot.
 Consider using .renvignore to ignore files, or switching to explicit snapshots.
 See `?renv::dependencies` for more information.
diff --git a/development/assets/www/lock/graphs/efficacy/fstg01.lock b/development/assets/www/lock/graphs/efficacy/fstg01.lock index a517d09e1f..089f0f9818 100644 --- a/development/assets/www/lock/graphs/efficacy/fstg01.lock +++ b/development/assets/www/lock/graphs/efficacy/fstg01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1999,7 +1999,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -2010,7 +2010,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2272,11 +2272,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2297,7 +2297,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2318,11 +2318,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2333,7 +2333,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2355,11 +2355,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2394,15 +2394,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2419,15 +2419,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2450,7 +2450,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2544,11 +2544,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2561,7 +2561,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/graphs/efficacy/fstg02.lock b/development/assets/www/lock/graphs/efficacy/fstg02.lock index a517d09e1f..089f0f9818 100644 --- a/development/assets/www/lock/graphs/efficacy/fstg02.lock +++ b/development/assets/www/lock/graphs/efficacy/fstg02.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1999,7 +1999,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -2010,7 +2010,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2272,11 +2272,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2297,7 +2297,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2318,11 +2318,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2333,7 +2333,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2355,11 +2355,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2394,15 +2394,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2419,15 +2419,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2450,7 +2450,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2544,11 +2544,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2561,7 +2561,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/graphs/efficacy/kmg01.lock b/development/assets/www/lock/graphs/efficacy/kmg01.lock index a517d09e1f..089f0f9818 100644 --- a/development/assets/www/lock/graphs/efficacy/kmg01.lock +++ b/development/assets/www/lock/graphs/efficacy/kmg01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1999,7 +1999,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -2010,7 +2010,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2272,11 +2272,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2297,7 +2297,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2318,11 +2318,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2333,7 +2333,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2355,11 +2355,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2394,15 +2394,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2419,15 +2419,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2450,7 +2450,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2544,11 +2544,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2561,7 +2561,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/graphs/efficacy/mmrmg01.lock b/development/assets/www/lock/graphs/efficacy/mmrmg01.lock index a517d09e1f..089f0f9818 100644 --- a/development/assets/www/lock/graphs/efficacy/mmrmg01.lock +++ b/development/assets/www/lock/graphs/efficacy/mmrmg01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1999,7 +1999,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -2010,7 +2010,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2272,11 +2272,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2297,7 +2297,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2318,11 +2318,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2333,7 +2333,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2355,11 +2355,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2394,15 +2394,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2419,15 +2419,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2450,7 +2450,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2544,11 +2544,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2561,7 +2561,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/graphs/efficacy/mmrmg02.lock b/development/assets/www/lock/graphs/efficacy/mmrmg02.lock index 45515a94bf..6e898a2826 100644 --- a/development/assets/www/lock/graphs/efficacy/mmrmg02.lock +++ b/development/assets/www/lock/graphs/efficacy/mmrmg02.lock @@ -541,11 +541,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -553,7 +553,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1197,7 +1197,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1208,7 +1208,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/graphs/other/brg01.lock b/development/assets/www/lock/graphs/other/brg01.lock index a50e1f8506..6b37315123 100644 --- a/development/assets/www/lock/graphs/other/brg01.lock +++ b/development/assets/www/lock/graphs/other/brg01.lock @@ -539,11 +539,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -551,7 +551,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1259,7 +1259,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1270,7 +1270,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/graphs/other/bwg01.lock b/development/assets/www/lock/graphs/other/bwg01.lock index 991915eaea..bae6d00c0f 100644 --- a/development/assets/www/lock/graphs/other/bwg01.lock +++ b/development/assets/www/lock/graphs/other/bwg01.lock @@ -839,11 +839,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -851,7 +851,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1922,7 +1922,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1933,7 +1933,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2198,11 +2198,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2223,7 +2223,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2244,11 +2244,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2259,7 +2259,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2281,11 +2281,11 @@ }, "teal.modules.general": { "Package": "teal.modules.general", - "Version": "0.3.0.9006", + "Version": "0.3.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.general.git", - "RemoteSha": "99d7f0256a10be0c84afbf160bf1a093f63ae44f", + "RemoteSha": "78b95ac65d9ba0e324419469ccedc4b1a2262156", "Requirements": [ "DT", "R", @@ -2316,15 +2316,15 @@ "tools", "utils" ], - "Hash": "f3a57da302227c4b65b5245bd584705b" + "Hash": "9c3dcf6f9690b92f2fadd7056d467254" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2341,15 +2341,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2372,7 +2372,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", diff --git a/development/assets/www/lock/graphs/other/cig01.lock b/development/assets/www/lock/graphs/other/cig01.lock index a517d09e1f..089f0f9818 100644 --- a/development/assets/www/lock/graphs/other/cig01.lock +++ b/development/assets/www/lock/graphs/other/cig01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1999,7 +1999,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -2010,7 +2010,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2272,11 +2272,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2297,7 +2297,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2318,11 +2318,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2333,7 +2333,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2355,11 +2355,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2394,15 +2394,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2419,15 +2419,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2450,7 +2450,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2544,11 +2544,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2561,7 +2561,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/graphs/other/ippg01.lock b/development/assets/www/lock/graphs/other/ippg01.lock index a517d09e1f..089f0f9818 100644 --- a/development/assets/www/lock/graphs/other/ippg01.lock +++ b/development/assets/www/lock/graphs/other/ippg01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1999,7 +1999,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -2010,7 +2010,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2272,11 +2272,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2297,7 +2297,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2318,11 +2318,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2333,7 +2333,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2355,11 +2355,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2394,15 +2394,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2419,15 +2419,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2450,7 +2450,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2544,11 +2544,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2561,7 +2561,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/graphs/other/ltg01.lock b/development/assets/www/lock/graphs/other/ltg01.lock index a517d09e1f..089f0f9818 100644 --- a/development/assets/www/lock/graphs/other/ltg01.lock +++ b/development/assets/www/lock/graphs/other/ltg01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1999,7 +1999,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -2010,7 +2010,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2272,11 +2272,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2297,7 +2297,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2318,11 +2318,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2333,7 +2333,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2355,11 +2355,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2394,15 +2394,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2419,15 +2419,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2450,7 +2450,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2544,11 +2544,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2561,7 +2561,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/graphs/other/mng01.lock b/development/assets/www/lock/graphs/other/mng01.lock index a517d09e1f..089f0f9818 100644 --- a/development/assets/www/lock/graphs/other/mng01.lock +++ b/development/assets/www/lock/graphs/other/mng01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1999,7 +1999,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -2010,7 +2010,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2272,11 +2272,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2297,7 +2297,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2318,11 +2318,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2333,7 +2333,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2355,11 +2355,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2394,15 +2394,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2419,15 +2419,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2450,7 +2450,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2544,11 +2544,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2561,7 +2561,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/graphs/pharmacokinetic/pkcg01.lock b/development/assets/www/lock/graphs/pharmacokinetic/pkcg01.lock index c5a4ad0ae1..32d6b57e89 100644 --- a/development/assets/www/lock/graphs/pharmacokinetic/pkcg01.lock +++ b/development/assets/www/lock/graphs/pharmacokinetic/pkcg01.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1143,7 +1143,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1154,7 +1154,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/graphs/pharmacokinetic/pkcg02.lock b/development/assets/www/lock/graphs/pharmacokinetic/pkcg02.lock index c5a4ad0ae1..32d6b57e89 100644 --- a/development/assets/www/lock/graphs/pharmacokinetic/pkcg02.lock +++ b/development/assets/www/lock/graphs/pharmacokinetic/pkcg02.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1143,7 +1143,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1154,7 +1154,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/graphs/pharmacokinetic/pkcg03.lock b/development/assets/www/lock/graphs/pharmacokinetic/pkcg03.lock index c5a4ad0ae1..32d6b57e89 100644 --- a/development/assets/www/lock/graphs/pharmacokinetic/pkcg03.lock +++ b/development/assets/www/lock/graphs/pharmacokinetic/pkcg03.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1143,7 +1143,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1154,7 +1154,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/graphs/pharmacokinetic/pkpg01.lock b/development/assets/www/lock/graphs/pharmacokinetic/pkpg01.lock index c5a4ad0ae1..32d6b57e89 100644 --- a/development/assets/www/lock/graphs/pharmacokinetic/pkpg01.lock +++ b/development/assets/www/lock/graphs/pharmacokinetic/pkpg01.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1143,7 +1143,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1154,7 +1154,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/graphs/pharmacokinetic/pkpg02.lock b/development/assets/www/lock/graphs/pharmacokinetic/pkpg02.lock index c5a4ad0ae1..32d6b57e89 100644 --- a/development/assets/www/lock/graphs/pharmacokinetic/pkpg02.lock +++ b/development/assets/www/lock/graphs/pharmacokinetic/pkpg02.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1143,7 +1143,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1154,7 +1154,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/graphs/pharmacokinetic/pkpg03.lock b/development/assets/www/lock/graphs/pharmacokinetic/pkpg03.lock index c5a4ad0ae1..32d6b57e89 100644 --- a/development/assets/www/lock/graphs/pharmacokinetic/pkpg03.lock +++ b/development/assets/www/lock/graphs/pharmacokinetic/pkpg03.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1143,7 +1143,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1154,7 +1154,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/graphs/pharmacokinetic/pkpg04.lock b/development/assets/www/lock/graphs/pharmacokinetic/pkpg04.lock index 09f6e6e2ce..5734b675b6 100644 --- a/development/assets/www/lock/graphs/pharmacokinetic/pkpg04.lock +++ b/development/assets/www/lock/graphs/pharmacokinetic/pkpg04.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1159,7 +1159,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1170,7 +1170,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/graphs/pharmacokinetic/pkpg06.lock b/development/assets/www/lock/graphs/pharmacokinetic/pkpg06.lock index c5a4ad0ae1..32d6b57e89 100644 --- a/development/assets/www/lock/graphs/pharmacokinetic/pkpg06.lock +++ b/development/assets/www/lock/graphs/pharmacokinetic/pkpg06.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1143,7 +1143,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1154,7 +1154,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/listings/ADA/adal02.lock b/development/assets/www/lock/listings/ADA/adal02.lock index 3be77c3932..71eca794d8 100644 --- a/development/assets/www/lock/listings/ADA/adal02.lock +++ b/development/assets/www/lock/listings/ADA/adal02.lock @@ -183,11 +183,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -195,7 +195,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/ECG/egl01.lock b/development/assets/www/lock/listings/ECG/egl01.lock index 3be77c3932..71eca794d8 100644 --- a/development/assets/www/lock/listings/ECG/egl01.lock +++ b/development/assets/www/lock/listings/ECG/egl01.lock @@ -183,11 +183,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -195,7 +195,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/adverse-events/ael01.lock b/development/assets/www/lock/listings/adverse-events/ael01.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/adverse-events/ael01.lock +++ b/development/assets/www/lock/listings/adverse-events/ael01.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/adverse-events/ael01_nollt.lock b/development/assets/www/lock/listings/adverse-events/ael01_nollt.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/adverse-events/ael01_nollt.lock +++ b/development/assets/www/lock/listings/adverse-events/ael01_nollt.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/adverse-events/ael02.lock b/development/assets/www/lock/listings/adverse-events/ael02.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/adverse-events/ael02.lock +++ b/development/assets/www/lock/listings/adverse-events/ael02.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/adverse-events/ael02_ed.lock b/development/assets/www/lock/listings/adverse-events/ael02_ed.lock index 61cdc04c63..9fad3120e1 100644 --- a/development/assets/www/lock/listings/adverse-events/ael02_ed.lock +++ b/development/assets/www/lock/listings/adverse-events/ael02_ed.lock @@ -183,11 +183,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -195,7 +195,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/adverse-events/ael03.lock b/development/assets/www/lock/listings/adverse-events/ael03.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/adverse-events/ael03.lock +++ b/development/assets/www/lock/listings/adverse-events/ael03.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/adverse-events/ael04.lock b/development/assets/www/lock/listings/adverse-events/ael04.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/adverse-events/ael04.lock +++ b/development/assets/www/lock/listings/adverse-events/ael04.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/concomitant-medications/cml01.lock b/development/assets/www/lock/listings/concomitant-medications/cml01.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/concomitant-medications/cml01.lock +++ b/development/assets/www/lock/listings/concomitant-medications/cml01.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/concomitant-medications/cml02a_gl.lock b/development/assets/www/lock/listings/concomitant-medications/cml02a_gl.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/concomitant-medications/cml02a_gl.lock +++ b/development/assets/www/lock/listings/concomitant-medications/cml02a_gl.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/concomitant-medications/cml02b_gl.lock b/development/assets/www/lock/listings/concomitant-medications/cml02b_gl.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/concomitant-medications/cml02b_gl.lock +++ b/development/assets/www/lock/listings/concomitant-medications/cml02b_gl.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/development-safety-update-report/dsur4.lock b/development/assets/www/lock/listings/development-safety-update-report/dsur4.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/development-safety-update-report/dsur4.lock +++ b/development/assets/www/lock/listings/development-safety-update-report/dsur4.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/disposition/dsl01.lock b/development/assets/www/lock/listings/disposition/dsl01.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/disposition/dsl01.lock +++ b/development/assets/www/lock/listings/disposition/dsl01.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/disposition/dsl02.lock b/development/assets/www/lock/listings/disposition/dsl02.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/disposition/dsl02.lock +++ b/development/assets/www/lock/listings/disposition/dsl02.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/efficacy/oncl01.lock b/development/assets/www/lock/listings/efficacy/oncl01.lock index 3be77c3932..71eca794d8 100644 --- a/development/assets/www/lock/listings/efficacy/oncl01.lock +++ b/development/assets/www/lock/listings/efficacy/oncl01.lock @@ -183,11 +183,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -195,7 +195,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/exposure/exl01.lock b/development/assets/www/lock/listings/exposure/exl01.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/exposure/exl01.lock +++ b/development/assets/www/lock/listings/exposure/exl01.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/lab-results/lbl01.lock b/development/assets/www/lock/listings/lab-results/lbl01.lock index 3be77c3932..71eca794d8 100644 --- a/development/assets/www/lock/listings/lab-results/lbl01.lock +++ b/development/assets/www/lock/listings/lab-results/lbl01.lock @@ -183,11 +183,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -195,7 +195,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/lab-results/lbl01_rls.lock b/development/assets/www/lock/listings/lab-results/lbl01_rls.lock index 3be77c3932..71eca794d8 100644 --- a/development/assets/www/lock/listings/lab-results/lbl01_rls.lock +++ b/development/assets/www/lock/listings/lab-results/lbl01_rls.lock @@ -183,11 +183,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -195,7 +195,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/lab-results/lbl02a.lock b/development/assets/www/lock/listings/lab-results/lbl02a.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/lab-results/lbl02a.lock +++ b/development/assets/www/lock/listings/lab-results/lbl02a.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/lab-results/lbl02a_rls.lock b/development/assets/www/lock/listings/lab-results/lbl02a_rls.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/lab-results/lbl02a_rls.lock +++ b/development/assets/www/lock/listings/lab-results/lbl02a_rls.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/lab-results/lbl02b.lock b/development/assets/www/lock/listings/lab-results/lbl02b.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/lab-results/lbl02b.lock +++ b/development/assets/www/lock/listings/lab-results/lbl02b.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/medical-history/mhl01.lock b/development/assets/www/lock/listings/medical-history/mhl01.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/medical-history/mhl01.lock +++ b/development/assets/www/lock/listings/medical-history/mhl01.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/pharmacokinetic/pkcl01.lock b/development/assets/www/lock/listings/pharmacokinetic/pkcl01.lock index a388a265d1..096dbb35c4 100644 --- a/development/assets/www/lock/listings/pharmacokinetic/pkcl01.lock +++ b/development/assets/www/lock/listings/pharmacokinetic/pkcl01.lock @@ -173,11 +173,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -185,7 +185,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/pharmacokinetic/pkcl02.lock b/development/assets/www/lock/listings/pharmacokinetic/pkcl02.lock index 3be77c3932..71eca794d8 100644 --- a/development/assets/www/lock/listings/pharmacokinetic/pkcl02.lock +++ b/development/assets/www/lock/listings/pharmacokinetic/pkcl02.lock @@ -183,11 +183,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -195,7 +195,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/pharmacokinetic/pkpl01.lock b/development/assets/www/lock/listings/pharmacokinetic/pkpl01.lock index 3be77c3932..71eca794d8 100644 --- a/development/assets/www/lock/listings/pharmacokinetic/pkpl01.lock +++ b/development/assets/www/lock/listings/pharmacokinetic/pkpl01.lock @@ -183,11 +183,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -195,7 +195,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/pharmacokinetic/pkpl02.lock b/development/assets/www/lock/listings/pharmacokinetic/pkpl02.lock index 3be77c3932..71eca794d8 100644 --- a/development/assets/www/lock/listings/pharmacokinetic/pkpl02.lock +++ b/development/assets/www/lock/listings/pharmacokinetic/pkpl02.lock @@ -183,11 +183,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -195,7 +195,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/pharmacokinetic/pkpl04.lock b/development/assets/www/lock/listings/pharmacokinetic/pkpl04.lock index 3be77c3932..71eca794d8 100644 --- a/development/assets/www/lock/listings/pharmacokinetic/pkpl04.lock +++ b/development/assets/www/lock/listings/pharmacokinetic/pkpl04.lock @@ -183,11 +183,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -195,7 +195,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/listings/vital-signs/vsl01.lock b/development/assets/www/lock/listings/vital-signs/vsl01.lock index 3be77c3932..71eca794d8 100644 --- a/development/assets/www/lock/listings/vital-signs/vsl01.lock +++ b/development/assets/www/lock/listings/vital-signs/vsl01.lock @@ -183,11 +183,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -195,7 +195,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", diff --git a/development/assets/www/lock/tables/ADA/adat01.lock b/development/assets/www/lock/tables/ADA/adat01.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/ADA/adat01.lock +++ b/development/assets/www/lock/tables/ADA/adat01.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/ADA/adat02.lock b/development/assets/www/lock/tables/ADA/adat02.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/ADA/adat02.lock +++ b/development/assets/www/lock/tables/ADA/adat02.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/ADA/adat03.lock b/development/assets/www/lock/tables/ADA/adat03.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/ADA/adat03.lock +++ b/development/assets/www/lock/tables/ADA/adat03.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/ADA/adat04a.lock b/development/assets/www/lock/tables/ADA/adat04a.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/ADA/adat04a.lock +++ b/development/assets/www/lock/tables/ADA/adat04a.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/ADA/adat04b.lock b/development/assets/www/lock/tables/ADA/adat04b.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/ADA/adat04b.lock +++ b/development/assets/www/lock/tables/ADA/adat04b.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/ECG/egt01.lock b/development/assets/www/lock/tables/ECG/egt01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/ECG/egt01.lock +++ b/development/assets/www/lock/tables/ECG/egt01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/ECG/egt02.lock b/development/assets/www/lock/tables/ECG/egt02.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/ECG/egt02.lock +++ b/development/assets/www/lock/tables/ECG/egt02.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/ECG/egt03.lock b/development/assets/www/lock/tables/ECG/egt03.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/ECG/egt03.lock +++ b/development/assets/www/lock/tables/ECG/egt03.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/ECG/egt04.lock b/development/assets/www/lock/tables/ECG/egt04.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/ECG/egt04.lock +++ b/development/assets/www/lock/tables/ECG/egt04.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/ECG/egt05_qtcat.lock b/development/assets/www/lock/tables/ECG/egt05_qtcat.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/ECG/egt05_qtcat.lock +++ b/development/assets/www/lock/tables/ECG/egt05_qtcat.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/adverse-events/aet01.lock b/development/assets/www/lock/tables/adverse-events/aet01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/adverse-events/aet01.lock +++ b/development/assets/www/lock/tables/adverse-events/aet01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/adverse-events/aet01_aesi.lock b/development/assets/www/lock/tables/adverse-events/aet01_aesi.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/adverse-events/aet01_aesi.lock +++ b/development/assets/www/lock/tables/adverse-events/aet01_aesi.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/adverse-events/aet02.lock b/development/assets/www/lock/tables/adverse-events/aet02.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/adverse-events/aet02.lock +++ b/development/assets/www/lock/tables/adverse-events/aet02.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/adverse-events/aet02_smq.lock b/development/assets/www/lock/tables/adverse-events/aet02_smq.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/adverse-events/aet02_smq.lock +++ b/development/assets/www/lock/tables/adverse-events/aet02_smq.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/adverse-events/aet03.lock b/development/assets/www/lock/tables/adverse-events/aet03.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/adverse-events/aet03.lock +++ b/development/assets/www/lock/tables/adverse-events/aet03.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/adverse-events/aet04.lock b/development/assets/www/lock/tables/adverse-events/aet04.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/adverse-events/aet04.lock +++ b/development/assets/www/lock/tables/adverse-events/aet04.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/adverse-events/aet04_pi.lock b/development/assets/www/lock/tables/adverse-events/aet04_pi.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/adverse-events/aet04_pi.lock +++ b/development/assets/www/lock/tables/adverse-events/aet04_pi.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/adverse-events/aet05.lock b/development/assets/www/lock/tables/adverse-events/aet05.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/adverse-events/aet05.lock +++ b/development/assets/www/lock/tables/adverse-events/aet05.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/adverse-events/aet05_all.lock b/development/assets/www/lock/tables/adverse-events/aet05_all.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/adverse-events/aet05_all.lock +++ b/development/assets/www/lock/tables/adverse-events/aet05_all.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/adverse-events/aet06.lock b/development/assets/www/lock/tables/adverse-events/aet06.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/adverse-events/aet06.lock +++ b/development/assets/www/lock/tables/adverse-events/aet06.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/adverse-events/aet06_smq.lock b/development/assets/www/lock/tables/adverse-events/aet06_smq.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/adverse-events/aet06_smq.lock +++ b/development/assets/www/lock/tables/adverse-events/aet06_smq.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/adverse-events/aet07.lock b/development/assets/www/lock/tables/adverse-events/aet07.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/adverse-events/aet07.lock +++ b/development/assets/www/lock/tables/adverse-events/aet07.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/adverse-events/aet09.lock b/development/assets/www/lock/tables/adverse-events/aet09.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/adverse-events/aet09.lock +++ b/development/assets/www/lock/tables/adverse-events/aet09.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/adverse-events/aet09_smq.lock b/development/assets/www/lock/tables/adverse-events/aet09_smq.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/adverse-events/aet09_smq.lock +++ b/development/assets/www/lock/tables/adverse-events/aet09_smq.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/adverse-events/aet10.lock b/development/assets/www/lock/tables/adverse-events/aet10.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/adverse-events/aet10.lock +++ b/development/assets/www/lock/tables/adverse-events/aet10.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/concomitant-medications/cmt01.lock b/development/assets/www/lock/tables/concomitant-medications/cmt01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/concomitant-medications/cmt01.lock +++ b/development/assets/www/lock/tables/concomitant-medications/cmt01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/concomitant-medications/cmt01a.lock b/development/assets/www/lock/tables/concomitant-medications/cmt01a.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/concomitant-medications/cmt01a.lock +++ b/development/assets/www/lock/tables/concomitant-medications/cmt01a.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/concomitant-medications/cmt01b.lock b/development/assets/www/lock/tables/concomitant-medications/cmt01b.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/concomitant-medications/cmt01b.lock +++ b/development/assets/www/lock/tables/concomitant-medications/cmt01b.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/concomitant-medications/cmt02_pt.lock b/development/assets/www/lock/tables/concomitant-medications/cmt02_pt.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/concomitant-medications/cmt02_pt.lock +++ b/development/assets/www/lock/tables/concomitant-medications/cmt02_pt.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/deaths/dtht01.lock b/development/assets/www/lock/tables/deaths/dtht01.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/deaths/dtht01.lock +++ b/development/assets/www/lock/tables/deaths/dtht01.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/demography/dmt01.lock b/development/assets/www/lock/tables/demography/dmt01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/demography/dmt01.lock +++ b/development/assets/www/lock/tables/demography/dmt01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/disclosures/disclosurest01.lock b/development/assets/www/lock/tables/disclosures/disclosurest01.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/disclosures/disclosurest01.lock +++ b/development/assets/www/lock/tables/disclosures/disclosurest01.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/disclosures/eudrat01.lock b/development/assets/www/lock/tables/disclosures/eudrat01.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/disclosures/eudrat01.lock +++ b/development/assets/www/lock/tables/disclosures/eudrat01.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/disclosures/eudrat02.lock b/development/assets/www/lock/tables/disclosures/eudrat02.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/disclosures/eudrat02.lock +++ b/development/assets/www/lock/tables/disclosures/eudrat02.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/disposition/dst01.lock b/development/assets/www/lock/tables/disposition/dst01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/disposition/dst01.lock +++ b/development/assets/www/lock/tables/disposition/dst01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/disposition/pdt01.lock b/development/assets/www/lock/tables/disposition/pdt01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/disposition/pdt01.lock +++ b/development/assets/www/lock/tables/disposition/pdt01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/disposition/pdt02.lock b/development/assets/www/lock/tables/disposition/pdt02.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/disposition/pdt02.lock +++ b/development/assets/www/lock/tables/disposition/pdt02.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/efficacy/aovt01.lock b/development/assets/www/lock/tables/efficacy/aovt01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/efficacy/aovt01.lock +++ b/development/assets/www/lock/tables/efficacy/aovt01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/efficacy/aovt02.lock b/development/assets/www/lock/tables/efficacy/aovt02.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/efficacy/aovt02.lock +++ b/development/assets/www/lock/tables/efficacy/aovt02.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/efficacy/aovt03.lock b/development/assets/www/lock/tables/efficacy/aovt03.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/efficacy/aovt03.lock +++ b/development/assets/www/lock/tables/efficacy/aovt03.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/efficacy/cfbt01.lock b/development/assets/www/lock/tables/efficacy/cfbt01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/efficacy/cfbt01.lock +++ b/development/assets/www/lock/tables/efficacy/cfbt01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/efficacy/cmht01.lock b/development/assets/www/lock/tables/efficacy/cmht01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/efficacy/cmht01.lock +++ b/development/assets/www/lock/tables/efficacy/cmht01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/efficacy/coxt01.lock b/development/assets/www/lock/tables/efficacy/coxt01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/efficacy/coxt01.lock +++ b/development/assets/www/lock/tables/efficacy/coxt01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/efficacy/coxt02.lock b/development/assets/www/lock/tables/efficacy/coxt02.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/efficacy/coxt02.lock +++ b/development/assets/www/lock/tables/efficacy/coxt02.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/efficacy/dort01.lock b/development/assets/www/lock/tables/efficacy/dort01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/efficacy/dort01.lock +++ b/development/assets/www/lock/tables/efficacy/dort01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/efficacy/lgrt02.lock b/development/assets/www/lock/tables/efficacy/lgrt02.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/efficacy/lgrt02.lock +++ b/development/assets/www/lock/tables/efficacy/lgrt02.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/efficacy/mmrmt01.lock b/development/assets/www/lock/tables/efficacy/mmrmt01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/efficacy/mmrmt01.lock +++ b/development/assets/www/lock/tables/efficacy/mmrmt01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/efficacy/onct05.lock b/development/assets/www/lock/tables/efficacy/onct05.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/efficacy/onct05.lock +++ b/development/assets/www/lock/tables/efficacy/onct05.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/efficacy/ratet01.lock b/development/assets/www/lock/tables/efficacy/ratet01.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/efficacy/ratet01.lock +++ b/development/assets/www/lock/tables/efficacy/ratet01.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/efficacy/rbmit01.lock b/development/assets/www/lock/tables/efficacy/rbmit01.lock index e171dc4a1a..e205d4719f 100644 --- a/development/assets/www/lock/tables/efficacy/rbmit01.lock +++ b/development/assets/www/lock/tables/efficacy/rbmit01.lock @@ -608,11 +608,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -620,7 +620,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1354,7 +1354,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1365,7 +1365,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/efficacy/rspt01.lock b/development/assets/www/lock/tables/efficacy/rspt01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/efficacy/rspt01.lock +++ b/development/assets/www/lock/tables/efficacy/rspt01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/efficacy/ttet01.lock b/development/assets/www/lock/tables/efficacy/ttet01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/efficacy/ttet01.lock +++ b/development/assets/www/lock/tables/efficacy/ttet01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/exposure/ext01.lock b/development/assets/www/lock/tables/exposure/ext01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/exposure/ext01.lock +++ b/development/assets/www/lock/tables/exposure/ext01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/lab-results/lbt01.lock b/development/assets/www/lock/tables/lab-results/lbt01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/lab-results/lbt01.lock +++ b/development/assets/www/lock/tables/lab-results/lbt01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/lab-results/lbt02.lock b/development/assets/www/lock/tables/lab-results/lbt02.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/lab-results/lbt02.lock +++ b/development/assets/www/lock/tables/lab-results/lbt02.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/lab-results/lbt03.lock b/development/assets/www/lock/tables/lab-results/lbt03.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/lab-results/lbt03.lock +++ b/development/assets/www/lock/tables/lab-results/lbt03.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/lab-results/lbt04.lock b/development/assets/www/lock/tables/lab-results/lbt04.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/lab-results/lbt04.lock +++ b/development/assets/www/lock/tables/lab-results/lbt04.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/lab-results/lbt05.lock b/development/assets/www/lock/tables/lab-results/lbt05.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/lab-results/lbt05.lock +++ b/development/assets/www/lock/tables/lab-results/lbt05.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/lab-results/lbt06.lock b/development/assets/www/lock/tables/lab-results/lbt06.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/lab-results/lbt06.lock +++ b/development/assets/www/lock/tables/lab-results/lbt06.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/lab-results/lbt07.lock b/development/assets/www/lock/tables/lab-results/lbt07.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/lab-results/lbt07.lock +++ b/development/assets/www/lock/tables/lab-results/lbt07.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/lab-results/lbt08.lock b/development/assets/www/lock/tables/lab-results/lbt08.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/lab-results/lbt08.lock +++ b/development/assets/www/lock/tables/lab-results/lbt08.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/lab-results/lbt09.lock b/development/assets/www/lock/tables/lab-results/lbt09.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/lab-results/lbt09.lock +++ b/development/assets/www/lock/tables/lab-results/lbt09.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/lab-results/lbt10.lock b/development/assets/www/lock/tables/lab-results/lbt10.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/lab-results/lbt10.lock +++ b/development/assets/www/lock/tables/lab-results/lbt10.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/lab-results/lbt10_bl.lock b/development/assets/www/lock/tables/lab-results/lbt10_bl.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/lab-results/lbt10_bl.lock +++ b/development/assets/www/lock/tables/lab-results/lbt10_bl.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/lab-results/lbt11.lock b/development/assets/www/lock/tables/lab-results/lbt11.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/lab-results/lbt11.lock +++ b/development/assets/www/lock/tables/lab-results/lbt11.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/lab-results/lbt11_bl.lock b/development/assets/www/lock/tables/lab-results/lbt11_bl.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/lab-results/lbt11_bl.lock +++ b/development/assets/www/lock/tables/lab-results/lbt11_bl.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/lab-results/lbt12.lock b/development/assets/www/lock/tables/lab-results/lbt12.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/lab-results/lbt12.lock +++ b/development/assets/www/lock/tables/lab-results/lbt12.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/lab-results/lbt12_bl.lock b/development/assets/www/lock/tables/lab-results/lbt12_bl.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/lab-results/lbt12_bl.lock +++ b/development/assets/www/lock/tables/lab-results/lbt12_bl.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/lab-results/lbt13.lock b/development/assets/www/lock/tables/lab-results/lbt13.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/lab-results/lbt13.lock +++ b/development/assets/www/lock/tables/lab-results/lbt13.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/lab-results/lbt14.lock b/development/assets/www/lock/tables/lab-results/lbt14.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/lab-results/lbt14.lock +++ b/development/assets/www/lock/tables/lab-results/lbt14.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/lab-results/lbt15.lock b/development/assets/www/lock/tables/lab-results/lbt15.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/lab-results/lbt15.lock +++ b/development/assets/www/lock/tables/lab-results/lbt15.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/medical-history/mht01.lock b/development/assets/www/lock/tables/medical-history/mht01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/medical-history/mht01.lock +++ b/development/assets/www/lock/tables/medical-history/mht01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/pharmacokinetic/pkct01.lock b/development/assets/www/lock/tables/pharmacokinetic/pkct01.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/pharmacokinetic/pkct01.lock +++ b/development/assets/www/lock/tables/pharmacokinetic/pkct01.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/pharmacokinetic/pkpt02.lock b/development/assets/www/lock/tables/pharmacokinetic/pkpt02.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/pharmacokinetic/pkpt02.lock +++ b/development/assets/www/lock/tables/pharmacokinetic/pkpt02.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/pharmacokinetic/pkpt03.lock b/development/assets/www/lock/tables/pharmacokinetic/pkpt03.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/pharmacokinetic/pkpt03.lock +++ b/development/assets/www/lock/tables/pharmacokinetic/pkpt03.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/pharmacokinetic/pkpt04.lock b/development/assets/www/lock/tables/pharmacokinetic/pkpt04.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/pharmacokinetic/pkpt04.lock +++ b/development/assets/www/lock/tables/pharmacokinetic/pkpt04.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/pharmacokinetic/pkpt05.lock b/development/assets/www/lock/tables/pharmacokinetic/pkpt05.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/pharmacokinetic/pkpt05.lock +++ b/development/assets/www/lock/tables/pharmacokinetic/pkpt05.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/pharmacokinetic/pkpt06.lock b/development/assets/www/lock/tables/pharmacokinetic/pkpt06.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/pharmacokinetic/pkpt06.lock +++ b/development/assets/www/lock/tables/pharmacokinetic/pkpt06.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/pharmacokinetic/pkpt07.lock b/development/assets/www/lock/tables/pharmacokinetic/pkpt07.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/pharmacokinetic/pkpt07.lock +++ b/development/assets/www/lock/tables/pharmacokinetic/pkpt07.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/pharmacokinetic/pkpt08.lock b/development/assets/www/lock/tables/pharmacokinetic/pkpt08.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/pharmacokinetic/pkpt08.lock +++ b/development/assets/www/lock/tables/pharmacokinetic/pkpt08.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/pharmacokinetic/pkpt11.lock b/development/assets/www/lock/tables/pharmacokinetic/pkpt11.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/pharmacokinetic/pkpt11.lock +++ b/development/assets/www/lock/tables/pharmacokinetic/pkpt11.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/risk-management-plan/rmpt01.lock b/development/assets/www/lock/tables/risk-management-plan/rmpt01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/risk-management-plan/rmpt01.lock +++ b/development/assets/www/lock/tables/risk-management-plan/rmpt01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/risk-management-plan/rmpt03.lock b/development/assets/www/lock/tables/risk-management-plan/rmpt03.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/risk-management-plan/rmpt03.lock +++ b/development/assets/www/lock/tables/risk-management-plan/rmpt03.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/risk-management-plan/rmpt04.lock b/development/assets/www/lock/tables/risk-management-plan/rmpt04.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/risk-management-plan/rmpt04.lock +++ b/development/assets/www/lock/tables/risk-management-plan/rmpt04.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/risk-management-plan/rmpt05.lock b/development/assets/www/lock/tables/risk-management-plan/rmpt05.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/risk-management-plan/rmpt05.lock +++ b/development/assets/www/lock/tables/risk-management-plan/rmpt05.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/risk-management-plan/rmpt06.lock b/development/assets/www/lock/tables/risk-management-plan/rmpt06.lock index de88acb2c3..be3f2ed4b5 100644 --- a/development/assets/www/lock/tables/risk-management-plan/rmpt06.lock +++ b/development/assets/www/lock/tables/risk-management-plan/rmpt06.lock @@ -525,11 +525,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -537,7 +537,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1128,7 +1128,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1139,7 +1139,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", diff --git a/development/assets/www/lock/tables/safety/enrollment01.lock b/development/assets/www/lock/tables/safety/enrollment01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/safety/enrollment01.lock +++ b/development/assets/www/lock/tables/safety/enrollment01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/vital-signs/vst01.lock b/development/assets/www/lock/tables/vital-signs/vst01.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/vital-signs/vst01.lock +++ b/development/assets/www/lock/tables/vital-signs/vst01.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/lock/tables/vital-signs/vst02.lock b/development/assets/www/lock/tables/vital-signs/vst02.lock index 39b7ab6f56..68a5763e87 100644 --- a/development/assets/www/lock/tables/vital-signs/vst02.lock +++ b/development/assets/www/lock/tables/vital-signs/vst02.lock @@ -858,11 +858,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -870,7 +870,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -1984,7 +1984,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -1995,7 +1995,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2257,11 +2257,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2282,7 +2282,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2303,11 +2303,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2318,7 +2318,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2340,11 +2340,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2379,15 +2379,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2404,15 +2404,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -2435,7 +2435,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -2529,11 +2529,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -2546,7 +2546,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/assets/www/renv.lock b/development/assets/www/renv.lock index 0c757d08a9..fbea972d93 100644 --- a/development/assets/www/renv.lock +++ b/development/assets/www/renv.lock @@ -1017,11 +1017,11 @@ }, "formatters": { "Package": "formatters", - "Version": "0.5.5.9020", + "Version": "0.5.5.9021", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/formatters.git", - "RemoteSha": "959bfb4519082f28e3fc417ab208eee0c5f665e8", + "RemoteSha": "0fc6aad9a920f27de29c4ac6e519cd961a469fa5", "Requirements": [ "R", "checkmate", @@ -1029,7 +1029,7 @@ "htmltools", "methods" ], - "Hash": "434bbbe8cf6b6f0fb3af91b6ae05ae8f" + "Hash": "79df8ff18fcd99e4cbcaa36262c16932" }, "fs": { "Package": "fs", @@ -2494,7 +2494,7 @@ "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/rtables.git", - "RemoteSha": "3cd599f63b8f8d43d258aa9773ef2cd841fd0aa0", + "RemoteSha": "98e686e05f7381370c1f99cf698384dda9481c80", "Requirements": [ "R", "checkmate", @@ -2505,7 +2505,7 @@ "stats", "stringi" ], - "Hash": "93e7a6372aa432f1431a03ea772fb21e" + "Hash": "142c0beffe9e9673e92154eab1eca2ff" }, "sass": { "Package": "sass", @@ -2783,11 +2783,11 @@ }, "teal": { "Package": "teal", - "Version": "0.15.2.9020", + "Version": "0.15.2.9022", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.git", - "RemoteSha": "af17c0790729bdf1b01aa2a627753b5f2250b97a", + "RemoteSha": "044850deef68dc71c95112062ec64267df230711", "Requirements": [ "R", "checkmate", @@ -2808,7 +2808,7 @@ "teal.widgets", "utils" ], - "Hash": "29b5417f37496279707ca29eb012d47e" + "Hash": "22fa332c0de64dbc6ecf360f91c07484" }, "teal.code": { "Package": "teal.code", @@ -2829,11 +2829,11 @@ }, "teal.data": { "Package": "teal.data", - "Version": "0.5.0.9006", + "Version": "0.5.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.data.git", - "RemoteSha": "c67471379c6a3179dcd386aeae63fbf3fd6c8b63", + "RemoteSha": "2499231d74631e51e227b8c70010d75c0bce2014", "Requirements": [ "R", "checkmate", @@ -2844,7 +2844,7 @@ "teal.code", "utils" ], - "Hash": "19e00aab37e29f9fce16678f43c4a4a9" + "Hash": "00ffacb047898532c5ab7a056182aabd" }, "teal.logger": { "Package": "teal.logger", @@ -2866,11 +2866,11 @@ }, "teal.modules.clinical": { "Package": "teal.modules.clinical", - "Version": "0.9.0.9014", + "Version": "0.9.0.9016", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.clinical.git", - "RemoteSha": "80220ffc237067db4e5e57f48e75e2f0d6469526", + "RemoteSha": "72195ad40a8197caf433620eb57975dbdc72c662", "Requirements": [ "DT", "R", @@ -2905,15 +2905,15 @@ "utils", "vistime" ], - "Hash": "ad742c88b076f5c19e8d1c36b4e78e83" + "Hash": "570a564e1a83fdf398094137ed8f0f99" }, "teal.modules.general": { "Package": "teal.modules.general", - "Version": "0.3.0.9006", + "Version": "0.3.0.9007", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.modules.general.git", - "RemoteSha": "99d7f0256a10be0c84afbf160bf1a093f63ae44f", + "RemoteSha": "78b95ac65d9ba0e324419469ccedc4b1a2262156", "Requirements": [ "DT", "R", @@ -2944,15 +2944,15 @@ "tools", "utils" ], - "Hash": "f3a57da302227c4b65b5245bd584705b" + "Hash": "9c3dcf6f9690b92f2fadd7056d467254" }, "teal.reporter": { "Package": "teal.reporter", - "Version": "0.3.1.9002", + "Version": "0.3.1.9003", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.reporter.git", - "RemoteSha": "9103c6a297a630281af8f06cfe68d9cd9b236e26", + "RemoteSha": "ad7fd2041f0d7cac83d0d97dbbe3ed7914a197ea", "Requirements": [ "R6", "bslib", @@ -2969,15 +2969,15 @@ "yaml", "zip" ], - "Hash": "fb6f013e8afefd0916737602158bf3c5" + "Hash": "af631cc229890f387d8df20b5e869db2" }, "teal.slice": { "Package": "teal.slice", - "Version": "0.5.0.9009", + "Version": "0.5.0.9010", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/teal.slice.git", - "RemoteSha": "973208510456f6ccf7e4b634448ec04461d145e4", + "RemoteSha": "7f72a2caa179dba918c16eec37a87874082e799c", "Requirements": [ "R", "R6", @@ -3000,7 +3000,7 @@ "teal.widgets", "utils" ], - "Hash": "de8d8756ac2fa0ed958d967de72f9a49" + "Hash": "c4ba5392976bd787d4ca4492bf230960" }, "teal.transform": { "Package": "teal.transform", @@ -3105,11 +3105,11 @@ }, "tern.gee": { "Package": "tern.gee", - "Version": "0.1.3.9004", + "Version": "0.1.3.9005", "Source": "Git", "RemoteType": "git2r", "RemoteUrl": "https://github.com/insightsengineering/tern.gee.git", - "RemoteSha": "7c0e8edcb70f300da014245d0f224233d986672a", + "RemoteSha": "ce377eb62b2611d77948bf133dc525b3a9b76fd1", "Requirements": [ "R", "checkmate", @@ -3122,7 +3122,7 @@ "stats", "tern" ], - "Hash": "4d755cdbcb30bdee7610ee7a40ae9bc8" + "Hash": "3133b725c1b100053a99e1b3dd4bfd5a" }, "tern.mmrm": { "Package": "tern.mmrm", diff --git a/development/graphs/efficacy/fstg01.html b/development/graphs/efficacy/fstg01.html index 75c45634dc..b4ab5cc882 100644 --- a/development/graphs/efficacy/fstg01.html +++ b/development/graphs/efficacy/fstg01.html @@ -1738,7 +1738,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:59:16 UTC"
+
[1] "2024-04-10 18:00:37 UTC"

Session Info

@@ -1768,16 +1768,16 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 nestcolor_0.1.2.9009 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): - [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 + [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 [10] systemfonts_1.0.6 callr_3.7.6 vctrs_0.6.5 @@ -1785,7 +1785,7 @@ [16] fontawesome_0.5.2 labeling_0.4.3 utf8_1.2.4 [19] promises_1.3.0 rmarkdown_2.26 ps_1.7.6 [22] ragg_1.3.0 purrr_1.0.2 xfun_0.43 -[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002 +[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003 [28] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 [31] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 [34] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 diff --git a/development/graphs/efficacy/fstg01_files/figure-html/teal-1.png b/development/graphs/efficacy/fstg01_files/figure-html/teal-1.png index bd0b882933..c06862ab56 100644 Binary files a/development/graphs/efficacy/fstg01_files/figure-html/teal-1.png and b/development/graphs/efficacy/fstg01_files/figure-html/teal-1.png differ diff --git a/development/graphs/efficacy/fstg02.html b/development/graphs/efficacy/fstg02.html index f27381c0de..61b5a468a0 100644 --- a/development/graphs/efficacy/fstg02.html +++ b/development/graphs/efficacy/fstg02.html @@ -1762,7 +1762,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:57:24 UTC"
+
[1] "2024-04-10 17:58:42 UTC"

Session Info

@@ -1792,17 +1792,17 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] nestcolor_0.1.2.9009 forcats_1.0.0 [11] dplyr_1.1.4 tern_0.9.3.9031 [13] rtables_0.6.6.9011 magrittr_2.0.3 -[15] formatters_0.5.5.9020 +[15] formatters_0.5.5.9021 loaded via a namespace (and not attached): - [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 + [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 [10] systemfonts_1.0.6 callr_3.7.6 vctrs_0.6.5 @@ -1810,7 +1810,7 @@ [16] fontawesome_0.5.2 labeling_0.4.3 utf8_1.2.4 [19] promises_1.3.0 rmarkdown_2.26 ps_1.7.6 [22] ragg_1.3.0 purrr_1.0.2 xfun_0.43 -[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002 +[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003 [28] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 [31] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 [34] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 diff --git a/development/graphs/efficacy/fstg02_files/figure-html/teal-1.png b/development/graphs/efficacy/fstg02_files/figure-html/teal-1.png index b8a8872d22..261206bf3b 100644 Binary files a/development/graphs/efficacy/fstg02_files/figure-html/teal-1.png and b/development/graphs/efficacy/fstg02_files/figure-html/teal-1.png differ diff --git a/development/graphs/efficacy/kmg01.html b/development/graphs/efficacy/kmg01.html index 02ac0ccbe0..ec7b697ad4 100644 --- a/development/graphs/efficacy/kmg01.html +++ b/development/graphs/efficacy/kmg01.html @@ -1673,7 +1673,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:57:56 UTC"
+
[1] "2024-04-10 17:59:15 UTC"

Session Info

@@ -1703,19 +1703,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 nestcolor_0.1.2.9009 [9] dplyr_1.1.4 scda_0.1.6.9017 [11] tern_0.9.3.9031 rtables_0.6.6.9011 -[13] magrittr_2.0.3 formatters_0.5.5.9020 +[13] magrittr_2.0.3 formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 farver_2.1.1 fastmap_1.1.1 [4] TH.data_1.1-2 webshot2_0.1.1 shinyjs_2.1.0 [7] promises_1.3.0 digest_0.6.35 estimability_1.5 -[10] mime_0.12 tern.gee_0.1.3.9004 lifecycle_1.0.4 +[10] mime_0.12 tern.gee_0.1.3.9005 lifecycle_1.0.4 [13] survival_3.5-8 processx_3.8.4 compiler_4.3.3 [16] sass_0.4.9 rlang_1.1.3 tools_4.3.3 [19] utf8_1.2.4 yaml_2.3.8 knitr_1.45 @@ -1739,7 +1739,7 @@ [73] R6_2.5.1 textshaping_0.3.7 Rdpack_2.6 [76] evaluate_0.23 lattice_0.22-6 rbibutils_2.2.16 [79] backports_1.4.1 memoise_2.0.1 broom_1.0.5 -[82] teal.reporter_0.3.1.9002 bslib_0.7.0 httpuv_1.6.15 +[82] teal.reporter_0.3.1.9003 bslib_0.7.0 httpuv_1.6.15 [85] Rcpp_1.0.12 shinyvalidate_0.1.3 coda_0.19-4.1 [88] nlme_3.1-164 checkmate_2.3.1 xfun_0.43 [91] zoo_1.8-12 pkgconfig_2.0.3 diff --git a/development/graphs/efficacy/kmg01_files/figure-html/teal-1.png b/development/graphs/efficacy/kmg01_files/figure-html/teal-1.png index f6632290d2..febb1c87f7 100644 Binary files a/development/graphs/efficacy/kmg01_files/figure-html/teal-1.png and b/development/graphs/efficacy/kmg01_files/figure-html/teal-1.png differ diff --git a/development/graphs/efficacy/mmrmg01.html b/development/graphs/efficacy/mmrmg01.html index 866920d49e..75a15e91f7 100644 --- a/development/graphs/efficacy/mmrmg01.html +++ b/development/graphs/efficacy/mmrmg01.html @@ -1657,7 +1657,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:58:19 UTC"
+
[1] "2024-04-10 17:59:39 UTC"

Session Info

@@ -1687,25 +1687,25 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 nestcolor_0.1.2.9009 [9] scda_0.1.6.9017 tern.mmrm_0.3.0.9005 [11] tern_0.9.3.9031 rtables_0.6.6.9011 -[13] magrittr_2.0.3 formatters_0.5.5.9020 +[13] magrittr_2.0.3 formatters_0.5.5.9021 [15] dplyr_1.1.4 loaded via a namespace (and not attached): [1] Rdpack_2.6 mmrm_0.3.11 formatR_1.14 - [4] tern.gee_0.1.3.9004 logger_0.3.0 testthat_3.2.1 + [4] tern.gee_0.1.3.9005 logger_0.3.0 testthat_3.2.1 [7] sandwich_3.1-0 rlang_1.1.3 multcomp_1.4-25 [10] compiler_4.3.3 callr_3.7.6 vctrs_0.6.5 [13] stringr_1.5.1 pkgconfig_2.0.3 fastmap_1.1.1 [16] backports_1.4.1 fontawesome_0.5.2 labeling_0.4.3 [19] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 [22] ps_1.7.6 purrr_1.0.2 xfun_0.43 -[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002 +[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003 [28] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 [31] parallel_4.3.3 R6_2.5.1 bslib_0.7.0 [34] stringi_1.8.3 parallelly_1.37.1 brio_1.1.4 diff --git a/development/graphs/efficacy/mmrmg01_files/figure-html/teal-1.png b/development/graphs/efficacy/mmrmg01_files/figure-html/teal-1.png index 267da28dad..a6c1b4e3ba 100644 Binary files a/development/graphs/efficacy/mmrmg01_files/figure-html/teal-1.png and b/development/graphs/efficacy/mmrmg01_files/figure-html/teal-1.png differ diff --git a/development/graphs/efficacy/mmrmg02.html b/development/graphs/efficacy/mmrmg02.html index 8aa4e1c3dd..4e8ae71ce3 100644 --- a/development/graphs/efficacy/mmrmg02.html +++ b/development/graphs/efficacy/mmrmg02.html @@ -1583,7 +1583,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:58:52 UTC"
+
[1] "2024-04-10 18:00:12 UTC"

Session Info

@@ -1614,7 +1614,7 @@ other attached packages: [1] nestcolor_0.1.2.9009 tern.mmrm_0.3.0.9005 tern_0.9.3.9031 -[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9020 +[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9021 [7] dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): diff --git a/development/graphs/other/brg01.html b/development/graphs/other/brg01.html index 7d47e77303..df48239a2a 100644 --- a/development/graphs/other/brg01.html +++ b/development/graphs/other/brg01.html @@ -1815,7 +1815,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:56:28 UTC"
+
[1] "2024-04-10 17:57:45 UTC"

Session Info

@@ -1846,7 +1846,7 @@ other attached packages: [1] nestcolor_0.1.2.9009 tern_0.9.3.9031 rtables_0.6.6.9011 - [4] magrittr_2.0.3 formatters_0.5.5.9020 tidyr_1.3.1 + [4] magrittr_2.0.3 formatters_0.5.5.9021 tidyr_1.3.1 [7] scda_0.1.6.9017 ggplot2_3.5.0 dplyr_1.1.4 [10] binom_1.1-1.1 diff --git a/development/graphs/other/bwg01.html b/development/graphs/other/bwg01.html index 39420ef0a6..10b7fe1ce5 100644 --- a/development/graphs/other/bwg01.html +++ b/development/graphs/other/bwg01.html @@ -1968,7 +1968,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:56:03 UTC"
+
[1] "2024-04-10 17:57:18 UTC"

Session Info

@@ -1999,10 +1999,10 @@ other attached packages: [1] tern_0.9.3.9031 rtables_0.6.6.9011 - [3] magrittr_2.0.3 formatters_0.5.5.9020 - [5] teal.modules.general_0.3.0.9006 teal.transform_0.5.0.9004 - [7] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [9] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [3] magrittr_2.0.3 formatters_0.5.5.9021 + [5] teal.modules.general_0.3.0.9007 teal.transform_0.5.0.9004 + [7] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [9] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [11] shiny_1.8.1.1 ggmosaic_0.3.3 [13] nestcolor_0.1.2.9009 ggplot2_3.5.0 [15] dplyr_1.1.4 scda_0.1.6.9017 @@ -2040,7 +2040,7 @@ [88] codetools_0.2-20 tibble_3.2.1 cli_3.6.2 [91] xtable_1.8-4 DescTools_0.99.54 systemfonts_1.0.6 [94] Rdpack_2.6 munsell_0.5.1 processx_3.8.4 - [97] jquerylib_0.1.4 Rcpp_1.0.12 teal.reporter_0.3.1.9002 + [97] jquerylib_0.1.4 Rcpp_1.0.12 teal.reporter_0.3.1.9003 [100] readxl_1.4.3 viridisLite_0.4.2 mvtnorm_1.2-4 [103] scales_1.3.0 e1071_1.7-14 purrr_1.0.2 [106] rlang_1.1.3 cowplot_1.1.3 formatR_1.14 diff --git a/development/graphs/other/bwg01_files/figure-html/teal-1.png b/development/graphs/other/bwg01_files/figure-html/teal-1.png index 9a05464576..f838599e67 100644 Binary files a/development/graphs/other/bwg01_files/figure-html/teal-1.png and b/development/graphs/other/bwg01_files/figure-html/teal-1.png differ diff --git a/development/graphs/other/cig01.html b/development/graphs/other/cig01.html index 3a9e0396ff..26265dc2d3 100644 --- a/development/graphs/other/cig01.html +++ b/development/graphs/other/cig01.html @@ -1726,7 +1726,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:55:42 UTC"
+
[1] "2024-04-10 17:56:57 UTC"

Session Info

@@ -1756,20 +1756,20 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 nestcolor_0.1.2.9009 [9] scda_0.1.6.9017 dplyr_1.1.4 [11] ggplot2_3.5.0 tern_0.9.3.9031 [13] rtables_0.6.6.9011 magrittr_2.0.3 -[15] formatters_0.5.5.9020 +[15] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 farver_2.1.1 fastmap_1.1.1 [4] TH.data_1.1-2 webshot2_0.1.1 shinyjs_2.1.0 [7] promises_1.3.0 digest_0.6.35 estimability_1.5 -[10] mime_0.12 tern.gee_0.1.3.9004 lifecycle_1.0.4 +[10] mime_0.12 tern.gee_0.1.3.9005 lifecycle_1.0.4 [13] survival_3.5-8 processx_3.8.4 compiler_4.3.3 [16] sass_0.4.9 rlang_1.1.3 tools_4.3.3 [19] utf8_1.2.4 yaml_2.3.8 knitr_1.45 @@ -1792,7 +1792,7 @@ [70] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [73] textshaping_0.3.7 Rdpack_2.6 evaluate_0.23 [76] lattice_0.22-6 rbibutils_2.2.16 backports_1.4.1 -[79] memoise_2.0.1 broom_1.0.5 teal.reporter_0.3.1.9002 +[79] memoise_2.0.1 broom_1.0.5 teal.reporter_0.3.1.9003 [82] bslib_0.7.0 httpuv_1.6.15 Rcpp_1.0.12 [85] shinyvalidate_0.1.3 coda_0.19-4.1 nlme_3.1-164 [88] checkmate_2.3.1 xfun_0.43 zoo_1.8-12 diff --git a/development/graphs/other/cig01_files/figure-html/teal-1.png b/development/graphs/other/cig01_files/figure-html/teal-1.png index 2bd1f754b9..25171d1513 100644 Binary files a/development/graphs/other/cig01_files/figure-html/teal-1.png and b/development/graphs/other/cig01_files/figure-html/teal-1.png differ diff --git a/development/graphs/other/ippg01.html b/development/graphs/other/ippg01.html index 2af1f02465..08e230a398 100644 --- a/development/graphs/other/ippg01.html +++ b/development/graphs/other/ippg01.html @@ -1647,7 +1647,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:56:19 UTC"
+
[1] "2024-04-10 17:57:35 UTC"

Session Info

@@ -1677,20 +1677,20 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 nestcolor_0.1.2.9009 [9] ggplot2_3.5.0 dplyr_1.1.4 [11] scda_0.1.6.9017 tern_0.9.3.9031 [13] rtables_0.6.6.9011 magrittr_2.0.3 -[15] formatters_0.5.5.9020 +[15] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 farver_2.1.1 fastmap_1.1.1 [4] TH.data_1.1-2 webshot2_0.1.1 shinyjs_2.1.0 [7] promises_1.3.0 digest_0.6.35 estimability_1.5 -[10] mime_0.12 tern.gee_0.1.3.9004 lifecycle_1.0.4 +[10] mime_0.12 tern.gee_0.1.3.9005 lifecycle_1.0.4 [13] survival_3.5-8 processx_3.8.4 compiler_4.3.3 [16] sass_0.4.9 rlang_1.1.3 tools_4.3.3 [19] utf8_1.2.4 yaml_2.3.8 knitr_1.45 @@ -1713,7 +1713,7 @@ [70] brio_1.1.4 R6_2.5.1 textshaping_0.3.7 [73] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [76] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[79] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[79] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [82] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [85] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [88] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/graphs/other/ippg01_files/figure-html/teal-1.png b/development/graphs/other/ippg01_files/figure-html/teal-1.png index c15bc253c5..2541d46929 100644 Binary files a/development/graphs/other/ippg01_files/figure-html/teal-1.png and b/development/graphs/other/ippg01_files/figure-html/teal-1.png differ diff --git a/development/graphs/other/ltg01.html b/development/graphs/other/ltg01.html index 59dd055574..3dccde82a3 100644 --- a/development/graphs/other/ltg01.html +++ b/development/graphs/other/ltg01.html @@ -1697,7 +1697,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:56:42 UTC"
+
[1] "2024-04-10 17:57:59 UTC"

Session Info

@@ -1728,12 +1728,12 @@ other attached packages: [1] nestcolor_0.1.2.9009 dplyr_1.1.4 - [3] ggplot2_3.5.0 teal.modules.clinical_0.9.0.9014 - [5] teal.transform_0.5.0.9004 teal_0.15.2.9020 - [7] teal.slice_0.5.0.9009 teal.data_0.5.0.9006 + [3] ggplot2_3.5.0 teal.modules.clinical_0.9.0.9016 + [5] teal.transform_0.5.0.9004 teal_0.15.2.9022 + [7] teal.slice_0.5.0.9010 teal.data_0.5.0.9007 [9] teal.code_0.5.0.9004 shiny_1.8.1.1 [11] tern_0.9.3.9031 rtables_0.6.6.9011 -[13] magrittr_2.0.3 formatters_0.5.5.9020 +[13] magrittr_2.0.3 formatters_0.5.5.9021 [15] scda_0.1.6.9017 loaded via a namespace (and not attached): @@ -1746,7 +1746,7 @@ [19] munsell_0.5.1 codetools_0.2-20 httpuv_1.6.15 [22] htmltools_0.5.8.1 yaml_2.3.8 later_1.3.2 [25] pillar_1.9.0 tidyr_1.3.1 MASS_7.3-60.0.1 -[28] tern.gee_0.1.3.9004 multcomp_1.4-25 nlme_3.1-164 +[28] tern.gee_0.1.3.9005 multcomp_1.4-25 nlme_3.1-164 [31] mime_0.12 tidyselect_1.2.1 digest_0.6.35 [34] mvtnorm_1.2-4 purrr_1.0.2 labeling_0.4.3 [37] geepack_1.3.10 splines_4.3.3 fastmap_1.1.1 diff --git a/development/graphs/other/mng01.html b/development/graphs/other/mng01.html index b11fddaaa9..8678005c7a 100644 --- a/development/graphs/other/mng01.html +++ b/development/graphs/other/mng01.html @@ -1681,12 +1681,7 @@ ) shinyApp(app$ui, app$server) -
-
Warning: Error in : could not find function "control_summarize_vars" 
- when evaluating qenv code:
-plot <- g_lineplot(df = anl, variables = variables, interval = "mean_ci", mid = "mean", whiskers = c("mean_ci_lwr", "mean_ci_upr"), table = c("n", "mean_sd", "median", "range"), mid_type = "pl", mid_point_size = 2, table_font_size = 4, newpage = FALSE, title = "Plot of Mean and 95% Mean Confidence Interval of AVAL by Visit", subtitle = "", caption = NULL, y_lab = "AVAL Mean Values for", legend_title = NULL, ggtheme = ggplot2::theme_minimal(), control = control_summarize_vars(conf_level = 0.95), subtitle_add_paramcd = FALSE,      subtitle_add_unit = FALSE)
-
-
+

@@ -1697,14 +1692,14 @@

Timestamp

-
Code
Sys.time()
+
Code
Sys.time()
-
[1] "2024-04-06 17:57:03 UTC"
+
[1] "2024-04-10 17:58:20 UTC"

Session Info

-
Code
sessionInfo()
+
Code
sessionInfo()
R version 4.3.3 (2024-02-29)
 Platform: x86_64-pc-linux-gnu (64-bit)
@@ -1729,77 +1724,78 @@
 [1] stats     graphics  grDevices utils     datasets  methods   base     
 
 other attached packages:
- [1] forcats_1.0.0                    teal.modules.clinical_0.9.0.9014
- [3] teal.transform_0.5.0.9004        teal_0.15.2.9020                
- [5] teal.slice_0.5.0.9009            teal.data_0.5.0.9006            
+ [1] forcats_1.0.0                    teal.modules.clinical_0.9.0.9016
+ [3] teal.transform_0.5.0.9004        teal_0.15.2.9022                
+ [5] teal.slice_0.5.0.9010            teal.data_0.5.0.9007            
  [7] teal.code_0.5.0.9004             shiny_1.8.1.1                   
  [9] nestcolor_0.1.2.9009             scda_0.1.6.9017                 
 [11] tern_0.9.3.9031                  rtables_0.6.6.9011              
-[13] magrittr_2.0.3                   formatters_0.5.5.9020           
+[13] magrittr_2.0.3                   formatters_0.5.5.9021           
 [15] dplyr_1.1.4                     
 
 loaded via a namespace (and not attached):
- [1] tidyselect_1.2.1         farver_2.1.1             fastmap_1.1.1           
- [4] TH.data_1.1-2            webshot2_0.1.1           shinyjs_2.1.0           
- [7] promises_1.3.0           digest_0.6.35            estimability_1.5        
-[10] mime_0.12                tern.gee_0.1.3.9004      lifecycle_1.0.4         
-[13] survival_3.5-8           processx_3.8.4           compiler_4.3.3          
-[16] sass_0.4.9               rlang_1.1.3              tools_4.3.3             
-[19] utf8_1.2.4               yaml_2.3.8               knitr_1.45              
-[22] labeling_0.4.3           htmlwidgets_1.6.4        websocket_1.4.1         
-[25] multcomp_1.4-25          withr_3.0.0              purrr_1.0.2             
-[28] shinyWidgets_0.8.4       geepack_1.3.10           grid_4.3.3              
-[31] fansi_1.0.6              teal.logger_0.2.0.9001   xtable_1.8-4            
-[34] colorspace_2.1-0         ggplot2_3.5.0            emmeans_1.10.0          
-[37] scales_1.3.0             MASS_7.3-60.0.1          cli_3.6.2               
-[40] mvtnorm_1.2-4            crayon_1.5.2             rmarkdown_2.26          
-[43] generics_0.1.3           cachem_1.0.8             chromote_0.2.0          
-[46] splines_4.3.3            formatR_1.14             vctrs_0.6.5             
-[49] webshot_0.5.5            Matrix_1.6-5             sandwich_3.1-0          
-[52] jsonlite_1.8.8           callr_3.7.6              teal.widgets_0.4.2.9009 
-[55] testthat_3.2.1           fontawesome_0.5.2        jquerylib_0.1.4         
-[58] tidyr_1.3.1              glue_1.7.0               ps_1.7.6                
-[61] codetools_0.2-20         cowplot_1.1.3            gtable_0.3.4            
-[64] later_1.3.2              shinycssloaders_1.0.0    munsell_0.5.1           
-[67] tibble_3.2.1             logger_0.3.0             pillar_1.9.0            
-[70] htmltools_0.5.8.1        brio_1.1.4               R6_2.5.1                
-[73] Rdpack_2.6               evaluate_0.23            lattice_0.22-6          
-[76] rbibutils_2.2.16         backports_1.4.1          memoise_2.0.1           
-[79] broom_1.0.5              teal.reporter_0.3.1.9002 bslib_0.7.0             
-[82] httpuv_1.6.15            Rcpp_1.0.12              shinyvalidate_0.1.3     
-[85] coda_0.19-4.1            nlme_3.1-164             checkmate_2.3.1         
-[88] xfun_0.43                zoo_1.8-12               pkgconfig_2.0.3         
+ [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 + [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 + [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 +[10] systemfonts_1.0.6 callr_3.7.6 vctrs_0.6.5 +[13] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 +[16] fontawesome_0.5.2 labeling_0.4.3 utf8_1.2.4 +[19] promises_1.3.0 rmarkdown_2.26 ps_1.7.6 +[22] ragg_1.3.0 purrr_1.0.2 xfun_0.43 +[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003 +[28] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 +[31] R6_2.5.1 bslib_0.7.0 brio_1.1.4 +[34] jquerylib_0.1.4 estimability_1.5 Rcpp_1.0.12 +[37] knitr_1.45 zoo_1.8-12 teal.logger_0.2.0.9001 +[40] httpuv_1.6.15 Matrix_1.6-5 splines_4.3.3 +[43] tidyselect_1.2.1 yaml_2.3.8 codetools_0.2-20 +[46] websocket_1.4.1 processx_3.8.4 teal.widgets_0.4.2.9009 +[49] lattice_0.22-6 tibble_3.2.1 withr_3.0.0 +[52] coda_0.19-4.1 evaluate_0.23 survival_3.5-8 +[55] pillar_1.9.0 shinycssloaders_1.0.0 checkmate_2.3.1 +[58] shinyjs_2.1.0 generics_0.1.3 chromote_0.2.0 +[61] ggplot2_3.5.0 munsell_0.5.1 scales_1.3.0 +[64] xtable_1.8-4 glue_1.7.0 emmeans_1.10.0 +[67] tools_4.3.3 webshot2_0.1.1 webshot_0.5.5 +[70] mvtnorm_1.2-4 cowplot_1.1.3 grid_4.3.3 +[73] tidyr_1.3.1 rbibutils_2.2.16 colorspace_2.1-0 +[76] nlme_3.1-164 cli_3.6.2 textshaping_0.3.7 +[79] fansi_1.0.6 geepack_1.3.10 gtable_0.3.4 +[82] sass_0.4.9 digest_0.6.35 TH.data_1.1-2 +[85] htmlwidgets_1.6.4 farver_2.1.1 memoise_2.0.1 +[88] htmltools_0.5.8.1 lifecycle_1.0.4 shinyWidgets_0.8.4 +[91] mime_0.12 MASS_7.3-60.0.1

.lock file

Download the .lock file and use renv::restore() on it to recreate environment used to generate this website.

-
Code
parent_file_path <- knitr::current_input(dir = TRUE)
-
-book_root_dir <- parent_file_path
-while (!file.exists(file.path(book_root_dir, "_quarto.yml"))) book_root_dir <- dirname(book_root_dir)
-
-lock_path <- file.path(
-  "../../assets/www/lock",
-  paste0(
-    gsub(
-      file.path(book_root_dir, ""),
-      "",
-      gsub(
-        "\\.rmarkdown$",
-        "",
-        knitr::current_input(dir = TRUE)
-      )
-    ),
-    ".lock"
-  )
-)
-
-withr::with_options(
-  list(renv.verbose = FALSE),
-  renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)
-)
+
Code
parent_file_path <- knitr::current_input(dir = TRUE)
+
+book_root_dir <- parent_file_path
+while (!file.exists(file.path(book_root_dir, "_quarto.yml"))) book_root_dir <- dirname(book_root_dir)
+
+lock_path <- file.path(
+  "../../assets/www/lock",
+  paste0(
+    gsub(
+      file.path(book_root_dir, ""),
+      "",
+      gsub(
+        "\\.rmarkdown$",
+        "",
+        knitr::current_input(dir = TRUE)
+      )
+    ),
+    ".lock"
+  )
+)
+
+withr::with_options(
+  list(renv.verbose = FALSE),
+  renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)
+)

Download

@@ -2427,210 +2423,210 @@

Session Info

@@ -1588,7 +1588,7 @@ other attached packages: [1] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 [4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 -[7] magrittr_2.0.3 formatters_0.5.5.9020 +[7] magrittr_2.0.3 formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/graphs/pharmacokinetic/pkcg02.html b/development/graphs/pharmacokinetic/pkcg02.html index e73d3fba5c..c0d52d4ebb 100644 --- a/development/graphs/pharmacokinetic/pkcg02.html +++ b/development/graphs/pharmacokinetic/pkcg02.html @@ -1557,7 +1557,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:59:23 UTC"
+
[1] "2024-04-10 18:00:45 UTC"

Session Info

@@ -1589,7 +1589,7 @@ other attached packages: [1] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 [4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 -[7] magrittr_2.0.3 formatters_0.5.5.9020 +[7] magrittr_2.0.3 formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/graphs/pharmacokinetic/pkcg03.html b/development/graphs/pharmacokinetic/pkcg03.html index 77781afeed..0b1b32e419 100644 --- a/development/graphs/pharmacokinetic/pkcg03.html +++ b/development/graphs/pharmacokinetic/pkcg03.html @@ -1573,7 +1573,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:59:56 UTC"
+
[1] "2024-04-10 18:01:19 UTC"

Session Info

@@ -1605,7 +1605,7 @@ other attached packages: [1] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 [4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 -[7] magrittr_2.0.3 formatters_0.5.5.9020 +[7] magrittr_2.0.3 formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/graphs/pharmacokinetic/pkpg01.html b/development/graphs/pharmacokinetic/pkpg01.html index 8bebe192e5..f379b0aac3 100644 --- a/development/graphs/pharmacokinetic/pkpg01.html +++ b/development/graphs/pharmacokinetic/pkpg01.html @@ -1602,7 +1602,7 @@
Code
Sys.time()
-
[1] "2024-04-06 18:00:11 UTC"
+
[1] "2024-04-10 18:01:35 UTC"

Session Info

@@ -1634,7 +1634,7 @@ other attached packages: [1] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 [4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 -[7] magrittr_2.0.3 formatters_0.5.5.9020 +[7] magrittr_2.0.3 formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/graphs/pharmacokinetic/pkpg02.html b/development/graphs/pharmacokinetic/pkpg02.html index 6cadb734f0..582d02e2b1 100644 --- a/development/graphs/pharmacokinetic/pkpg02.html +++ b/development/graphs/pharmacokinetic/pkpg02.html @@ -1620,7 +1620,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:59:43 UTC"
+
[1] "2024-04-10 18:01:05 UTC"

Session Info

@@ -1652,7 +1652,7 @@ other attached packages: [1] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 [4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 -[7] magrittr_2.0.3 formatters_0.5.5.9020 +[7] magrittr_2.0.3 formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/graphs/pharmacokinetic/pkpg03.html b/development/graphs/pharmacokinetic/pkpg03.html index e45954b837..8dff10abfc 100644 --- a/development/graphs/pharmacokinetic/pkpg03.html +++ b/development/graphs/pharmacokinetic/pkpg03.html @@ -1515,7 +1515,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:59:29 UTC"
+
[1] "2024-04-10 18:00:51 UTC"

Session Info

@@ -1547,7 +1547,7 @@ other attached packages: [1] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 [4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 -[7] magrittr_2.0.3 formatters_0.5.5.9020 +[7] magrittr_2.0.3 formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/graphs/pharmacokinetic/pkpg04.html b/development/graphs/pharmacokinetic/pkpg04.html index 20b006b97b..7c81b393ef 100644 --- a/development/graphs/pharmacokinetic/pkpg04.html +++ b/development/graphs/pharmacokinetic/pkpg04.html @@ -1517,7 +1517,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:59:49 UTC"
+
[1] "2024-04-10 18:01:12 UTC"

Session Info

@@ -1549,7 +1549,7 @@ other attached packages: [1] nestcolor_0.1.2.9009 ggrepel_0.9.5 ggplot2_3.5.0 [4] dplyr_1.1.4 scda_0.1.6.9017 tern_0.9.3.9031 -[7] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9020 +[7] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] utf8_1.2.4 generics_0.1.3 tidyr_1.3.1 lattice_0.22-6 diff --git a/development/graphs/pharmacokinetic/pkpg04_files/figure-html/plot1-1.png b/development/graphs/pharmacokinetic/pkpg04_files/figure-html/plot1-1.png index 27f1176566..bb649158f6 100644 Binary files a/development/graphs/pharmacokinetic/pkpg04_files/figure-html/plot1-1.png and b/development/graphs/pharmacokinetic/pkpg04_files/figure-html/plot1-1.png differ diff --git a/development/graphs/pharmacokinetic/pkpg06.html b/development/graphs/pharmacokinetic/pkpg06.html index c8f519ea99..6021ff0927 100644 --- a/development/graphs/pharmacokinetic/pkpg06.html +++ b/development/graphs/pharmacokinetic/pkpg06.html @@ -1715,7 +1715,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:59:36 UTC"
+
[1] "2024-04-10 18:00:58 UTC"

Session Info

@@ -1746,7 +1746,7 @@ other attached packages: [1] nestcolor_0.1.2.9009 tern_0.9.3.9031 rtables_0.6.6.9011 -[4] magrittr_2.0.3 formatters_0.5.5.9020 tidyr_1.3.1 +[4] magrittr_2.0.3 formatters_0.5.5.9021 tidyr_1.3.1 [7] ggplot2_3.5.0 scda_0.1.6.9017 dplyr_1.1.4 loaded via a namespace (and not attached): diff --git a/development/listings/ADA/adal02.html b/development/listings/ADA/adal02.html index ae240511ef..07a6114074 100644 --- a/development/listings/ADA/adal02.html +++ b/development/listings/ADA/adal02.html @@ -1617,7 +1617,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:33:36 UTC"
+
[1] "2024-04-10 17:33:57 UTC"

Session Info

@@ -1648,7 +1648,7 @@ other attached packages: [1] scda_0.1.6.9017 rlistings_0.2.7.9013 tibble_3.2.1 -[4] formatters_0.5.5.9020 dplyr_1.1.4 +[4] formatters_0.5.5.9021 dplyr_1.1.4 loaded via a namespace (and not attached): [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 diff --git a/development/listings/ECG/egl01.html b/development/listings/ECG/egl01.html index b5cf20daef..81d3ed46ce 100644 --- a/development/listings/ECG/egl01.html +++ b/development/listings/ECG/egl01.html @@ -1574,7 +1574,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:37 UTC"
+
[1] "2024-04-10 17:35:01 UTC"

Session Info

@@ -1604,7 +1604,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] scda_0.1.6.9017 dplyr_1.1.4 loaded via a namespace (and not attached): diff --git a/development/listings/adverse-events/ael01.html b/development/listings/adverse-events/ael01.html index 05eb09a288..b2e2ce5257 100644 --- a/development/listings/adverse-events/ael01.html +++ b/development/listings/adverse-events/ael01.html @@ -1510,7 +1510,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:08 UTC"
+
[1] "2024-04-10 17:34:31 UTC"

Session Info

@@ -1540,7 +1540,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): diff --git a/development/listings/adverse-events/ael01_nollt.html b/development/listings/adverse-events/ael01_nollt.html index 0145014b30..ee7c09242c 100644 --- a/development/listings/adverse-events/ael01_nollt.html +++ b/development/listings/adverse-events/ael01_nollt.html @@ -1509,7 +1509,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:33:57 UTC"
+
[1] "2024-04-10 17:34:19 UTC"

Session Info

@@ -1539,7 +1539,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): diff --git a/development/listings/adverse-events/ael02.html b/development/listings/adverse-events/ael02.html index 774be6a66c..bc7dbb90d3 100644 --- a/development/listings/adverse-events/ael02.html +++ b/development/listings/adverse-events/ael02.html @@ -1574,7 +1574,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:01 UTC"
+
[1] "2024-04-10 17:34:23 UTC"

Session Info

@@ -1604,7 +1604,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] scda_0.1.6.9017 dplyr_1.1.4 loaded via a namespace (and not attached): diff --git a/development/listings/adverse-events/ael02_ed.html b/development/listings/adverse-events/ael02_ed.html index 99b7948bd8..e48642bc93 100644 --- a/development/listings/adverse-events/ael02_ed.html +++ b/development/listings/adverse-events/ael02_ed.html @@ -1592,7 +1592,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:05 UTC"
+
[1] "2024-04-10 17:34:27 UTC"

Session Info

@@ -1623,7 +1623,7 @@ other attached packages: [1] lubridate_1.9.3 rlistings_0.2.7.9013 tibble_3.2.1 -[4] formatters_0.5.5.9020 scda_0.1.6.9017 dplyr_1.1.4 +[4] formatters_0.5.5.9021 scda_0.1.6.9017 dplyr_1.1.4 loaded via a namespace (and not attached): [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 diff --git a/development/listings/adverse-events/ael03.html b/development/listings/adverse-events/ael03.html index 2163c24ea7..4c0e08d05c 100644 --- a/development/listings/adverse-events/ael03.html +++ b/development/listings/adverse-events/ael03.html @@ -1593,7 +1593,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:33:54 UTC"
+
[1] "2024-04-10 17:34:16 UTC"

Session Info

@@ -1623,7 +1623,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): diff --git a/development/listings/adverse-events/ael04.html b/development/listings/adverse-events/ael04.html index 2d79ea7889..246aff55af 100644 --- a/development/listings/adverse-events/ael04.html +++ b/development/listings/adverse-events/ael04.html @@ -1531,7 +1531,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:33:51 UTC"
+
[1] "2024-04-10 17:34:12 UTC"

Session Info

@@ -1561,7 +1561,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] scda_0.1.6.9017 dplyr_1.1.4 loaded via a namespace (and not attached): diff --git a/development/listings/concomitant-medications/cml01.html b/development/listings/concomitant-medications/cml01.html index b1be0ecf29..a5c763995b 100644 --- a/development/listings/concomitant-medications/cml01.html +++ b/development/listings/concomitant-medications/cml01.html @@ -1542,7 +1542,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:40 UTC"
+
[1] "2024-04-10 17:35:05 UTC"

Session Info

@@ -1572,7 +1572,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] scda_0.1.6.9017 dplyr_1.1.4 loaded via a namespace (and not attached): diff --git a/development/listings/concomitant-medications/cml02a_gl.html b/development/listings/concomitant-medications/cml02a_gl.html index e3875f8b10..aedc617843 100644 --- a/development/listings/concomitant-medications/cml02a_gl.html +++ b/development/listings/concomitant-medications/cml02a_gl.html @@ -1516,7 +1516,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:44 UTC"
+
[1] "2024-04-10 17:35:09 UTC"

Session Info

@@ -1546,7 +1546,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): diff --git a/development/listings/concomitant-medications/cml02b_gl.html b/development/listings/concomitant-medications/cml02b_gl.html index e1aed1ac27..2228739b92 100644 --- a/development/listings/concomitant-medications/cml02b_gl.html +++ b/development/listings/concomitant-medications/cml02b_gl.html @@ -1519,7 +1519,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:47 UTC"
+
[1] "2024-04-10 17:35:13 UTC"

Session Info

@@ -1549,7 +1549,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): diff --git a/development/listings/development-safety-update-report/dsur4.html b/development/listings/development-safety-update-report/dsur4.html index ba8101aeb1..b1f09c4a18 100644 --- a/development/listings/development-safety-update-report/dsur4.html +++ b/development/listings/development-safety-update-report/dsur4.html @@ -1521,7 +1521,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:33:44 UTC"
+
[1] "2024-04-10 17:34:05 UTC"

Session Info

@@ -1551,7 +1551,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): diff --git a/development/listings/disposition/dsl01.html b/development/listings/disposition/dsl01.html index 49cbd9645f..99fc60535e 100644 --- a/development/listings/disposition/dsl01.html +++ b/development/listings/disposition/dsl01.html @@ -1530,7 +1530,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:15 UTC"
+
[1] "2024-04-10 17:34:38 UTC"

Session Info

@@ -1560,7 +1560,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): diff --git a/development/listings/disposition/dsl02.html b/development/listings/disposition/dsl02.html index ce7d94ea48..22be216436 100644 --- a/development/listings/disposition/dsl02.html +++ b/development/listings/disposition/dsl02.html @@ -1525,7 +1525,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:11 UTC"
+
[1] "2024-04-10 17:34:34 UTC"

Session Info

@@ -1555,7 +1555,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): diff --git a/development/listings/efficacy/oncl01.html b/development/listings/efficacy/oncl01.html index b3f130fa00..6ec22cc109 100644 --- a/development/listings/efficacy/oncl01.html +++ b/development/listings/efficacy/oncl01.html @@ -1585,7 +1585,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:33:41 UTC"
+
[1] "2024-04-10 17:34:01 UTC"

Session Info

@@ -1615,7 +1615,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): diff --git a/development/listings/exposure/exl01.html b/development/listings/exposure/exl01.html index 6a578efedc..9f5b129e65 100644 --- a/development/listings/exposure/exl01.html +++ b/development/listings/exposure/exl01.html @@ -1529,7 +1529,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:35:13 UTC"
+
[1] "2024-04-10 17:35:40 UTC"

Session Info

@@ -1559,7 +1559,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] scda_0.1.6.9017 dplyr_1.1.4 loaded via a namespace (and not attached): diff --git a/development/listings/lab-results/lbl01.html b/development/listings/lab-results/lbl01.html index 40acbfa540..26e4d9113f 100644 --- a/development/listings/lab-results/lbl01.html +++ b/development/listings/lab-results/lbl01.html @@ -1558,7 +1558,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:58 UTC"
+
[1] "2024-04-10 17:35:25 UTC"

Session Info

@@ -1588,7 +1588,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] scda_0.1.6.9017 dplyr_1.1.4 loaded via a namespace (and not attached): diff --git a/development/listings/lab-results/lbl01_rls.html b/development/listings/lab-results/lbl01_rls.html index 0ec5e4f2d0..4b9dc557da 100644 --- a/development/listings/lab-results/lbl01_rls.html +++ b/development/listings/lab-results/lbl01_rls.html @@ -1563,7 +1563,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:35:06 UTC"
+
[1] "2024-04-10 17:35:33 UTC"

Session Info

@@ -1593,7 +1593,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] scda_0.1.6.9017 dplyr_1.1.4 loaded via a namespace (and not attached): diff --git a/development/listings/lab-results/lbl02a.html b/development/listings/lab-results/lbl02a.html index ee01b160a8..d150839443 100644 --- a/development/listings/lab-results/lbl02a.html +++ b/development/listings/lab-results/lbl02a.html @@ -1558,7 +1558,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:35:09 UTC"
+
[1] "2024-04-10 17:35:36 UTC"

Session Info

@@ -1588,7 +1588,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] scda_0.1.6.9017 dplyr_1.1.4 loaded via a namespace (and not attached): diff --git a/development/listings/lab-results/lbl02a_rls.html b/development/listings/lab-results/lbl02a_rls.html index ea1715f51e..696be35f45 100644 --- a/development/listings/lab-results/lbl02a_rls.html +++ b/development/listings/lab-results/lbl02a_rls.html @@ -1579,7 +1579,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:55 UTC"
+
[1] "2024-04-10 17:35:21 UTC"

Session Info

@@ -1609,7 +1609,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] scda_0.1.6.9017 dplyr_1.1.4 loaded via a namespace (and not attached): diff --git a/development/listings/lab-results/lbl02b.html b/development/listings/lab-results/lbl02b.html index fbd5f07bf2..3b49d3b7b3 100644 --- a/development/listings/lab-results/lbl02b.html +++ b/development/listings/lab-results/lbl02b.html @@ -1559,7 +1559,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:35:02 UTC"
+
[1] "2024-04-10 17:35:29 UTC"

Session Info

@@ -1589,7 +1589,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] scda_0.1.6.9017 dplyr_1.1.4 loaded via a namespace (and not attached): diff --git a/development/listings/medical-history/mhl01.html b/development/listings/medical-history/mhl01.html index 71b03d1c70..c826ee7420 100644 --- a/development/listings/medical-history/mhl01.html +++ b/development/listings/medical-history/mhl01.html @@ -1534,7 +1534,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:33:47 UTC"
+
[1] "2024-04-10 17:34:09 UTC"

Session Info

@@ -1564,7 +1564,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] scda_0.1.6.9017 dplyr_1.1.4 loaded via a namespace (and not attached): diff --git a/development/listings/pharmacokinetic/pkcl01.html b/development/listings/pharmacokinetic/pkcl01.html index f2e2bf3082..b64a7e1d92 100644 --- a/development/listings/pharmacokinetic/pkcl01.html +++ b/development/listings/pharmacokinetic/pkcl01.html @@ -1532,7 +1532,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:29 UTC"
+
[1] "2024-04-10 17:34:54 UTC"

Session Info

@@ -1563,7 +1563,7 @@ other attached packages: [1] dplyr_1.1.4 scda_0.1.6.9017 rlistings_0.2.7.9013 -[4] tibble_3.2.1 formatters_0.5.5.9020 +[4] tibble_3.2.1 formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 diff --git a/development/listings/pharmacokinetic/pkcl02.html b/development/listings/pharmacokinetic/pkcl02.html index d151fd02f3..db75ae5f90 100644 --- a/development/listings/pharmacokinetic/pkcl02.html +++ b/development/listings/pharmacokinetic/pkcl02.html @@ -1566,7 +1566,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:18 UTC"
+
[1] "2024-04-10 17:34:42 UTC"

Session Info

@@ -1597,7 +1597,7 @@ other attached packages: [1] scda_0.1.6.9017 rlistings_0.2.7.9013 tibble_3.2.1 -[4] formatters_0.5.5.9020 dplyr_1.1.4 +[4] formatters_0.5.5.9021 dplyr_1.1.4 loaded via a namespace (and not attached): [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 diff --git a/development/listings/pharmacokinetic/pkpl01.html b/development/listings/pharmacokinetic/pkpl01.html index 3d027a0aed..ea8ca2ca13 100644 --- a/development/listings/pharmacokinetic/pkpl01.html +++ b/development/listings/pharmacokinetic/pkpl01.html @@ -1534,7 +1534,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:22 UTC"
+
[1] "2024-04-10 17:34:46 UTC"

Session Info

@@ -1565,7 +1565,7 @@ other attached packages: [1] scda_0.1.6.9017 rlistings_0.2.7.9013 tibble_3.2.1 -[4] formatters_0.5.5.9020 dplyr_1.1.4 +[4] formatters_0.5.5.9021 dplyr_1.1.4 loaded via a namespace (and not attached): [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 diff --git a/development/listings/pharmacokinetic/pkpl02.html b/development/listings/pharmacokinetic/pkpl02.html index fbad4716a1..72bbe6416e 100644 --- a/development/listings/pharmacokinetic/pkpl02.html +++ b/development/listings/pharmacokinetic/pkpl02.html @@ -1535,7 +1535,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:33 UTC"
+
[1] "2024-04-10 17:34:57 UTC"

Session Info

@@ -1566,7 +1566,7 @@ other attached packages: [1] scda_0.1.6.9017 rlistings_0.2.7.9013 tibble_3.2.1 -[4] formatters_0.5.5.9020 dplyr_1.1.4 +[4] formatters_0.5.5.9021 dplyr_1.1.4 loaded via a namespace (and not attached): [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 diff --git a/development/listings/pharmacokinetic/pkpl04.html b/development/listings/pharmacokinetic/pkpl04.html index ead52469b2..ca93962761 100644 --- a/development/listings/pharmacokinetic/pkpl04.html +++ b/development/listings/pharmacokinetic/pkpl04.html @@ -1553,7 +1553,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:26 UTC"
+
[1] "2024-04-10 17:34:50 UTC"

Session Info

@@ -1584,7 +1584,7 @@ other attached packages: [1] scda_0.1.6.9017 rlistings_0.2.7.9013 tibble_3.2.1 -[4] formatters_0.5.5.9020 dplyr_1.1.4 +[4] formatters_0.5.5.9021 dplyr_1.1.4 loaded via a namespace (and not attached): [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 diff --git a/development/listings/vital-signs/vsl01.html b/development/listings/vital-signs/vsl01.html index 0e41adecaa..b003faab6a 100644 --- a/development/listings/vital-signs/vsl01.html +++ b/development/listings/vital-signs/vsl01.html @@ -1610,7 +1610,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:34:51 UTC"
+
[1] "2024-04-10 17:35:17 UTC"

Session Info

@@ -1640,7 +1640,7 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: -[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020 +[1] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021 [4] scda_0.1.6.9017 dplyr_1.1.4 loaded via a namespace (and not attached): diff --git a/development/repro.html b/development/repro.html index d630c695fd..be6d13ceaa 100644 --- a/development/repro.html +++ b/development/repro.html @@ -184,7 +184,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:55:28 UTC"
+
[1] "2024-04-10 17:56:42 UTC"

Session Info

diff --git a/development/search.json b/development/search.json index da8f765297..e89fb4e971 100644 --- a/development/search.json +++ b/development/search.json @@ -67,7 +67,7 @@ "href": "graphs/pharmacokinetic/pkpg01.html", "title": "PKPG01", "section": "", - "text": "Data Setup\nPlot with Two Cohorts\nPlot with Six Cohorts\nteal App\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(nestcolor)\nset.seed(123)\n\n# loading in the data\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\n\n# filtering the rows for specific data entries\nadpp <- adpp %>%\n filter(PARAMCD == \"RCPCINT\", AVISIT == \"CYCLE 1 DAY 1\", PPCAT == \"Plasma Drug X\")\n\n# adding or modifying specific columns\nadpp <- adpp %>%\n mutate(ARM = as.factor(TRT01A)) %>%\n mutate(PARAM1 = \"Fe\") %>% # re-format PK parameter name\n mutate(Time = as.numeric(gsub(\"PT*|\\\\.|H$\", \"\", PPENINT))) %>%\n droplevels() %>%\n df_explicit_na()\n\n# in cases where the cohorts are numeric it is possible to rename them\nlevels(adpp$ARM) <- c(\n \"A: Drug X\",\n \"C: Combination\"\n)\n\n\n\n\n\n\nCodeuse_title <- \"Plot of Mean (+/- SD) Cummulative Percentage (%) of Recovered Drug in Urine \\nby Analyte, Visit: PK Evaluable Patients\" \nuse_subtitle <- \"Analyte: Plasma Drug X \\nVisit: CYCLE 1 DAY 1 \\nPK Parameter:\"\nuse_footnote <- \"Program: \\nOutput:\"\n\nseparation_between_barplots <- 1.5\n\nresult <- g_lineplot(\n df = adpp,\n variables = control_lineplot_vars(\n x = \"Time\",\n y = \"AVAL\",\n group_var = \"ARM\",\n paramcd = \"PARAM1\",\n y_unit = \"AVALU\"\n ),\n alt_counts_df = adpp,\n y_lab = \"Cummulative Percentage\",\n x_lab = \"Time (hours)\",\n y_lab_add_paramcd = FALSE,\n y_lab_add_unit = TRUE,\n interval = \"mean_sdi\",\n whiskers = c(\"mean_sdi_lwr\", \"mean_sdi_upr\"),\n title = use_title,\n subtitle = use_subtitle,\n caption = use_footnote,\n ggtheme = theme_nest(),\n position = ggplot2::position_dodge(width = 2)\n)\n\nplot <- result + theme(plot.caption = element_text(hjust = 0)) +\n scale_x_continuous(breaks = c(12, 24))\nplot\n\n\n\n\n\n\n\n\n\nIn this case we need to process the data further by artificially adding more random rows. Of course this step is not necessary in the case that data already has more cohorts.\n\n\nCodeadpp_hck <- adpp %>%\n mutate(AVAL + 1 * rnorm(nrow(adpp), mean = 1, sd = 1)) %>%\n mutate(ARM = as.factor(sample(\n c(\n \"D: Drug D\",\n \"E: Drug E\",\n \"F: Drug F\",\n \"G: Drug G\"\n ),\n nrow(adpp),\n replace = TRUE,\n prob = c(0.4, 0.3, 0.2, 0.1)\n )))\n\nadpp <- bind_rows(adpp, adpp_hck)\n\nuse_title <- \"Plot of Mean (+/- SD) Cummulative Percentage (%) of Recovered Drug in Urine \\nby Analyte, Visit: PK Evaluable Patients\" \nuse_subtitle <- \"Analyte: Plasma Drug X \\nVisit: CYCLE 1 DAY 1 \\nPK Parameter:\"\nuse_footnote <- \"Program: \\nOutput:\"\n\nseparation_between_barplots <- 1.5\n\nresult <- g_lineplot(\n df = adpp,\n variables = control_lineplot_vars(\n x = \"Time\",\n y = \"AVAL\",\n group_var = \"ARM\",\n paramcd = \"PARAM1\",\n y_unit = \"AVALU\"\n ),\n alt_counts_df = adpp,\n y_lab = \"Cummulative Percentage\",\n x_lab = \"Time (hours)\",\n y_lab_add_paramcd = FALSE,\n y_lab_add_unit = TRUE,\n interval = \"mean_sdi\",\n whiskers = c(\"mean_sdi_lwr\", \"mean_sdi_upr\"),\n title = use_title,\n subtitle = use_subtitle,\n caption = use_footnote,\n ggtheme = theme_nest(),\n position = ggplot2::position_dodge(width = 2)\n)\n\nplot <- result + theme(plot.caption = element_text(hjust = 0)) +\n scale_x_continuous(breaks = c(12, 24))\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 18:00:11 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 \n[4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 \n[7] magrittr_2.0.3 formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] R6_2.5.1 labeling_0.4.3 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 withr_3.0.0 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 farver_2.1.1 codetools_0.2-20 \n[41] survival_3.5-8 fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 \n[45] rmarkdown_2.26 tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nPlot with Two Cohorts\nPlot with Six Cohorts\nteal App\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(nestcolor)\nset.seed(123)\n\n# loading in the data\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\n\n# filtering the rows for specific data entries\nadpp <- adpp %>%\n filter(PARAMCD == \"RCPCINT\", AVISIT == \"CYCLE 1 DAY 1\", PPCAT == \"Plasma Drug X\")\n\n# adding or modifying specific columns\nadpp <- adpp %>%\n mutate(ARM = as.factor(TRT01A)) %>%\n mutate(PARAM1 = \"Fe\") %>% # re-format PK parameter name\n mutate(Time = as.numeric(gsub(\"PT*|\\\\.|H$\", \"\", PPENINT))) %>%\n droplevels() %>%\n df_explicit_na()\n\n# in cases where the cohorts are numeric it is possible to rename them\nlevels(adpp$ARM) <- c(\n \"A: Drug X\",\n \"C: Combination\"\n)\n\n\n\n\n\n\nCodeuse_title <- \"Plot of Mean (+/- SD) Cummulative Percentage (%) of Recovered Drug in Urine \\nby Analyte, Visit: PK Evaluable Patients\" \nuse_subtitle <- \"Analyte: Plasma Drug X \\nVisit: CYCLE 1 DAY 1 \\nPK Parameter:\"\nuse_footnote <- \"Program: \\nOutput:\"\n\nseparation_between_barplots <- 1.5\n\nresult <- g_lineplot(\n df = adpp,\n variables = control_lineplot_vars(\n x = \"Time\",\n y = \"AVAL\",\n group_var = \"ARM\",\n paramcd = \"PARAM1\",\n y_unit = \"AVALU\"\n ),\n alt_counts_df = adpp,\n y_lab = \"Cummulative Percentage\",\n x_lab = \"Time (hours)\",\n y_lab_add_paramcd = FALSE,\n y_lab_add_unit = TRUE,\n interval = \"mean_sdi\",\n whiskers = c(\"mean_sdi_lwr\", \"mean_sdi_upr\"),\n title = use_title,\n subtitle = use_subtitle,\n caption = use_footnote,\n ggtheme = theme_nest(),\n position = ggplot2::position_dodge(width = 2)\n)\n\nplot <- result + theme(plot.caption = element_text(hjust = 0)) +\n scale_x_continuous(breaks = c(12, 24))\nplot\n\n\n\n\n\n\n\n\n\nIn this case we need to process the data further by artificially adding more random rows. Of course this step is not necessary in the case that data already has more cohorts.\n\n\nCodeadpp_hck <- adpp %>%\n mutate(AVAL + 1 * rnorm(nrow(adpp), mean = 1, sd = 1)) %>%\n mutate(ARM = as.factor(sample(\n c(\n \"D: Drug D\",\n \"E: Drug E\",\n \"F: Drug F\",\n \"G: Drug G\"\n ),\n nrow(adpp),\n replace = TRUE,\n prob = c(0.4, 0.3, 0.2, 0.1)\n )))\n\nadpp <- bind_rows(adpp, adpp_hck)\n\nuse_title <- \"Plot of Mean (+/- SD) Cummulative Percentage (%) of Recovered Drug in Urine \\nby Analyte, Visit: PK Evaluable Patients\" \nuse_subtitle <- \"Analyte: Plasma Drug X \\nVisit: CYCLE 1 DAY 1 \\nPK Parameter:\"\nuse_footnote <- \"Program: \\nOutput:\"\n\nseparation_between_barplots <- 1.5\n\nresult <- g_lineplot(\n df = adpp,\n variables = control_lineplot_vars(\n x = \"Time\",\n y = \"AVAL\",\n group_var = \"ARM\",\n paramcd = \"PARAM1\",\n y_unit = \"AVALU\"\n ),\n alt_counts_df = adpp,\n y_lab = \"Cummulative Percentage\",\n x_lab = \"Time (hours)\",\n y_lab_add_paramcd = FALSE,\n y_lab_add_unit = TRUE,\n interval = \"mean_sdi\",\n whiskers = c(\"mean_sdi_lwr\", \"mean_sdi_upr\"),\n title = use_title,\n subtitle = use_subtitle,\n caption = use_footnote,\n ggtheme = theme_nest(),\n position = ggplot2::position_dodge(width = 2)\n)\n\nplot <- result + theme(plot.caption = element_text(hjust = 0)) +\n scale_x_continuous(breaks = c(12, 24))\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 18:01:35 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 \n[4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 \n[7] magrittr_2.0.3 formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] R6_2.5.1 labeling_0.4.3 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 withr_3.0.0 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 farver_2.1.1 codetools_0.2-20 \n[41] survival_3.5-8 fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 \n[45] rmarkdown_2.26 tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Pharmacokinetic", @@ -79,7 +79,7 @@ "href": "graphs/pharmacokinetic/pkcg03.html", "title": "PKCG03", "section": "", - "text": "Data Setup\nPlot in Linear Scale\nPlot in Log Scale\nteal App\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(nestcolor)\n\nadsl_f <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n filter(SAFFL == \"Y\" & ARM != \"B: Placebo\") %>%\n df_explicit_na()\n\nadpc <- synthetic_cdisc_dataset(\"latest\", \"adpc\") %>%\n mutate(Patient_ID = sub(\".*id-\", \"\", USUBJID)) %>%\n filter(PARAM == \"Plasma Drug X\") %>%\n droplevels() %>%\n df_explicit_na()\n\n\n\n\n\n\nCodeuse_title <- \"Plot of Mean (+/- SD) Plasma Concentrations Over Time by Treatment, \\nPK Evaluable Patients\"\nuse_subtitle <- \"Analyte:\"\nuse_footnote <- \"Program: \\nOutput:\"\n\nresult <- g_lineplot(\n df = adpc,\n variables = control_lineplot_vars(\n x = \"NFRLT\",\n y = \"AVAL\",\n group_var = \"ARM\",\n paramcd = \"PARAM\",\n y_unit = \"AVALU\",\n subject_var = \"USUBJID\"\n ),\n alt_counts_df = adsl_f,\n y_lab = \"Concentration\",\n y_lab_add_paramcd = FALSE,\n y_lab_add_unit = TRUE,\n interval = \"mean_sdi\",\n whiskers = c(\"mean_sdi_lwr\", \"mean_sdi_upr\"),\n title = use_title,\n subtitle = use_subtitle,\n caption = use_footnote,\n ggtheme = theme_nest()\n)\n\nplot <- result + theme(plot.caption = element_text(hjust = 0))\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeuse_title <- \"Plot of Mean (+/- SD) Log-Scale Plasma Concentrations Over Time by Treatment, \\nPK Evaluable Patients\"\nuse_subtitle <- \"Analyte:\"\nuse_footnote <- \"Program: \\nOutput:\"\n\nadpc <- adpc %>%\n mutate(avalog = ifelse(AVAL != 0, AVAL, 0.001))\n\nresult <- g_lineplot(\n df = adpc,\n variables = control_lineplot_vars(\n x = \"NFRLT\",\n y = \"avalog\",\n group_var = \"ARM\",\n paramcd = \"PARAM\",\n y_unit = \"AVALU\",\n subject_var = \"USUBJID\"\n ),\n alt_counts_df = adsl_f,\n y_lab = \"Concentration\",\n y_lab_add_paramcd = FALSE,\n y_lab_add_unit = TRUE,\n interval = \"mean_sdi\",\n whiskers = c(\"mean_sdi_lwr\", \"mean_sdi_upr\"),\n title = use_title,\n subtitle = use_subtitle,\n caption = use_footnote,\n ggtheme = theme_nest()\n)\n\nplot <- result + theme(plot.caption = element_text(hjust = 0)) +\n ggplot2::scale_y_log10(breaks = c(0.001, 0.01, 0.1, 1, 10), labels = c(0.001, 0.01, 0.1, 1, 10))\n\nScale for y is already present.\nAdding another scale for y, which will replace the existing scale.\n\nCodeplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:59:56 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 \n[4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 \n[7] magrittr_2.0.3 formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] R6_2.5.1 labeling_0.4.3 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 withr_3.0.0 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 farver_2.1.1 codetools_0.2-20 \n[41] survival_3.5-8 fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 \n[45] rmarkdown_2.26 tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nPlot in Linear Scale\nPlot in Log Scale\nteal App\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(nestcolor)\n\nadsl_f <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n filter(SAFFL == \"Y\" & ARM != \"B: Placebo\") %>%\n df_explicit_na()\n\nadpc <- synthetic_cdisc_dataset(\"latest\", \"adpc\") %>%\n mutate(Patient_ID = sub(\".*id-\", \"\", USUBJID)) %>%\n filter(PARAM == \"Plasma Drug X\") %>%\n droplevels() %>%\n df_explicit_na()\n\n\n\n\n\n\nCodeuse_title <- \"Plot of Mean (+/- SD) Plasma Concentrations Over Time by Treatment, \\nPK Evaluable Patients\"\nuse_subtitle <- \"Analyte:\"\nuse_footnote <- \"Program: \\nOutput:\"\n\nresult <- g_lineplot(\n df = adpc,\n variables = control_lineplot_vars(\n x = \"NFRLT\",\n y = \"AVAL\",\n group_var = \"ARM\",\n paramcd = \"PARAM\",\n y_unit = \"AVALU\",\n subject_var = \"USUBJID\"\n ),\n alt_counts_df = adsl_f,\n y_lab = \"Concentration\",\n y_lab_add_paramcd = FALSE,\n y_lab_add_unit = TRUE,\n interval = \"mean_sdi\",\n whiskers = c(\"mean_sdi_lwr\", \"mean_sdi_upr\"),\n title = use_title,\n subtitle = use_subtitle,\n caption = use_footnote,\n ggtheme = theme_nest()\n)\n\nplot <- result + theme(plot.caption = element_text(hjust = 0))\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeuse_title <- \"Plot of Mean (+/- SD) Log-Scale Plasma Concentrations Over Time by Treatment, \\nPK Evaluable Patients\"\nuse_subtitle <- \"Analyte:\"\nuse_footnote <- \"Program: \\nOutput:\"\n\nadpc <- adpc %>%\n mutate(avalog = ifelse(AVAL != 0, AVAL, 0.001))\n\nresult <- g_lineplot(\n df = adpc,\n variables = control_lineplot_vars(\n x = \"NFRLT\",\n y = \"avalog\",\n group_var = \"ARM\",\n paramcd = \"PARAM\",\n y_unit = \"AVALU\",\n subject_var = \"USUBJID\"\n ),\n alt_counts_df = adsl_f,\n y_lab = \"Concentration\",\n y_lab_add_paramcd = FALSE,\n y_lab_add_unit = TRUE,\n interval = \"mean_sdi\",\n whiskers = c(\"mean_sdi_lwr\", \"mean_sdi_upr\"),\n title = use_title,\n subtitle = use_subtitle,\n caption = use_footnote,\n ggtheme = theme_nest()\n)\n\nplot <- result + theme(plot.caption = element_text(hjust = 0)) +\n ggplot2::scale_y_log10(breaks = c(0.001, 0.01, 0.1, 1, 10), labels = c(0.001, 0.01, 0.1, 1, 10))\n\nScale for y is already present.\nAdding another scale for y, which will replace the existing scale.\n\nCodeplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 18:01:19 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 \n[4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 \n[7] magrittr_2.0.3 formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] R6_2.5.1 labeling_0.4.3 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 withr_3.0.0 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 farver_2.1.1 codetools_0.2-20 \n[41] survival_3.5-8 fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 \n[45] rmarkdown_2.26 tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Pharmacokinetic", @@ -91,7 +91,7 @@ "href": "graphs/pharmacokinetic/pkpg02.html", "title": "PKPG02", "section": "", - "text": "Data Setup\nSummary of Pharmacokinetic Parameters – Plasma\nSummary of Plasma Pharmacokinetic Parameters with Median Points\nteal App\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(nestcolor)\n\n# need adex for dose info and adpp for AUC max info\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\n\nadpp_a <- adpp %>%\n filter(\n PPSPEC == \"Plasma\",\n AVISITN == \"1\",\n PARAMCD == \"AUCIFO\"\n ) %>%\n mutate(AUCinf = AVAL)\n\nadex_a <- adex %>%\n filter(\n AVISITN == \"1\",\n PARAMCD == \"DOSE\"\n ) %>%\n mutate(Dose = AVAL) %>%\n select(USUBJID, Dose)\n\n# join the dose information to the adpp table\nadpp_adex <- left_join(adpp_a, adex_a, by = \"USUBJID\") %>%\n group_by(`ARM`) %>%\n mutate(count = paste0(`ARM`, \" (\", n(), \")\"))\n\n# set x and y variable names\nx_var <- \"Dose\"\ny_var <- \"AUCinf\"\n\n\n\n\n\n\nCode# calculate Summary Statistics (mean and sd) for each group\nSummaryStat <- adpp_adex %>% \n group_by(Dose = as.factor(Dose)) %>%\n summarise(AUCsd = sd(AUCinf), meanAUC = mean(AUCinf))\nSummaryStat$Dose <- as.numeric(as.character(SummaryStat$Dose)) \n\n# generate linear model\nmod1 <- lm(log(AUCinf) ~ log(Dose), adpp_adex)\n\n# obtain linear model coefficient values\ncf <- round(coef(mod1), 2)\n\n# generate linear model equation\neq <- paste0(\n \"y = \", cf[1],\n ifelse(sign(cf[2]) == 1, \" + \", \" - \"), abs(cf[2]), \" x , \",\n \"R²\",\n \" = \",\n signif(summary(mod1)$adj.r.squared, 3)\n)\n\nplot <- ggplot(adpp_adex, aes(x = .data[[x_var]], y = .data[[y_var]])) +\n annotate(geom = \"text\", x = min(adpp_adex[[x_var]]), y = max(adpp_adex[[y_var]]), label = eq, hjust = 0.1) +\n geom_point(size = 1, aes(color = factor(`count`))) +\n scale_x_continuous(\n name = \"Dose (mg/mL)\",\n breaks = unique(adpp_adex$Dose)\n ) +\n scale_y_continuous(\n name = paste(y_var, adpp_a$AVALU),\n transform = \"log\",\n breaks = exp(ceiling(seq(\n from = min(log(adpp_adex$AUCinf)), to = max(log(adpp_adex$AUCinf)),\n by = 1\n ))),\n labels = as.character(ceiling(seq(\n from = min(log(adpp_adex$AUCinf)),\n to = max(log(adpp_adex$AUCinf)), by = 1\n )))\n ) +\n geom_smooth(method = \"lm\", formula = y ~ x, se = FALSE, color = \"black\", linewidth = 0.5) +\n # Display error bars for each dosing group (this will only appear if the sd is less than the mean)\n geom_errorbar(\n data = SummaryStat,\n aes(x = `Dose`, y = `meanAUC`, ymin = `meanAUC` - `AUCsd`, ymax = `meanAUC` + AUCsd),\n width = .05,\n position = position_dodge(.1)\n ) +\n geom_point(data = SummaryStat, aes(x = Dose, y = meanAUC, size = 1), shape = 2, show.legend = FALSE) +\n ggtitle(paste(\n \"Dose-Proportionality Plot of Serum\", as.character(unique(adex$TRT01P)),\n y_var, \"in\", adpp_a$AVALU\n ), subtitle = \"Summary of serum PK parameters by treatment\") +\n labs(color = \"Treatment Arm\") +\n theme_nest()\n\nplot\n\n\n\n\n\n\n\n\n\n\n\nCode# calculate median for each group if preferred\nSummaryStat <- adpp_adex %>% \n group_by(Dose = as.factor(Dose)) %>%\n summarise(medAUC = median(AUCinf))\nSummaryStat$Dose <- as.numeric(as.character(SummaryStat$Dose)) \n\nplot <- ggplot(adpp_adex, aes(x = .data[[x_var]], y = .data[[y_var]])) +\n annotate(geom = \"text\", x = min(adpp_adex[[x_var]]), y = max(adpp_adex[[y_var]]), label = eq, hjust = 0.1) +\n geom_point(size = 1, aes(color = factor(`count`))) +\n geom_smooth(method = \"lm\", formula = y ~ x, se = FALSE, color = \"black\", linewidth = 0.5) +\n geom_point(data = SummaryStat, aes(x = Dose, y = medAUC, size = 1), shape = 2, show.legend = FALSE) +\n ggtitle(\n paste(\n \"Dose-Proportionality Plot of Serum\",\n as.character(unique(adex$TRT01P)),\n y_var,\n \"in\",\n adpp_a$AVALU\n ),\n subtitle = \"Summary of serum PK parameters by treatment\"\n ) +\n labs(color = \"Treatment Arm\") +\n scale_y_continuous(\n name = paste(y_var, adpp_a$AVALU),\n transform = \"log\",\n breaks = exp(ceiling(seq(from = min(log(adpp_adex$AUCinf)), to = max(log(adpp_adex$AUCinf)), by = 1))),\n labels = as.character(ceiling(seq(from = min(log(adpp_adex$AUCinf)), to = max(log(adpp_adex$AUCinf)), by = 1)))\n ) +\n scale_x_continuous(\n name = \"Dose (mg/mL)\",\n breaks = unique(adpp_adex$Dose)\n ) +\n theme_nest()\n\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:59:43 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 \n[4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 \n[7] magrittr_2.0.3 formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] R6_2.5.1 generics_0.1.3 knitr_1.45 rbibutils_2.2.16 \n[17] htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 tibble_3.2.1 \n[21] munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 utf8_1.2.4 \n[25] testthat_3.2.1 broom_1.0.5 xfun_0.43 cli_3.6.2 \n[29] mgcv_1.9-1 withr_3.0.0 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 nlme_3.1-164 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 farver_2.1.1 codetools_0.2-20 \n[41] survival_3.5-8 fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 \n[45] rmarkdown_2.26 tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nSummary of Pharmacokinetic Parameters – Plasma\nSummary of Plasma Pharmacokinetic Parameters with Median Points\nteal App\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(nestcolor)\n\n# need adex for dose info and adpp for AUC max info\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\n\nadpp_a <- adpp %>%\n filter(\n PPSPEC == \"Plasma\",\n AVISITN == \"1\",\n PARAMCD == \"AUCIFO\"\n ) %>%\n mutate(AUCinf = AVAL)\n\nadex_a <- adex %>%\n filter(\n AVISITN == \"1\",\n PARAMCD == \"DOSE\"\n ) %>%\n mutate(Dose = AVAL) %>%\n select(USUBJID, Dose)\n\n# join the dose information to the adpp table\nadpp_adex <- left_join(adpp_a, adex_a, by = \"USUBJID\") %>%\n group_by(`ARM`) %>%\n mutate(count = paste0(`ARM`, \" (\", n(), \")\"))\n\n# set x and y variable names\nx_var <- \"Dose\"\ny_var <- \"AUCinf\"\n\n\n\n\n\n\nCode# calculate Summary Statistics (mean and sd) for each group\nSummaryStat <- adpp_adex %>% \n group_by(Dose = as.factor(Dose)) %>%\n summarise(AUCsd = sd(AUCinf), meanAUC = mean(AUCinf))\nSummaryStat$Dose <- as.numeric(as.character(SummaryStat$Dose)) \n\n# generate linear model\nmod1 <- lm(log(AUCinf) ~ log(Dose), adpp_adex)\n\n# obtain linear model coefficient values\ncf <- round(coef(mod1), 2)\n\n# generate linear model equation\neq <- paste0(\n \"y = \", cf[1],\n ifelse(sign(cf[2]) == 1, \" + \", \" - \"), abs(cf[2]), \" x , \",\n \"R²\",\n \" = \",\n signif(summary(mod1)$adj.r.squared, 3)\n)\n\nplot <- ggplot(adpp_adex, aes(x = .data[[x_var]], y = .data[[y_var]])) +\n annotate(geom = \"text\", x = min(adpp_adex[[x_var]]), y = max(adpp_adex[[y_var]]), label = eq, hjust = 0.1) +\n geom_point(size = 1, aes(color = factor(`count`))) +\n scale_x_continuous(\n name = \"Dose (mg/mL)\",\n breaks = unique(adpp_adex$Dose)\n ) +\n scale_y_continuous(\n name = paste(y_var, adpp_a$AVALU),\n transform = \"log\",\n breaks = exp(ceiling(seq(\n from = min(log(adpp_adex$AUCinf)), to = max(log(adpp_adex$AUCinf)),\n by = 1\n ))),\n labels = as.character(ceiling(seq(\n from = min(log(adpp_adex$AUCinf)),\n to = max(log(adpp_adex$AUCinf)), by = 1\n )))\n ) +\n geom_smooth(method = \"lm\", formula = y ~ x, se = FALSE, color = \"black\", linewidth = 0.5) +\n # Display error bars for each dosing group (this will only appear if the sd is less than the mean)\n geom_errorbar(\n data = SummaryStat,\n aes(x = `Dose`, y = `meanAUC`, ymin = `meanAUC` - `AUCsd`, ymax = `meanAUC` + AUCsd),\n width = .05,\n position = position_dodge(.1)\n ) +\n geom_point(data = SummaryStat, aes(x = Dose, y = meanAUC, size = 1), shape = 2, show.legend = FALSE) +\n ggtitle(paste(\n \"Dose-Proportionality Plot of Serum\", as.character(unique(adex$TRT01P)),\n y_var, \"in\", adpp_a$AVALU\n ), subtitle = \"Summary of serum PK parameters by treatment\") +\n labs(color = \"Treatment Arm\") +\n theme_nest()\n\nplot\n\n\n\n\n\n\n\n\n\n\n\nCode# calculate median for each group if preferred\nSummaryStat <- adpp_adex %>% \n group_by(Dose = as.factor(Dose)) %>%\n summarise(medAUC = median(AUCinf))\nSummaryStat$Dose <- as.numeric(as.character(SummaryStat$Dose)) \n\nplot <- ggplot(adpp_adex, aes(x = .data[[x_var]], y = .data[[y_var]])) +\n annotate(geom = \"text\", x = min(adpp_adex[[x_var]]), y = max(adpp_adex[[y_var]]), label = eq, hjust = 0.1) +\n geom_point(size = 1, aes(color = factor(`count`))) +\n geom_smooth(method = \"lm\", formula = y ~ x, se = FALSE, color = \"black\", linewidth = 0.5) +\n geom_point(data = SummaryStat, aes(x = Dose, y = medAUC, size = 1), shape = 2, show.legend = FALSE) +\n ggtitle(\n paste(\n \"Dose-Proportionality Plot of Serum\",\n as.character(unique(adex$TRT01P)),\n y_var,\n \"in\",\n adpp_a$AVALU\n ),\n subtitle = \"Summary of serum PK parameters by treatment\"\n ) +\n labs(color = \"Treatment Arm\") +\n scale_y_continuous(\n name = paste(y_var, adpp_a$AVALU),\n transform = \"log\",\n breaks = exp(ceiling(seq(from = min(log(adpp_adex$AUCinf)), to = max(log(adpp_adex$AUCinf)), by = 1))),\n labels = as.character(ceiling(seq(from = min(log(adpp_adex$AUCinf)), to = max(log(adpp_adex$AUCinf)), by = 1)))\n ) +\n scale_x_continuous(\n name = \"Dose (mg/mL)\",\n breaks = unique(adpp_adex$Dose)\n ) +\n theme_nest()\n\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 18:01:05 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 \n[4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 \n[7] magrittr_2.0.3 formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] R6_2.5.1 generics_0.1.3 knitr_1.45 rbibutils_2.2.16 \n[17] htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 tibble_3.2.1 \n[21] munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 utf8_1.2.4 \n[25] testthat_3.2.1 broom_1.0.5 xfun_0.43 cli_3.6.2 \n[29] mgcv_1.9-1 withr_3.0.0 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 nlme_3.1-164 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 farver_2.1.1 codetools_0.2-20 \n[41] survival_3.5-8 fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 \n[45] rmarkdown_2.26 tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Pharmacokinetic", @@ -103,7 +103,7 @@ "href": "graphs/pharmacokinetic/pkpg03.html", "title": "PKPG03", "section": "", - "text": "Data Setup\nPlot of CMAX by Visit\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(nestcolor)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\n\n\n\n\n\n\nCode# filtered parameter\nadpp <- adpp %>% filter(PARAMCD == \"CMAX\", PPSPEC == \"Plasma\")\n\nuse_title <- paste0(\"Boxplot of \", as.character(unique(adpp$PARAM)), \" by Visit\")\nuse_subtitle <- paste0(\n \"Analyte:\\nPK Parameter: \",\n as.character(unique(adpp$PARAM)),\n \" (\",\n as.character(unique(adpp$AVALU)),\n \")\"\n)\nuse_footnote <- \"Program: \\nOutput:\"\n\nplot <- ggplot(adpp, aes(x = AVISIT, y = AVAL, fill = ACTARM)) +\n geom_boxplot(outlier.size = 2) +\n stat_boxplot(geom = \"errorbar\") +\n stat_summary(geom = \"point\", fun = \"mean\", col = \"black\", size = 5, shape = 8, position = position_dodge(0.75)) +\n geom_text(\n data = . %>% dplyr::group_by(AVISIT, ACTARM) %>% dplyr::filter(AVAL %in% boxplot.stats(AVAL)$out),\n aes(x = AVISIT, y = AVAL, label = SUBJID, color = ACTARM),\n size = 3, hjust = -0.2, position = position_dodge(0.75)\n ) +\n labs(\n title = use_title,\n subtitle = use_subtitle,\n caption = use_footnote,\n x = \"Visit\",\n y = paste0(as.character(unique(adpp$PARAM)), \" (\", as.character(unique(adpp$AVALU)), \")\")\n ) +\n theme(plot.caption = element_text(hjust = 0)) +\n theme_nest()\n\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:59:29 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 \n[4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 \n[7] magrittr_2.0.3 formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] R6_2.5.1 labeling_0.4.3 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 broom_1.0.5 xfun_0.43 \n[29] cli_3.6.2 withr_3.0.0 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 farver_2.1.1 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nPlot of CMAX by Visit\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(nestcolor)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\n\n\n\n\n\n\nCode# filtered parameter\nadpp <- adpp %>% filter(PARAMCD == \"CMAX\", PPSPEC == \"Plasma\")\n\nuse_title <- paste0(\"Boxplot of \", as.character(unique(adpp$PARAM)), \" by Visit\")\nuse_subtitle <- paste0(\n \"Analyte:\\nPK Parameter: \",\n as.character(unique(adpp$PARAM)),\n \" (\",\n as.character(unique(adpp$AVALU)),\n \")\"\n)\nuse_footnote <- \"Program: \\nOutput:\"\n\nplot <- ggplot(adpp, aes(x = AVISIT, y = AVAL, fill = ACTARM)) +\n geom_boxplot(outlier.size = 2) +\n stat_boxplot(geom = \"errorbar\") +\n stat_summary(geom = \"point\", fun = \"mean\", col = \"black\", size = 5, shape = 8, position = position_dodge(0.75)) +\n geom_text(\n data = . %>% dplyr::group_by(AVISIT, ACTARM) %>% dplyr::filter(AVAL %in% boxplot.stats(AVAL)$out),\n aes(x = AVISIT, y = AVAL, label = SUBJID, color = ACTARM),\n size = 3, hjust = -0.2, position = position_dodge(0.75)\n ) +\n labs(\n title = use_title,\n subtitle = use_subtitle,\n caption = use_footnote,\n x = \"Visit\",\n y = paste0(as.character(unique(adpp$PARAM)), \" (\", as.character(unique(adpp$AVALU)), \")\")\n ) +\n theme(plot.caption = element_text(hjust = 0)) +\n theme_nest()\n\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 18:00:51 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 \n[4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 \n[7] magrittr_2.0.3 formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] R6_2.5.1 labeling_0.4.3 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 broom_1.0.5 xfun_0.43 \n[29] cli_3.6.2 withr_3.0.0 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 farver_2.1.1 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Pharmacokinetic", @@ -115,7 +115,7 @@ "href": "graphs/efficacy/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 App\nReproducibility\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\n\n\nCodedf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"is_rsp\",\n arm = \"ARM\",\n subgroups = c(\"SEX\", \"BMRKR2\"),\n strata = \"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\nplot <- g_forest(tbl = result)\nplot\n\n\n\n\n\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 = \"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\nplot <- g_forest(tbl = result)\nplot\n\n\n\n\n\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 = \"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\nplot <- g_forest(tbl = result)\nplot\n\n\n\n\n\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 = \"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\nplot <- g_forest(\n tbl = result,\n col_symbol_size = NULL\n)\nplot\n\n\n\n\n\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 = \"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\nplot <- g_forest(tbl = result)\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n})\ndatanames <- c(\"ADSL\", \"ADRS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\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\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADRS <- data[[\"ADRS\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:59:16 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 nestcolor_0.1.2.9009 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] systemfonts_1.0.6 callr_3.7.6 vctrs_0.6.5 \n[13] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[16] fontawesome_0.5.2 labeling_0.4.3 utf8_1.2.4 \n[19] promises_1.3.0 rmarkdown_2.26 ps_1.7.6 \n[22] ragg_1.3.0 purrr_1.0.2 xfun_0.43 \n[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002\n[28] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[31] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[34] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[37] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[40] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[43] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[46] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[49] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[52] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[55] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[58] checkmate_2.3.1 shinyjs_2.1.0 generics_0.1.3 \n[61] chromote_0.2.0 ggplot2_3.5.0 munsell_0.5.1 \n[64] scales_1.3.0 xtable_1.8-4 glue_1.7.0 \n[67] emmeans_1.10.0 tools_4.3.3 webshot2_0.1.1 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-4 \n[73] cowplot_1.1.3 grid_4.3.3 tidyr_1.3.1 \n[76] rbibutils_2.2.16 colorspace_2.1-0 nlme_3.1-164 \n[79] cli_3.6.2 textshaping_0.3.7 fansi_1.0.6 \n[82] geepack_1.3.10 gtable_0.3.4 sass_0.4.9 \n[85] digest_0.6.35 TH.data_1.1-2 htmlwidgets_1.6.4 \n[88] farver_2.1.1 memoise_2.0.1 htmltools_0.5.8.1 \n[91] lifecycle_1.0.4 shinyWidgets_0.8.4 mime_0.12 \n[94] MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\n\n\nCodedf <- extract_rsp_subgroups(\n variables = list(\n rsp = \"is_rsp\",\n arm = \"ARM\",\n subgroups = c(\"SEX\", \"BMRKR2\"),\n strata = \"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\nplot <- g_forest(tbl = result)\nplot\n\n\n\n\n\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 = \"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\nplot <- g_forest(tbl = result)\nplot\n\n\n\n\n\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 = \"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\nplot <- g_forest(tbl = result)\nplot\n\n\n\n\n\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 = \"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\nplot <- g_forest(\n tbl = result,\n col_symbol_size = NULL\n)\nplot\n\n\n\n\n\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 = \"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\nplot <- g_forest(tbl = result)\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n})\ndatanames <- c(\"ADSL\", \"ADRS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\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\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADRS <- data[[\"ADRS\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 18:00:37 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 nestcolor_0.1.2.9009 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] systemfonts_1.0.6 callr_3.7.6 vctrs_0.6.5 \n[13] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[16] fontawesome_0.5.2 labeling_0.4.3 utf8_1.2.4 \n[19] promises_1.3.0 rmarkdown_2.26 ps_1.7.6 \n[22] ragg_1.3.0 purrr_1.0.2 xfun_0.43 \n[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003\n[28] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[31] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[34] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[37] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[40] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[43] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[46] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[49] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[52] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[55] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[58] checkmate_2.3.1 shinyjs_2.1.0 generics_0.1.3 \n[61] chromote_0.2.0 ggplot2_3.5.0 munsell_0.5.1 \n[64] scales_1.3.0 xtable_1.8-4 glue_1.7.0 \n[67] emmeans_1.10.0 tools_4.3.3 webshot2_0.1.1 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-4 \n[73] cowplot_1.1.3 grid_4.3.3 tidyr_1.3.1 \n[76] rbibutils_2.2.16 colorspace_2.1-0 nlme_3.1-164 \n[79] cli_3.6.2 textshaping_0.3.7 fansi_1.0.6 \n[82] geepack_1.3.10 gtable_0.3.4 sass_0.4.9 \n[85] digest_0.6.35 TH.data_1.1-2 htmlwidgets_1.6.4 \n[88] farver_2.1.1 memoise_2.0.1 htmltools_0.5.8.1 \n[91] lifecycle_1.0.4 shinyWidgets_0.8.4 mime_0.12 \n[94] MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Efficacy", @@ -127,7 +127,7 @@ "href": "graphs/efficacy/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 App\nReproducibility\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\n\nCodeplot <- g_mmrm_lsmeans(\n mmrm_results,\n select = \"estimates\",\n xlab = \"Visit\"\n)\nplot\n\n\n\n\n\n\n\nConsidering the treatment variable in the model, with lines\n\n\nCodeplot <- g_mmrm_lsmeans(\n mmrm_results,\n select = \"estimates\",\n xlab = \"Visit\",\n show_lines = TRUE\n)\nplot\n\n\n\n\n\n\n\nConsidering the treatment variable in the model, with statistics table\n\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\n\n\n\nUsers can choose to display both estimates and contrasts together by running g_mmrm_lsmeans(mmrm_results).\n\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\n\n\n\nCodeplot <- g_mmrm_diagnostic(mmrm_results)\nplot\n\n\n\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\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADQS <- synthetic_cdisc_dataset(\"latest\", \"adqs\") %>%\n filter(ABLFL != \"Y\" & ABLFL2 != \"Y\") %>%\n filter(AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\")) %>%\n 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})\ndatanames <- c(\"ADSL\", \"ADQS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\narm_ref_comp <- list(\n ARMCD = list(\n ref = \"ARM A\",\n comp = c(\"ARM B\", \"ARM C\")\n )\n)\n\n## Reusable Configuration For Modules\nADQS <- data[[\"ADQS\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:58:19 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 nestcolor_0.1.2.9009 \n [9] scda_0.1.6.9017 tern.mmrm_0.3.0.9005 \n[11] tern_0.9.3.9031 rtables_0.6.6.9011 \n[13] magrittr_2.0.3 formatters_0.5.5.9020 \n[15] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 mmrm_0.3.11 formatR_1.14 \n [4] tern.gee_0.1.3.9004 logger_0.3.0 testthat_3.2.1 \n [7] sandwich_3.1-0 rlang_1.1.3 multcomp_1.4-25 \n[10] compiler_4.3.3 callr_3.7.6 vctrs_0.6.5 \n[13] stringr_1.5.1 pkgconfig_2.0.3 fastmap_1.1.1 \n[16] backports_1.4.1 fontawesome_0.5.2 labeling_0.4.3 \n[19] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 \n[22] ps_1.7.6 purrr_1.0.2 xfun_0.43 \n[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002\n[28] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[31] parallel_4.3.3 R6_2.5.1 bslib_0.7.0 \n[34] stringi_1.8.3 parallelly_1.37.1 brio_1.1.4 \n[37] jquerylib_0.1.4 estimability_1.5 Rcpp_1.0.12 \n[40] knitr_1.45 zoo_1.8-12 teal.logger_0.2.0.9001 \n[43] httpuv_1.6.15 Matrix_1.6-5 splines_4.3.3 \n[46] tidyselect_1.2.1 yaml_2.3.8 TMB_1.9.11 \n[49] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[52] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[55] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[58] survival_3.5-8 shinycssloaders_1.0.0 pillar_1.9.0 \n[61] checkmate_2.3.1 shinyjs_2.1.0 generics_0.1.3 \n[64] chromote_0.2.0 ggplot2_3.5.0 munsell_0.5.1 \n[67] scales_1.3.0 xtable_1.8-4 glue_1.7.0 \n[70] emmeans_1.10.0 tools_4.3.3 webshot2_0.1.1 \n[73] webshot_0.5.5 mvtnorm_1.2-4 cowplot_1.1.3 \n[76] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[79] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[82] fansi_1.0.6 geepack_1.3.10 gtable_0.3.4 \n[85] sass_0.4.9 digest_0.6.35 TH.data_1.1-2 \n[88] htmlwidgets_1.6.4 farver_2.1.1 memoise_2.0.1 \n[91] htmltools_0.5.8.1 lifecycle_1.0.4 shinyWidgets_0.8.4 \n[94] mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\n\nCodeplot <- g_mmrm_lsmeans(\n mmrm_results,\n select = \"estimates\",\n xlab = \"Visit\"\n)\nplot\n\n\n\n\n\n\n\nConsidering the treatment variable in the model, with lines\n\n\nCodeplot <- g_mmrm_lsmeans(\n mmrm_results,\n select = \"estimates\",\n xlab = \"Visit\",\n show_lines = TRUE\n)\nplot\n\n\n\n\n\n\n\nConsidering the treatment variable in the model, with statistics table\n\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\n\n\n\nUsers can choose to display both estimates and contrasts together by running g_mmrm_lsmeans(mmrm_results).\n\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\n\n\n\nCodeplot <- g_mmrm_diagnostic(mmrm_results)\nplot\n\n\n\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\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADQS <- synthetic_cdisc_dataset(\"latest\", \"adqs\") %>%\n filter(ABLFL != \"Y\" & ABLFL2 != \"Y\") %>%\n filter(AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\")) %>%\n 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})\ndatanames <- c(\"ADSL\", \"ADQS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\narm_ref_comp <- list(\n ARMCD = list(\n ref = \"ARM A\",\n comp = c(\"ARM B\", \"ARM C\")\n )\n)\n\n## Reusable Configuration For Modules\nADQS <- data[[\"ADQS\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:59:39 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 nestcolor_0.1.2.9009 \n [9] scda_0.1.6.9017 tern.mmrm_0.3.0.9005 \n[11] tern_0.9.3.9031 rtables_0.6.6.9011 \n[13] magrittr_2.0.3 formatters_0.5.5.9021 \n[15] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 mmrm_0.3.11 formatR_1.14 \n [4] tern.gee_0.1.3.9005 logger_0.3.0 testthat_3.2.1 \n [7] sandwich_3.1-0 rlang_1.1.3 multcomp_1.4-25 \n[10] compiler_4.3.3 callr_3.7.6 vctrs_0.6.5 \n[13] stringr_1.5.1 pkgconfig_2.0.3 fastmap_1.1.1 \n[16] backports_1.4.1 fontawesome_0.5.2 labeling_0.4.3 \n[19] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 \n[22] ps_1.7.6 purrr_1.0.2 xfun_0.43 \n[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003\n[28] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[31] parallel_4.3.3 R6_2.5.1 bslib_0.7.0 \n[34] stringi_1.8.3 parallelly_1.37.1 brio_1.1.4 \n[37] jquerylib_0.1.4 estimability_1.5 Rcpp_1.0.12 \n[40] knitr_1.45 zoo_1.8-12 teal.logger_0.2.0.9001 \n[43] httpuv_1.6.15 Matrix_1.6-5 splines_4.3.3 \n[46] tidyselect_1.2.1 yaml_2.3.8 TMB_1.9.11 \n[49] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[52] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[55] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[58] survival_3.5-8 shinycssloaders_1.0.0 pillar_1.9.0 \n[61] checkmate_2.3.1 shinyjs_2.1.0 generics_0.1.3 \n[64] chromote_0.2.0 ggplot2_3.5.0 munsell_0.5.1 \n[67] scales_1.3.0 xtable_1.8-4 glue_1.7.0 \n[70] emmeans_1.10.0 tools_4.3.3 webshot2_0.1.1 \n[73] webshot_0.5.5 mvtnorm_1.2-4 cowplot_1.1.3 \n[76] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[79] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[82] fansi_1.0.6 geepack_1.3.10 gtable_0.3.4 \n[85] sass_0.4.9 digest_0.6.35 TH.data_1.1-2 \n[88] htmlwidgets_1.6.4 farver_2.1.1 memoise_2.0.1 \n[91] htmltools_0.5.8.1 lifecycle_1.0.4 shinyWidgets_0.8.4 \n[94] mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Efficacy", @@ -139,7 +139,7 @@ "href": "graphs/efficacy/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 App\nReproducibility\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\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\n B: Placebo A: Drug X \nBaseline Risk Factors 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.\nplot <- g_forest(tbl = result)\nplot\n\n\n\n\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\n Placebo Drug X \nBaseline Risk Factors 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\nCodeplot <- g_forest(tbl = result)\nplot\n\n\n\n\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\n \nBaseline Risk Factors 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.\nplot <- g_forest(tbl = result)\nplot\n\n\n\n\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\n B: Placebo A: Drug X \nBaseline Risk Factors 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.\nplot <- g_forest(\n tbl = result,\n col_symbol_size = NULL\n)\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n library(forcats)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- ADSL %>%\n filter(ARM %in% c(\"B: Placebo\", \"A: Drug X\")) %>%\n mutate(ARM = droplevels(fct_relevel(ARM, \"B: Placebo\"))) %>%\n mutate(ARMCD = droplevels(fct_relevel(ARMCD, \"ARM B\")))\n ADSL$RACE <- droplevels(ADSL$RACE)\n\n ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n adtte_labels <- col_labels(ADTTE)\n\n ADTTE <- ADTTE %>%\n filter(\n PARAMCD == \"OS\",\n ARM %in% c(\"B: Placebo\", \"A: Drug X\"),\n SEX %in% c(\"M\", \"F\")\n ) %>%\n mutate(\n # Reorder levels of ARM to display reference arm before treatment arm.\n ARM = droplevels(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 col_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})\ndatanames <- c(\"ADSL\", \"ADTTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADTTE <- data[[\"ADTTE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:57:24 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] nestcolor_0.1.2.9009 forcats_1.0.0 \n[11] dplyr_1.1.4 tern_0.9.3.9031 \n[13] rtables_0.6.6.9011 magrittr_2.0.3 \n[15] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] systemfonts_1.0.6 callr_3.7.6 vctrs_0.6.5 \n[13] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[16] fontawesome_0.5.2 labeling_0.4.3 utf8_1.2.4 \n[19] promises_1.3.0 rmarkdown_2.26 ps_1.7.6 \n[22] ragg_1.3.0 purrr_1.0.2 xfun_0.43 \n[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002\n[28] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[31] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[34] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[37] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[40] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[43] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[46] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[49] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[52] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[55] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[58] checkmate_2.3.1 shinyjs_2.1.0 generics_0.1.3 \n[61] chromote_0.2.0 ggplot2_3.5.0 munsell_0.5.1 \n[64] scales_1.3.0 xtable_1.8-4 glue_1.7.0 \n[67] emmeans_1.10.0 tools_4.3.3 webshot2_0.1.1 \n[70] webshot_0.5.5 mvtnorm_1.2-4 cowplot_1.1.3 \n[73] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[76] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[79] textshaping_0.3.7 fansi_1.0.6 geepack_1.3.10 \n[82] gtable_0.3.4 sass_0.4.9 digest_0.6.35 \n[85] TH.data_1.1-2 htmlwidgets_1.6.4 farver_2.1.1 \n[88] memoise_2.0.1 htmltools_0.5.8.1 lifecycle_1.0.4 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\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\n B: Placebo A: Drug X \nBaseline Risk Factors 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.\nplot <- g_forest(tbl = result)\nplot\n\n\n\n\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\n Placebo Drug X \nBaseline Risk Factors 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\nCodeplot <- g_forest(tbl = result)\nplot\n\n\n\n\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\n \nBaseline Risk Factors 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.\nplot <- g_forest(tbl = result)\nplot\n\n\n\n\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\n B: Placebo A: Drug X \nBaseline Risk Factors 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.\nplot <- g_forest(\n tbl = result,\n col_symbol_size = NULL\n)\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n library(forcats)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADSL <- ADSL %>%\n filter(ARM %in% c(\"B: Placebo\", \"A: Drug X\")) %>%\n mutate(ARM = droplevels(fct_relevel(ARM, \"B: Placebo\"))) %>%\n mutate(ARMCD = droplevels(fct_relevel(ARMCD, \"ARM B\")))\n ADSL$RACE <- droplevels(ADSL$RACE)\n\n ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n adtte_labels <- col_labels(ADTTE)\n\n ADTTE <- ADTTE %>%\n filter(\n PARAMCD == \"OS\",\n ARM %in% c(\"B: Placebo\", \"A: Drug X\"),\n SEX %in% c(\"M\", \"F\")\n ) %>%\n mutate(\n # Reorder levels of ARM to display reference arm before treatment arm.\n ARM = droplevels(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 col_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})\ndatanames <- c(\"ADSL\", \"ADTTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADTTE <- data[[\"ADTTE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:58:42 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] nestcolor_0.1.2.9009 forcats_1.0.0 \n[11] dplyr_1.1.4 tern_0.9.3.9031 \n[13] rtables_0.6.6.9011 magrittr_2.0.3 \n[15] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] systemfonts_1.0.6 callr_3.7.6 vctrs_0.6.5 \n[13] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[16] fontawesome_0.5.2 labeling_0.4.3 utf8_1.2.4 \n[19] promises_1.3.0 rmarkdown_2.26 ps_1.7.6 \n[22] ragg_1.3.0 purrr_1.0.2 xfun_0.43 \n[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003\n[28] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[31] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[34] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[37] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[40] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[43] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[46] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[49] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[52] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[55] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[58] checkmate_2.3.1 shinyjs_2.1.0 generics_0.1.3 \n[61] chromote_0.2.0 ggplot2_3.5.0 munsell_0.5.1 \n[64] scales_1.3.0 xtable_1.8-4 glue_1.7.0 \n[67] emmeans_1.10.0 tools_4.3.3 webshot2_0.1.1 \n[70] webshot_0.5.5 mvtnorm_1.2-4 cowplot_1.1.3 \n[73] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[76] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[79] textshaping_0.3.7 fansi_1.0.6 geepack_1.3.10 \n[82] gtable_0.3.4 sass_0.4.9 digest_0.6.35 \n[85] TH.data_1.1-2 htmlwidgets_1.6.4 farver_2.1.1 \n[88] memoise_2.0.1 htmltools_0.5.8.1 lifecycle_1.0.4 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Efficacy", @@ -151,7 +151,7 @@ "href": "graphs/other/ltg01.html", "title": "LTG01", "section": "", - "text": "Lattice plots are natively handled by R, the examples below rely mostly on the package ggplot2.\n\n\nData Setup\nPlot of Liver Function Tests\nPlot of Liver Function Tests Including Mean, Median, and 95% CIs\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(teal)\nlibrary(teal.modules.clinical)\nlibrary(ggplot2)\nlibrary(dplyr)\nlibrary(nestcolor)\n\n# Datasets\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% slice(1:8)\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>% filter(USUBJID %in% adsl$USUBJID)\n\n# Pre-processing\nadlb$AVISIT_txt <- adlb$AVISIT\nadlb$AVISIT <- as.numeric(adlb$AVISIT)\nadlb$ARM_N <- adlb$ARM\nlevels(adlb$ARM_N) <- with(\n data = adlb,\n paste0(\n levels(ARM_N), \" (N = \",\n tapply(SUBJID, ARM_N, function(x) length(unique(x))), \")\"\n )\n)\n\n# Plot utils\nnpch <- 1:25\nnpatients <- length(unique(adlb$SUBJID))\npch <- c(\n rep(npch, times = npatients %/% length(npch)),\n npch[1:(npatients %% length(npch))]\n)\n\n\n\n\nBasic Plot\n\n\nCode# General mapping and \"lattice\" (\"facet\" in ggplot2 nomenclature).\ng1 <- {\n ggplot(\n data = adlb,\n mapping = aes(x = AVISIT, y = AVAL, colour = SUBJID, shape = SUBJID)\n ) +\n facet_grid(LBTESTCD ~ ARM, scales = \"free_y\") +\n scale_shape_manual(values = pch)\n}\n\n# Add points and lines.\ng1 <- g1 + geom_point()\ng1 <- g1 + geom_line()\nplot <- g1\nplot\n\n\n\n\n\n\n\nModifying Facets\nThe units describing rows of panes and the number of patients under each arm is specified by modifying facet_grid():\n\n\nCode# Include the units and the sample size N.\ng2 <- g1 + facet_grid(\n paste0(LBTESTCD, \"\\n(\", AVALU, \")\") ~ ARM_N,\n scales = \"free_y\"\n)\n\nplot <- g2\nplot\n\n\n\n\n\n\n\nModifying X-Axis\nThe graphic elements are modified through usual ggplot2 functions. For instance, the x-axis could be improved as follows:\n\n\nCodeg3 <- g2 + theme(\n axis.text.x = element_text(angle = 45, hjust = 1),\n axis.title = element_blank()\n) + scale_x_continuous(breaks = adlb$AVISIT, labels = adlb$AVISIT_txt)\n\nplot <- g3\nplot\n\n\n\n\n\n\n\n\n\n\nThe functions stat_mean_ci and stat_median_ci from the tern package allow the addition of mean and/or median confidence intervals. The example below suggests a larger dataset, where the individual subject legend may not be relevant but the mean or the median are of special interest.\nPre-Processing\n\nCode# Datasets\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% slice(1:40)\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>% filter(USUBJID %in% adsl$USUBJID)\n\n# Pre-processing\nadlb$AVISIT_txt <- adlb$AVISIT\nadlb$AVISIT <- as.numeric(adlb$AVISIT)\nadlb$ARM_N <- adlb$ARM\nlevels(adlb$ARM_N) <- with(\n data = adlb,\n paste0(\n levels(ARM_N), \" (N = \",\n tapply(SUBJID, ARM_N, function(x) length(unique(x))), \")\"\n )\n)\n\n# Plot utils\nnpch <- 1:25\nnpatients <- length(unique(adlb$SUBJID))\npch <- c(\n rep(npch, times = npatients %/% length(npch)),\n npch[1:(npatients %% length(npch))]\n)\n\n\nBasic Plot\n\nCode# General mapping and \"lattice\" (\"facet\" in ggplot2 nomenclature)\ng4 <- {\n ggplot(\n data = adlb,\n mapping = aes(x = AVISIT, y = AVAL, colour = SUBJID, shape = SUBJID)\n ) +\n facet_grid(LBTESTCD ~ ARM_N, scales = \"free_y\") +\n scale_shape_manual(values = pch) +\n scale_color_manual(values = rep(getOption(\"ggplot2.discrete.colour\"), 2))\n}\n\n# Add points and lines.\n# Note that with so many patients, legend might not be useful and transparency\n# is advisable.\ng4 <- g4 + geom_point(alpha = .3)\ng4 <- g4 + geom_line(alpha = .3)\ng4 <- g4 + guides(colour = \"none\", shape = \"none\")\ng4 <- g4 + theme(\n axis.text.x = element_text(angle = 45, hjust = 1),\n axis.title = element_blank()\n)\ng4 <- g4 + scale_x_continuous(breaks = adlb$AVISIT, labels = adlb$AVISIT_txt)\nplot <- g4\nplot\n\n\n\n\n\n\n\nAdding Mean\n\n\nCode# Add the mean along with the 95% CI at every visit.\ng51 <- g4 + stat_summary(\n fun = mean, linewidth = 1, geom = \"line\",\n aes(group = 1, linetype = \"Mean +/- 95% CI\")\n)\ng51 <- g51 + stat_summary(\n fun.data = tern::stat_mean_ci, geom = \"errorbar\",\n aes(group = 1, linetype = \"Mean +/- 95% CI\")\n)\nplot <- g51 + guides(linetype = guide_legend(title = NULL))\nplot\n\n\n\n\n\n\n\nAdding Median\n\n\nCode# Instead of a mean, the median could be more relevant.\ng52 <- g51 + stat_summary(\n fun = median, linewidth = 1, geom = \"line\",\n aes(group = 1, linetype = \"Median +/- 95% CI\")\n)\ng52 <- g52 + stat_summary(\n fun.data = tern::stat_median_ci, geom = \"errorbar\",\n aes(group = 1, linetype = \"Median +/- 95% CI\")\n)\nplot <- g52 + guides(linetype = guide_legend(title = \"Aggregate\"))\nplot\n\n\n\n\n\n\n\nChanging Confidence Level\n\n\nCode# Change the confidence level of interval for the median.\n# Note: check `?stat_mean_ci()` and `?stat_median_ci()` for further fine tuning.\ng53 <- g4 + stat_summary(\n fun = median, linewidth = 1, geom = \"line\",\n aes(group = 1, linetype = \"Median +/- 80% CI\")\n)\ng53 <- g53 + stat_summary(\n fun.data = function(x) tern::stat_median_ci(x, conf_level = 0.8),\n geom = \"errorbar\", aes(group = 1, linetype = \"Median +/- 80% CI\")\n)\nplot <- g53 + guides(linetype = guide_legend(title = NULL))\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:56:42 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 dplyr_1.1.4 \n [3] ggplot2_3.5.0 teal.modules.clinical_0.9.0.9014\n [5] teal.transform_0.5.0.9004 teal_0.15.2.9020 \n [7] teal.slice_0.5.0.9009 teal.data_0.5.0.9006 \n [9] teal.code_0.5.0.9004 shiny_1.8.1.1 \n[11] tern_0.9.3.9031 rtables_0.6.6.9011 \n[13] magrittr_2.0.3 formatters_0.5.5.9020 \n[15] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] gtable_0.3.4 xfun_0.43 htmlwidgets_1.6.4 \n [4] lattice_0.22-6 vctrs_0.6.5 tools_4.3.3 \n [7] Rdpack_2.6 generics_0.1.3 sandwich_3.1-0 \n[10] tibble_3.2.1 fansi_1.0.6 pkgconfig_2.0.3 \n[13] Matrix_1.6-5 checkmate_2.3.1 lifecycle_1.0.4 \n[16] farver_2.1.1 compiler_4.3.3 brio_1.1.4 \n[19] munsell_0.5.1 codetools_0.2-20 httpuv_1.6.15 \n[22] htmltools_0.5.8.1 yaml_2.3.8 later_1.3.2 \n[25] pillar_1.9.0 tidyr_1.3.1 MASS_7.3-60.0.1 \n[28] tern.gee_0.1.3.9004 multcomp_1.4-25 nlme_3.1-164 \n[31] mime_0.12 tidyselect_1.2.1 digest_0.6.35 \n[34] mvtnorm_1.2-4 purrr_1.0.2 labeling_0.4.3 \n[37] geepack_1.3.10 splines_4.3.3 fastmap_1.1.1 \n[40] grid_4.3.3 colorspace_2.1-0 cli_3.6.2 \n[43] logger_0.3.0 survival_3.5-8 utf8_1.2.4 \n[46] TH.data_1.1-2 broom_1.0.5 withr_3.0.0 \n[49] scales_1.3.0 promises_1.3.0 backports_1.4.1 \n[52] estimability_1.5 rmarkdown_2.26 emmeans_1.10.0 \n[55] zoo_1.8-12 coda_0.19-4.1 evaluate_0.23 \n[58] knitr_1.45 rbibutils_2.2.16 testthat_3.2.1 \n[61] rlang_1.1.3 Rcpp_1.0.12 xtable_1.8-4 \n[64] glue_1.7.0 jsonlite_1.8.8 teal.logger_0.2.0.9001\n[67] R6_2.5.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Lattice plots are natively handled by R, the examples below rely mostly on the package ggplot2.\n\n\nData Setup\nPlot of Liver Function Tests\nPlot of Liver Function Tests Including Mean, Median, and 95% CIs\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(teal)\nlibrary(teal.modules.clinical)\nlibrary(ggplot2)\nlibrary(dplyr)\nlibrary(nestcolor)\n\n# Datasets\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% slice(1:8)\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>% filter(USUBJID %in% adsl$USUBJID)\n\n# Pre-processing\nadlb$AVISIT_txt <- adlb$AVISIT\nadlb$AVISIT <- as.numeric(adlb$AVISIT)\nadlb$ARM_N <- adlb$ARM\nlevels(adlb$ARM_N) <- with(\n data = adlb,\n paste0(\n levels(ARM_N), \" (N = \",\n tapply(SUBJID, ARM_N, function(x) length(unique(x))), \")\"\n )\n)\n\n# Plot utils\nnpch <- 1:25\nnpatients <- length(unique(adlb$SUBJID))\npch <- c(\n rep(npch, times = npatients %/% length(npch)),\n npch[1:(npatients %% length(npch))]\n)\n\n\n\n\nBasic Plot\n\n\nCode# General mapping and \"lattice\" (\"facet\" in ggplot2 nomenclature).\ng1 <- {\n ggplot(\n data = adlb,\n mapping = aes(x = AVISIT, y = AVAL, colour = SUBJID, shape = SUBJID)\n ) +\n facet_grid(LBTESTCD ~ ARM, scales = \"free_y\") +\n scale_shape_manual(values = pch)\n}\n\n# Add points and lines.\ng1 <- g1 + geom_point()\ng1 <- g1 + geom_line()\nplot <- g1\nplot\n\n\n\n\n\n\n\nModifying Facets\nThe units describing rows of panes and the number of patients under each arm is specified by modifying facet_grid():\n\n\nCode# Include the units and the sample size N.\ng2 <- g1 + facet_grid(\n paste0(LBTESTCD, \"\\n(\", AVALU, \")\") ~ ARM_N,\n scales = \"free_y\"\n)\n\nplot <- g2\nplot\n\n\n\n\n\n\n\nModifying X-Axis\nThe graphic elements are modified through usual ggplot2 functions. For instance, the x-axis could be improved as follows:\n\n\nCodeg3 <- g2 + theme(\n axis.text.x = element_text(angle = 45, hjust = 1),\n axis.title = element_blank()\n) + scale_x_continuous(breaks = adlb$AVISIT, labels = adlb$AVISIT_txt)\n\nplot <- g3\nplot\n\n\n\n\n\n\n\n\n\n\nThe functions stat_mean_ci and stat_median_ci from the tern package allow the addition of mean and/or median confidence intervals. The example below suggests a larger dataset, where the individual subject legend may not be relevant but the mean or the median are of special interest.\nPre-Processing\n\nCode# Datasets\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% slice(1:40)\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>% filter(USUBJID %in% adsl$USUBJID)\n\n# Pre-processing\nadlb$AVISIT_txt <- adlb$AVISIT\nadlb$AVISIT <- as.numeric(adlb$AVISIT)\nadlb$ARM_N <- adlb$ARM\nlevels(adlb$ARM_N) <- with(\n data = adlb,\n paste0(\n levels(ARM_N), \" (N = \",\n tapply(SUBJID, ARM_N, function(x) length(unique(x))), \")\"\n )\n)\n\n# Plot utils\nnpch <- 1:25\nnpatients <- length(unique(adlb$SUBJID))\npch <- c(\n rep(npch, times = npatients %/% length(npch)),\n npch[1:(npatients %% length(npch))]\n)\n\n\nBasic Plot\n\nCode# General mapping and \"lattice\" (\"facet\" in ggplot2 nomenclature)\ng4 <- {\n ggplot(\n data = adlb,\n mapping = aes(x = AVISIT, y = AVAL, colour = SUBJID, shape = SUBJID)\n ) +\n facet_grid(LBTESTCD ~ ARM_N, scales = \"free_y\") +\n scale_shape_manual(values = pch) +\n scale_color_manual(values = rep(getOption(\"ggplot2.discrete.colour\"), 2))\n}\n\n# Add points and lines.\n# Note that with so many patients, legend might not be useful and transparency\n# is advisable.\ng4 <- g4 + geom_point(alpha = .3)\ng4 <- g4 + geom_line(alpha = .3)\ng4 <- g4 + guides(colour = \"none\", shape = \"none\")\ng4 <- g4 + theme(\n axis.text.x = element_text(angle = 45, hjust = 1),\n axis.title = element_blank()\n)\ng4 <- g4 + scale_x_continuous(breaks = adlb$AVISIT, labels = adlb$AVISIT_txt)\nplot <- g4\nplot\n\n\n\n\n\n\n\nAdding Mean\n\n\nCode# Add the mean along with the 95% CI at every visit.\ng51 <- g4 + stat_summary(\n fun = mean, linewidth = 1, geom = \"line\",\n aes(group = 1, linetype = \"Mean +/- 95% CI\")\n)\ng51 <- g51 + stat_summary(\n fun.data = tern::stat_mean_ci, geom = \"errorbar\",\n aes(group = 1, linetype = \"Mean +/- 95% CI\")\n)\nplot <- g51 + guides(linetype = guide_legend(title = NULL))\nplot\n\n\n\n\n\n\n\nAdding Median\n\n\nCode# Instead of a mean, the median could be more relevant.\ng52 <- g51 + stat_summary(\n fun = median, linewidth = 1, geom = \"line\",\n aes(group = 1, linetype = \"Median +/- 95% CI\")\n)\ng52 <- g52 + stat_summary(\n fun.data = tern::stat_median_ci, geom = \"errorbar\",\n aes(group = 1, linetype = \"Median +/- 95% CI\")\n)\nplot <- g52 + guides(linetype = guide_legend(title = \"Aggregate\"))\nplot\n\n\n\n\n\n\n\nChanging Confidence Level\n\n\nCode# Change the confidence level of interval for the median.\n# Note: check `?stat_mean_ci()` and `?stat_median_ci()` for further fine tuning.\ng53 <- g4 + stat_summary(\n fun = median, linewidth = 1, geom = \"line\",\n aes(group = 1, linetype = \"Median +/- 80% CI\")\n)\ng53 <- g53 + stat_summary(\n fun.data = function(x) tern::stat_median_ci(x, conf_level = 0.8),\n geom = \"errorbar\", aes(group = 1, linetype = \"Median +/- 80% CI\")\n)\nplot <- g53 + guides(linetype = guide_legend(title = NULL))\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:57:59 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 dplyr_1.1.4 \n [3] ggplot2_3.5.0 teal.modules.clinical_0.9.0.9016\n [5] teal.transform_0.5.0.9004 teal_0.15.2.9022 \n [7] teal.slice_0.5.0.9010 teal.data_0.5.0.9007 \n [9] teal.code_0.5.0.9004 shiny_1.8.1.1 \n[11] tern_0.9.3.9031 rtables_0.6.6.9011 \n[13] magrittr_2.0.3 formatters_0.5.5.9021 \n[15] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] gtable_0.3.4 xfun_0.43 htmlwidgets_1.6.4 \n [4] lattice_0.22-6 vctrs_0.6.5 tools_4.3.3 \n [7] Rdpack_2.6 generics_0.1.3 sandwich_3.1-0 \n[10] tibble_3.2.1 fansi_1.0.6 pkgconfig_2.0.3 \n[13] Matrix_1.6-5 checkmate_2.3.1 lifecycle_1.0.4 \n[16] farver_2.1.1 compiler_4.3.3 brio_1.1.4 \n[19] munsell_0.5.1 codetools_0.2-20 httpuv_1.6.15 \n[22] htmltools_0.5.8.1 yaml_2.3.8 later_1.3.2 \n[25] pillar_1.9.0 tidyr_1.3.1 MASS_7.3-60.0.1 \n[28] tern.gee_0.1.3.9005 multcomp_1.4-25 nlme_3.1-164 \n[31] mime_0.12 tidyselect_1.2.1 digest_0.6.35 \n[34] mvtnorm_1.2-4 purrr_1.0.2 labeling_0.4.3 \n[37] geepack_1.3.10 splines_4.3.3 fastmap_1.1.1 \n[40] grid_4.3.3 colorspace_2.1-0 cli_3.6.2 \n[43] logger_0.3.0 survival_3.5-8 utf8_1.2.4 \n[46] TH.data_1.1-2 broom_1.0.5 withr_3.0.0 \n[49] scales_1.3.0 promises_1.3.0 backports_1.4.1 \n[52] estimability_1.5 rmarkdown_2.26 emmeans_1.10.0 \n[55] zoo_1.8-12 coda_0.19-4.1 evaluate_0.23 \n[58] knitr_1.45 rbibutils_2.2.16 testthat_3.2.1 \n[61] rlang_1.1.3 Rcpp_1.0.12 xtable_1.8-4 \n[64] glue_1.7.0 jsonlite_1.8.8 teal.logger_0.2.0.9001\n[67] R6_2.5.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Other", @@ -163,7 +163,7 @@ "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 App\nReproducibility\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\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\n\n\n[[2]]\n\n\n\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\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\n\n\n[[2]]\n\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(tern)\n library(scda)\n library(dplyr)\n\n # use small sample size\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% slice(1:15)\n ADLB <- 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.\n ADSL <- df_explicit_na(ADSL)\n ADLB <- df_explicit_na(ADLB) %>%\n filter(AVISIT != \"SCREENING\")\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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 baseline_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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:56:19 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 nestcolor_0.1.2.9009 \n [9] ggplot2_3.5.0 dplyr_1.1.4 \n[11] scda_0.1.6.9017 tern_0.9.3.9031 \n[13] rtables_0.6.6.9011 magrittr_2.0.3 \n[15] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 farver_2.1.1 fastmap_1.1.1 \n [4] TH.data_1.1-2 webshot2_0.1.1 shinyjs_2.1.0 \n [7] promises_1.3.0 digest_0.6.35 estimability_1.5 \n[10] mime_0.12 tern.gee_0.1.3.9004 lifecycle_1.0.4 \n[13] survival_3.5-8 processx_3.8.4 compiler_4.3.3 \n[16] sass_0.4.9 rlang_1.1.3 tools_4.3.3 \n[19] utf8_1.2.4 yaml_2.3.8 knitr_1.45 \n[22] labeling_0.4.3 htmlwidgets_1.6.4 websocket_1.4.1 \n[25] multcomp_1.4-25 withr_3.0.0 purrr_1.0.2 \n[28] shinyWidgets_0.8.4 geepack_1.3.10 grid_4.3.3 \n[31] fansi_1.0.6 teal.logger_0.2.0.9001 xtable_1.8-4 \n[34] colorspace_2.1-0 emmeans_1.10.0 scales_1.3.0 \n[37] MASS_7.3-60.0.1 cli_3.6.2 mvtnorm_1.2-4 \n[40] rmarkdown_2.26 ragg_1.3.0 generics_0.1.3 \n[43] cachem_1.0.8 chromote_0.2.0 splines_4.3.3 \n[46] formatR_1.14 vctrs_0.6.5 webshot_0.5.5 \n[49] Matrix_1.6-5 sandwich_3.1-0 jsonlite_1.8.8 \n[52] callr_3.7.6 systemfonts_1.0.6 teal.widgets_0.4.2.9009 \n[55] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[58] tidyr_1.3.1 glue_1.7.0 ps_1.7.6 \n[61] codetools_0.2-20 gtable_0.3.4 later_1.3.2 \n[64] shinycssloaders_1.0.0 munsell_0.5.1 tibble_3.2.1 \n[67] logger_0.3.0 pillar_1.9.0 htmltools_0.5.8.1 \n[70] brio_1.1.4 R6_2.5.1 textshaping_0.3.7 \n[73] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[76] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[79] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[82] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[85] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[88] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[91] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\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\n\n\n[[2]]\n\n\n\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\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\n\n\n[[2]]\n\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(tern)\n library(scda)\n library(dplyr)\n\n # use small sample size\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>% slice(1:15)\n ADLB <- 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.\n ADSL <- df_explicit_na(ADSL)\n ADLB <- df_explicit_na(ADLB) %>%\n filter(AVISIT != \"SCREENING\")\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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 baseline_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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:57:35 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 nestcolor_0.1.2.9009 \n [9] ggplot2_3.5.0 dplyr_1.1.4 \n[11] scda_0.1.6.9017 tern_0.9.3.9031 \n[13] rtables_0.6.6.9011 magrittr_2.0.3 \n[15] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 farver_2.1.1 fastmap_1.1.1 \n [4] TH.data_1.1-2 webshot2_0.1.1 shinyjs_2.1.0 \n [7] promises_1.3.0 digest_0.6.35 estimability_1.5 \n[10] mime_0.12 tern.gee_0.1.3.9005 lifecycle_1.0.4 \n[13] survival_3.5-8 processx_3.8.4 compiler_4.3.3 \n[16] sass_0.4.9 rlang_1.1.3 tools_4.3.3 \n[19] utf8_1.2.4 yaml_2.3.8 knitr_1.45 \n[22] labeling_0.4.3 htmlwidgets_1.6.4 websocket_1.4.1 \n[25] multcomp_1.4-25 withr_3.0.0 purrr_1.0.2 \n[28] shinyWidgets_0.8.4 geepack_1.3.10 grid_4.3.3 \n[31] fansi_1.0.6 teal.logger_0.2.0.9001 xtable_1.8-4 \n[34] colorspace_2.1-0 emmeans_1.10.0 scales_1.3.0 \n[37] MASS_7.3-60.0.1 cli_3.6.2 mvtnorm_1.2-4 \n[40] rmarkdown_2.26 ragg_1.3.0 generics_0.1.3 \n[43] cachem_1.0.8 chromote_0.2.0 splines_4.3.3 \n[46] formatR_1.14 vctrs_0.6.5 webshot_0.5.5 \n[49] Matrix_1.6-5 sandwich_3.1-0 jsonlite_1.8.8 \n[52] callr_3.7.6 systemfonts_1.0.6 teal.widgets_0.4.2.9009 \n[55] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[58] tidyr_1.3.1 glue_1.7.0 ps_1.7.6 \n[61] codetools_0.2-20 gtable_0.3.4 later_1.3.2 \n[64] shinycssloaders_1.0.0 munsell_0.5.1 tibble_3.2.1 \n[67] logger_0.3.0 pillar_1.9.0 htmltools_0.5.8.1 \n[70] brio_1.1.4 R6_2.5.1 textshaping_0.3.7 \n[73] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[76] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[79] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[82] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[85] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[88] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[91] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Other", @@ -175,7 +175,7 @@ "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 App\nReproducibility\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\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\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\n\n\n\nThe function stat_median_ci from the tern package works similarly to stat_mean_ci.\n\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 )\nplot\n\n\n\n\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\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 )\nplot\n\n\n\n\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 analyze_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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:55:42 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 nestcolor_0.1.2.9009 \n [9] scda_0.1.6.9017 dplyr_1.1.4 \n[11] ggplot2_3.5.0 tern_0.9.3.9031 \n[13] rtables_0.6.6.9011 magrittr_2.0.3 \n[15] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 farver_2.1.1 fastmap_1.1.1 \n [4] TH.data_1.1-2 webshot2_0.1.1 shinyjs_2.1.0 \n [7] promises_1.3.0 digest_0.6.35 estimability_1.5 \n[10] mime_0.12 tern.gee_0.1.3.9004 lifecycle_1.0.4 \n[13] survival_3.5-8 processx_3.8.4 compiler_4.3.3 \n[16] sass_0.4.9 rlang_1.1.3 tools_4.3.3 \n[19] utf8_1.2.4 yaml_2.3.8 knitr_1.45 \n[22] labeling_0.4.3 htmlwidgets_1.6.4 websocket_1.4.1 \n[25] multcomp_1.4-25 withr_3.0.0 purrr_1.0.2 \n[28] shinyWidgets_0.8.4 geepack_1.3.10 grid_4.3.3 \n[31] fansi_1.0.6 teal.logger_0.2.0.9001 xtable_1.8-4 \n[34] colorspace_2.1-0 emmeans_1.10.0 scales_1.3.0 \n[37] MASS_7.3-60.0.1 cli_3.6.2 mvtnorm_1.2-4 \n[40] rmarkdown_2.26 ragg_1.3.0 generics_0.1.3 \n[43] cachem_1.0.8 chromote_0.2.0 splines_4.3.3 \n[46] formatR_1.14 vctrs_0.6.5 webshot_0.5.5 \n[49] Matrix_1.6-5 sandwich_3.1-0 jsonlite_1.8.8 \n[52] callr_3.7.6 systemfonts_1.0.6 teal.widgets_0.4.2.9009 \n[55] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[58] tidyr_1.3.1 glue_1.7.0 ps_1.7.6 \n[61] codetools_0.2-20 stringi_1.8.3 gtable_0.3.4 \n[64] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[67] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[70] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[73] textshaping_0.3.7 Rdpack_2.6 evaluate_0.23 \n[76] lattice_0.22-6 rbibutils_2.2.16 backports_1.4.1 \n[79] memoise_2.0.1 broom_1.0.5 teal.reporter_0.3.1.9002\n[82] bslib_0.7.0 httpuv_1.6.15 Rcpp_1.0.12 \n[85] shinyvalidate_0.1.3 coda_0.19-4.1 nlme_3.1-164 \n[88] checkmate_2.3.1 xfun_0.43 zoo_1.8-12 \n[91] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\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\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\n\n\n\nThe function stat_median_ci from the tern package works similarly to stat_mean_ci.\n\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 )\nplot\n\n\n\n\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\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 )\nplot\n\n\n\n\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 analyze_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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:56:57 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 nestcolor_0.1.2.9009 \n [9] scda_0.1.6.9017 dplyr_1.1.4 \n[11] ggplot2_3.5.0 tern_0.9.3.9031 \n[13] rtables_0.6.6.9011 magrittr_2.0.3 \n[15] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 farver_2.1.1 fastmap_1.1.1 \n [4] TH.data_1.1-2 webshot2_0.1.1 shinyjs_2.1.0 \n [7] promises_1.3.0 digest_0.6.35 estimability_1.5 \n[10] mime_0.12 tern.gee_0.1.3.9005 lifecycle_1.0.4 \n[13] survival_3.5-8 processx_3.8.4 compiler_4.3.3 \n[16] sass_0.4.9 rlang_1.1.3 tools_4.3.3 \n[19] utf8_1.2.4 yaml_2.3.8 knitr_1.45 \n[22] labeling_0.4.3 htmlwidgets_1.6.4 websocket_1.4.1 \n[25] multcomp_1.4-25 withr_3.0.0 purrr_1.0.2 \n[28] shinyWidgets_0.8.4 geepack_1.3.10 grid_4.3.3 \n[31] fansi_1.0.6 teal.logger_0.2.0.9001 xtable_1.8-4 \n[34] colorspace_2.1-0 emmeans_1.10.0 scales_1.3.0 \n[37] MASS_7.3-60.0.1 cli_3.6.2 mvtnorm_1.2-4 \n[40] rmarkdown_2.26 ragg_1.3.0 generics_0.1.3 \n[43] cachem_1.0.8 chromote_0.2.0 splines_4.3.3 \n[46] formatR_1.14 vctrs_0.6.5 webshot_0.5.5 \n[49] Matrix_1.6-5 sandwich_3.1-0 jsonlite_1.8.8 \n[52] callr_3.7.6 systemfonts_1.0.6 teal.widgets_0.4.2.9009 \n[55] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[58] tidyr_1.3.1 glue_1.7.0 ps_1.7.6 \n[61] codetools_0.2-20 stringi_1.8.3 gtable_0.3.4 \n[64] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[67] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[70] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[73] textshaping_0.3.7 Rdpack_2.6 evaluate_0.23 \n[76] lattice_0.22-6 rbibutils_2.2.16 backports_1.4.1 \n[79] memoise_2.0.1 broom_1.0.5 teal.reporter_0.3.1.9003\n[82] bslib_0.7.0 httpuv_1.6.15 Rcpp_1.0.12 \n[85] shinyvalidate_0.1.3 coda_0.19-4.1 nlme_3.1-164 \n[88] checkmate_2.3.1 xfun_0.43 zoo_1.8-12 \n[91] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Other", @@ -187,14 +187,14 @@ "href": "repro.html#reproducibility", "title": "", "section": "Reproducibility", - "text": "Reproducibility\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:55:28 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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\nloaded via a namespace (and not attached):\n [1] htmlwidgets_1.6.4 compiler_4.3.3 fastmap_1.1.1 cli_3.6.2 \n [5] tools_4.3.3 htmltools_0.5.8.1 yaml_2.3.8 codetools_0.2-20 \n [9] rmarkdown_2.26 knitr_1.45 jsonlite_1.8.8 xfun_0.43 \n[13] digest_0.6.35 rlang_1.1.3 evaluate_0.23 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload" + "text": "Reproducibility\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:56:42 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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\nloaded via a namespace (and not attached):\n [1] htmlwidgets_1.6.4 compiler_4.3.3 fastmap_1.1.1 cli_3.6.2 \n [5] tools_4.3.3 htmltools_0.5.8.1 yaml_2.3.8 codetools_0.2-20 \n [9] rmarkdown_2.26 knitr_1.45 jsonlite_1.8.8 xfun_0.43 \n[13] digest_0.6.35 rlang_1.1.3 evaluate_0.23 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload" }, { "objectID": "tables/exposure/ext01.html", "href": "tables/exposure/ext01.html", "title": "EXT01", "section": "", - "text": "Data Setup\nStandard Table\nTable with Optional Analyses\nTable with User-Specified Categories for Missed Doses\nteal App\nReproducibility\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 analyze_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 analyze_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 analyze_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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n adex_labels <- unname(col_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 )\n col_labels(ADEX) <- c(adex_labels, \"\")\n})\ndatanames <- c(\"ADSL\", \"ADEX\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADEX <- data[[\"ADEX\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(\n teal_slice(\"ADEX\", \"PARCAT2\", selected = \"Drug A\"),\n teal_slice(\"ADEX\", \"AVAL\", selected = NULL)\n )\n)\n\nshinyApp(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\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:55:23 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tidyr_1.3.1 \n [9] dplyr_1.1.4 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 \n[13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 \n[16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 \n[19] ps_1.7.6 purrr_1.0.2 xfun_0.43 \n[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002\n[25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[34] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[37] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[40] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[43] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[46] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[49] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[52] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[55] checkmate_2.3.1 shinyjs_2.1.0 plotly_4.10.4 \n[58] generics_0.1.3 chromote_0.2.0 ggplot2_3.5.0 \n[61] munsell_0.5.1 scales_1.3.0 xtable_1.8-4 \n[64] glue_1.7.0 emmeans_1.10.0 lazyeval_0.2.2 \n[67] tools_4.3.3 webshot2_0.1.1 data.table_1.15.4 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-4 \n[73] grid_4.3.3 rbibutils_2.2.16 colorspace_2.1-0 \n[76] nlme_3.1-164 cli_3.6.2 fansi_1.0.6 \n[79] viridisLite_0.4.2 geepack_1.3.10 gtable_0.3.4 \n[82] sass_0.4.9 digest_0.6.35 TH.data_1.1-2 \n[85] htmlwidgets_1.6.4 memoise_2.0.1 htmltools_0.5.8.1 \n[88] lifecycle_1.0.4 httr_1.4.7 shinyWidgets_0.8.4 \n[91] mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nTable with Optional Analyses\nTable with User-Specified Categories for Missed Doses\nteal App\nReproducibility\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 analyze_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 analyze_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 analyze_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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n adex_labels <- unname(col_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 )\n col_labels(ADEX) <- c(adex_labels, \"\")\n})\ndatanames <- c(\"ADSL\", \"ADEX\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADEX <- data[[\"ADEX\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(\n teal_slice(\"ADEX\", \"PARCAT2\", selected = \"Drug A\"),\n teal_slice(\"ADEX\", \"AVAL\", selected = NULL)\n )\n)\n\nshinyApp(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\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:56:38 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tidyr_1.3.1 \n [9] dplyr_1.1.4 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 \n[13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 \n[16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 \n[19] ps_1.7.6 purrr_1.0.2 xfun_0.43 \n[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003\n[25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[34] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[37] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[40] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[43] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[46] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[49] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[52] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[55] checkmate_2.3.1 shinyjs_2.1.0 plotly_4.10.4 \n[58] generics_0.1.3 chromote_0.2.0 ggplot2_3.5.0 \n[61] munsell_0.5.1 scales_1.3.0 xtable_1.8-4 \n[64] glue_1.7.0 emmeans_1.10.0 lazyeval_0.2.2 \n[67] tools_4.3.3 webshot2_0.1.1 data.table_1.15.4 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-4 \n[73] grid_4.3.3 rbibutils_2.2.16 colorspace_2.1-0 \n[76] nlme_3.1-164 cli_3.6.2 fansi_1.0.6 \n[79] viridisLite_0.4.2 geepack_1.3.10 gtable_0.3.4 \n[82] sass_0.4.9 digest_0.6.35 TH.data_1.1-2 \n[85] htmlwidgets_1.6.4 memoise_2.0.1 htmltools_0.5.8.1 \n[88] lifecycle_1.0.4 httr_1.4.7 shinyWidgets_0.8.4 \n[91] mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Exposure", @@ -206,7 +206,7 @@ "href": "tables/lab-results/lbt04.html", "title": "LBT04", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n col_relabel(PARAM = \"Laboratory Test\", ANRIND = \"Direction of Abnormality\")\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:55:00 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9020 dplyr_1.1.4 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n col_relabel(PARAM = \"Laboratory Test\", ANRIND = \"Direction of Abnormality\")\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:56:13 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9021 dplyr_1.1.4 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -218,7 +218,7 @@ "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 App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"))\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:54:29 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9020 dplyr_1.1.4 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"))\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:55:41 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9021 dplyr_1.1.4 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -230,7 +230,7 @@ "href": "tables/lab-results/lbt15.html", "title": "LBT15", "section": "", - "text": "Data Setup\nStandard Table\nTable Modifying Cut Point\nteal App\nReproducibility\n\n\n\nBecause the scda dataset adlb doesn’t have the PARCAT1 variable, this variable is created from LBCAT in pre-processing.\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\n# 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(\n \"PARCAT1\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb$PARCAT1)\n ) %>%\n split_rows_by(\n \"PARAM\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb$PARAM)\n ) %>%\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\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)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n library(forcats)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\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(.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 col_relabel(ANRIND = \"Direction of Abnormality\")\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:53:57 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 forcats_1.0.0 \n [9] dplyr_1.1.4 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nTable Modifying Cut Point\nteal App\nReproducibility\n\n\n\nBecause the scda dataset adlb doesn’t have the PARCAT1 variable, this variable is created from LBCAT in pre-processing.\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\n# 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(\n \"PARCAT1\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb$PARCAT1)\n ) %>%\n split_rows_by(\n \"PARAM\",\n split_fun = drop_split_levels, label_pos = \"topleft\", split_label = obj_label(adlb$PARAM)\n ) %>%\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\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)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n library(forcats)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\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(.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 col_relabel(ANRIND = \"Direction of Abnormality\")\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:55:08 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 forcats_1.0.0 \n [9] dplyr_1.1.4 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -242,7 +242,7 @@ "href": "tables/lab-results/lbt03.html", "title": "LBT03", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\" & 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\n A: Drug X B: Placebo C: Combination\nAnalysis Visit (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\n A: Drug X B: Placebo C: Combination\nAnalysis Visit (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nHere, we pre-process and manually define the variable “Baseline or Absolute Change from Baseline”.\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))\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 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 group_by(USUBJID, PARAM) %>%\n mutate(\n AVAL_CHG = AVAL - (!ABLFLL) * sum(AVAL * ABLFLL)\n ) %>%\n ungroup() %>%\n col_relabel(\n AVAL_CHG = \"Baseline or Absolute Change from Baseline\",\n ABLFLL = \"Baseline Flag (TRUE/FALSE)\",\n AVISIT_header = \"Analysis Visit\"\n )\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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 # note: order matters here. If `PARAM` is first, the split will be first by `PARAM`and then by `AVISIT`\n choices = variable_choices(ADLB, c(\"PARAM\", \"AVISIT_header\")),\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 = teal_slices(teal_slice(\"ADLB\", \"AVAL\", selected = NULL))\n)\nshinyApp(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\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:53:19 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9020 dplyr_1.1.4 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 \n[13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 \n[16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 \n[19] ps_1.7.6 purrr_1.0.2 xfun_0.43 \n[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002\n[25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[34] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[37] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[40] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[43] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[46] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[49] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[52] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[55] checkmate_2.3.1 shinyjs_2.1.0 plotly_4.10.4 \n[58] generics_0.1.3 chromote_0.2.0 ggplot2_3.5.0 \n[61] munsell_0.5.1 scales_1.3.0 xtable_1.8-4 \n[64] glue_1.7.0 emmeans_1.10.0 lazyeval_0.2.2 \n[67] tools_4.3.3 webshot2_0.1.1 data.table_1.15.4 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-4 \n[73] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[76] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[79] fansi_1.0.6 viridisLite_0.4.2 geepack_1.3.10 \n[82] gtable_0.3.4 sass_0.4.9 digest_0.6.35 \n[85] TH.data_1.1-2 htmlwidgets_1.6.4 memoise_2.0.1 \n[88] htmltools_0.5.8.1 lifecycle_1.0.4 httr_1.4.7 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\" & 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\n A: Drug X B: Placebo C: Combination\nAnalysis Visit (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\n A: Drug X B: Placebo C: Combination\nAnalysis Visit (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nHere, we pre-process and manually define the variable “Baseline or Absolute Change from Baseline”.\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- df_explicit_na(synthetic_cdisc_dataset(\"latest\", \"adsl\"))\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 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 group_by(USUBJID, PARAM) %>%\n mutate(\n AVAL_CHG = AVAL - (!ABLFLL) * sum(AVAL * ABLFLL)\n ) %>%\n ungroup() %>%\n col_relabel(\n AVAL_CHG = \"Baseline or Absolute Change from Baseline\",\n ABLFLL = \"Baseline Flag (TRUE/FALSE)\",\n AVISIT_header = \"Analysis Visit\"\n )\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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 # note: order matters here. If `PARAM` is first, the split will be first by `PARAM`and then by `AVISIT`\n choices = variable_choices(ADLB, c(\"PARAM\", \"AVISIT_header\")),\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 = teal_slices(teal_slice(\"ADLB\", \"AVAL\", selected = NULL))\n)\nshinyApp(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\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:54:28 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9021 dplyr_1.1.4 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 \n[13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 \n[16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 \n[19] ps_1.7.6 purrr_1.0.2 xfun_0.43 \n[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003\n[25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[34] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[37] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[40] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[43] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[46] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[49] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[52] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[55] checkmate_2.3.1 shinyjs_2.1.0 plotly_4.10.4 \n[58] generics_0.1.3 chromote_0.2.0 ggplot2_3.5.0 \n[61] munsell_0.5.1 scales_1.3.0 xtable_1.8-4 \n[64] glue_1.7.0 emmeans_1.10.0 lazyeval_0.2.2 \n[67] tools_4.3.3 webshot2_0.1.1 data.table_1.15.4 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-4 \n[73] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[76] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[79] fansi_1.0.6 viridisLite_0.4.2 geepack_1.3.10 \n[82] gtable_0.3.4 sass_0.4.9 digest_0.6.35 \n[85] TH.data_1.1-2 htmlwidgets_1.6.4 memoise_2.0.1 \n[88] htmltools_0.5.8.1 lifecycle_1.0.4 httr_1.4.7 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -254,7 +254,7 @@ "href": "tables/lab-results/lbt12_bl.html", "title": "LBT12_BL", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadhy <- synthetic_cdisc_dataset(\"latest\", \"adhy\")\n\nanl <- adhy\nanl$APERIODC <- as.factor(anl$APERIODC) # to ensure the table is built even if there is no patients after filtering\nanl$ACTARM <- as.factor(anl$ACTARM) # to ensure the table is built even if there is no patients after filtering\n\nanl <- anl %>%\n filter(\n SAFFL == \"Y\",\n PARAMCD %in% c(\"ASTPBASE\", \"ALTPBASE\", \"ALTASTPB\") & AVISIT == \"POST-BASELINE\"\n ) %>%\n mutate(\n ARM_AVALC = factor(\n case_when(\n AVALC == \"Y\" ~ as.character(ACTARM),\n TRUE ~ \"Criteria not met\"\n ),\n levels = c(levels(anl$ACTARM), \"Criteria not met\")\n ),\n PARAM = factor(\n case_when(\n PARAMCD == \"ASTPBASE\" ~ \"AST>3x Baseline\",\n PARAMCD == \"ALTPBASE\" ~ \"ALT>3x Baseline\",\n PARAMCD == \"ALTASTPB\" ~ \"AST>3x Baseline or ALT>3x Baseline\"\n ),\n levels = c(\"AST>3x Baseline\", \"ALT>3x Baseline\", \"AST>3x Baseline or ALT>3x Baseline\")\n ),\n TITLE = factor(\"First Elevated Result Occurring During\")\n )\n\nanl <- df_explicit_na(anl)\n\n\n\n\n\nCoderesult <- basic_table() %>%\n split_cols_by(\"TITLE\") %>%\n split_cols_by(\"APERIODC\") %>%\n split_rows_by(\"PARAM\") %>%\n split_rows_by(\"ACTARM\", split_fun = drop_split_levels, child_labels = \"hidden\") %>%\n count_occurrences(\"ARM_AVALC\", .stats = \"fraction\", denom = \"n\", drop = TRUE) %>%\n build_table(anl)\n\ncriteria_fun <- function(tr) {\n row_label <- obj_label(tr)\n dplyr::if_else(row_label == \"Criteria not met\", TRUE, FALSE)\n}\n\nresult <- result %>% trim_rows(criteria = criteria_fun)\nresult\n\n First Elevated Result Occurring During \n PERIOD 1 PERIOD 2 \n——————————————————————————————————————————————————————————————————————————————\nAST>3x Baseline \n A: Drug X 14/134 (10.4%) 8/134 (6.0%) \n B: Placebo 11/134 (8.2%) 11/134 (8.2%) \n C: Combination 15/132 (11.4%) 14/132 (10.6%) \nALT>3x Baseline \n A: Drug X 7/134 (5.2%) 20/134 (14.9%) \n B: Placebo 10/134 (7.5%) 9/134 (6.7%) \n C: Combination 12/132 (9.1%) 8/132 (6.1%) \nAST>3x Baseline or ALT>3x Baseline \n A: Drug X 8/134 (6.0%) 22/134 (16.4%) \n B: Placebo 19/134 (14.2%) 15/134 (11.2%) \n C: Combination 14/132 (10.6%) 13/132 (9.8%) \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:52:56 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadhy <- synthetic_cdisc_dataset(\"latest\", \"adhy\")\n\nanl <- adhy\nanl$APERIODC <- as.factor(anl$APERIODC) # to ensure the table is built even if there is no patients after filtering\nanl$ACTARM <- as.factor(anl$ACTARM) # to ensure the table is built even if there is no patients after filtering\n\nanl <- anl %>%\n filter(\n SAFFL == \"Y\",\n PARAMCD %in% c(\"ASTPBASE\", \"ALTPBASE\", \"ALTASTPB\") & AVISIT == \"POST-BASELINE\"\n ) %>%\n mutate(\n ARM_AVALC = factor(\n case_when(\n AVALC == \"Y\" ~ as.character(ACTARM),\n TRUE ~ \"Criteria not met\"\n ),\n levels = c(levels(anl$ACTARM), \"Criteria not met\")\n ),\n PARAM = factor(\n case_when(\n PARAMCD == \"ASTPBASE\" ~ \"AST>3x Baseline\",\n PARAMCD == \"ALTPBASE\" ~ \"ALT>3x Baseline\",\n PARAMCD == \"ALTASTPB\" ~ \"AST>3x Baseline or ALT>3x Baseline\"\n ),\n levels = c(\"AST>3x Baseline\", \"ALT>3x Baseline\", \"AST>3x Baseline or ALT>3x Baseline\")\n ),\n TITLE = factor(\"First Elevated Result Occurring During\")\n )\n\nanl <- df_explicit_na(anl)\n\n\n\n\n\nCoderesult <- basic_table() %>%\n split_cols_by(\"TITLE\") %>%\n split_cols_by(\"APERIODC\") %>%\n split_rows_by(\"PARAM\") %>%\n split_rows_by(\"ACTARM\", split_fun = drop_split_levels, child_labels = \"hidden\") %>%\n count_occurrences(\"ARM_AVALC\", .stats = \"fraction\", denom = \"n\", drop = TRUE) %>%\n build_table(anl)\n\ncriteria_fun <- function(tr) {\n row_label <- obj_label(tr)\n dplyr::if_else(row_label == \"Criteria not met\", TRUE, FALSE)\n}\n\nresult <- result %>% trim_rows(criteria = criteria_fun)\nresult\n\n First Elevated Result Occurring During \n PERIOD 1 PERIOD 2 \n——————————————————————————————————————————————————————————————————————————————\nAST>3x Baseline \n A: Drug X 14/134 (10.4%) 8/134 (6.0%) \n B: Placebo 11/134 (8.2%) 11/134 (8.2%) \n C: Combination 15/132 (11.4%) 14/132 (10.6%) \nALT>3x Baseline \n A: Drug X 7/134 (5.2%) 20/134 (14.9%) \n B: Placebo 10/134 (7.5%) 9/134 (6.7%) \n C: Combination 12/132 (9.1%) 8/132 (6.1%) \nAST>3x Baseline or ALT>3x Baseline \n A: Drug X 8/134 (6.0%) 22/134 (16.4%) \n B: Placebo 19/134 (14.2%) 15/134 (11.2%) \n C: Combination 14/132 (10.6%) 13/132 (9.8%) \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:54:05 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -266,7 +266,7 @@ "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 App\nReproducibility\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\nadsl_safl <- dplyr::filter(adsl, .data$SAFFL == \"Y\")\n\nanl <- adaette %>%\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 1.0 to 731.0 {1} 1.0 to 728.0 {1} 1.0 to 728.0 {2}\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{1} - Censored observations: range minimum & maximum\n{2} - Censored observation: range minimum\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\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 1.0 to 731.0 {1} 1.0 to 728.0 {1} 1.0 to 728.0 {2}\n———————————————————————————————————————————————————————————————————————————————————————\n\n{1} - Censored observations: range minimum & maximum\n{2} - Censored observation: range minimum\n———————————————————————————————————————————————————————————————————————————————————————\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 strata = 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 1.0 to 731.0 {1} 1.0 to 728.0 {1} 1.0 to 728.0 {2}\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{1} - Censored observations: range minimum & maximum\n{2} - Censored observation: range minimum\n———————————————————————————————————————————————————————————————————————————————————————\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAETTE <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAETTE <- df_explicit_na(ADAETTE)\n\n ADSL <- filter(ADSL, .data$SAFFL == \"Y\")\n ADAETTE <- filter(ADAETTE, .data$SAFFL == \"Y\")\n})\ndatanames <- c(\"ADSL\", \"ADAETTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADAETTE <- data[[\"ADAETTE\"]]\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\n## Setup App\napp <- init(\n data = data,\n modules = modules(\n tm_t_tte(\n label = \"Time To LLT Event Table\",\n dataname = \"ADAETTE\",\n arm_var = choices_selected(\n variable_choices(data[[\"ADSL\"]], c(\"ARM\", \"ARMCD\", \"ACTARMCD\")),\n \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(data[[\"ADAETTE\"]], \"PARAMCD\", \"PARAM\"),\n \"HYSTTEUL\"\n ),\n strata_var = choices_selected(\n variable_choices(data[[\"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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:52:42 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\nadsl_safl <- dplyr::filter(adsl, .data$SAFFL == \"Y\")\n\nanl <- adaette %>%\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 1.0 to 731.0 {1} 1.0 to 728.0 {1} 1.0 to 728.0 {2}\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{1} - Censored observations: range minimum & maximum\n{2} - Censored observation: range minimum\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\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 1.0 to 731.0 {1} 1.0 to 728.0 {1} 1.0 to 728.0 {2}\n———————————————————————————————————————————————————————————————————————————————————————\n\n{1} - Censored observations: range minimum & maximum\n{2} - Censored observation: range minimum\n———————————————————————————————————————————————————————————————————————————————————————\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 strata = 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 1.0 to 731.0 {1} 1.0 to 728.0 {1} 1.0 to 728.0 {2}\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{1} - Censored observations: range minimum & maximum\n{2} - Censored observation: range minimum\n———————————————————————————————————————————————————————————————————————————————————————\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAETTE <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAETTE <- df_explicit_na(ADAETTE)\n\n ADSL <- filter(ADSL, .data$SAFFL == \"Y\")\n ADAETTE <- filter(ADAETTE, .data$SAFFL == \"Y\")\n})\ndatanames <- c(\"ADSL\", \"ADAETTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADAETTE <- data[[\"ADAETTE\"]]\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\n## Setup App\napp <- init(\n data = data,\n modules = modules(\n tm_t_tte(\n label = \"Time To LLT Event Table\",\n dataname = \"ADAETTE\",\n arm_var = choices_selected(\n variable_choices(data[[\"ADSL\"]], c(\"ARM\", \"ARMCD\", \"ACTARMCD\")),\n \"ARM\"\n ),\n arm_ref_comp = arm_ref_comp,\n paramcd = choices_selected(\n value_choices(data[[\"ADAETTE\"]], \"PARAMCD\", \"PARAM\"),\n \"HYSTTEUL\"\n ),\n strata_var = choices_selected(\n variable_choices(data[[\"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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:53:51 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -278,7 +278,7 @@ "href": "tables/lab-results/lbt01.html", "title": "LBT01", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\n A: Drug X B: Placebo C: Combination \n Change from Change from Change from \nParameter Value at Visit Baseline Value at Visit Baseline Value at Visit Baseline \n Analysis Visit (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADLB <- df_explicit_na(ADLB)\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(teal_slice(\"ADLB\", \"AVAL\", selected = NULL))\n)\n\nshinyApp(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\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:52:20 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 \n[13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 \n[16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 \n[19] ps_1.7.6 purrr_1.0.2 xfun_0.43 \n[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002\n[25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[34] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[37] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[40] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[43] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[46] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[49] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[52] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[55] checkmate_2.3.1 shinyjs_2.1.0 plotly_4.10.4 \n[58] generics_0.1.3 chromote_0.2.0 ggplot2_3.5.0 \n[61] munsell_0.5.1 scales_1.3.0 xtable_1.8-4 \n[64] glue_1.7.0 emmeans_1.10.0 lazyeval_0.2.2 \n[67] tools_4.3.3 webshot2_0.1.1 data.table_1.15.4 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-4 \n[73] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[76] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[79] fansi_1.0.6 viridisLite_0.4.2 geepack_1.3.10 \n[82] gtable_0.3.4 sass_0.4.9 digest_0.6.35 \n[85] TH.data_1.1-2 htmlwidgets_1.6.4 memoise_2.0.1 \n[88] htmltools_0.5.8.1 lifecycle_1.0.4 httr_1.4.7 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\n A: Drug X B: Placebo C: Combination \n Change from Change from Change from \nParameter Value at Visit Baseline Value at Visit Baseline Value at Visit Baseline \n Analysis Visit (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADLB <- df_explicit_na(ADLB)\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(teal_slice(\"ADLB\", \"AVAL\", selected = NULL))\n)\n\nshinyApp(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\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:53:28 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 \n[13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 \n[16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 \n[19] ps_1.7.6 purrr_1.0.2 xfun_0.43 \n[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003\n[25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[34] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[37] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[40] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[43] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[46] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[49] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[52] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[55] checkmate_2.3.1 shinyjs_2.1.0 plotly_4.10.4 \n[58] generics_0.1.3 chromote_0.2.0 ggplot2_3.5.0 \n[61] munsell_0.5.1 scales_1.3.0 xtable_1.8-4 \n[64] glue_1.7.0 emmeans_1.10.0 lazyeval_0.2.2 \n[67] tools_4.3.3 webshot2_0.1.1 data.table_1.15.4 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-4 \n[73] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[76] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[79] fansi_1.0.6 viridisLite_0.4.2 geepack_1.3.10 \n[82] gtable_0.3.4 sass_0.4.9 digest_0.6.35 \n[85] TH.data_1.1-2 htmlwidgets_1.6.4 memoise_2.0.1 \n[88] htmltools_0.5.8.1 lifecycle_1.0.4 httr_1.4.7 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -290,7 +290,7 @@ "href": "tables/lab-results/lbt10_bl.html", "title": "LBT10_BL", "section": "", - "text": "Data Setup\nStandard Table\nTable Selecting Sections\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadhy <- synthetic_cdisc_dataset(\"latest\", \"adhy\")\n\nadhy_liver <- adhy %>%\n filter(PARAMCD %in% c(\n \"BL2AL2CB\", \"BL2AS2CB\", \"BG2AL2CB\", \"BG2AS2CB\", \"B2A2L2CB\", \"B2A2S2CB\", \"B2A5L2CB\", \"B2A5S2CB\"\n )) %>%\n mutate(PARAMCAT = case_when(\n PARAMCD %in% c(\"BL2AL2CB\", \"BL2AS2CB\") ~ \"Total Bilirubin <= 2xULN\",\n PARAMCD %in% c(\"BG2AL2CB\", \"BG2AS2CB\") ~ \"Total Bilirubin > 2xULN\",\n PARAMCD %in% c(\"B2A2L2CB\", \"B2A2S2CB\") ~ \"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 2xULN\",\n PARAMCD %in% c(\"B2A5L2CB\", \"B2A5S2CB\") ~ \"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 5xULN\"\n )) %>%\n mutate(AVALC_FORMAT = case_when(\n PARAMCD %in% c(\"BL2AL2CB\", \"BG2AL2CB\", \"B2A2L2CB\", \"B2A5L2CB\") & AVALC == \"Y\" ~ \"ALT >3xULN at 2 Visits\",\n PARAMCD %in% c(\"BL2AS2CB\", \"BG2AS2CB\", \"B2A2S2CB\", \"B2A5S2CB\") & AVALC == \"Y\" ~ \"AST >3xULN at 2 Visits\",\n TRUE ~ \"Criteria not met\"\n ))\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nanl <- df_explicit_na(adhy_liver)\n\n\n\n\n\nCodetbl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n split_rows_by(\"PARAMCAT\") %>%\n split_rows_by(\"PARAM\", split_fun = drop_split_levels, child_labels = \"hidden\") %>%\n count_occurrences(\n vars = \"AVALC_FORMAT\",\n .stats = c(\"fraction\"),\n denom = \"n\",\n drop = TRUE\n ) %>%\n build_table(anl, alt_counts_df = adsl)\n\ncriteria_fun <- function(tr) {\n row_label <- obj_label(tr)\n ifelse(row_label == \"Criteria not met\", TRUE, FALSE)\n}\n\nresult <- tbl %>% trim_rows(criteria = criteria_fun)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————\nTotal Bilirubin <= 2xULN \n ALT >3xULN at 2 Visits 25/134 (18.7%) 20/134 (14.9%) 27/132 (20.5%)\n AST >3xULN at 2 Visits 22/134 (16.4%) 14/134 (10.4%) 37/132 (28.0%)\nTotal Bilirubin > 2xULN \n ALT >3xULN at 2 Visits 26/134 (19.4%) 31/134 (23.1%) 23/132 (17.4%)\n AST >3xULN at 2 Visits 30/134 (22.4%) 27/134 (20.1%) 26/132 (19.7%)\n\n\n\n\n\nCodetbl2 <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n split_rows_by(\"PARAMCAT\", split_fun = remove_split_levels(\"Total Bilirubin > 2xULN\")) %>%\n split_rows_by(\"PARAM\", split_fun = drop_split_levels, child_labels = \"hidden\") %>%\n count_occurrences(\n vars = \"AVALC_FORMAT\",\n .stats = c(\"fraction\"),\n denom = \"n\",\n drop = TRUE\n ) %>%\n build_table(anl, alt_counts_df = adsl)\n\ncriteria_fun <- function(tr) {\n row_label <- obj_label(tr)\n ifelse(row_label == \"Criteria not met\", TRUE, FALSE)\n}\n\nresult <- tbl2 %>% trim_rows(criteria = criteria_fun)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————\nTotal Bilirubin <= 2xULN \n ALT >3xULN at 2 Visits 25/134 (18.7%) 20/134 (14.9%) 27/132 (20.5%)\n AST >3xULN at 2 Visits 22/134 (16.4%) 14/134 (10.4%) 37/132 (28.0%)\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:52:00 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nTable Selecting Sections\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadhy <- synthetic_cdisc_dataset(\"latest\", \"adhy\")\n\nadhy_liver <- adhy %>%\n filter(PARAMCD %in% c(\n \"BL2AL2CB\", \"BL2AS2CB\", \"BG2AL2CB\", \"BG2AS2CB\", \"B2A2L2CB\", \"B2A2S2CB\", \"B2A5L2CB\", \"B2A5S2CB\"\n )) %>%\n mutate(PARAMCAT = case_when(\n PARAMCD %in% c(\"BL2AL2CB\", \"BL2AS2CB\") ~ \"Total Bilirubin <= 2xULN\",\n PARAMCD %in% c(\"BG2AL2CB\", \"BG2AS2CB\") ~ \"Total Bilirubin > 2xULN\",\n PARAMCD %in% c(\"B2A2L2CB\", \"B2A2S2CB\") ~ \"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 2xULN\",\n PARAMCD %in% c(\"B2A5L2CB\", \"B2A5S2CB\") ~ \"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 5xULN\"\n )) %>%\n mutate(AVALC_FORMAT = case_when(\n PARAMCD %in% c(\"BL2AL2CB\", \"BG2AL2CB\", \"B2A2L2CB\", \"B2A5L2CB\") & AVALC == \"Y\" ~ \"ALT >3xULN at 2 Visits\",\n PARAMCD %in% c(\"BL2AS2CB\", \"BG2AS2CB\", \"B2A2S2CB\", \"B2A5S2CB\") & AVALC == \"Y\" ~ \"AST >3xULN at 2 Visits\",\n TRUE ~ \"Criteria not met\"\n ))\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nanl <- df_explicit_na(adhy_liver)\n\n\n\n\n\nCodetbl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n split_rows_by(\"PARAMCAT\") %>%\n split_rows_by(\"PARAM\", split_fun = drop_split_levels, child_labels = \"hidden\") %>%\n count_occurrences(\n vars = \"AVALC_FORMAT\",\n .stats = c(\"fraction\"),\n denom = \"n\",\n drop = TRUE\n ) %>%\n build_table(anl, alt_counts_df = adsl)\n\ncriteria_fun <- function(tr) {\n row_label <- obj_label(tr)\n ifelse(row_label == \"Criteria not met\", TRUE, FALSE)\n}\n\nresult <- tbl %>% trim_rows(criteria = criteria_fun)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————\nTotal Bilirubin <= 2xULN \n ALT >3xULN at 2 Visits 25/134 (18.7%) 20/134 (14.9%) 27/132 (20.5%)\n AST >3xULN at 2 Visits 22/134 (16.4%) 14/134 (10.4%) 37/132 (28.0%)\nTotal Bilirubin > 2xULN \n ALT >3xULN at 2 Visits 26/134 (19.4%) 31/134 (23.1%) 23/132 (17.4%)\n AST >3xULN at 2 Visits 30/134 (22.4%) 27/134 (20.1%) 26/132 (19.7%)\n\n\n\n\n\nCodetbl2 <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n split_rows_by(\"PARAMCAT\", split_fun = remove_split_levels(\"Total Bilirubin > 2xULN\")) %>%\n split_rows_by(\"PARAM\", split_fun = drop_split_levels, child_labels = \"hidden\") %>%\n count_occurrences(\n vars = \"AVALC_FORMAT\",\n .stats = c(\"fraction\"),\n denom = \"n\",\n drop = TRUE\n ) %>%\n build_table(anl, alt_counts_df = adsl)\n\ncriteria_fun <- function(tr) {\n row_label <- obj_label(tr)\n ifelse(row_label == \"Criteria not met\", TRUE, FALSE)\n}\n\nresult <- tbl2 %>% trim_rows(criteria = criteria_fun)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————\nTotal Bilirubin <= 2xULN \n ALT >3xULN at 2 Visits 25/134 (18.7%) 20/134 (14.9%) 27/132 (20.5%)\n AST >3xULN at 2 Visits 22/134 (16.4%) 14/134 (10.4%) 37/132 (28.0%)\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:53:07 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -302,7 +302,7 @@ "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 App\nReproducibility\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\nadsl_safl <- dplyr::filter(adsl, .data$SAFFL == \"Y\")\n\nanl <- adaette %>%\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 1.0 to 728.0 {1} 1.0 to 726.0 {1} 1.0 to 724.0 {1}\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{1} - Censored observations: range minimum & maximum\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\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 1.0 to 728.0 {1} 1.0 to 726.0 {1} 1.0 to 724.0 {1}\n———————————————————————————————————————————————————————————————————————————————————————\n\n{1} - Censored observations: range minimum & maximum\n———————————————————————————————————————————————————————————————————————————————————————\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 strata = 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 1.0 to 728.0 {1} 1.0 to 726.0 {1} 1.0 to 724.0 {1}\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{1} - Censored observations: range minimum & maximum\n———————————————————————————————————————————————————————————————————————————————————————\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAETTE <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAETTE <- df_explicit_na(ADAETTE)\n\n ADSL <- filter(ADSL, .data$SAFFL == \"Y\")\n ADAETTE <- filter(ADAETTE, .data$SAFFL == \"Y\")\n})\ndatanames <- c(\"ADSL\", \"ADAETTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADAETTE <- data[[\"ADAETTE\"]]\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\n## Setup App\napp <- init(\n data = data,\n modules = modules(\n tm_t_tte(\n label = \"Time To LLT Event Table\",\n dataname = \"ADAETTE\",\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(ADAETTE, \"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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:51:37 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\nadsl_safl <- dplyr::filter(adsl, .data$SAFFL == \"Y\")\n\nanl <- adaette %>%\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 1.0 to 728.0 {1} 1.0 to 726.0 {1} 1.0 to 724.0 {1}\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{1} - Censored observations: range minimum & maximum\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\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 1.0 to 728.0 {1} 1.0 to 726.0 {1} 1.0 to 724.0 {1}\n———————————————————————————————————————————————————————————————————————————————————————\n\n{1} - Censored observations: range minimum & maximum\n———————————————————————————————————————————————————————————————————————————————————————\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 strata = 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 1.0 to 728.0 {1} 1.0 to 726.0 {1} 1.0 to 724.0 {1}\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{1} - Censored observations: range minimum & maximum\n———————————————————————————————————————————————————————————————————————————————————————\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAETTE <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAETTE <- df_explicit_na(ADAETTE)\n\n ADSL <- filter(ADSL, .data$SAFFL == \"Y\")\n ADAETTE <- filter(ADAETTE, .data$SAFFL == \"Y\")\n})\ndatanames <- c(\"ADSL\", \"ADAETTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADAETTE <- data[[\"ADAETTE\"]]\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\n## Setup App\napp <- init(\n data = data,\n modules = modules(\n tm_t_tte(\n label = \"Time To LLT Event Table\",\n dataname = \"ADAETTE\",\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(ADAETTE, \"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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:52:43 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -314,7 +314,7 @@ "href": "tables/vital-signs/vst01.html", "title": "VST01", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\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 \n Value at Visit Baseline Value at Visit Baseline Value at Visit Baseline \nAnalysis Visit (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADVS <- synthetic_cdisc_dataset(\"latest\", \"advs\")\n advs_label <- col_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 <- rbind(\n ADVS,\n advs_pb_last,\n advs_pb_min,\n advs_pb_max\n ) %>%\n mutate(AVISIT = droplevels(AVISIT))\n\n col_labels(ADVS) <- advs_label\n})\ndatanames <- c(\"ADSL\", \"ADVS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADVS <- data[[\"ADVS\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(teal_slice(\"ADVS\", \"AVAL\", selected = NULL))\n)\n\nshinyApp(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\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:51:14 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 \n[13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 \n[16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 \n[19] ps_1.7.6 purrr_1.0.2 xfun_0.43 \n[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002\n[25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[34] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[37] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[40] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[43] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[46] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[49] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[52] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[55] checkmate_2.3.1 shinyjs_2.1.0 plotly_4.10.4 \n[58] generics_0.1.3 chromote_0.2.0 ggplot2_3.5.0 \n[61] munsell_0.5.1 scales_1.3.0 xtable_1.8-4 \n[64] glue_1.7.0 emmeans_1.10.0 lazyeval_0.2.2 \n[67] tools_4.3.3 webshot2_0.1.1 data.table_1.15.4 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-4 \n[73] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[76] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[79] fansi_1.0.6 viridisLite_0.4.2 geepack_1.3.10 \n[82] gtable_0.3.4 sass_0.4.9 digest_0.6.35 \n[85] TH.data_1.1-2 htmlwidgets_1.6.4 memoise_2.0.1 \n[88] htmltools_0.5.8.1 lifecycle_1.0.4 httr_1.4.7 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\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 \n Value at Visit Baseline Value at Visit Baseline Value at Visit Baseline \nAnalysis Visit (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADVS <- synthetic_cdisc_dataset(\"latest\", \"advs\")\n advs_label <- col_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 <- rbind(\n ADVS,\n advs_pb_last,\n advs_pb_min,\n advs_pb_max\n ) %>%\n mutate(AVISIT = droplevels(AVISIT))\n\n col_labels(ADVS) <- advs_label\n})\ndatanames <- c(\"ADSL\", \"ADVS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADVS <- data[[\"ADVS\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(teal_slice(\"ADVS\", \"AVAL\", selected = NULL))\n)\n\nshinyApp(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\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:52:19 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 \n[13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 \n[16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 \n[19] ps_1.7.6 purrr_1.0.2 xfun_0.43 \n[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003\n[25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[34] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[37] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[40] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[43] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[46] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[49] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[52] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[55] checkmate_2.3.1 shinyjs_2.1.0 plotly_4.10.4 \n[58] generics_0.1.3 chromote_0.2.0 ggplot2_3.5.0 \n[61] munsell_0.5.1 scales_1.3.0 xtable_1.8-4 \n[64] glue_1.7.0 emmeans_1.10.0 lazyeval_0.2.2 \n[67] tools_4.3.3 webshot2_0.1.1 data.table_1.15.4 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-4 \n[73] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[76] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[79] fansi_1.0.6 viridisLite_0.4.2 geepack_1.3.10 \n[82] gtable_0.3.4 sass_0.4.9 digest_0.6.35 \n[85] TH.data_1.1-2 htmlwidgets_1.6.4 memoise_2.0.1 \n[88] htmltools_0.5.8.1 lifecycle_1.0.4 httr_1.4.7 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Vital Signs", @@ -326,7 +326,7 @@ "href": "tables/concomitant-medications/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 App\nReproducibility\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\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 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 \"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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\nadcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADCM <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n ADCM$CMSEQ <- as.integer(ADCM$CMSEQ)\n\n ADSL <- df_explicit_na(ADSL)\n ADCM <- df_explicit_na(ADCM)\n})\ndatanames <- c(\"ADSL\", \"ADCM\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\njoin_keys(data)[\"ADCM\", \"ADCM\"] <- adcm_keys\n\n## Reusable Configuration For Modules\nADCM <- data[[\"ADCM\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(\n teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"),\n teal_slice(\"ADCM\", \"ATIREL\", selected = \"CONCOMITANT\")\n )\n)\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:50:41 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\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 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 \"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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\nadcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADCM <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n ADCM$CMSEQ <- as.integer(ADCM$CMSEQ)\n\n ADSL <- df_explicit_na(ADSL)\n ADCM <- df_explicit_na(ADCM)\n})\ndatanames <- c(\"ADSL\", \"ADCM\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\njoin_keys(data)[\"ADCM\", \"ADCM\"] <- adcm_keys\n\n## Reusable Configuration For Modules\nADCM <- data[[\"ADCM\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(\n teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"),\n teal_slice(\"ADCM\", \"ATIREL\", selected = \"CONCOMITANT\")\n )\n)\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:51:46 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Concomitant Medications", @@ -338,7 +338,7 @@ "href": "tables/concomitant-medications/cmt02_pt.html", "title": "CMT02_PT", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\nadcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADCM <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n ADCM$CMSEQ <- as.integer(ADCM$CMSEQ)\n\n ADSL <- df_explicit_na(ADSL)\n ADCM <- df_explicit_na(ADCM)\n})\ndatanames <- c(\"ADSL\", \"ADCM\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\njoin_keys(data)[\"ADCM\", \"ADCM\"] <- adcm_keys\n\n## Reusable Configuration For Modules\nADCM <- data[[\"ADCM\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(\n teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"),\n teal_slice(\"ADCM\", \"ATIREL\", selected = \"CONCOMITANT\")\n )\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:50:05 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\nadcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADCM <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n ADCM$CMSEQ <- as.integer(ADCM$CMSEQ)\n\n ADSL <- df_explicit_na(ADSL)\n ADCM <- df_explicit_na(ADCM)\n})\ndatanames <- c(\"ADSL\", \"ADCM\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\njoin_keys(data)[\"ADCM\", \"ADCM\"] <- adcm_keys\n\n## Reusable Configuration For Modules\nADCM <- data[[\"ADCM\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(\n teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"),\n teal_slice(\"ADCM\", \"ATIREL\", selected = \"CONCOMITANT\")\n )\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:51:09 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Concomitant Medications", @@ -350,7 +350,7 @@ "href": "tables/risk-management-plan/rmpt01.html", "title": "RMPT01", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n labels <- col_labels(ADEX)\n set.seed(1, kind = \"Mersenne-Twister\")\n ADEX <- 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\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\")) %>% with_label(\"Overall duration\")\n ) %>%\n select(-aval_months)\n})\ndatanames <- c(\"ADSL\", \"ADEX\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADEX <- data[[\"ADEX\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = \"ARM\"\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 = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"))\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:49:34 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n labels <- col_labels(ADEX)\n set.seed(1, kind = \"Mersenne-Twister\")\n ADEX <- 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\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\")) %>% with_label(\"Overall duration\")\n ) %>%\n select(-aval_months)\n})\ndatanames <- c(\"ADSL\", \"ADEX\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADEX <- data[[\"ADEX\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = \"ARM\"\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 = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"))\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:50:36 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Risk Management Plan", @@ -362,7 +362,7 @@ "href": "tables/risk-management-plan/rmpt03.html", "title": "RMPT03", "section": "", - "text": "Data Setup\nStandard Table\nTable Excluding Empty Age Groups\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n labels <- col_labels(ADEX)\n set.seed(1, kind = \"Mersenne-Twister\")\n\n labels <- col_labels(ADEX)\n ADEX <- 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 SEX = factor(case_when(\n SEX == \"F\" ~ \"Female\",\n SEX == \"M\" ~ \"Male\"\n ))\n ) %>%\n bind_rows(ADEX)\n\n col_labels(ADEX) <- labels\n\n ADEX <- ADEX %>%\n mutate(\n AGEGR1 = factor(ifelse(AGE < 65, \"<65\", \">=65\")) %>% with_label(\"Age group (years)\"),\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\")) %>% with_label(\"Age group (years)\")\n )\n\n ADSL <- ADSL %>%\n mutate(SEX = factor(case_when(\n SEX == \"F\" ~ \"Female\",\n SEX == \"M\" ~ \"Male\"\n )) %>% with_label(\"Sex\"))\n})\ndatanames <- c(\"ADSL\", \"ADEX\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADEX <- data[[\"ADEX\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = \"ARM\"\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 = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"))\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:49:06 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nTable Excluding Empty Age Groups\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n labels <- col_labels(ADEX)\n set.seed(1, kind = \"Mersenne-Twister\")\n\n labels <- col_labels(ADEX)\n ADEX <- 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 SEX = factor(case_when(\n SEX == \"F\" ~ \"Female\",\n SEX == \"M\" ~ \"Male\"\n ))\n ) %>%\n bind_rows(ADEX)\n\n col_labels(ADEX) <- labels\n\n ADEX <- ADEX %>%\n mutate(\n AGEGR1 = factor(ifelse(AGE < 65, \"<65\", \">=65\")) %>% with_label(\"Age group (years)\"),\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\")) %>% with_label(\"Age group (years)\")\n )\n\n ADSL <- ADSL %>%\n mutate(SEX = factor(case_when(\n SEX == \"F\" ~ \"Female\",\n SEX == \"M\" ~ \"Male\"\n )) %>% with_label(\"Sex\"))\n})\ndatanames <- c(\"ADSL\", \"ADEX\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADEX <- data[[\"ADEX\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = \"ARM\"\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 = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"))\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:50:06 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Risk Management Plan", @@ -374,7 +374,7 @@ "href": "tables/risk-management-plan/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 App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:48:37 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 dplyr_1.1.4 tern_0.9.3.9031 \n[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:49:35 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 dplyr_1.1.4 tern_0.9.3.9031 \n[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Risk Management Plan", @@ -386,7 +386,7 @@ "href": "tables/ECG/egt03.html", "title": "EGT03", "section": "", - "text": "Data Setup\nTable of Baseline Versus Minimum Post-Baseline\nTable of Baseline Versus Maximum Post-Baseline\nteal App\nReproducibility\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(seq_len(nrow(adeg_f_pbmin)), size = 5)] <- \"Missing\"\nadeg_f_pbmin$ANRIND[sample(seq_len(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 analyze_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(seq_len(nrow(adeg_f_pbmax)), size = 5)] <- \"Missing\"\nadeg_f_pbmax$ANRIND[sample(seq_len(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 analyze_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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEG <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n})\ndatanames <- c(\"ADSL\", \"ADEG\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADEG <- data[[\"ADEG\"]]\n\n## Setup App\napp <- init(\n data = data,\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 baseline_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 = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"))\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:48:13 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nTable of Baseline Versus Minimum Post-Baseline\nTable of Baseline Versus Maximum Post-Baseline\nteal App\nReproducibility\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(seq_len(nrow(adeg_f_pbmin)), size = 5)] <- \"Missing\"\nadeg_f_pbmin$ANRIND[sample(seq_len(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 analyze_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(seq_len(nrow(adeg_f_pbmax)), size = 5)] <- \"Missing\"\nadeg_f_pbmax$ANRIND[sample(seq_len(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 analyze_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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEG <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n})\ndatanames <- c(\"ADSL\", \"ADEG\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADEG <- data[[\"ADEG\"]]\n\n## Setup App\napp <- init(\n data = data,\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 baseline_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 = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"))\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:49:11 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "ECG", @@ -398,7 +398,7 @@ "href": "tables/ECG/egt04.html", "title": "EGT04", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\nFor the EGT04 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\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\nset.seed(123)\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, omit_columns = c(\"AVALC\", \"BASEC\"))\n\nadeg_labels <- var_labels(adeg)\n\nadeg_f <- subset(\n adeg,\n PARAMCD == \"ECGINTP\" & # Analysis in terms of \"NORMAL\"/\"ABNORMAL\" (AVALC)\n SAFFL == \"Y\" & # \"Safety Population Flag\"\n ONTRTFL == \"Y\" & # \"On Treatment Record Flag\"\n WORS02FL == \"Y\" # \"Worst Post-Baseline Observation\"\n)\n\nadeg_f$AVALC[sample(seq_len(nrow(adeg_f)), size = 5)] <- \"Missing\"\nadeg_f$BASEC[sample(seq_len(nrow(adeg_f)), size = 5)] <- \"Missing\"\nadeg_f$AVALC <- factor(\n adeg_f$AVALC,\n levels = c(\"NORMAL\", \"ABNORMAL\", \"Missing\"),\n labels = c(\"Normal\", \"Abnormal\", \"Missing\")\n)\nadeg_f$BASEC <- factor(\n adeg_f$BASEC,\n levels = c(\"NORMAL\", \"ABNORMAL\", \"Missing\"),\n labels = c(\"Normal\", \"Abnormal\", \"Missing\")\n)\n\nvar_labels(adeg_f) <- adeg_labels\nadeg_f <- adeg_f %>%\n var_relabel(BASEC = \"Baseline\")\n\n# Temprary solution for over arching column\nadeg_f <- adeg_f %>% mutate(postbaseline_label = \"Post-Baseline\")\n\n\n\n\nThe EGT04 template consists of a stacked list of contingency tables, one per group. For each group, the n’s across all cells must add up to the group N in the analysis, and percentages are calculated using N as the denominator.\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table() %>%\n split_cols_by(\"postbaseline_label\") %>%\n split_cols_by(\"AVALC\") %>%\n split_rows_by(\"ARM\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adeg_f$ARM)) %>%\n add_rowcounts() %>%\n analyze_vars(\n \"BASEC\",\n denom = \"N_row\",\n .stats = \"count_fraction\",\n na.rm = FALSE\n ) %>%\n append_varlabels(adeg_f, c(\"BASEC\"), indent = 1L)\n\nresult <- build_table(lyt, adeg_f)\nresult\n\nDescription of Planned Arm Post-Baseline \n Baseline Normal Abnormal Missing \n———————————————————————————————————————————————————————————————\nA: Drug X (N=134) \n Normal 20 (14.9%) 81 (60.4%) 1 (0.7%)\n Abnormal 11 (8.2%) 19 (14.2%) 0 \n Missing 0 1 (0.7%) 1 (0.7%)\nB: Placebo (N=134) \n Normal 18 (13.4%) 81 (60.4%) 2 (1.5%)\n Abnormal 3 (2.2%) 28 (20.9%) 0 \n Missing 0 2 (1.5%) 0 \nC: Combination (N=132) \n Normal 26 (19.7%) 69 (52.3%) 1 (0.8%)\n Abnormal 6 (4.5%) 29 (22%) 0 \n Missing 1 (0.8%) 0 0 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:47:37 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 tern_0.9.3.9031 rtables_0.6.6.9011 \n[4] magrittr_2.0.3 formatters_0.5.5.9020 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\nFor the EGT04 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\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\nset.seed(123)\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, omit_columns = c(\"AVALC\", \"BASEC\"))\n\nadeg_labels <- var_labels(adeg)\n\nadeg_f <- subset(\n adeg,\n PARAMCD == \"ECGINTP\" & # Analysis in terms of \"NORMAL\"/\"ABNORMAL\" (AVALC)\n SAFFL == \"Y\" & # \"Safety Population Flag\"\n ONTRTFL == \"Y\" & # \"On Treatment Record Flag\"\n WORS02FL == \"Y\" # \"Worst Post-Baseline Observation\"\n)\n\nadeg_f$AVALC[sample(seq_len(nrow(adeg_f)), size = 5)] <- \"Missing\"\nadeg_f$BASEC[sample(seq_len(nrow(adeg_f)), size = 5)] <- \"Missing\"\nadeg_f$AVALC <- factor(\n adeg_f$AVALC,\n levels = c(\"NORMAL\", \"ABNORMAL\", \"Missing\"),\n labels = c(\"Normal\", \"Abnormal\", \"Missing\")\n)\nadeg_f$BASEC <- factor(\n adeg_f$BASEC,\n levels = c(\"NORMAL\", \"ABNORMAL\", \"Missing\"),\n labels = c(\"Normal\", \"Abnormal\", \"Missing\")\n)\n\nvar_labels(adeg_f) <- adeg_labels\nadeg_f <- adeg_f %>%\n var_relabel(BASEC = \"Baseline\")\n\n# Temprary solution for over arching column\nadeg_f <- adeg_f %>% mutate(postbaseline_label = \"Post-Baseline\")\n\n\n\n\nThe EGT04 template consists of a stacked list of contingency tables, one per group. For each group, the n’s across all cells must add up to the group N in the analysis, and percentages are calculated using N as the denominator.\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table() %>%\n split_cols_by(\"postbaseline_label\") %>%\n split_cols_by(\"AVALC\") %>%\n split_rows_by(\"ARM\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adeg_f$ARM)) %>%\n add_rowcounts() %>%\n analyze_vars(\n \"BASEC\",\n denom = \"N_row\",\n .stats = \"count_fraction\",\n na.rm = FALSE\n ) %>%\n append_varlabels(adeg_f, c(\"BASEC\"), indent = 1L)\n\nresult <- build_table(lyt, adeg_f)\nresult\n\nDescription of Planned Arm Post-Baseline \n Baseline Normal Abnormal Missing \n———————————————————————————————————————————————————————————————\nA: Drug X (N=134) \n Normal 20 (14.9%) 81 (60.4%) 1 (0.7%)\n Abnormal 11 (8.2%) 19 (14.2%) 0 \n Missing 0 1 (0.7%) 1 (0.7%)\nB: Placebo (N=134) \n Normal 18 (13.4%) 81 (60.4%) 2 (1.5%)\n Abnormal 3 (2.2%) 28 (20.9%) 0 \n Missing 0 2 (1.5%) 0 \nC: Combination (N=132) \n Normal 26 (19.7%) 69 (52.3%) 1 (0.8%)\n Abnormal 6 (4.5%) 29 (22%) 0 \n Missing 1 (0.8%) 0 0 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:48:34 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 tern_0.9.3.9031 rtables_0.6.6.9011 \n[4] magrittr_2.0.3 formatters_0.5.5.9021 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "ECG", @@ -410,7 +410,7 @@ "href": "tables/pharmacokinetic/pkpt06.html", "title": "PKPT06", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\nlibrary(stringr)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\nadpp <- adpp %>%\n filter(AVISIT == \"CYCLE 1 DAY 1\", str_detect(tolower(PARAM), regex(\"norm by dose\", ignore_case = TRUE)))\n\n\n\n\n\nCode# lyt creation\nlyt <- basic_table() %>%\n split_cols_by(\n var = \"ARMCD\",\n split_fun = trim_levels_in_group(\"ARMCD\"),\n split_label = \"Treatment Arm\"\n ) %>%\n split_rows_by(\n var = \"PKPARAM\",\n label_pos = \"topleft\",\n split_label = \"PK Parameter\"\n ) %>%\n tern::analyze_vars(\n vars = \"AVAL\",\n .stats = c(\"n\", \"mean_sd\", \"cv\", \"geom_mean\", \"geom_cv\", \"median\", \"range\"),\n .formats = c(\n n = \"xx.\",\n mean_sd = format_sigfig(3, \"xx (xx)\"),\n cv = \"xx.x\",\n geom_mean = format_sigfig(3),\n geom_cv = \"xx.x\",\n median = format_sigfig(3),\n range = format_sigfig(3, \"xx - xx\")\n )\n )\n\n\nPlasma Drug X\n\n\nCodeadpp0 <- adpp %>%\n filter(PPCAT == \"Plasma Drug X\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp0)\nmain_title(result) <- paste(\"Summary of Dose-Normalized PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp0$PPCAT), \"\\nVisit:\", unique(adpp0$AVISIT))\nresult\n\nSummary of Dose-Normalized PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X \nVisit: CYCLE 1 DAY 1\n\n———————————————————————————————————————————————————————————————\nPK Parameter ARM A ARM C \n———————————————————————————————————————————————————————————————\nRENALCLD (L/hr/mg) \n n 134 132 \n Mean (SD) 0.00487 (0.000965) 0.00511 (0.000934)\n CV (%) 19.8 18.3 \n Geometric Mean 0.00477 0.00502 \n CV % Geometric Mean 21.2 19.7 \n Median 0.00497 0.00515 \n Min - Max 0.00238 - 0.00726 0.00236 - 0.00741 \n\n\nPlasma Drug Y\n\n\nCodeadpp1 <- adpp %>%\n filter(PPCAT == \"Plasma Drug Y\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp1)\nmain_title(result) <- paste(\"Summary of Dose-Normalized PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp1$PPCAT), \"\\nVisit:\", unique(adpp1$AVISIT))\nresult\n\nSummary of Dose-Normalized PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug Y \nVisit: CYCLE 1 DAY 1\n\n—————————————————————————————————————————\nPK Parameter ARM C \n—————————————————————————————————————————\nRENALCLD (L/hr/mg) \n n 132 \n Mean (SD) 0.00509 (0.00103)\n CV (%) 20.3 \n Geometric Mean 0.00499 \n CV % Geometric Mean 21.4 \n Median 0.00502 \n Min - Max 0.00236 - 0.00794\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:47:17 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] stringr_1.5.1 tern_0.9.3.9031 rtables_0.6.6.9011 \n[4] magrittr_2.0.3 formatters_0.5.5.9020 dplyr_1.1.4 \n[7] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 codetools_0.2-20 survival_3.5-8 fansi_1.0.6 \n[41] colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 tools_4.3.3 \n[45] pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\nlibrary(stringr)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\nadpp <- adpp %>%\n filter(AVISIT == \"CYCLE 1 DAY 1\", str_detect(tolower(PARAM), regex(\"norm by dose\", ignore_case = TRUE)))\n\n\n\n\n\nCode# lyt creation\nlyt <- basic_table() %>%\n split_cols_by(\n var = \"ARMCD\",\n split_fun = trim_levels_in_group(\"ARMCD\"),\n split_label = \"Treatment Arm\"\n ) %>%\n split_rows_by(\n var = \"PKPARAM\",\n label_pos = \"topleft\",\n split_label = \"PK Parameter\"\n ) %>%\n tern::analyze_vars(\n vars = \"AVAL\",\n .stats = c(\"n\", \"mean_sd\", \"cv\", \"geom_mean\", \"geom_cv\", \"median\", \"range\"),\n .formats = c(\n n = \"xx.\",\n mean_sd = format_sigfig(3, \"xx (xx)\"),\n cv = \"xx.x\",\n geom_mean = format_sigfig(3),\n geom_cv = \"xx.x\",\n median = format_sigfig(3),\n range = format_sigfig(3, \"xx - xx\")\n )\n )\n\n\nPlasma Drug X\n\n\nCodeadpp0 <- adpp %>%\n filter(PPCAT == \"Plasma Drug X\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp0)\nmain_title(result) <- paste(\"Summary of Dose-Normalized PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp0$PPCAT), \"\\nVisit:\", unique(adpp0$AVISIT))\nresult\n\nSummary of Dose-Normalized PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X \nVisit: CYCLE 1 DAY 1\n\n———————————————————————————————————————————————————————————————\nPK Parameter ARM A ARM C \n———————————————————————————————————————————————————————————————\nRENALCLD (L/hr/mg) \n n 134 132 \n Mean (SD) 0.00487 (0.000965) 0.00511 (0.000934)\n CV (%) 19.8 18.3 \n Geometric Mean 0.00477 0.00502 \n CV % Geometric Mean 21.2 19.7 \n Median 0.00497 0.00515 \n Min - Max 0.00238 - 0.00726 0.00236 - 0.00741 \n\n\nPlasma Drug Y\n\n\nCodeadpp1 <- adpp %>%\n filter(PPCAT == \"Plasma Drug Y\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp1)\nmain_title(result) <- paste(\"Summary of Dose-Normalized PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp1$PPCAT), \"\\nVisit:\", unique(adpp1$AVISIT))\nresult\n\nSummary of Dose-Normalized PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug Y \nVisit: CYCLE 1 DAY 1\n\n—————————————————————————————————————————\nPK Parameter ARM C \n—————————————————————————————————————————\nRENALCLD (L/hr/mg) \n n 132 \n Mean (SD) 0.00509 (0.00103)\n CV (%) 20.3 \n Geometric Mean 0.00499 \n CV % Geometric Mean 21.4 \n Median 0.00502 \n Min - Max 0.00236 - 0.00794\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:48:12 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] stringr_1.5.1 tern_0.9.3.9031 rtables_0.6.6.9011 \n[4] magrittr_2.0.3 formatters_0.5.5.9021 dplyr_1.1.4 \n[7] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 codetools_0.2-20 survival_3.5-8 fansi_1.0.6 \n[41] colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 tools_4.3.3 \n[45] pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Pharmacokinetic", @@ -422,7 +422,7 @@ "href": "tables/pharmacokinetic/pkpt04.html", "title": "PKPT04", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\nadpp <- adpp %>% filter(PPSPEC == \"Urine\", AVISIT == \"CYCLE 1 DAY 1\")\n\n\n\n\n\nCode# lyt creation\nlyt <- basic_table() %>%\n split_cols_by(\n var = \"ARMCD\",\n split_fun = trim_levels_in_group(\"ARMCD\"),\n split_label = \"Treatment Arm\"\n ) %>%\n split_rows_by(\n var = \"PKPARAM\",\n label_pos = \"topleft\",\n split_label = \"PK Parameter\"\n ) %>%\n tern::analyze_vars(\n vars = \"AVAL\",\n .stats = c(\"n\", \"mean_sd\", \"cv\", \"geom_mean\", \"geom_cv\", \"median\", \"range\"),\n .formats = c(\n n = \"xx.\",\n mean_sd = format_sigfig(3, \"xx (xx)\"),\n cv = \"xx.x\",\n geom_mean = format_sigfig(3),\n geom_cv = \"xx.x\",\n median = format_sigfig(3),\n range = format_sigfig(3, \"xx - xx\")\n )\n )\n\n\nPlasma Drug X\n\n\nCodeadpp0 <- adpp %>%\n filter(PPCAT == \"Plasma Drug X\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp0)\nmain_title(result) <- paste(\"Summary of\", unique(adpp0$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp0$PPCAT), \"\\nVisit:\", unique(adpp0$AVISIT))\nresult\n\nSummary of Urine PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X \nVisit: CYCLE 1 DAY 1\n\n———————————————————————————————————————————————————————————————\nPK Parameter ARM A ARM C \n———————————————————————————————————————————————————————————————\nAe (mg) \n n 268 264 \n Mean (SD) 1.55 (0.338) 1.54 (0.298) \n CV (%) 21.8 19.4 \n Geometric Mean 1.51 1.51 \n CV % Geometric Mean 23.0 20.3 \n Median 1.55 1.55 \n Min - Max 0.702 - 2.46 0.850 - 2.21 \nFe (%) \n n 268 264 \n Mean (SD) 15.7 (3.35) 16.1 (3.10) \n CV (%) 21.3 19.3 \n Geometric Mean 15.3 15.8 \n CV % Geometric Mean 22.2 20.2 \n Median 15.8 16.0 \n Min - Max 8.15 - 24.5 8.50 - 24.4 \nCLR (L/hr) \n n 134 132 \n Mean (SD) 0.0492 (0.00961) 0.0502 (0.0105) \n CV (%) 19.5 20.9 \n Geometric Mean 0.0482 0.0491 \n CV % Geometric Mean 21.0 21.9 \n Median 0.0491 0.0498 \n Min - Max 0.0249 - 0.0751 0.0251 - 0.0856 \nRENALCLD (L/hr/mg) \n n 134 132 \n Mean (SD) 0.00487 (0.000965) 0.00511 (0.000934)\n CV (%) 19.8 18.3 \n Geometric Mean 0.00477 0.00502 \n CV % Geometric Mean 21.2 19.7 \n Median 0.00497 0.00515 \n Min - Max 0.00238 - 0.00726 0.00236 - 0.00741 \n\n\nPlasma Drug Y\n\n\nCodeadpp1 <- adpp %>%\n filter(PPCAT == \"Plasma Drug Y\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp1)\nmain_title(result) <- paste(\"Summary of\", unique(adpp1$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp1$PPCAT), \"\\nVisit:\", unique(adpp1$AVISIT))\nresult\n\nSummary of Urine PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug Y \nVisit: CYCLE 1 DAY 1\n\n—————————————————————————————————————————\nPK Parameter ARM C \n—————————————————————————————————————————\nAe (mg) \n n 264 \n Mean (SD) 1.60 (0.315) \n CV (%) 19.7 \n Geometric Mean 1.56 \n CV % Geometric Mean 21.4 \n Median 1.60 \n Min - Max 0.857 - 2.26 \nFe (%) \n n 264 \n Mean (SD) 15.8 (3.08) \n CV (%) 19.4 \n Geometric Mean 15.5 \n CV % Geometric Mean 20.2 \n Median 15.7 \n Min - Max 8.31 - 23.8 \nCLR (L/hr) \n n 132 \n Mean (SD) 0.0497 (0.0101) \n CV (%) 20.3 \n Geometric Mean 0.0486 \n CV % Geometric Mean 22.0 \n Median 0.0491 \n Min - Max 0.0184 - 0.0776 \nRENALCLD (L/hr/mg) \n n 132 \n Mean (SD) 0.00509 (0.00103)\n CV (%) 20.3 \n Geometric Mean 0.00499 \n CV % Geometric Mean 21.4 \n Median 0.00502 \n Min - Max 0.00236 - 0.00794\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:47:06 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 codetools_0.2-20 survival_3.5-8 fansi_1.0.6 \n[41] colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 tools_4.3.3 \n[45] pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\nadpp <- adpp %>% filter(PPSPEC == \"Urine\", AVISIT == \"CYCLE 1 DAY 1\")\n\n\n\n\n\nCode# lyt creation\nlyt <- basic_table() %>%\n split_cols_by(\n var = \"ARMCD\",\n split_fun = trim_levels_in_group(\"ARMCD\"),\n split_label = \"Treatment Arm\"\n ) %>%\n split_rows_by(\n var = \"PKPARAM\",\n label_pos = \"topleft\",\n split_label = \"PK Parameter\"\n ) %>%\n tern::analyze_vars(\n vars = \"AVAL\",\n .stats = c(\"n\", \"mean_sd\", \"cv\", \"geom_mean\", \"geom_cv\", \"median\", \"range\"),\n .formats = c(\n n = \"xx.\",\n mean_sd = format_sigfig(3, \"xx (xx)\"),\n cv = \"xx.x\",\n geom_mean = format_sigfig(3),\n geom_cv = \"xx.x\",\n median = format_sigfig(3),\n range = format_sigfig(3, \"xx - xx\")\n )\n )\n\n\nPlasma Drug X\n\n\nCodeadpp0 <- adpp %>%\n filter(PPCAT == \"Plasma Drug X\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp0)\nmain_title(result) <- paste(\"Summary of\", unique(adpp0$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp0$PPCAT), \"\\nVisit:\", unique(adpp0$AVISIT))\nresult\n\nSummary of Urine PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X \nVisit: CYCLE 1 DAY 1\n\n———————————————————————————————————————————————————————————————\nPK Parameter ARM A ARM C \n———————————————————————————————————————————————————————————————\nAe (mg) \n n 268 264 \n Mean (SD) 1.55 (0.338) 1.54 (0.298) \n CV (%) 21.8 19.4 \n Geometric Mean 1.51 1.51 \n CV % Geometric Mean 23.0 20.3 \n Median 1.55 1.55 \n Min - Max 0.702 - 2.46 0.850 - 2.21 \nFe (%) \n n 268 264 \n Mean (SD) 15.7 (3.35) 16.1 (3.10) \n CV (%) 21.3 19.3 \n Geometric Mean 15.3 15.8 \n CV % Geometric Mean 22.2 20.2 \n Median 15.8 16.0 \n Min - Max 8.15 - 24.5 8.50 - 24.4 \nCLR (L/hr) \n n 134 132 \n Mean (SD) 0.0492 (0.00961) 0.0502 (0.0105) \n CV (%) 19.5 20.9 \n Geometric Mean 0.0482 0.0491 \n CV % Geometric Mean 21.0 21.9 \n Median 0.0491 0.0498 \n Min - Max 0.0249 - 0.0751 0.0251 - 0.0856 \nRENALCLD (L/hr/mg) \n n 134 132 \n Mean (SD) 0.00487 (0.000965) 0.00511 (0.000934)\n CV (%) 19.8 18.3 \n Geometric Mean 0.00477 0.00502 \n CV % Geometric Mean 21.2 19.7 \n Median 0.00497 0.00515 \n Min - Max 0.00238 - 0.00726 0.00236 - 0.00741 \n\n\nPlasma Drug Y\n\n\nCodeadpp1 <- adpp %>%\n filter(PPCAT == \"Plasma Drug Y\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp1)\nmain_title(result) <- paste(\"Summary of\", unique(adpp1$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp1$PPCAT), \"\\nVisit:\", unique(adpp1$AVISIT))\nresult\n\nSummary of Urine PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug Y \nVisit: CYCLE 1 DAY 1\n\n—————————————————————————————————————————\nPK Parameter ARM C \n—————————————————————————————————————————\nAe (mg) \n n 264 \n Mean (SD) 1.60 (0.315) \n CV (%) 19.7 \n Geometric Mean 1.56 \n CV % Geometric Mean 21.4 \n Median 1.60 \n Min - Max 0.857 - 2.26 \nFe (%) \n n 264 \n Mean (SD) 15.8 (3.08) \n CV (%) 19.4 \n Geometric Mean 15.5 \n CV % Geometric Mean 20.2 \n Median 15.7 \n Min - Max 8.31 - 23.8 \nCLR (L/hr) \n n 132 \n Mean (SD) 0.0497 (0.0101) \n CV (%) 20.3 \n Geometric Mean 0.0486 \n CV % Geometric Mean 22.0 \n Median 0.0491 \n Min - Max 0.0184 - 0.0776 \nRENALCLD (L/hr/mg) \n n 132 \n Mean (SD) 0.00509 (0.00103)\n CV (%) 20.3 \n Geometric Mean 0.00499 \n CV % Geometric Mean 21.4 \n Median 0.00502 \n Min - Max 0.00236 - 0.00794\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:48:00 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 codetools_0.2-20 survival_3.5-8 fansi_1.0.6 \n[41] colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 tools_4.3.3 \n[45] pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Pharmacokinetic", @@ -434,7 +434,7 @@ "href": "tables/pharmacokinetic/pkpt07.html", "title": "PKPT07", "section": "", - "text": "Data Setup\nStandard Table – Urine\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\nlibrary(stringr)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\nadpp <- adpp %>%\n filter(AVISIT == \"CYCLE 1 DAY 1\", str_detect(tolower(PARAM), regex(\"norm by dose\", ignore_case = TRUE)))\n\n\n\n\n\nCode# lyt creation\nlyt <- basic_table() %>%\n split_rows_by(\n var = \"ARMCD\",\n split_fun = trim_levels_in_group(\"ARMCD\"),\n label_pos = \"topleft\",\n split_label = \"Treatment Arm\"\n ) %>%\n split_rows_by(\n var = \"PKPARAM\",\n label_pos = \"topleft\",\n split_label = \"PK Parameter\",\n child_labels = \"hidden\"\n ) %>%\n analyze_vars_in_cols(\n vars = \"AVAL\",\n .stats = c(\n \"n\", \"mean\", \"sd\", \"cv\",\n \"geom_mean\", \"geom_cv\", \"median\",\n \"min\", \"max\"\n ),\n .labels = c(\n n = \"n\",\n mean = \"Mean\",\n sd = \"SD\",\n cv = \"CV (%)\",\n geom_mean = \"Geometric Mean\",\n geom_cv = \"CV % Geometric Mean\",\n median = \"Median\",\n min = \"Minimum\",\n max = \"Maximum\"\n ),\n .formats = c(\n n = \"xx.\",\n mean = format_sigfig(3),\n sd = format_sigfig(3),\n cv = \"xx.x\",\n median = format_sigfig(3),\n geom_mean = format_sigfig(3),\n geom_cv = \"xx.x\",\n min = format_sigfig(3),\n max = format_sigfig(3)\n )\n )\n\n\nPlasma Drug X\n\n\nCodeadpp0 <- adpp %>%\n filter(PPCAT == \"Plasma Drug X\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp0)\nmain_title(result) <- paste(\"Summary of\", unique(adpp0$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp0$PPCAT), \"\\nVisit:\", unique(adpp0$AVISIT))\nresult\n\nSummary of Urine PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X \nVisit: CYCLE 1 DAY 1\n\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM A \n RENALCLD (L/hr/mg) 134 0.00487 0.000965 19.8 0.00477 21.2 0.00497 0.00238 0.00726\nARM C \n RENALCLD (L/hr/mg) 132 0.00511 0.000934 18.3 0.00502 19.7 0.00515 0.00236 0.00741\n\n\nPlasma Drug Y\n\n\nCodeadpp1 <- adpp %>%\n filter(PPCAT == \"Plasma Drug Y\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp1)\nmain_title(result) <- paste(\"Summary of\", unique(adpp1$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp1$PPCAT), \"\\nVisit:\", unique(adpp1$AVISIT))\nresult\n\nSummary of Urine PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug Y \nVisit: CYCLE 1 DAY 1\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM C \n RENALCLD (L/hr/mg) 132 0.00509 0.00103 20.3 0.00499 21.4 0.00502 0.00236 0.00794\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:46:52 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] stringr_1.5.1 tern_0.9.3.9031 rtables_0.6.6.9011 \n[4] magrittr_2.0.3 formatters_0.5.5.9020 dplyr_1.1.4 \n[7] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 codetools_0.2-20 survival_3.5-8 fansi_1.0.6 \n[41] colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 tools_4.3.3 \n[45] pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table – Urine\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\nlibrary(stringr)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\nadpp <- adpp %>%\n filter(AVISIT == \"CYCLE 1 DAY 1\", str_detect(tolower(PARAM), regex(\"norm by dose\", ignore_case = TRUE)))\n\n\n\n\n\nCode# lyt creation\nlyt <- basic_table() %>%\n split_rows_by(\n var = \"ARMCD\",\n split_fun = trim_levels_in_group(\"ARMCD\"),\n label_pos = \"topleft\",\n split_label = \"Treatment Arm\"\n ) %>%\n split_rows_by(\n var = \"PKPARAM\",\n label_pos = \"topleft\",\n split_label = \"PK Parameter\",\n child_labels = \"hidden\"\n ) %>%\n analyze_vars_in_cols(\n vars = \"AVAL\",\n .stats = c(\n \"n\", \"mean\", \"sd\", \"cv\",\n \"geom_mean\", \"geom_cv\", \"median\",\n \"min\", \"max\"\n ),\n .labels = c(\n n = \"n\",\n mean = \"Mean\",\n sd = \"SD\",\n cv = \"CV (%)\",\n geom_mean = \"Geometric Mean\",\n geom_cv = \"CV % Geometric Mean\",\n median = \"Median\",\n min = \"Minimum\",\n max = \"Maximum\"\n ),\n .formats = c(\n n = \"xx.\",\n mean = format_sigfig(3),\n sd = format_sigfig(3),\n cv = \"xx.x\",\n median = format_sigfig(3),\n geom_mean = format_sigfig(3),\n geom_cv = \"xx.x\",\n min = format_sigfig(3),\n max = format_sigfig(3)\n )\n )\n\n\nPlasma Drug X\n\n\nCodeadpp0 <- adpp %>%\n filter(PPCAT == \"Plasma Drug X\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp0)\nmain_title(result) <- paste(\"Summary of\", unique(adpp0$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp0$PPCAT), \"\\nVisit:\", unique(adpp0$AVISIT))\nresult\n\nSummary of Urine PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X \nVisit: CYCLE 1 DAY 1\n\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM A \n RENALCLD (L/hr/mg) 134 0.00487 0.000965 19.8 0.00477 21.2 0.00497 0.00238 0.00726\nARM C \n RENALCLD (L/hr/mg) 132 0.00511 0.000934 18.3 0.00502 19.7 0.00515 0.00236 0.00741\n\n\nPlasma Drug Y\n\n\nCodeadpp1 <- adpp %>%\n filter(PPCAT == \"Plasma Drug Y\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp1)\nmain_title(result) <- paste(\"Summary of\", unique(adpp1$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp1$PPCAT), \"\\nVisit:\", unique(adpp1$AVISIT))\nresult\n\nSummary of Urine PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug Y \nVisit: CYCLE 1 DAY 1\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM C \n RENALCLD (L/hr/mg) 132 0.00509 0.00103 20.3 0.00499 21.4 0.00502 0.00236 0.00794\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:47:45 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] stringr_1.5.1 tern_0.9.3.9031 rtables_0.6.6.9011 \n[4] magrittr_2.0.3 formatters_0.5.5.9021 dplyr_1.1.4 \n[7] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 codetools_0.2-20 survival_3.5-8 fansi_1.0.6 \n[41] colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 tools_4.3.3 \n[45] pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Pharmacokinetic", @@ -446,7 +446,7 @@ "href": "tables/pharmacokinetic/pkpt03.html", "title": "PKPT03", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\n# Preprocess analysis data ----\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\nadpp <- adpp %>%\n filter(PPSPEC == \"Plasma\") %>%\n filter(AVISIT %in% c(\"CYCLE 1 DAY 1\", \"CYCLE 1 DAY 2\")) %>%\n h_pkparam_sort() %>%\n mutate(PARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PARAM = reorder(PARAM, TLG_ORDER))\n\n# Preprocess subject-level data ----\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\n# Workaround needed to include (N=xx) population counts\n# Repeat ADSL by the number of levels in AVISIT\n# Include AVISIT and dummy PARAM as it's needed for trim_levels_in_group\nadsl_tmp <- adsl %>%\n select(STUDYID, USUBJID, ARMCD) %>%\n unique() %>%\n mutate(PARAM = factor(NA_character_, levels = levels(adpp$PARAM)))\n\n# Data for Plasma Drug X example ----\nadpp_x <- adpp %>%\n filter(PPCAT == \"Plasma Drug X\") %>%\n # Please do not replicate mutate statement below!\n # It is used to make the random data in this example more realistic\n # as not all parameters are always available across all visits.\n mutate(\n AVAL = if_else(\n ARMCD == \"ARM A\" & AVISIT == \"CYCLE 1 DAY 1\" & PARAM == \"Cmax (ug/mL)\",\n NA_real_, AVAL\n )\n )\n\nadpp_x_tmp <- adpp_x %>%\n select(STUDYID, USUBJID, ARMCD, AVISIT) %>%\n unique()\n\nadsl_x_splitvars <- adsl_tmp %>%\n left_join(adpp_x_tmp, by = c(\"STUDYID\", \"USUBJID\", \"ARMCD\")) %>%\n filter(!is.na(AVISIT))\n\n# Data for Plasma Drug Y example ----\nadpp_y <- adpp %>%\n filter(PPCAT == \"Plasma Drug Y\")\n\nadpp_y_tmp <- adpp_y %>%\n select(STUDYID, USUBJID, ARMCD, AVISIT) %>%\n unique()\n\nadsl_y_splitvars <- adsl_tmp %>%\n left_join(adpp_y_tmp, by = c(\"STUDYID\", \"USUBJID\", \"ARMCD\")) %>%\n filter(!is.na(AVISIT))\n\n\n\n\n\nCode# lyt creation\nlyt <- basic_table() %>%\n split_rows_by(\n var = \"AVISIT\",\n split_fun = drop_split_levels,\n split_label = \"Visit\",\n page_by = TRUE\n ) %>%\n split_rows_by(\n var = \"ARMCD\",\n split_fun = trim_levels_in_group(\"PARAM\"),\n label_pos = \"topleft\",\n split_label = \"Treatment Arm\"\n ) %>%\n add_rowcounts(alt_counts = TRUE) %>%\n split_rows_by(\n var = \"PARAM\",\n label_pos = \"topleft\",\n split_label = \"PK Parameter\",\n child_labels = \"hidden\"\n ) %>%\n analyze_vars_in_cols(\n vars = \"AVAL\",\n .stats = c(\n \"n\", \"mean\", \"sd\", \"cv\",\n \"geom_mean\", \"geom_cv\", \"median\",\n \"min\", \"max\"\n ),\n .labels = c(\n n = \"n\",\n mean = \"Mean\",\n sd = \"SD\",\n cv = \"CV (%)\",\n geom_mean = \"Geometric Mean\",\n geom_cv = \"CV % Geometric Mean\",\n median = \"Median\",\n min = \"Minimum\",\n max = \"Maximum\"\n ),\n .formats = c(\n n = \"xx.\",\n mean = format_sigfig(3),\n sd = format_sigfig(3),\n cv = \"xx.x\",\n median = format_sigfig(3),\n geom_mean = format_sigfig(3),\n geom_cv = \"xx.x\",\n min = format_sigfig(3),\n max = format_sigfig(3)\n ),\n na_str = \"NE\"\n )\n\n\nPlasma Drug X\n\nCoderesult <- build_table(lyt, df = adpp_x, alt_counts_df = adsl_x_splitvars)\nmain_title(result) <- paste(\"Summary of\", unique(adpp_x$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp_x$PPCAT))\nresult <- paginate_table(result, landscape = TRUE)\nresult\n\n$`CYCLE 1 DAY 1`\nSummary of Plasma PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X\nVisit: CYCLE 1 DAY 1\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM A (N=134) \n Cmax (ug/mL) 0 NE NE NE NE NE NE NE NE \n AUCinf obs (day*ug/mL) 134 203 37.7 18.6 199 18.7 197 125 311 \n CL obs (ml/day/kg) 134 5.04 1.04 20.6 4.93 22.4 5.08 2.25 7.39 \nARM C (N=132) \n Cmax (ug/mL) 132 30.0 5.46 18.2 29.5 18.9 29.8 15.9 47.6 \n AUCinf obs (day*ug/mL) 132 195 37.8 19.4 192 20.1 196 103 315 \n CL obs (ml/day/kg) 132 5.01 0.985 19.7 4.91 21.1 4.97 2.10 7.49 \n\n$`CYCLE 1 DAY 2`\nSummary of Plasma PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X\nVisit: CYCLE 1 DAY 2\n\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM A (N=134) \n Cmax (ug/mL) 134 29.4 6.22 21.2 28.6 24.4 29.8 10.1 43.5 \n AUCinf obs (day*ug/mL) 134 202 41.2 20.4 197 21.4 200 105 294 \n CL obs (ml/day/kg) 134 5.04 1.04 20.7 4.92 22.6 5.01 2.39 7.18 \nARM C (N=132) \n Cmax (ug/mL) 132 30.4 6.03 19.9 29.7 21.7 30.5 12.4 45.5 \n AUCinf obs (day*ug/mL) 132 191 43.0 22.5 186 24.7 189 74.8 296 \n CL obs (ml/day/kg) 132 5.07 1.07 21.1 4.96 22.4 5.01 2.48 7.50 \n\n\nPlasma Drug X: Remove Rows with 0s\n\nCoderesult <- build_table(lyt, df = adpp_x, alt_counts_df = adsl_x_splitvars) %>%\n prune_table()\n\nmain_title(result) <- paste(\"Summary of\", unique(adpp_x$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp_x$PPCAT))\nresult <- paginate_table(result, landscape = TRUE)\nresult\n\n$`CYCLE 1 DAY 1`\nSummary of Plasma PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X\nVisit: CYCLE 1 DAY 1\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM A (N=134) \n AUCinf obs (day*ug/mL) 134 203 37.7 18.6 199 18.7 197 125 311 \n CL obs (ml/day/kg) 134 5.04 1.04 20.6 4.93 22.4 5.08 2.25 7.39 \nARM C (N=132) \n Cmax (ug/mL) 132 30.0 5.46 18.2 29.5 18.9 29.8 15.9 47.6 \n AUCinf obs (day*ug/mL) 132 195 37.8 19.4 192 20.1 196 103 315 \n CL obs (ml/day/kg) 132 5.01 0.985 19.7 4.91 21.1 4.97 2.10 7.49 \n\n$`CYCLE 1 DAY 2`\nSummary of Plasma PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X\nVisit: CYCLE 1 DAY 2\n\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM A (N=134) \n Cmax (ug/mL) 134 29.4 6.22 21.2 28.6 24.4 29.8 10.1 43.5 \n AUCinf obs (day*ug/mL) 134 202 41.2 20.4 197 21.4 200 105 294 \n CL obs (ml/day/kg) 134 5.04 1.04 20.7 4.92 22.6 5.01 2.39 7.18 \nARM C (N=132) \n Cmax (ug/mL) 132 30.4 6.03 19.9 29.7 21.7 30.5 12.4 45.5 \n AUCinf obs (day*ug/mL) 132 191 43.0 22.5 186 24.7 189 74.8 296 \n CL obs (ml/day/kg) 132 5.07 1.07 21.1 4.96 22.4 5.01 2.48 7.50 \n\n\nPlasma Drug Y\n\nCoderesult <- build_table(lyt, df = adpp_y, alt_counts_df = adsl_y_splitvars)\nmain_title(result) <- paste(\"Summary of\", unique(adpp_y$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp_y$PPCAT))\nresult <- paginate_table(result, landscape = TRUE)\nresult\n\n$`CYCLE 1 DAY 1`\nSummary of Plasma PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug Y\nVisit: CYCLE 1 DAY 1\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM C (N=132) \n Cmax (ug/mL) 132 29.9 5.55 18.6 29.4 20.1 29.7 14.1 43.4 \n AUCinf obs (day*ug/mL) 132 199 37.9 19.1 195 18.9 195 126 318 \n CL obs (ml/day/kg) 132 4.96 0.895 18.1 4.87 18.7 4.94 2.99 7.21 \n\n$`CYCLE 1 DAY 2`\nSummary of Plasma PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug Y\nVisit: CYCLE 1 DAY 2\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM C (N=132) \n Cmax (ug/mL) 132 30.7 6.12 19.9 30.1 21.9 31.4 12.9 48.3 \n AUCinf obs (day*ug/mL) 132 199 40.0 20.1 194 22.2 197 79.2 295 \n CL obs (ml/day/kg) 132 4.99 0.984 19.7 4.89 20.9 4.96 2.58 8.39 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:46:40 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 withr_3.0.0 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\n# Preprocess analysis data ----\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\nadpp <- adpp %>%\n filter(PPSPEC == \"Plasma\") %>%\n filter(AVISIT %in% c(\"CYCLE 1 DAY 1\", \"CYCLE 1 DAY 2\")) %>%\n h_pkparam_sort() %>%\n mutate(PARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PARAM = reorder(PARAM, TLG_ORDER))\n\n# Preprocess subject-level data ----\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\n# Workaround needed to include (N=xx) population counts\n# Repeat ADSL by the number of levels in AVISIT\n# Include AVISIT and dummy PARAM as it's needed for trim_levels_in_group\nadsl_tmp <- adsl %>%\n select(STUDYID, USUBJID, ARMCD) %>%\n unique() %>%\n mutate(PARAM = factor(NA_character_, levels = levels(adpp$PARAM)))\n\n# Data for Plasma Drug X example ----\nadpp_x <- adpp %>%\n filter(PPCAT == \"Plasma Drug X\") %>%\n # Please do not replicate mutate statement below!\n # It is used to make the random data in this example more realistic\n # as not all parameters are always available across all visits.\n mutate(\n AVAL = if_else(\n ARMCD == \"ARM A\" & AVISIT == \"CYCLE 1 DAY 1\" & PARAM == \"Cmax (ug/mL)\",\n NA_real_, AVAL\n )\n )\n\nadpp_x_tmp <- adpp_x %>%\n select(STUDYID, USUBJID, ARMCD, AVISIT) %>%\n unique()\n\nadsl_x_splitvars <- adsl_tmp %>%\n left_join(adpp_x_tmp, by = c(\"STUDYID\", \"USUBJID\", \"ARMCD\")) %>%\n filter(!is.na(AVISIT))\n\n# Data for Plasma Drug Y example ----\nadpp_y <- adpp %>%\n filter(PPCAT == \"Plasma Drug Y\")\n\nadpp_y_tmp <- adpp_y %>%\n select(STUDYID, USUBJID, ARMCD, AVISIT) %>%\n unique()\n\nadsl_y_splitvars <- adsl_tmp %>%\n left_join(adpp_y_tmp, by = c(\"STUDYID\", \"USUBJID\", \"ARMCD\")) %>%\n filter(!is.na(AVISIT))\n\n\n\n\n\nCode# lyt creation\nlyt <- basic_table() %>%\n split_rows_by(\n var = \"AVISIT\",\n split_fun = drop_split_levels,\n split_label = \"Visit\",\n page_by = TRUE\n ) %>%\n split_rows_by(\n var = \"ARMCD\",\n split_fun = trim_levels_in_group(\"PARAM\"),\n label_pos = \"topleft\",\n split_label = \"Treatment Arm\"\n ) %>%\n add_rowcounts(alt_counts = TRUE) %>%\n split_rows_by(\n var = \"PARAM\",\n label_pos = \"topleft\",\n split_label = \"PK Parameter\",\n child_labels = \"hidden\"\n ) %>%\n analyze_vars_in_cols(\n vars = \"AVAL\",\n .stats = c(\n \"n\", \"mean\", \"sd\", \"cv\",\n \"geom_mean\", \"geom_cv\", \"median\",\n \"min\", \"max\"\n ),\n .labels = c(\n n = \"n\",\n mean = \"Mean\",\n sd = \"SD\",\n cv = \"CV (%)\",\n geom_mean = \"Geometric Mean\",\n geom_cv = \"CV % Geometric Mean\",\n median = \"Median\",\n min = \"Minimum\",\n max = \"Maximum\"\n ),\n .formats = c(\n n = \"xx.\",\n mean = format_sigfig(3),\n sd = format_sigfig(3),\n cv = \"xx.x\",\n median = format_sigfig(3),\n geom_mean = format_sigfig(3),\n geom_cv = \"xx.x\",\n min = format_sigfig(3),\n max = format_sigfig(3)\n ),\n na_str = \"NE\"\n )\n\n\nPlasma Drug X\n\nCoderesult <- build_table(lyt, df = adpp_x, alt_counts_df = adsl_x_splitvars)\nmain_title(result) <- paste(\"Summary of\", unique(adpp_x$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp_x$PPCAT))\nresult <- paginate_table(result, landscape = TRUE)\nresult\n\n$`CYCLE 1 DAY 1`\nSummary of Plasma PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X\nVisit: CYCLE 1 DAY 1\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM A (N=134) \n Cmax (ug/mL) 0 NE NE NE NE NE NE NE NE \n AUCinf obs (day*ug/mL) 134 203 37.7 18.6 199 18.7 197 125 311 \n CL obs (ml/day/kg) 134 5.04 1.04 20.6 4.93 22.4 5.08 2.25 7.39 \nARM C (N=132) \n Cmax (ug/mL) 132 30.0 5.46 18.2 29.5 18.9 29.8 15.9 47.6 \n AUCinf obs (day*ug/mL) 132 195 37.8 19.4 192 20.1 196 103 315 \n CL obs (ml/day/kg) 132 5.01 0.985 19.7 4.91 21.1 4.97 2.10 7.49 \n\n$`CYCLE 1 DAY 2`\nSummary of Plasma PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X\nVisit: CYCLE 1 DAY 2\n\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM A (N=134) \n Cmax (ug/mL) 134 29.4 6.22 21.2 28.6 24.4 29.8 10.1 43.5 \n AUCinf obs (day*ug/mL) 134 202 41.2 20.4 197 21.4 200 105 294 \n CL obs (ml/day/kg) 134 5.04 1.04 20.7 4.92 22.6 5.01 2.39 7.18 \nARM C (N=132) \n Cmax (ug/mL) 132 30.4 6.03 19.9 29.7 21.7 30.5 12.4 45.5 \n AUCinf obs (day*ug/mL) 132 191 43.0 22.5 186 24.7 189 74.8 296 \n CL obs (ml/day/kg) 132 5.07 1.07 21.1 4.96 22.4 5.01 2.48 7.50 \n\n\nPlasma Drug X: Remove Rows with 0s\n\nCoderesult <- build_table(lyt, df = adpp_x, alt_counts_df = adsl_x_splitvars) %>%\n prune_table()\n\nmain_title(result) <- paste(\"Summary of\", unique(adpp_x$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp_x$PPCAT))\nresult <- paginate_table(result, landscape = TRUE)\nresult\n\n$`CYCLE 1 DAY 1`\nSummary of Plasma PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X\nVisit: CYCLE 1 DAY 1\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM A (N=134) \n AUCinf obs (day*ug/mL) 134 203 37.7 18.6 199 18.7 197 125 311 \n CL obs (ml/day/kg) 134 5.04 1.04 20.6 4.93 22.4 5.08 2.25 7.39 \nARM C (N=132) \n Cmax (ug/mL) 132 30.0 5.46 18.2 29.5 18.9 29.8 15.9 47.6 \n AUCinf obs (day*ug/mL) 132 195 37.8 19.4 192 20.1 196 103 315 \n CL obs (ml/day/kg) 132 5.01 0.985 19.7 4.91 21.1 4.97 2.10 7.49 \n\n$`CYCLE 1 DAY 2`\nSummary of Plasma PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X\nVisit: CYCLE 1 DAY 2\n\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM A (N=134) \n Cmax (ug/mL) 134 29.4 6.22 21.2 28.6 24.4 29.8 10.1 43.5 \n AUCinf obs (day*ug/mL) 134 202 41.2 20.4 197 21.4 200 105 294 \n CL obs (ml/day/kg) 134 5.04 1.04 20.7 4.92 22.6 5.01 2.39 7.18 \nARM C (N=132) \n Cmax (ug/mL) 132 30.4 6.03 19.9 29.7 21.7 30.5 12.4 45.5 \n AUCinf obs (day*ug/mL) 132 191 43.0 22.5 186 24.7 189 74.8 296 \n CL obs (ml/day/kg) 132 5.07 1.07 21.1 4.96 22.4 5.01 2.48 7.50 \n\n\nPlasma Drug Y\n\nCoderesult <- build_table(lyt, df = adpp_y, alt_counts_df = adsl_y_splitvars)\nmain_title(result) <- paste(\"Summary of\", unique(adpp_y$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp_y$PPCAT))\nresult <- paginate_table(result, landscape = TRUE)\nresult\n\n$`CYCLE 1 DAY 1`\nSummary of Plasma PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug Y\nVisit: CYCLE 1 DAY 1\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM C (N=132) \n Cmax (ug/mL) 132 29.9 5.55 18.6 29.4 20.1 29.7 14.1 43.4 \n AUCinf obs (day*ug/mL) 132 199 37.9 19.1 195 18.9 195 126 318 \n CL obs (ml/day/kg) 132 4.96 0.895 18.1 4.87 18.7 4.94 2.99 7.21 \n\n$`CYCLE 1 DAY 2`\nSummary of Plasma PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug Y\nVisit: CYCLE 1 DAY 2\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM C (N=132) \n Cmax (ug/mL) 132 30.7 6.12 19.9 30.1 21.9 31.4 12.9 48.3 \n AUCinf obs (day*ug/mL) 132 199 40.0 20.1 194 22.2 197 79.2 295 \n CL obs (ml/day/kg) 132 4.99 0.984 19.7 4.89 20.9 4.96 2.58 8.39 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:47:33 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 withr_3.0.0 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Pharmacokinetic", @@ -458,7 +458,7 @@ "href": "tables/pharmacokinetic/pkpt08.html", "title": "PKPT08", "section": "", - "text": "Data Setup\nStandard Table – Plasma\nteal App\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(tern)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\n\nadpp <- adpp %>%\n filter(PPSTINT != \"NA\" & PPENINT != \"NA\") %>%\n mutate(PPINT = factor(paste0(gsub(\"[PH]\", \"\", PPSTINT), \"-\", gsub(\"[PH]\", \"\", PPENINT))))\n\n\n\n\n\n\nCode# create layout\nlyt <- basic_table() %>%\n add_overall_col(\"Accumulation Interval (hours)\") %>%\n split_cols_by(var = \"PPINT\") %>%\n split_cols_by(var = \"PKPARAM\") %>%\n split_rows_by(\n var = \"ARMCD\",\n split_fun = trim_levels_in_group(\"ACTARM\"),\n label_pos = \"topleft\",\n split_label = \"Treatment Arm\"\n ) %>%\n analyze_vars(\n vars = \"AVAL\",\n .stats = c(\n \"n\", \"mean\", \"sd\", \"cv\",\n \"median\", \"min\", \"max\"\n ),\n .labels = c(\n n = \"n\",\n mean = \"Mean\",\n sd = \"SD\",\n cv = \"CV (%)\",\n median = \"Median\",\n min = \"Minimum\",\n max = \"Maximum\"\n ),\n .formats = c(\n n = \"xx.\",\n mean = format_sigfig(3),\n sd = format_sigfig(3),\n cv = \"xx.x\",\n median = format_sigfig(3),\n min = format_sigfig(3),\n max = format_sigfig(3)\n )\n )\n\nadpp0 <- adpp %>%\n filter(\n AVISIT == \"CYCLE 1 DAY 1\",\n PPCAT == \"Plasma Drug X\"\n ) %>%\n h_pkparam_sort() %>%\n mutate(\n PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))\n )\n\nresult <- build_table(lyt, df = adpp0)\nmain_title(result) <- paste(\n \"Summary of Cumulative Amount and Percentage of\", unique(adpp0$PPSPEC), \"Recovered from\\n\",\n unique(adpp0$PPCAT), \"following\", unique(adpp0$REGIMEN), \"Administration for\",\n unique(adpp0$PPINT)[length(unique(adpp0$PPINT))], \"hours, PK Population\"\n)\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp0$PPCAT), \"\\nVisit:\", unique(adpp0$AVISIT))\n\ncat(rtables::toString(result, indent_size = 10))\n\nSummary of Cumulative Amount and Percentage of Urine Recovered from\n Plasma Drug X following BID Administration for 0-24 hours, PK Population\nAnalyte: Plasma Drug X \nVisit: CYCLE 1 DAY 1\n\n——————————————————————————————————————————————————————————\n Accumulation Interval (hours) \n 0-12 0-24 \nTreatment Arm Ae (mg) Fe (%) Ae (mg) Fe (%)\n——————————————————————————————————————————————————————————\nARM A \n n 134 134 134 134 \n Mean 1.55 15.7 1.55 15.7 \n SD 0.339 3.35 0.339 3.35 \n CV (%) 21.9 21.4 21.9 21.4 \n Median 1.55 15.8 1.55 15.8 \n Minimum 0.702 8.15 0.702 8.15 \n Maximum 2.46 24.5 2.46 24.5 \nARM C \n n 132 132 132 132 \n Mean 1.54 16.1 1.54 16.1 \n SD 0.298 3.11 0.298 3.11 \n CV (%) 19.4 19.3 19.4 19.3 \n Median 1.55 16.0 1.55 16.0 \n Minimum 0.850 8.50 0.850 8.50 \n Maximum 2.21 24.4 2.21 24.4 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:46:21 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9020 scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 codetools_0.2-20 survival_3.5-8 fansi_1.0.6 \n[41] colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 tools_4.3.3 \n[45] pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table – Plasma\nteal App\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(tern)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\n\nadpp <- adpp %>%\n filter(PPSTINT != \"NA\" & PPENINT != \"NA\") %>%\n mutate(PPINT = factor(paste0(gsub(\"[PH]\", \"\", PPSTINT), \"-\", gsub(\"[PH]\", \"\", PPENINT))))\n\n\n\n\n\n\nCode# create layout\nlyt <- basic_table() %>%\n add_overall_col(\"Accumulation Interval (hours)\") %>%\n split_cols_by(var = \"PPINT\") %>%\n split_cols_by(var = \"PKPARAM\") %>%\n split_rows_by(\n var = \"ARMCD\",\n split_fun = trim_levels_in_group(\"ACTARM\"),\n label_pos = \"topleft\",\n split_label = \"Treatment Arm\"\n ) %>%\n analyze_vars(\n vars = \"AVAL\",\n .stats = c(\n \"n\", \"mean\", \"sd\", \"cv\",\n \"median\", \"min\", \"max\"\n ),\n .labels = c(\n n = \"n\",\n mean = \"Mean\",\n sd = \"SD\",\n cv = \"CV (%)\",\n median = \"Median\",\n min = \"Minimum\",\n max = \"Maximum\"\n ),\n .formats = c(\n n = \"xx.\",\n mean = format_sigfig(3),\n sd = format_sigfig(3),\n cv = \"xx.x\",\n median = format_sigfig(3),\n min = format_sigfig(3),\n max = format_sigfig(3)\n )\n )\n\nadpp0 <- adpp %>%\n filter(\n AVISIT == \"CYCLE 1 DAY 1\",\n PPCAT == \"Plasma Drug X\"\n ) %>%\n h_pkparam_sort() %>%\n mutate(\n PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))\n )\n\nresult <- build_table(lyt, df = adpp0)\nmain_title(result) <- paste(\n \"Summary of Cumulative Amount and Percentage of\", unique(adpp0$PPSPEC), \"Recovered from\\n\",\n unique(adpp0$PPCAT), \"following\", unique(adpp0$REGIMEN), \"Administration for\",\n unique(adpp0$PPINT)[length(unique(adpp0$PPINT))], \"hours, PK Population\"\n)\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp0$PPCAT), \"\\nVisit:\", unique(adpp0$AVISIT))\n\ncat(rtables::toString(result, indent_size = 10))\n\nSummary of Cumulative Amount and Percentage of Urine Recovered from\n Plasma Drug X following BID Administration for 0-24 hours, PK Population\nAnalyte: Plasma Drug X \nVisit: CYCLE 1 DAY 1\n\n——————————————————————————————————————————————————————————\n Accumulation Interval (hours) \n 0-12 0-24 \nTreatment Arm Ae (mg) Fe (%) Ae (mg) Fe (%)\n——————————————————————————————————————————————————————————\nARM A \n n 134 134 134 134 \n Mean 1.55 15.7 1.55 15.7 \n SD 0.339 3.35 0.339 3.35 \n CV (%) 21.9 21.4 21.9 21.4 \n Median 1.55 15.8 1.55 15.8 \n Minimum 0.702 8.15 0.702 8.15 \n Maximum 2.46 24.5 2.46 24.5 \nARM C \n n 132 132 132 132 \n Mean 1.54 16.1 1.54 16.1 \n SD 0.298 3.11 0.298 3.11 \n CV (%) 19.4 19.3 19.4 19.3 \n Median 1.55 16.0 1.55 16.0 \n Minimum 0.850 8.50 0.850 8.50 \n Maximum 2.21 24.4 2.21 24.4 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:47:13 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9021 scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 codetools_0.2-20 survival_3.5-8 fansi_1.0.6 \n[41] colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 tools_4.3.3 \n[45] pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Pharmacokinetic", @@ -470,7 +470,7 @@ "href": "tables/disclosures/eudrat02.html", "title": "EUDRAT02", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\nFor illustrative purposes, the adae data is filtered by arm A: Drug X here.\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadae <- df_explicit_na(adae)\n\nadae_serious <- adae %>% filter(AESER == \"Y\", SAFFL == \"Y\")\nadae_serious_arm <- adae_serious %>% filter(ARM == \"A: Drug X\")\n\nfilters_list <- list(\n related = with_label(c(AEREL = \"Y\"), \"Events (Related)\"),\n fatal = with_label(c(AESDTH = \"Y\"), \"Events (Fatal)\"),\n fatal_related = with_label(c(AEREL = \"Y\", AESDTH = \"Y\"), \"Events (Fatal & Related)\")\n)\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table() %>%\n summarize_patients_events_in_cols(\n filters_list = filters_list,\n empty_stats = c(\"all\", \"related\", \"fatal\", \"fatal_related\"),\n custom_label = \"Total number of patients with at least one serious adverse event\"\n ) %>%\n split_rows_by(\"AEBODSYS\",\n nested = FALSE,\n split_fun = split_fun,\n indent_mod = -1L,\n label_pos = \"topleft\",\n split_label = obj_label(adae_serious_arm$AEBODSYS)\n ) %>%\n split_rows_by(\"AEDECOD\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae_serious_arm$AEDECOD)\n ) %>%\n summarize_patients_events_in_cols(\n filters_list = filters_list,\n col_split = FALSE\n )\n\nresult <- build_table(lyt, adae_serious_arm)\nresult\n\nBody System or Organ Class \n Dictionary-Derived Term Patients (All) Events (All) Events (Related) Events (Fatal) Events (Fatal & Related)\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one serious adverse event 104 \ncl A.1 \n dcd A.1.1.1.2 48 68 0 0 0 \ncl B.1 \n dcd B.1.1.1.1 47 56 56 56 56 \ncl B.2 \n dcd B.2.2.3.1 48 64 0 0 0 \ncl D.1 \n dcd D.1.1.1.1 50 61 61 61 61 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:46:10 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 scda_0.1.6.9017 tern_0.9.3.9031 \n[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\nFor illustrative purposes, the adae data is filtered by arm A: Drug X here.\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadae <- df_explicit_na(adae)\n\nadae_serious <- adae %>% filter(AESER == \"Y\", SAFFL == \"Y\")\nadae_serious_arm <- adae_serious %>% filter(ARM == \"A: Drug X\")\n\nfilters_list <- list(\n related = with_label(c(AEREL = \"Y\"), \"Events (Related)\"),\n fatal = with_label(c(AESDTH = \"Y\"), \"Events (Fatal)\"),\n fatal_related = with_label(c(AEREL = \"Y\", AESDTH = \"Y\"), \"Events (Fatal & Related)\")\n)\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table() %>%\n summarize_patients_events_in_cols(\n filters_list = filters_list,\n empty_stats = c(\"all\", \"related\", \"fatal\", \"fatal_related\"),\n custom_label = \"Total number of patients with at least one serious adverse event\"\n ) %>%\n split_rows_by(\"AEBODSYS\",\n nested = FALSE,\n split_fun = split_fun,\n indent_mod = -1L,\n label_pos = \"topleft\",\n split_label = obj_label(adae_serious_arm$AEBODSYS)\n ) %>%\n split_rows_by(\"AEDECOD\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae_serious_arm$AEDECOD)\n ) %>%\n summarize_patients_events_in_cols(\n filters_list = filters_list,\n col_split = FALSE\n )\n\nresult <- build_table(lyt, adae_serious_arm)\nresult\n\nBody System or Organ Class \n Dictionary-Derived Term Patients (All) Events (All) Events (Related) Events (Fatal) Events (Fatal & Related)\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one serious adverse event 104 \ncl A.1 \n dcd A.1.1.1.2 48 68 0 0 0 \ncl B.1 \n dcd B.1.1.1.1 47 56 56 56 56 \ncl B.2 \n dcd B.2.2.3.1 48 64 0 0 0 \ncl D.1 \n dcd D.1.1.1.1 50 61 61 61 61 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:47:01 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 scda_0.1.6.9017 tern_0.9.3.9031 \n[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Disclosures", @@ -482,7 +482,7 @@ "href": "tables/disposition/pdt01.html", "title": "PDT01", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADDV <- synthetic_cdisc_dataset(\"latest\", \"addv\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADDV <- df_explicit_na(ADDV)\n})\ndatanames <- c(\"ADSL\", \"ADDV\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADDV <- data[[\"ADDV\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:45:56 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADDV <- synthetic_cdisc_dataset(\"latest\", \"addv\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADDV <- df_explicit_na(ADDV)\n})\ndatanames <- c(\"ADSL\", \"ADDV\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADDV <- data[[\"ADDV\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:46:47 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Disposition", @@ -494,7 +494,7 @@ "href": "tables/disposition/pdt02.html", "title": "PDT02", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\naddv <- synthetic_cdisc_dataset(\"latest\", \"addv\")\n\nadsl <- df_explicit_na(adsl)\naddv <- df_explicit_na(addv)\n\naddv_pan <- addv %>%\n filter(AEPRELFL == \"Y\" & DVCAT == \"MAJOR\") %>%\n var_relabel(\n DVREAS = \"Primary Reason\",\n DVTERM = \"Description\"\n )\n\n\n\n\n\nCodelyt <- 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 related to epidemic/pandemic\",\n nonunique = \"Total number of major protocol deviations related to epidemic/pandemic\"\n )\n ) %>%\n split_rows_by(\n \"DVREAS\",\n split_fun = drop_split_levels,\n nested = FALSE,\n label_pos = \"topleft\",\n split_label = obj_label(addv_pan$DVREAS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = \"Site action due to epidemic/pandemic\"\n ) %>%\n count_occurrences(vars = \"DVTERM\") %>%\n append_varlabels(addv_pan, \"DVTERM\", indent = 1L)\n\nresult <- build_table(lyt, addv_pan, alt_counts_df = adsl)\nresult\n\nPrimary Reason 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 related to epidemic/pandemic 8 (6.0%) 4 (3.0%) 4 (3.0%) \nTotal number of major protocol deviations related to epidemic/pandemic 8 5 4 \nSite action due to epidemic/pandemic 8 (6.0%) 4 (3.0%) 4 (3.0%) \n Dose missed or significantly out of window 2 (1.5%) 0 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 Significant deviation from planned dose 3 (2.2%) 1 (0.7%) 2 (1.5%) \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:45:27 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 tern_0.9.3.9031 rtables_0.6.6.9011 \n[4] magrittr_2.0.3 formatters_0.5.5.9020 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\naddv <- synthetic_cdisc_dataset(\"latest\", \"addv\")\n\nadsl <- df_explicit_na(adsl)\naddv <- df_explicit_na(addv)\n\naddv_pan <- addv %>%\n filter(AEPRELFL == \"Y\" & DVCAT == \"MAJOR\") %>%\n var_relabel(\n DVREAS = \"Primary Reason\",\n DVTERM = \"Description\"\n )\n\n\n\n\n\nCodelyt <- 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 related to epidemic/pandemic\",\n nonunique = \"Total number of major protocol deviations related to epidemic/pandemic\"\n )\n ) %>%\n split_rows_by(\n \"DVREAS\",\n split_fun = drop_split_levels,\n nested = FALSE,\n label_pos = \"topleft\",\n split_label = obj_label(addv_pan$DVREAS)\n ) %>%\n summarize_num_patients(\n var = \"USUBJID\",\n .stats = c(\"unique\"),\n .labels = \"Site action due to epidemic/pandemic\"\n ) %>%\n count_occurrences(vars = \"DVTERM\") %>%\n append_varlabels(addv_pan, \"DVTERM\", indent = 1L)\n\nresult <- build_table(lyt, addv_pan, alt_counts_df = adsl)\nresult\n\nPrimary Reason 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 related to epidemic/pandemic 8 (6.0%) 4 (3.0%) 4 (3.0%) \nTotal number of major protocol deviations related to epidemic/pandemic 8 5 4 \nSite action due to epidemic/pandemic 8 (6.0%) 4 (3.0%) 4 (3.0%) \n Dose missed or significantly out of window 2 (1.5%) 0 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 Significant deviation from planned dose 3 (2.2%) 1 (0.7%) 2 (1.5%) \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:46:17 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 tern_0.9.3.9031 rtables_0.6.6.9011 \n[4] magrittr_2.0.3 formatters_0.5.5.9021 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Disposition", @@ -506,7 +506,7 @@ "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 App\nReproducibility\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(\n sample(c(\"N\", \"Y\"), size = nrow(adae), replace = TRUE, prob = c(0.99, 0.01)),\n \"Results in Death\"\n ),\n AEACN = with_label(\n 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 \"Action Taken with Study Treatment\"\n ),\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\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n add_event_flags <- function(dat) {\n dat %>%\n 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 col_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.\n ADAE <- ADAE %>% add_event_flags()\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADAE <- data[[\"ADAE\"]]\nae_anl_vars <- names(ADAE)[startsWith(names(ADAE), \"TMPFL_\")]\naesi_vars <- names(ADAE)[startsWith(names(ADAE), \"TMP_\")]\n\n## Setup App\napp <- init(\n data = data,\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\nWarning in rlang::hash(list(data = data, modules = modules)):\n'package:teal.modules.clinical' may not be available when loading\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:44:51 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] dplyr_1.1.4 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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(\n sample(c(\"N\", \"Y\"), size = nrow(adae), replace = TRUE, prob = c(0.99, 0.01)),\n \"Results in Death\"\n ),\n AEACN = with_label(\n 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 \"Action Taken with Study Treatment\"\n ),\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\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n add_event_flags <- function(dat) {\n dat %>%\n 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 col_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.\n ADAE <- ADAE %>% add_event_flags()\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADAE <- data[[\"ADAE\"]]\nae_anl_vars <- names(ADAE)[startsWith(names(ADAE), \"TMPFL_\")]\naesi_vars <- names(ADAE)[startsWith(names(ADAE), \"TMP_\")]\n\n## Setup App\napp <- init(\n data = data,\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\nWarning in rlang::hash(list(data = data, modules = modules)):\n'package:teal.modules.clinical' may not be available when loading\n\nCodeshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:45:39 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] dplyr_1.1.4 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Adverse Events", @@ -518,7 +518,7 @@ "href": "tables/adverse-events/aet09.html", "title": "AET09", "section": "", - "text": "Data Setup\nStandard Table\nTable Including High-Level Terms\nteal App\nReproducibility\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 = -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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAE <- df_explicit_na(ADAE)\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADAE <- data[[\"ADAE\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(teal_slice(\"ADAE\", \"AEREL\", selected = \"Y\")) # related AEs only\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:44:18 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nTable Including High-Level Terms\nteal App\nReproducibility\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 = -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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAE <- df_explicit_na(ADAE)\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADAE <- data[[\"ADAE\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(teal_slice(\"ADAE\", \"AEREL\", selected = \"Y\")) # related AEs only\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:45:05 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Adverse Events", @@ -530,7 +530,7 @@ "href": "tables/adverse-events/aet10.html", "title": "AET10", "section": "", - "text": "Data Setup\nStandard Table\nMost Common (\\(\\geq\\) 35%) Adverse Events (setting threshold)\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nThe desired frequency is specified in prune_freq. For illustration, frequency is set to \\(\\geq\\) 35%.\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAE <- df_explicit_na(ADAE)\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADAE <- data[[\"ADAE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:43:47 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] dplyr_1.1.4 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nMost Common (\\(\\geq\\) 35%) Adverse Events (setting threshold)\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nThe desired frequency is specified in prune_freq. For illustration, frequency is set to \\(\\geq\\) 35%.\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAE <- df_explicit_na(ADAE)\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADAE <- data[[\"ADAE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:44:32 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] dplyr_1.1.4 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Adverse Events", @@ -542,7 +542,7 @@ "href": "tables/adverse-events/aet07.html", "title": "AET07", "section": "", - "text": "Data Setup\nStandard Table\nTable with Fill-In of Treatment Groups without Deaths\nteal App\nReproducibility\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 vars = \"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\n B: Placebo C: Combination\nMedDRA SOC and Preferred Term (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 vars = \"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\n A: Drug X B: Placebo C: Combination\nMedDRA SOC and Preferred Term (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAE <- df_explicit_na(ADAE)\n\n ADSL <- ADSL %>%\n mutate(\n DTHFL = case_when(\n !is.na(DTHDT) ~ \"Y\",\n TRUE ~ \"\"\n )\n ) %>%\n col_relabel(\n DTHFL = \"Subject Death Flag\"\n )\n\n ADAE <- 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 col_relabel(SOC_PT = \"MedDRA SOC and Preferred Term\")\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADAE <- data[[\"ADAE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:43:09 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nTable with Fill-In of Treatment Groups without Deaths\nteal App\nReproducibility\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 vars = \"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\n B: Placebo C: Combination\nMedDRA SOC and Preferred Term (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 vars = \"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\n A: Drug X B: Placebo C: Combination\nMedDRA SOC and Preferred Term (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAE <- df_explicit_na(ADAE)\n\n ADSL <- ADSL %>%\n mutate(\n DTHFL = case_when(\n !is.na(DTHDT) ~ \"Y\",\n TRUE ~ \"\"\n )\n ) %>%\n col_relabel(\n DTHFL = \"Subject Death Flag\"\n )\n\n ADAE <- 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 col_relabel(SOC_PT = \"MedDRA SOC and Preferred Term\")\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADAE <- data[[\"ADAE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:43:53 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Adverse Events", @@ -554,7 +554,7 @@ "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 App\nReproducibility\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\n ARM A ARM B ARM C \nStandardized MedDRA Query 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 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) {\n !is(tr, \"ContentRow\") && all_zero_or_na(tr) && !grepl(\"Total number of\", obj_label(tr))\n}\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 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\", drop = FALSE) %>%\n append_varlabels(adae_smq_all, \"AEDECOD\", indent = 1L)\n\nscore_ae_pts <- function(tt) {\n count_vals <- cell_values(tree_children(tt)[[\"USUBJID\"]])[[1]]\n sum(matrix(unlist(count_vals), nrow = length(count_vals), byrow = TRUE)[, 1])\n}\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 = score_ae_pts) %>%\n sort_at_path(path = c(\"SMQ\", \"*\", \"AEDECOD\"), scorefun = score_occurrences, na.pos = \"last\") %>%\n trim_rows(criteria = criteria_fun)\n\nresult\n\n ARM A ARM B ARM C \nStandardized MedDRA Query 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 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\n ARM A ARM B ARM C \nStandardized MedDRA Query < 65 >= 65 < 65 >= 65 < 65 >= 65\n Dictionary-Derived Term (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n 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 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})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADAE <- data[[\"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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:42:38 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 stringr_1.5.1 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\n ARM A ARM B ARM C \nStandardized MedDRA Query 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 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) {\n !is(tr, \"ContentRow\") && all_zero_or_na(tr) && !grepl(\"Total number of\", obj_label(tr))\n}\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 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\", drop = FALSE) %>%\n append_varlabels(adae_smq_all, \"AEDECOD\", indent = 1L)\n\nscore_ae_pts <- function(tt) {\n count_vals <- cell_values(tree_children(tt)[[\"USUBJID\"]])[[1]]\n sum(matrix(unlist(count_vals), nrow = length(count_vals), byrow = TRUE)[, 1])\n}\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 = score_ae_pts) %>%\n sort_at_path(path = c(\"SMQ\", \"*\", \"AEDECOD\"), scorefun = score_occurrences, na.pos = \"last\") %>%\n trim_rows(criteria = criteria_fun)\n\nresult\n\n ARM A ARM B ARM C \nStandardized MedDRA Query 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 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\n ARM A ARM B ARM C \nStandardized MedDRA Query < 65 >= 65 < 65 >= 65 < 65 >= 65\n Dictionary-Derived Term (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n 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 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})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADAE <- data[[\"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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:43:22 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 stringr_1.5.1 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Adverse Events", @@ -566,7 +566,7 @@ "href": "tables/adverse-events/aet05_all.html", "title": "AET05_ALL", "section": "", - "text": "Data Setup\nStandard Table\nTable Setting Type of Confidence Interval\nteal App\nReproducibility\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(num_pt_year = 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 (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\", num_pt_year = 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAETTE <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAETTE <- df_explicit_na(ADAETTE)\n\n # Create analysis dataset anl from the 2 parameters AEREPTTE & AETOT1\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\n anl_tte <- ADAETTE %>%\n filter(PARAMCD == \"AEREPTTE\") %>%\n select(USUBJID, STUDYID, ARM, ARMCD, AVAL, AVALU)\n\n ADAETTE <- full_join(anl_tte, anl_events, by = c(\"USUBJID\", \"STUDYID\", \"ARM\", \"ARMCD\"))\n})\ndatanames <- c(\"ADSL\", \"ADAETTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADAETTE <- data[[\"ADAETTE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:42:00 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nTable Setting Type of Confidence Interval\nteal App\nReproducibility\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(num_pt_year = 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 (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\", num_pt_year = 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAETTE <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAETTE <- df_explicit_na(ADAETTE)\n\n # Create analysis dataset anl from the 2 parameters AEREPTTE & AETOT1\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\n anl_tte <- ADAETTE %>%\n filter(PARAMCD == \"AEREPTTE\") %>%\n select(USUBJID, STUDYID, ARM, ARMCD, AVAL, AVALU)\n\n ADAETTE <- full_join(anl_tte, anl_events, by = c(\"USUBJID\", \"STUDYID\", \"ARM\", \"ARMCD\"))\n})\ndatanames <- c(\"ADSL\", \"ADAETTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADAETTE <- data[[\"ADAETTE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:42:42 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Adverse Events", @@ -578,7 +578,7 @@ "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 App\nReproducibility\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\n A: Drug X B: Placebo C: Combination \nBody System or Organ Class 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 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 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\n A: Drug X B: Placebo C: Combination \nBody System or Organ Class LOW MEDIUM HIGH LOW MEDIUM HIGH LOW MEDIUM HIGH \n Dictionary-Derived Term (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\n A: Drug X B: Placebo C: Combination \nBody System or Organ Class <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 Dictionary-Derived Term (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\n A: Drug X B: Placebo C: Combination \nBody System or Organ Class WHITE NON-WHITE WHITE NON-WHITE WHITE NON-WHITE \n Dictionary-Derived Term (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAE <- df_explicit_na(ADAE)\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADAE <- data[[\"ADAE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:41:17 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\n A: Drug X B: Placebo C: Combination \nBody System or Organ Class 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 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 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\n A: Drug X B: Placebo C: Combination \nBody System or Organ Class LOW MEDIUM HIGH LOW MEDIUM HIGH LOW MEDIUM HIGH \n Dictionary-Derived Term (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\n A: Drug X B: Placebo C: Combination \nBody System or Organ Class <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 Dictionary-Derived Term (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\n A: Drug X B: Placebo C: Combination \nBody System or Organ Class WHITE NON-WHITE WHITE NON-WHITE WHITE NON-WHITE \n Dictionary-Derived Term (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAE <- df_explicit_na(ADAE)\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADAE <- data[[\"ADAE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:41:59 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Adverse Events", @@ -590,7 +590,7 @@ "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 App\nReproducibility\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(\n is.na(NOT_RESOLVED),\n \"Total number of patients with all non-fatal AEs resolved\"\n ),\n NOT_RESOLVED = with_label(\n !is.na(NOT_RESOLVED),\n \"Total number of patients with at least one unresolved or ongoing non-fatal AE\"\n )\n )\n\nadae <- adae %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n WD = with_label(\n AEACN == \"DRUG WITHDRAWN\",\n \"Total number of patients with study drug withdrawn due to AE\"\n ),\n DSM = with_label(\n AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"Total number of patients with dose modified/interrupted due to AE\"\n ),\n CONTRT = with_label(\n AECONTRT == \"Y\",\n \"Total number of patients with treatment received for AE\"\n ),\n SER = with_label(\n AESER == \"Y\",\n \"Total number of patients with at least one serious AE\"\n ),\n REL = with_label(\n AEREL == \"Y\",\n \"Total number of patients with at least one related AE\"\n ),\n ALL_RESOLVED_WD = with_label(\n WD == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with study drug withdrawn due to resolved AE\"\n ),\n ALL_RESOLVED_DSM = with_label(\n DSM == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with dose modified/interrupted due to resolved AE\"\n ),\n ALL_RESOLVED_CONTRT = with_label(\n CONTRT == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with treatment received for resolved AE\"\n ),\n NOT_RESOLVED_WD = with_label(\n WD == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with study drug withdrawn due to unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_DSM = with_label(\n DSM == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with dose modified/interrupted due to unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_CONTRT = with_label(\n CONTRT == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with treatment received for unresolved or ongoing AE\"\n ),\n SERWD = with_label(\n AESER == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug withdrawn due to serious AE\"\n ),\n SERCONTRT = with_label(\n AECONTRT == \"Y\" & AESER == \"Y\",\n \"No. of patients with dose modified/interrupted due to serious AE\"\n ),\n SERDSM = with_label(\n AESER == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"No. of patients with treatment received for serious AE\"\n ),\n RELWD = with_label(\n AEREL == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug withdrawn due to related AE\"\n ),\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(\n AECONTRT == \"Y\" & AEREL == \"Y\",\n \"No. of patients with treatment received for related AE\"\n ),\n RELSER = with_label(\n AESER == \"Y\" & AEREL == \"Y\",\n \"No. of patients with serious, related AE\"\n )\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(\n is.na(NOT_RESOLVED),\n \"Total number of patients with all non-fatal AEs resolved\"\n ),\n NOT_RESOLVED = with_label(\n !is.na(NOT_RESOLVED),\n \"Total number of patients with at least one non-fatal unresolved or ongoing AE\"\n )\n )\n\nadae_mult <- adae_mult %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n WD1 = with_label(\n AEACN1 == \"DRUG WITHDRAWN\",\n \"Total number of patients with study drug 1 withdrawn due to AE\"\n ),\n WD2 = with_label(\n AEACN2 == \"DRUG WITHDRAWN\",\n \"Total number of patients with study drug 2 withdrawn due to AE\"\n ),\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(\n AECONTRT == \"Y\",\n \"Total number of patients with treatment received for AE\"\n ),\n SER = with_label(\n AESER == \"Y\",\n \"Total number of patients with at least one serious AE\"\n ),\n REL1 = with_label(\n AEREL1 == \"Y\",\n \"Total number of patients with at least one AE related to study drug 1\"\n ),\n REL2 = with_label(\n AEREL2 == \"Y\",\n \"Total number of patients with at least one AE related to study drug 2\"\n ),\n ALL_RESOLVED_WD1 = with_label(\n WD1 == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with study drug 1 withdrawn due to resolved AE\"\n ),\n ALL_RESOLVED_DSM1 = with_label(\n DSM1 == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with dose of study drug 1 modified/interrupted due to resolved AE\"\n ),\n ALL_RESOLVED_CONTRT = with_label(\n CONTRT == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with treatment received for resolved AE\"\n ),\n ALL_RESOLVED_WD2 = with_label(\n WD2 == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with study drug 2 withdrawn due to resolved AE\"\n ),\n ALL_RESOLVED_DSM2 = with_label(\n DSM2 == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with dose of study drug 2 modified/interrupted due to resolved AE\"\n ),\n NOT_RESOLVED_WD1 = with_label(\n WD1 == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with study drug 1 withdrawn due to unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_DSM1 = with_label(\n DSM1 == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with dose of study drug 1 modified/interrupted due to unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_CONTRT = with_label(\n CONTRT == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with treatment received for unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_WD2 = with_label(\n WD2 == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with study drug 2 withdrawn due to unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_DSM2 = with_label(\n DSM2 == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with dose of study drug 2 modified/interrupted due to unresolved or ongoing AE\"\n ),\n SERWD1 = with_label(\n AESER == \"Y\" & AEACN1 == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug 1 withdrawn due to serious AE\"\n ),\n SERWD2 = with_label(\n AESER == \"Y\" & AEACN2 == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug 2 withdrawn due to serious AE\"\n ),\n SERCONTRT = with_label(\n AECONTRT == \"Y\" & AESER == \"Y\",\n \"No. of patients with treatment received for serious AE\"\n ),\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(\n AEREL1 == \"Y\" & AEACN1 == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug 1 withdrawn due to AE related to study drug 1\"\n ),\n REL1WD2 = with_label(\n AEREL1 == \"Y\" & AEACN2 == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug 1 withdrawn due to AE related to study drug 2\"\n ),\n REL2WD1 = with_label(\n AEREL1 == \"Y\" & AEACN1 == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug 2 withdrawn due to AE related to study drug 1\"\n ),\n REL2WD2 = with_label(\n AEREL1 == \"Y\" & AEACN2 == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug 2 withdrawn due to AE related to study drug 2\"\n ),\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(\n AECONTRT == \"Y\" & AEREL1 == \"Y\",\n \"No. of patients with treatment received for AE related to study drug 1\"\n ),\n REL2CONTRT = with_label(\n AECONTRT == \"Y\" & AEREL2 == \"Y\",\n \"No. of patients with treatment received for AE related to study drug 2\"\n ),\n REL1SER = with_label(\n AESER == \"Y\" & AEREL1 == \"Y\",\n \"No. of patients with serious AE related to study drug 1\"\n ),\n REL2SER = with_label(\n AESER == \"Y\" & AEREL2 == \"Y\",\n \"No. of patients with serious AE related to study drug 2\"\n )\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(\n \"ALL_RESOLVED\",\n \"ALL_RESOLVED_WD1\",\n \"ALL_RESOLVED_WD2\",\n \"ALL_RESOLVED_DSM1\",\n \"ALL_RESOLVED_DSM2\",\n \"ALL_RESOLVED_CONTRT\"\n)\naesi_not_res <- c(\n \"NOT_RESOLVED\",\n \"NOT_RESOLVED_WD1\",\n \"NOT_RESOLVED_WD2\",\n \"NOT_RESOLVED_DSM1\",\n \"NOT_RESOLVED_DSM2\",\n \"NOT_RESOLVED_CONTRT\"\n)\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(\n is.na(NOT_RESOLVED),\n \"Total number of patients with all non-fatal AEs resolved\"\n ),\n NOT_RESOLVED = with_label(\n !is.na(NOT_RESOLVED),\n \"Total number of patients with at least one non-fatal unresolved or ongoing AE\"\n )\n )\n\nadae_smq <- adae_smq %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n WD = with_label(\n AEACN == \"DRUG WITHDRAWN\",\n \"Total number of patients with study drug withdrawn due to AE\"\n ),\n DSM = with_label(\n AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"Total number of patients with dose modified/interrupted due to AE\"\n ),\n CONTRT = with_label(\n AECONTRT == \"Y\",\n \"Total number of patients with treatment received for AE\"\n ),\n SER = with_label(\n AESER == \"Y\",\n \"Total number of patients with at least one serious AE\"\n ),\n REL = with_label(\n AEREL == \"Y\",\n \"Total number of patients with at least one related AE\"\n ),\n ALL_RESOLVED_WD = with_label(\n WD == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with study drug withdrawn due to resolved AE\"\n ),\n ALL_RESOLVED_DSM = with_label(\n DSM == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with dose modified/interrupted due to resolved AE\"\n ),\n ALL_RESOLVED_CONTRT = with_label(\n CONTRT == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with treatment received for resolved AE\"\n ),\n NOT_RESOLVED_WD = with_label(\n WD == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with study drug withdrawn due to unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_DSM = with_label(\n DSM == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with dose modified/interrupted due to unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_CONTRT = with_label(\n CONTRT == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with treatment received for unresolved or ongoing AE\"\n ),\n SERWD = with_label(\n AESER == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug withdrawn due to serious AE\"\n ),\n SERCONTRT = with_label(\n AECONTRT == \"Y\" & AESER == \"Y\",\n \"No. of patients with treatment received for serious AE\"\n ),\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(\n AEREL == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug withdrawn due to related AE\"\n ),\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(\n AECONTRT == \"Y\" & AEREL == \"Y\",\n \"No. of patients with treatment received for related AE\"\n ),\n RELSER = with_label(\n AESER == \"Y\" & AEREL == \"Y\",\n \"No. of patients with serious, related AE\"\n )\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\n A: Drug X B: Placebo C: Combination\nStandardized MedDRA Query (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n ADAE <- filter(ADAE, ANL01FL == \"Y\" & SAFFL == \"Y\")\n\n not_resolved <- ADAE %>%\n filter(!(AEOUT %in% c(\"RECOVERED/RESOLVED\", \"FATAL\", \"RECOVERED/RESOLVED WITH SEQUELAE\"))) %>%\n distinct(USUBJID) %>%\n 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(\n AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"AE that led to study drug dose modified/interrupted\"\n ),\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(\n WD == TRUE & ALL_RESOLVED == TRUE,\n \"Resolved AE that led to study drug withdrawal\"\n ),\n ALL_RESOLVED_DSM = with_label(\n DSM == TRUE & ALL_RESOLVED == TRUE,\n \"Resolved AE that led to study drug dose modified/interrupted\"\n ),\n ALL_RESOLVED_CONTRT = with_label(\n CONTRT == TRUE & ALL_RESOLVED == TRUE,\n \"Resolved AE that required treatment\"\n ),\n NOT_RESOLVED_WD = with_label(\n WD == TRUE & NOT_RESOLVED == TRUE,\n \"Unresolved AE that led to study drug withdrawal\"\n ),\n NOT_RESOLVED_DSM = with_label(\n DSM == TRUE & NOT_RESOLVED == TRUE,\n \"Unresolved AE that led to study drug dose modified/interrupted\"\n ),\n NOT_RESOLVED_CONTRT = with_label(\n CONTRT == TRUE & NOT_RESOLVED == TRUE,\n \"Unresolved AE that required treatment\"\n ),\n SERWD = with_label(\n AESER == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n \"Serious AE that led to study drug withdrawal\"\n ),\n SERCONTRT = with_label(\n AECONTRT == \"Y\" & AESER == \"Y\",\n \"Serious AE that required treatment\"\n ),\n SERDSM = with_label(\n AESER == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"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\"),\n \"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})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:40:40 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] dplyr_1.1.4 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nTable with Optional Lines\nTable For Studies with Multiple Drugs\nTable of AEs by SMQ\nteal App\nReproducibility\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(\n is.na(NOT_RESOLVED),\n \"Total number of patients with all non-fatal AEs resolved\"\n ),\n NOT_RESOLVED = with_label(\n !is.na(NOT_RESOLVED),\n \"Total number of patients with at least one unresolved or ongoing non-fatal AE\"\n )\n )\n\nadae <- adae %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n WD = with_label(\n AEACN == \"DRUG WITHDRAWN\",\n \"Total number of patients with study drug withdrawn due to AE\"\n ),\n DSM = with_label(\n AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"Total number of patients with dose modified/interrupted due to AE\"\n ),\n CONTRT = with_label(\n AECONTRT == \"Y\",\n \"Total number of patients with treatment received for AE\"\n ),\n SER = with_label(\n AESER == \"Y\",\n \"Total number of patients with at least one serious AE\"\n ),\n REL = with_label(\n AEREL == \"Y\",\n \"Total number of patients with at least one related AE\"\n ),\n ALL_RESOLVED_WD = with_label(\n WD == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with study drug withdrawn due to resolved AE\"\n ),\n ALL_RESOLVED_DSM = with_label(\n DSM == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with dose modified/interrupted due to resolved AE\"\n ),\n ALL_RESOLVED_CONTRT = with_label(\n CONTRT == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with treatment received for resolved AE\"\n ),\n NOT_RESOLVED_WD = with_label(\n WD == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with study drug withdrawn due to unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_DSM = with_label(\n DSM == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with dose modified/interrupted due to unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_CONTRT = with_label(\n CONTRT == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with treatment received for unresolved or ongoing AE\"\n ),\n SERWD = with_label(\n AESER == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug withdrawn due to serious AE\"\n ),\n SERCONTRT = with_label(\n AECONTRT == \"Y\" & AESER == \"Y\",\n \"No. of patients with dose modified/interrupted due to serious AE\"\n ),\n SERDSM = with_label(\n AESER == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"No. of patients with treatment received for serious AE\"\n ),\n RELWD = with_label(\n AEREL == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug withdrawn due to related AE\"\n ),\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(\n AECONTRT == \"Y\" & AEREL == \"Y\",\n \"No. of patients with treatment received for related AE\"\n ),\n RELSER = with_label(\n AESER == \"Y\" & AEREL == \"Y\",\n \"No. of patients with serious, related AE\"\n )\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(\n is.na(NOT_RESOLVED),\n \"Total number of patients with all non-fatal AEs resolved\"\n ),\n NOT_RESOLVED = with_label(\n !is.na(NOT_RESOLVED),\n \"Total number of patients with at least one non-fatal unresolved or ongoing AE\"\n )\n )\n\nadae_mult <- adae_mult %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n WD1 = with_label(\n AEACN1 == \"DRUG WITHDRAWN\",\n \"Total number of patients with study drug 1 withdrawn due to AE\"\n ),\n WD2 = with_label(\n AEACN2 == \"DRUG WITHDRAWN\",\n \"Total number of patients with study drug 2 withdrawn due to AE\"\n ),\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(\n AECONTRT == \"Y\",\n \"Total number of patients with treatment received for AE\"\n ),\n SER = with_label(\n AESER == \"Y\",\n \"Total number of patients with at least one serious AE\"\n ),\n REL1 = with_label(\n AEREL1 == \"Y\",\n \"Total number of patients with at least one AE related to study drug 1\"\n ),\n REL2 = with_label(\n AEREL2 == \"Y\",\n \"Total number of patients with at least one AE related to study drug 2\"\n ),\n ALL_RESOLVED_WD1 = with_label(\n WD1 == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with study drug 1 withdrawn due to resolved AE\"\n ),\n ALL_RESOLVED_DSM1 = with_label(\n DSM1 == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with dose of study drug 1 modified/interrupted due to resolved AE\"\n ),\n ALL_RESOLVED_CONTRT = with_label(\n CONTRT == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with treatment received for resolved AE\"\n ),\n ALL_RESOLVED_WD2 = with_label(\n WD2 == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with study drug 2 withdrawn due to resolved AE\"\n ),\n ALL_RESOLVED_DSM2 = with_label(\n DSM2 == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with dose of study drug 2 modified/interrupted due to resolved AE\"\n ),\n NOT_RESOLVED_WD1 = with_label(\n WD1 == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with study drug 1 withdrawn due to unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_DSM1 = with_label(\n DSM1 == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with dose of study drug 1 modified/interrupted due to unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_CONTRT = with_label(\n CONTRT == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with treatment received for unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_WD2 = with_label(\n WD2 == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with study drug 2 withdrawn due to unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_DSM2 = with_label(\n DSM2 == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with dose of study drug 2 modified/interrupted due to unresolved or ongoing AE\"\n ),\n SERWD1 = with_label(\n AESER == \"Y\" & AEACN1 == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug 1 withdrawn due to serious AE\"\n ),\n SERWD2 = with_label(\n AESER == \"Y\" & AEACN2 == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug 2 withdrawn due to serious AE\"\n ),\n SERCONTRT = with_label(\n AECONTRT == \"Y\" & AESER == \"Y\",\n \"No. of patients with treatment received for serious AE\"\n ),\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(\n AEREL1 == \"Y\" & AEACN1 == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug 1 withdrawn due to AE related to study drug 1\"\n ),\n REL1WD2 = with_label(\n AEREL1 == \"Y\" & AEACN2 == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug 1 withdrawn due to AE related to study drug 2\"\n ),\n REL2WD1 = with_label(\n AEREL1 == \"Y\" & AEACN1 == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug 2 withdrawn due to AE related to study drug 1\"\n ),\n REL2WD2 = with_label(\n AEREL1 == \"Y\" & AEACN2 == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug 2 withdrawn due to AE related to study drug 2\"\n ),\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(\n AECONTRT == \"Y\" & AEREL1 == \"Y\",\n \"No. of patients with treatment received for AE related to study drug 1\"\n ),\n REL2CONTRT = with_label(\n AECONTRT == \"Y\" & AEREL2 == \"Y\",\n \"No. of patients with treatment received for AE related to study drug 2\"\n ),\n REL1SER = with_label(\n AESER == \"Y\" & AEREL1 == \"Y\",\n \"No. of patients with serious AE related to study drug 1\"\n ),\n REL2SER = with_label(\n AESER == \"Y\" & AEREL2 == \"Y\",\n \"No. of patients with serious AE related to study drug 2\"\n )\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(\n \"ALL_RESOLVED\",\n \"ALL_RESOLVED_WD1\",\n \"ALL_RESOLVED_WD2\",\n \"ALL_RESOLVED_DSM1\",\n \"ALL_RESOLVED_DSM2\",\n \"ALL_RESOLVED_CONTRT\"\n)\naesi_not_res <- c(\n \"NOT_RESOLVED\",\n \"NOT_RESOLVED_WD1\",\n \"NOT_RESOLVED_WD2\",\n \"NOT_RESOLVED_DSM1\",\n \"NOT_RESOLVED_DSM2\",\n \"NOT_RESOLVED_CONTRT\"\n)\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(\n is.na(NOT_RESOLVED),\n \"Total number of patients with all non-fatal AEs resolved\"\n ),\n NOT_RESOLVED = with_label(\n !is.na(NOT_RESOLVED),\n \"Total number of patients with at least one non-fatal unresolved or ongoing AE\"\n )\n )\n\nadae_smq <- adae_smq %>%\n mutate(\n AEDECOD = as.character(AEDECOD),\n WD = with_label(\n AEACN == \"DRUG WITHDRAWN\",\n \"Total number of patients with study drug withdrawn due to AE\"\n ),\n DSM = with_label(\n AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"Total number of patients with dose modified/interrupted due to AE\"\n ),\n CONTRT = with_label(\n AECONTRT == \"Y\",\n \"Total number of patients with treatment received for AE\"\n ),\n SER = with_label(\n AESER == \"Y\",\n \"Total number of patients with at least one serious AE\"\n ),\n REL = with_label(\n AEREL == \"Y\",\n \"Total number of patients with at least one related AE\"\n ),\n ALL_RESOLVED_WD = with_label(\n WD == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with study drug withdrawn due to resolved AE\"\n ),\n ALL_RESOLVED_DSM = with_label(\n DSM == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with dose modified/interrupted due to resolved AE\"\n ),\n ALL_RESOLVED_CONTRT = with_label(\n CONTRT == TRUE & ALL_RESOLVED == TRUE,\n \"No. of patients with treatment received for resolved AE\"\n ),\n NOT_RESOLVED_WD = with_label(\n WD == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with study drug withdrawn due to unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_DSM = with_label(\n DSM == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with dose modified/interrupted due to unresolved or ongoing AE\"\n ),\n NOT_RESOLVED_CONTRT = with_label(\n CONTRT == TRUE & NOT_RESOLVED == TRUE,\n \"No. of patients with treatment received for unresolved or ongoing AE\"\n ),\n SERWD = with_label(\n AESER == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug withdrawn due to serious AE\"\n ),\n SERCONTRT = with_label(\n AECONTRT == \"Y\" & AESER == \"Y\",\n \"No. of patients with treatment received for serious AE\"\n ),\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(\n AEREL == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n \"No. of patients with study drug withdrawn due to related AE\"\n ),\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(\n AECONTRT == \"Y\" & AEREL == \"Y\",\n \"No. of patients with treatment received for related AE\"\n ),\n RELSER = with_label(\n AESER == \"Y\" & AEREL == \"Y\",\n \"No. of patients with serious, related AE\"\n )\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\n A: Drug X B: Placebo C: Combination\nStandardized MedDRA Query (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n ADAE <- filter(ADAE, ANL01FL == \"Y\" & SAFFL == \"Y\")\n\n not_resolved <- ADAE %>%\n filter(!(AEOUT %in% c(\"RECOVERED/RESOLVED\", \"FATAL\", \"RECOVERED/RESOLVED WITH SEQUELAE\"))) %>%\n distinct(USUBJID) %>%\n 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(\n AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"AE that led to study drug dose modified/interrupted\"\n ),\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(\n WD == TRUE & ALL_RESOLVED == TRUE,\n \"Resolved AE that led to study drug withdrawal\"\n ),\n ALL_RESOLVED_DSM = with_label(\n DSM == TRUE & ALL_RESOLVED == TRUE,\n \"Resolved AE that led to study drug dose modified/interrupted\"\n ),\n ALL_RESOLVED_CONTRT = with_label(\n CONTRT == TRUE & ALL_RESOLVED == TRUE,\n \"Resolved AE that required treatment\"\n ),\n NOT_RESOLVED_WD = with_label(\n WD == TRUE & NOT_RESOLVED == TRUE,\n \"Unresolved AE that led to study drug withdrawal\"\n ),\n NOT_RESOLVED_DSM = with_label(\n DSM == TRUE & NOT_RESOLVED == TRUE,\n \"Unresolved AE that led to study drug dose modified/interrupted\"\n ),\n NOT_RESOLVED_CONTRT = with_label(\n CONTRT == TRUE & NOT_RESOLVED == TRUE,\n \"Unresolved AE that required treatment\"\n ),\n SERWD = with_label(\n AESER == \"Y\" & AEACN == \"DRUG WITHDRAWN\",\n \"Serious AE that led to study drug withdrawal\"\n ),\n SERCONTRT = with_label(\n AECONTRT == \"Y\" & AESER == \"Y\",\n \"Serious AE that required treatment\"\n ),\n SERDSM = with_label(\n AESER == \"Y\" & AEACN %in% c(\"DRUG INTERRUPTED\", \"DOSE INCREASED\", \"DOSE REDUCED\"),\n \"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\"),\n \"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})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:41:20 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] dplyr_1.1.4 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Adverse Events", @@ -602,7 +602,7 @@ "href": "tables/efficacy/ratet01.html", "title": "RATET01", "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\nCustomized Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nanl <- synthetic_cdisc_dataset(\"latest\", \"adtte\") %>%\n filter(PARAMCD == \"TNE\")\n\n# Ensure number of exacerbation is a factor and NAs are explicit missing levels.\nanl$AVAL_f <- as.factor(anl$AVAL)\nanl <- df_explicit_na(anl)\n\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"B: Placebo\", split_fun = ref_group_position(\"first\")) %>%\n analyze_vars(\n \"AVAL_f\",\n var_labels = \"Number of exacerbations per patient\",\n .stats = c(\"count_fraction\"),\n .formats = c(\"count_fraction\" = \"xx (xx.xx%)\"),\n .labels = c(\"Number of exacerbations per patient\")\n ) %>%\n summarize_glm_count(\n vars = \"AVAL\",\n variables = list(arm = \"ARM\", offset = \"lgTMATRSK\", covariates = NULL),\n conf_level = 0.95,\n distribution = \"poisson\",\n rate_mean_method = \"emmeans\",\n var_labels = \"Unadjusted exacerbation rate (per year)\",\n table_names = \"unadj\",\n .stats = c(\"rate\"),\n .labels = c(rate = \"Rate\")\n ) %>%\n summarize_glm_count(\n vars = \"AVAL\",\n variables = list(arm = \"ARM\", offset = \"lgTMATRSK\", covariates = c(\"REGION1\")),\n conf_level = 0.95,\n distribution = \"quasipoisson\",\n rate_mean_method = \"ppmeans\",\n var_labels = \"Adjusted (QP) exacerbation rate (per year)\",\n table_names = \"adj-qp\",\n .stats = c(\"rate\", \"rate_ci\", \"rate_ratio\", \"rate_ratio_ci\", \"pval\"),\n .labels = c(\n rate = \"Rate\", rate_ci = \"Rate CI\", rate_ratio = \"Rate Ratio\",\n rate_ratio_ci = \"Rate Ratio CI\", pval = \"p value\"\n )\n ) %>%\n summarize_glm_count(\n vars = \"AVAL\",\n variables = list(arm = \"ARM\", offset = \"lgTMATRSK\", covariates = c(\"REGION1\")),\n conf_level = 0.95,\n distribution = \"negbin\",\n rate_mean_method = \"emmeans\",\n var_labels = \"Adjusted (NB) exacerbation rate (per year)\",\n table_names = \"adj-nb\",\n .stats = c(\"rate\", \"rate_ci\", \"rate_ratio\", \"rate_ratio_ci\", \"pval\"),\n .labels = c(\n rate = \"Rate\", rate_ci = \"Rate CI\", rate_ratio = \"Rate Ratio\",\n rate_ratio_ci = \"Rate Ratio CI\", pval = \"p value\"\n )\n )\nresult <- build_table(\n lyt = lyt,\n df = anl\n)\nresult\n\n B: Placebo A: Drug X C: Combination \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nNumber of exacerbations per patient \n 0 10 (7.46%) 6 (4.48%) 11 (8.33%) \n 1 25 (18.66%) 21 (15.67%) 14 (10.61%) \n 2 38 (28.36%) 41 (30.60%) 33 (25.00%) \n 3 22 (16.42%) 26 (19.40%) 21 (15.91%) \n 4 13 (9.70%) 18 (13.43%) 30 (22.73%) \n 5 11 (8.21%) 10 (7.46%) 12 (9.09%) \n 6 10 (7.46%) 7 (5.22%) 7 (5.30%) \n 7 3 (2.24%) 4 (2.99%) 3 (2.27%) \n 8 1 (0.75%) 1 (0.75%) 1 (0.76%) \n 9 1 (0.75%) 0 (0.00%) 0 (0.00%) \nUnadjusted exacerbation rate (per year) \n Rate 7.2364 8.2148 9.8131 \nAdjusted (QP) exacerbation rate (per year) \n Rate 2.4550 2.8514 3.4304 \n Rate CI (1.6194, 3.7219) (1.8974, 4.2850) (2.2946, 5.1284)\n Rate Ratio 1.1615 1.3973 \n Rate Ratio CI (0.6462, 2.0877) (0.7789, 2.5067)\n p value 0.6169 0.2619 \nAdjusted (NB) exacerbation rate (per year) \n Rate 2.7374 2.8150 2.9789 \n Rate CI (2.3932, 3.1311) (2.4681, 3.2106) (2.6152, 3.3932)\n Rate Ratio 1.0283 1.0882 \n Rate Ratio CI (0.8856, 1.1941) (0.9381, 1.2624)\n p value 0.7140 0.2643 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In Progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:40:07 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 tern_0.9.3.9031 rtables_0.6.6.9011 \n[4] magrittr_2.0.3 formatters_0.5.5.9020 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] sandwich_3.1-0 utf8_1.2.4 generics_0.1.3 tidyr_1.3.1 \n [5] stringi_1.8.3 lattice_0.22-6 digest_0.6.35 evaluate_0.23 \n [9] grid_4.3.3 estimability_1.5 mvtnorm_1.2-4 fastmap_1.1.1 \n[13] jsonlite_1.8.8 Matrix_1.6-5 backports_1.4.1 brio_1.1.4 \n[17] survival_3.5-8 multcomp_1.4-25 purrr_1.0.2 fansi_1.0.6 \n[21] scales_1.3.0 TH.data_1.1-2 codetools_0.2-20 Rdpack_2.6 \n[25] cli_3.6.2 rlang_1.1.3 rbibutils_2.2.16 munsell_0.5.1 \n[29] splines_4.3.3 yaml_2.3.8 tools_4.3.3 checkmate_2.3.1 \n[33] coda_0.19-4.1 colorspace_2.1-0 ggplot2_3.5.0 forcats_1.0.0 \n[37] broom_1.0.5 vctrs_0.6.5 R6_2.5.1 zoo_1.8-12 \n[41] lifecycle_1.0.4 emmeans_1.10.0 htmlwidgets_1.6.4 MASS_7.3-60.0.1 \n[45] pkgconfig_2.0.3 pillar_1.9.0 gtable_0.3.4 glue_1.7.0 \n[49] xfun_0.43 tibble_3.2.1 tidyselect_1.2.1 knitr_1.45 \n[53] xtable_1.8-4 htmltools_0.5.8.1 rmarkdown_2.26 testthat_3.2.1 \n[57] compiler_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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\nCustomized Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nanl <- synthetic_cdisc_dataset(\"latest\", \"adtte\") %>%\n filter(PARAMCD == \"TNE\")\n\n# Ensure number of exacerbation is a factor and NAs are explicit missing levels.\nanl$AVAL_f <- as.factor(anl$AVAL)\nanl <- df_explicit_na(anl)\n\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"B: Placebo\", split_fun = ref_group_position(\"first\")) %>%\n analyze_vars(\n \"AVAL_f\",\n var_labels = \"Number of exacerbations per patient\",\n .stats = c(\"count_fraction\"),\n .formats = c(\"count_fraction\" = \"xx (xx.xx%)\"),\n .labels = c(\"Number of exacerbations per patient\")\n ) %>%\n summarize_glm_count(\n vars = \"AVAL\",\n variables = list(arm = \"ARM\", offset = \"lgTMATRSK\", covariates = NULL),\n conf_level = 0.95,\n distribution = \"poisson\",\n rate_mean_method = \"emmeans\",\n var_labels = \"Unadjusted exacerbation rate (per year)\",\n table_names = \"unadj\",\n .stats = c(\"rate\"),\n .labels = c(rate = \"Rate\")\n ) %>%\n summarize_glm_count(\n vars = \"AVAL\",\n variables = list(arm = \"ARM\", offset = \"lgTMATRSK\", covariates = c(\"REGION1\")),\n conf_level = 0.95,\n distribution = \"quasipoisson\",\n rate_mean_method = \"ppmeans\",\n var_labels = \"Adjusted (QP) exacerbation rate (per year)\",\n table_names = \"adj-qp\",\n .stats = c(\"rate\", \"rate_ci\", \"rate_ratio\", \"rate_ratio_ci\", \"pval\"),\n .labels = c(\n rate = \"Rate\", rate_ci = \"Rate CI\", rate_ratio = \"Rate Ratio\",\n rate_ratio_ci = \"Rate Ratio CI\", pval = \"p value\"\n )\n ) %>%\n summarize_glm_count(\n vars = \"AVAL\",\n variables = list(arm = \"ARM\", offset = \"lgTMATRSK\", covariates = c(\"REGION1\")),\n conf_level = 0.95,\n distribution = \"negbin\",\n rate_mean_method = \"emmeans\",\n var_labels = \"Adjusted (NB) exacerbation rate (per year)\",\n table_names = \"adj-nb\",\n .stats = c(\"rate\", \"rate_ci\", \"rate_ratio\", \"rate_ratio_ci\", \"pval\"),\n .labels = c(\n rate = \"Rate\", rate_ci = \"Rate CI\", rate_ratio = \"Rate Ratio\",\n rate_ratio_ci = \"Rate Ratio CI\", pval = \"p value\"\n )\n )\nresult <- build_table(\n lyt = lyt,\n df = anl\n)\nresult\n\n B: Placebo A: Drug X C: Combination \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————————————————\nNumber of exacerbations per patient \n 0 10 (7.46%) 6 (4.48%) 11 (8.33%) \n 1 25 (18.66%) 21 (15.67%) 14 (10.61%) \n 2 38 (28.36%) 41 (30.60%) 33 (25.00%) \n 3 22 (16.42%) 26 (19.40%) 21 (15.91%) \n 4 13 (9.70%) 18 (13.43%) 30 (22.73%) \n 5 11 (8.21%) 10 (7.46%) 12 (9.09%) \n 6 10 (7.46%) 7 (5.22%) 7 (5.30%) \n 7 3 (2.24%) 4 (2.99%) 3 (2.27%) \n 8 1 (0.75%) 1 (0.75%) 1 (0.76%) \n 9 1 (0.75%) 0 (0.00%) 0 (0.00%) \nUnadjusted exacerbation rate (per year) \n Rate 7.2364 8.2148 9.8131 \nAdjusted (QP) exacerbation rate (per year) \n Rate 2.4550 2.8514 3.4304 \n Rate CI (1.6194, 3.7219) (1.8974, 4.2850) (2.2946, 5.1284)\n Rate Ratio 1.1615 1.3973 \n Rate Ratio CI (0.6462, 2.0877) (0.7789, 2.5067)\n p value 0.6169 0.2619 \nAdjusted (NB) exacerbation rate (per year) \n Rate 2.7374 2.8150 2.9789 \n Rate CI (2.3932, 3.1311) (2.4681, 3.2106) (2.6152, 3.3932)\n Rate Ratio 1.0283 1.0882 \n Rate Ratio CI (0.8856, 1.1941) (0.9381, 1.2624)\n p value 0.7140 0.2643 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In Progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:40:46 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 tern_0.9.3.9031 rtables_0.6.6.9011 \n[4] magrittr_2.0.3 formatters_0.5.5.9021 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] sandwich_3.1-0 utf8_1.2.4 generics_0.1.3 tidyr_1.3.1 \n [5] stringi_1.8.3 lattice_0.22-6 digest_0.6.35 evaluate_0.23 \n [9] grid_4.3.3 estimability_1.5 mvtnorm_1.2-4 fastmap_1.1.1 \n[13] jsonlite_1.8.8 Matrix_1.6-5 backports_1.4.1 brio_1.1.4 \n[17] survival_3.5-8 multcomp_1.4-25 purrr_1.0.2 fansi_1.0.6 \n[21] scales_1.3.0 TH.data_1.1-2 codetools_0.2-20 Rdpack_2.6 \n[25] cli_3.6.2 rlang_1.1.3 rbibutils_2.2.16 munsell_0.5.1 \n[29] splines_4.3.3 yaml_2.3.8 tools_4.3.3 checkmate_2.3.1 \n[33] coda_0.19-4.1 colorspace_2.1-0 ggplot2_3.5.0 forcats_1.0.0 \n[37] broom_1.0.5 vctrs_0.6.5 R6_2.5.1 zoo_1.8-12 \n[41] lifecycle_1.0.4 emmeans_1.10.0 htmlwidgets_1.6.4 MASS_7.3-60.0.1 \n[45] pkgconfig_2.0.3 pillar_1.9.0 gtable_0.3.4 glue_1.7.0 \n[49] xfun_0.43 tibble_3.2.1 tidyselect_1.2.1 knitr_1.45 \n[53] xtable_1.8-4 htmltools_0.5.8.1 rmarkdown_2.26 testthat_3.2.1 \n[57] compiler_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Efficacy", @@ -614,7 +614,7 @@ "href": "tables/efficacy/aovt01.html", "title": "AOVT01", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADQS <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADQS <- df_explicit_na(ADQS)\n})\ndatanames <- c(\"ADSL\", \"ADQS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADQS <- data[[\"ADQS\"]]\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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:39:42 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADQS <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADQS <- df_explicit_na(ADQS)\n})\ndatanames <- c(\"ADSL\", \"ADQS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADQS <- data[[\"ADQS\"]]\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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:40:21 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Efficacy", @@ -626,7 +626,7 @@ "href": "tables/efficacy/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 App\nReproducibility\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\n ARM A ARM B ARM C \nParameter (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADQS <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADQS <- df_explicit_na(ADQS)\n})\ndatanames <- c(\"ADSL\", \"ADQS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADQS <- data[[\"ADQS\"]]\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\n## Setup App\napp <- init(\n data = data,\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)\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:39:16 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\n ARM A ARM B ARM C \nParameter (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADQS <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADQS <- df_explicit_na(ADQS)\n})\ndatanames <- c(\"ADSL\", \"ADQS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADQS <- data[[\"ADQS\"]]\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\n## Setup App\napp <- init(\n data = data,\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)\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:39:53 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Efficacy", @@ -638,7 +638,7 @@ "href": "tables/efficacy/mmrmt01.html", "title": "MMRMT01", "section": "", - "text": "Data Setup\nLeast Squares Means\nFixed Effects\nCovariance Matrix\nModel Diagnostics\nteal App\nReproducibility\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\", \"SCREENING\")) %>%\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\ndf <- 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\ndf_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 distinct(USUBJID, .keep_all = TRUE) %>%\n droplevels()\n\nb <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARMCD\") %>%\n split_rows_by(\"AVISIT\") %>%\n analyze_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 134 134 132 \n Mean (SD) 49.9 (7.4) 49.7 (8.3) 50.3 (9.1) \n Median 48.7 49.3 49.7 \n Min - Max 33.7 - 65.9 25.8 - 71.5 26.0 - 70.0 \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\ndf_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\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\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\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADQS <- synthetic_cdisc_dataset(\"latest\", \"adqs\") %>%\n filter(ABLFL != \"Y\" & ABLFL2 != \"Y\") %>%\n filter(AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\")) %>%\n 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})\ndatanames <- c(\"ADSL\", \"ADQS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADQS <- data[[\"ADQS\"]]\narm_ref_comp <- list(\n ARMCD = list(\n ref = \"ARM A\",\n comp = c(\"ARM B\", \"ARM C\")\n )\n)\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:38:43 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 broom_1.0.5 \n [9] scda_0.1.6.9017 tern.mmrm_0.3.0.9005 \n[11] tern_0.9.3.9031 rtables_0.6.6.9011 \n[13] magrittr_2.0.3 formatters_0.5.5.9020 \n[15] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 mmrm_0.3.11 formatR_1.14 \n [4] tern.gee_0.1.3.9004 logger_0.3.0 testthat_3.2.1 \n [7] sandwich_3.1-0 rlang_1.1.3 multcomp_1.4-25 \n[10] compiler_4.3.3 callr_3.7.6 vctrs_0.6.5 \n[13] stringr_1.5.1 pkgconfig_2.0.3 fastmap_1.1.1 \n[16] backports_1.4.1 fontawesome_0.5.2 utf8_1.2.4 \n[19] promises_1.3.0 rmarkdown_2.26 ps_1.7.6 \n[22] purrr_1.0.2 xfun_0.43 shinyvalidate_0.1.3 \n[25] cachem_1.0.8 teal.reporter_0.3.1.9002 jsonlite_1.8.8 \n[28] later_1.3.2 parallel_4.3.3 R6_2.5.1 \n[31] bslib_0.7.0 stringi_1.8.3 parallelly_1.37.1 \n[34] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[37] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[40] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[43] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[46] TMB_1.9.11 codetools_0.2-20 websocket_1.4.1 \n[49] processx_3.8.4 teal.widgets_0.4.2.9009 lattice_0.22-6 \n[52] tibble_3.2.1 withr_3.0.0 coda_0.19-4.1 \n[55] evaluate_0.23 survival_3.5-8 shinycssloaders_1.0.0 \n[58] pillar_1.9.0 checkmate_2.3.1 shinyjs_2.1.0 \n[61] generics_0.1.3 chromote_0.2.0 ggplot2_3.5.0 \n[64] munsell_0.5.1 scales_1.3.0 xtable_1.8-4 \n[67] glue_1.7.0 emmeans_1.10.0 tools_4.3.3 \n[70] webshot2_0.1.1 webshot_0.5.5 forcats_1.0.0 \n[73] mvtnorm_1.2-4 cowplot_1.1.3 grid_4.3.3 \n[76] tidyr_1.3.1 rbibutils_2.2.16 colorspace_2.1-0 \n[79] nlme_3.1-164 cli_3.6.2 fansi_1.0.6 \n[82] geepack_1.3.10 gtable_0.3.4 sass_0.4.9 \n[85] digest_0.6.35 TH.data_1.1-2 htmlwidgets_1.6.4 \n[88] memoise_2.0.1 htmltools_0.5.8.1 lifecycle_1.0.4 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nLeast Squares Means\nFixed Effects\nCovariance Matrix\nModel Diagnostics\nteal App\nReproducibility\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\", \"SCREENING\")) %>%\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\ndf <- 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\ndf_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 distinct(USUBJID, .keep_all = TRUE) %>%\n droplevels()\n\nb <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARMCD\") %>%\n split_rows_by(\"AVISIT\") %>%\n analyze_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 134 134 132 \n Mean (SD) 49.9 (7.4) 49.7 (8.3) 50.3 (9.1) \n Median 48.7 49.3 49.7 \n Min - Max 33.7 - 65.9 25.8 - 71.5 26.0 - 70.0 \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\ndf_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\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\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\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADQS <- synthetic_cdisc_dataset(\"latest\", \"adqs\") %>%\n filter(ABLFL != \"Y\" & ABLFL2 != \"Y\") %>%\n filter(AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 3 DAY 22\")) %>%\n 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})\ndatanames <- c(\"ADSL\", \"ADQS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADQS <- data[[\"ADQS\"]]\narm_ref_comp <- list(\n ARMCD = list(\n ref = \"ARM A\",\n comp = c(\"ARM B\", \"ARM C\")\n )\n)\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:39:19 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 broom_1.0.5 \n [9] scda_0.1.6.9017 tern.mmrm_0.3.0.9005 \n[11] tern_0.9.3.9031 rtables_0.6.6.9011 \n[13] magrittr_2.0.3 formatters_0.5.5.9021 \n[15] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 mmrm_0.3.11 formatR_1.14 \n [4] tern.gee_0.1.3.9005 logger_0.3.0 testthat_3.2.1 \n [7] sandwich_3.1-0 rlang_1.1.3 multcomp_1.4-25 \n[10] compiler_4.3.3 callr_3.7.6 vctrs_0.6.5 \n[13] stringr_1.5.1 pkgconfig_2.0.3 fastmap_1.1.1 \n[16] backports_1.4.1 fontawesome_0.5.2 utf8_1.2.4 \n[19] promises_1.3.0 rmarkdown_2.26 ps_1.7.6 \n[22] purrr_1.0.2 xfun_0.43 shinyvalidate_0.1.3 \n[25] cachem_1.0.8 teal.reporter_0.3.1.9003 jsonlite_1.8.8 \n[28] later_1.3.2 parallel_4.3.3 R6_2.5.1 \n[31] bslib_0.7.0 stringi_1.8.3 parallelly_1.37.1 \n[34] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[37] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[40] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[43] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[46] TMB_1.9.11 codetools_0.2-20 websocket_1.4.1 \n[49] processx_3.8.4 teal.widgets_0.4.2.9009 lattice_0.22-6 \n[52] tibble_3.2.1 withr_3.0.0 coda_0.19-4.1 \n[55] evaluate_0.23 survival_3.5-8 shinycssloaders_1.0.0 \n[58] pillar_1.9.0 checkmate_2.3.1 shinyjs_2.1.0 \n[61] generics_0.1.3 chromote_0.2.0 ggplot2_3.5.0 \n[64] munsell_0.5.1 scales_1.3.0 xtable_1.8-4 \n[67] glue_1.7.0 emmeans_1.10.0 tools_4.3.3 \n[70] webshot2_0.1.1 webshot_0.5.5 forcats_1.0.0 \n[73] mvtnorm_1.2-4 cowplot_1.1.3 grid_4.3.3 \n[76] tidyr_1.3.1 rbibutils_2.2.16 colorspace_2.1-0 \n[79] nlme_3.1-164 cli_3.6.2 fansi_1.0.6 \n[82] geepack_1.3.10 gtable_0.3.4 sass_0.4.9 \n[85] digest_0.6.35 TH.data_1.1-2 htmlwidgets_1.6.4 \n[88] memoise_2.0.1 htmltools_0.5.8.1 lifecycle_1.0.4 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Efficacy", @@ -650,7 +650,7 @@ "href": "tables/efficacy/rbmit01.html", "title": "RBMIT01", "section": "", - "text": "Data Setup\nDraws\nImpute\nAnalyze\nPool\nCreate Output\nReproducibility\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\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.000354 seconds\nChain 1: 1000 transitions using 10 leapfrog steps per transition would take 3.54 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.558 seconds (Warm-up)\nChain 1: 1.788 seconds (Sampling)\nChain 1: 2.346 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\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\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.250814 0.6466452 -5.527714 -2.9739143 NA NA\n4 alt -2.804837 0.6438255 -4.076779 -1.5328939 1.44597772 0.9136660\n5 ref -6.365807 0.7214451 -7.792725 -4.9388895 NA NA\n6 alt -4.095430 0.6958248 -5.470969 -2.7198908 2.27037720 0.9961376\n7 ref -7.688935 0.7965136 -9.265897 -6.1119740 NA NA\n8 alt -4.775673 0.7516059 -6.261450 -3.2898970 2.91326216 1.0733820\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.893177243 0.05681725 4 0.95\n3 NA NA NA NA 5 0.95\n4 -0.3584507 3.250406 0.115488900 -0.34016488 5 0.95\n5 NA NA NA NA 6 0.95\n6 0.3014522 4.239302 0.024124977 -0.35665190 6 0.95\n7 NA NA NA NA 7 0.95\n8 0.7918874 5.034637 0.007446276 -0.37889019 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.251 (0.647) -2.805 (0.644) \n 95% CI (-5.528, -2.974) (-4.077, -1.533)\n Difference in Adjusted Means (SE) 1.446 (0.914) \n 95% CI (-0.358, 3.250) \n Relative Reduction (%) -34.0% \n p-value (RBMI) 0.1155 \n6 \n Adjusted Mean (SE) -6.366 (0.721) -4.095 (0.696) \n 95% CI (-7.793, -4.939) (-5.471, -2.720)\n Difference in Adjusted Means (SE) 2.270 (0.996) \n 95% CI (0.301, 4.239) \n Relative Reduction (%) -35.7% \n p-value (RBMI) 0.0241 \n7 \n Adjusted Mean (SE) -7.689 (0.797) -4.776 (0.752) \n 95% CI (-9.266, -6.112) (-6.261, -3.290)\n Difference in Adjusted Means (SE) 2.913 (1.073) \n 95% CI (0.792, 5.035) \n Relative Reduction (%) -37.9% \n p-value (RBMI) 0.0074 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:38:01 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 tern.rbmi_0.1.2.9013 \n[4] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[7] formatters_0.5.5.9020 rbmi_1.2.6 \n\nloaded via a namespace (and not attached):\n [1] gtable_0.3.4 TMB_1.9.11 xfun_0.43 ggplot2_3.5.0 \n [5] QuickJSR_1.1.3 htmlwidgets_1.6.4 inline_0.3.19 lattice_0.22-6 \n [9] vctrs_0.6.5 tools_4.3.3 Rdpack_2.6 generics_0.1.3 \n[13] stats4_4.3.3 curl_5.2.1 parallel_4.3.3 tibble_3.2.1 \n[17] mmrm_0.3.11 fansi_1.0.6 pkgconfig_2.0.3 Matrix_1.6-5 \n[21] checkmate_2.3.1 RcppParallel_5.1.7 assertthat_0.2.1 lifecycle_1.0.4 \n[25] compiler_4.3.3 stringr_1.5.1 brio_1.1.4 munsell_0.5.1 \n[29] codetools_0.2-20 htmltools_0.5.8.1 yaml_2.3.8 pillar_1.9.0 \n[33] tidyr_1.3.1 StanHeaders_2.32.6 nlme_3.1-164 rstan_2.32.6 \n[37] tidyselect_1.2.1 digest_0.6.35 stringi_1.8.3 purrr_1.0.2 \n[41] splines_4.3.3 fastmap_1.1.1 grid_4.3.3 colorspace_2.1-0 \n[45] cli_3.6.2 loo_2.7.0 survival_3.5-8 pkgbuild_1.4.4 \n[49] utf8_1.2.4 withr_3.0.0 scales_1.3.0 backports_1.4.1 \n[53] rmarkdown_2.26 matrixStats_1.2.0 gridExtra_2.3 evaluate_0.23 \n[57] knitr_1.45 rbibutils_2.2.16 testthat_3.2.1 V8_4.4.2 \n[61] rlang_1.1.3 Rcpp_1.0.12 glue_1.7.0 jsonlite_1.8.8 \n[65] R6_2.5.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nDraws\nImpute\nAnalyze\nPool\nCreate Output\nReproducibility\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\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.000383 seconds\nChain 1: 1000 transitions using 10 leapfrog steps per transition would take 3.83 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.558 seconds (Warm-up)\nChain 1: 1.788 seconds (Sampling)\nChain 1: 2.346 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\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\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.250814 0.6466452 -5.527714 -2.9739143 NA NA\n4 alt -2.804837 0.6438255 -4.076779 -1.5328939 1.44597772 0.9136660\n5 ref -6.365807 0.7214451 -7.792725 -4.9388895 NA NA\n6 alt -4.095430 0.6958248 -5.470969 -2.7198908 2.27037720 0.9961376\n7 ref -7.688935 0.7965136 -9.265897 -6.1119740 NA NA\n8 alt -4.775673 0.7516059 -6.261450 -3.2898970 2.91326216 1.0733820\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.893177243 0.05681725 4 0.95\n3 NA NA NA NA 5 0.95\n4 -0.3584507 3.250406 0.115488900 -0.34016488 5 0.95\n5 NA NA NA NA 6 0.95\n6 0.3014522 4.239302 0.024124977 -0.35665190 6 0.95\n7 NA NA NA NA 7 0.95\n8 0.7918874 5.034637 0.007446276 -0.37889019 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.251 (0.647) -2.805 (0.644) \n 95% CI (-5.528, -2.974) (-4.077, -1.533)\n Difference in Adjusted Means (SE) 1.446 (0.914) \n 95% CI (-0.358, 3.250) \n Relative Reduction (%) -34.0% \n p-value (RBMI) 0.1155 \n6 \n Adjusted Mean (SE) -6.366 (0.721) -4.095 (0.696) \n 95% CI (-7.793, -4.939) (-5.471, -2.720)\n Difference in Adjusted Means (SE) 2.270 (0.996) \n 95% CI (0.301, 4.239) \n Relative Reduction (%) -35.7% \n p-value (RBMI) 0.0241 \n7 \n Adjusted Mean (SE) -7.689 (0.797) -4.776 (0.752) \n 95% CI (-9.266, -6.112) (-6.261, -3.290)\n Difference in Adjusted Means (SE) 2.913 (1.073) \n 95% CI (0.792, 5.035) \n Relative Reduction (%) -37.9% \n p-value (RBMI) 0.0074 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:38:35 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 tern.rbmi_0.1.2.9013 \n[4] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[7] formatters_0.5.5.9021 rbmi_1.2.6 \n\nloaded via a namespace (and not attached):\n [1] gtable_0.3.4 TMB_1.9.11 xfun_0.43 ggplot2_3.5.0 \n [5] QuickJSR_1.1.3 htmlwidgets_1.6.4 inline_0.3.19 lattice_0.22-6 \n [9] vctrs_0.6.5 tools_4.3.3 Rdpack_2.6 generics_0.1.3 \n[13] stats4_4.3.3 curl_5.2.1 parallel_4.3.3 tibble_3.2.1 \n[17] mmrm_0.3.11 fansi_1.0.6 pkgconfig_2.0.3 Matrix_1.6-5 \n[21] checkmate_2.3.1 RcppParallel_5.1.7 assertthat_0.2.1 lifecycle_1.0.4 \n[25] compiler_4.3.3 stringr_1.5.1 brio_1.1.4 munsell_0.5.1 \n[29] codetools_0.2-20 htmltools_0.5.8.1 yaml_2.3.8 pillar_1.9.0 \n[33] tidyr_1.3.1 StanHeaders_2.32.6 nlme_3.1-164 rstan_2.32.6 \n[37] tidyselect_1.2.1 digest_0.6.35 stringi_1.8.3 purrr_1.0.2 \n[41] splines_4.3.3 fastmap_1.1.1 grid_4.3.3 colorspace_2.1-0 \n[45] cli_3.6.2 loo_2.7.0 survival_3.5-8 pkgbuild_1.4.4 \n[49] utf8_1.2.4 withr_3.0.0 scales_1.3.0 backports_1.4.1 \n[53] rmarkdown_2.26 matrixStats_1.2.0 gridExtra_2.3 evaluate_0.23 \n[57] knitr_1.45 rbibutils_2.2.16 testthat_3.2.1 V8_4.4.2 \n[61] rlang_1.1.3 Rcpp_1.0.12 glue_1.7.0 jsonlite_1.8.8 \n[65] R6_2.5.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Efficacy", @@ -662,7 +662,7 @@ "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 App\nReproducibility\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\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\n B: Placebo A: Drug X \nBaseline Risk Factors 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\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\n B: Placebo A: Drug X \nBaseline Risk Factors 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\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\n B: Placebo A: Drug X \nBaseline Risk Factors 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\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\n B: Placebo A: Drug X \nBaseline Risk Factors 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# Use table, embedded in response forest plot module.\nlibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(forcats)\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADRS <- df_explicit_na(ADRS)\n})\ndatanames <- c(\"ADSL\", \"ADRS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADRS <- data[[\"ADRS\"]]\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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:37:34 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014\n [3] teal.transform_0.5.0.9004 teal_0.15.2.9020 \n [5] teal.slice_0.5.0.9009 teal.data_0.5.0.9006 \n [7] teal.code_0.5.0.9004 shiny_1.8.1.1 \n [9] scda_0.1.6.9017 dplyr_1.1.4 \n[11] tern_0.9.3.9031 rtables_0.6.6.9011 \n[13] magrittr_2.0.3 formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] systemfonts_1.0.6 callr_3.7.6 vctrs_0.6.5 \n[13] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[16] fontawesome_0.5.2 labeling_0.4.3 utf8_1.2.4 \n[19] promises_1.3.0 rmarkdown_2.26 ps_1.7.6 \n[22] ragg_1.3.0 purrr_1.0.2 xfun_0.43 \n[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002\n[28] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[31] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[34] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[37] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[40] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[43] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[46] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[49] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[52] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[55] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[58] checkmate_2.3.1 shinyjs_2.1.0 generics_0.1.3 \n[61] chromote_0.2.0 ggplot2_3.5.0 munsell_0.5.1 \n[64] scales_1.3.0 xtable_1.8-4 glue_1.7.0 \n[67] emmeans_1.10.0 tools_4.3.3 webshot2_0.1.1 \n[70] webshot_0.5.5 mvtnorm_1.2-4 cowplot_1.1.3 \n[73] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[76] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[79] textshaping_0.3.7 fansi_1.0.6 geepack_1.3.10 \n[82] gtable_0.3.4 sass_0.4.9 digest_0.6.35 \n[85] TH.data_1.1-2 htmlwidgets_1.6.4 farver_2.1.1 \n[88] memoise_2.0.1 htmltools_0.5.8.1 lifecycle_1.0.4 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\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\n B: Placebo A: Drug X \nBaseline Risk Factors 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\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\n B: Placebo A: Drug X \nBaseline Risk Factors 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\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\n B: Placebo A: Drug X \nBaseline Risk Factors 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\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\n B: Placebo A: Drug X \nBaseline Risk Factors 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# Use table, embedded in response forest plot module.\nlibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(forcats)\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADRS <- df_explicit_na(ADRS)\n})\ndatanames <- c(\"ADSL\", \"ADRS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADRS <- data[[\"ADRS\"]]\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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:38:08 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016\n [3] teal.transform_0.5.0.9004 teal_0.15.2.9022 \n [5] teal.slice_0.5.0.9010 teal.data_0.5.0.9007 \n [7] teal.code_0.5.0.9004 shiny_1.8.1.1 \n [9] scda_0.1.6.9017 dplyr_1.1.4 \n[11] tern_0.9.3.9031 rtables_0.6.6.9011 \n[13] magrittr_2.0.3 formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] systemfonts_1.0.6 callr_3.7.6 vctrs_0.6.5 \n[13] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[16] fontawesome_0.5.2 labeling_0.4.3 utf8_1.2.4 \n[19] promises_1.3.0 rmarkdown_2.26 ps_1.7.6 \n[22] ragg_1.3.0 purrr_1.0.2 xfun_0.43 \n[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003\n[28] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[31] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[34] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[37] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[40] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[43] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[46] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[49] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[52] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[55] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[58] checkmate_2.3.1 shinyjs_2.1.0 generics_0.1.3 \n[61] chromote_0.2.0 ggplot2_3.5.0 munsell_0.5.1 \n[64] scales_1.3.0 xtable_1.8-4 glue_1.7.0 \n[67] emmeans_1.10.0 tools_4.3.3 webshot2_0.1.1 \n[70] webshot_0.5.5 mvtnorm_1.2-4 cowplot_1.1.3 \n[73] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[76] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[79] textshaping_0.3.7 fansi_1.0.6 geepack_1.3.10 \n[82] gtable_0.3.4 sass_0.4.9 digest_0.6.35 \n[85] TH.data_1.1-2 htmlwidgets_1.6.4 farver_2.1.1 \n[88] memoise_2.0.1 htmltools_0.5.8.1 lifecycle_1.0.4 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Efficacy", @@ -674,7 +674,7 @@ "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 App\nReproducibility\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\n Treatment Effect Adjusted for Covariate \nEffect/Covariate Included in the Model 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\n Treatment Effect Adjusted for Covariate \nEffect/Covariate Included in the Model 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\n Treatment Effect Adjusted for Covariate \nEffect/Covariate Included in the Model 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\n Treatment Effect Adjusted for Covariate \nEffect/Covariate Included in the Model 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\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\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADTTE <- df_explicit_na(ADTTE)\n})\ndatanames <- c(\"ADSL\", \"ADTTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADTTE <- data[[\"ADTTE\"]]\n\n## Setup App\napp <- init(\n data = data,\n modules = modules(\n tm_t_coxreg(\n label = \"Cox Reg.\",\n dataname = \"ADTTE\",\n arm_var = choices_selected(c(\"ARM\", \"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)\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:36:59 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9020 dplyr_1.1.4 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 processx_3.8.4 \n[13] survival_3.5-8 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 abind_1.4-5 multcomp_1.4-25 \n[25] withr_3.0.0 purrr_1.0.2 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] stringr_1.5.1 splines_4.3.3 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 carData_3.0-5 callr_3.7.6 \n[52] car_3.1-2 teal.widgets_0.4.2.9009 testthat_3.2.1 \n[55] fontawesome_0.5.2 jquerylib_0.1.4 tidyr_1.3.1 \n[58] glue_1.7.0 ps_1.7.6 codetools_0.2-20 \n[61] stringi_1.8.3 gtable_0.3.4 later_1.3.2 \n[64] munsell_0.5.1 tibble_3.2.1 logger_0.3.0 \n[67] pillar_1.9.0 htmltools_0.5.8.1 brio_1.1.4 \n[70] R6_2.5.1 Rdpack_2.6 evaluate_0.23 \n[73] lattice_0.22-6 rbibutils_2.2.16 backports_1.4.1 \n[76] memoise_2.0.1 broom_1.0.5 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 coda_0.19-4.1 \n[82] nlme_3.1-164 checkmate_2.3.1 xfun_0.43 \n[85] zoo_1.8-12 forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\n Treatment Effect Adjusted for Covariate \nEffect/Covariate Included in the Model 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\n Treatment Effect Adjusted for Covariate \nEffect/Covariate Included in the Model 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\n Treatment Effect Adjusted for Covariate \nEffect/Covariate Included in the Model 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\n Treatment Effect Adjusted for Covariate \nEffect/Covariate Included in the Model 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\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\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADTTE <- df_explicit_na(ADTTE)\n})\ndatanames <- c(\"ADSL\", \"ADTTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADTTE <- data[[\"ADTTE\"]]\n\n## Setup App\napp <- init(\n data = data,\n modules = modules(\n tm_t_coxreg(\n label = \"Cox Reg.\",\n dataname = \"ADTTE\",\n arm_var = choices_selected(c(\"ARM\", \"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)\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:37:31 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9021 dplyr_1.1.4 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 processx_3.8.4 \n[13] survival_3.5-8 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 abind_1.4-5 multcomp_1.4-25 \n[25] withr_3.0.0 purrr_1.0.2 shinyWidgets_0.8.4 \n[28] geepack_1.3.10 grid_4.3.3 fansi_1.0.6 \n[31] teal.logger_0.2.0.9001 xtable_1.8-4 colorspace_2.1-0 \n[34] ggplot2_3.5.0 emmeans_1.10.0 scales_1.3.0 \n[37] MASS_7.3-60.0.1 cli_3.6.2 mvtnorm_1.2-4 \n[40] rmarkdown_2.26 generics_0.1.3 cachem_1.0.8 \n[43] chromote_0.2.0 stringr_1.5.1 splines_4.3.3 \n[46] formatR_1.14 vctrs_0.6.5 webshot_0.5.5 \n[49] Matrix_1.6-5 sandwich_3.1-0 jsonlite_1.8.8 \n[52] carData_3.0-5 callr_3.7.6 car_3.1-2 \n[55] teal.widgets_0.4.2.9009 testthat_3.2.1 fontawesome_0.5.2 \n[58] jquerylib_0.1.4 tidyr_1.3.1 glue_1.7.0 \n[61] ps_1.7.6 codetools_0.2-20 stringi_1.8.3 \n[64] gtable_0.3.4 later_1.3.2 shinycssloaders_1.0.0 \n[67] munsell_0.5.1 tibble_3.2.1 logger_0.3.0 \n[70] pillar_1.9.0 htmltools_0.5.8.1 brio_1.1.4 \n[73] R6_2.5.1 Rdpack_2.6 evaluate_0.23 \n[76] lattice_0.22-6 rbibutils_2.2.16 backports_1.4.1 \n[79] memoise_2.0.1 broom_1.0.5 teal.reporter_0.3.1.9003\n[82] bslib_0.7.0 httpuv_1.6.15 Rcpp_1.0.12 \n[85] shinyvalidate_0.1.3 coda_0.19-4.1 nlme_3.1-164 \n[88] checkmate_2.3.1 xfun_0.43 zoo_1.8-12 \n[91] forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Efficacy", @@ -686,7 +686,7 @@ "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 App\nReproducibility\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 analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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) %>%\n prune_table()\n\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 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}\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{1} - Censored observation: range maximum\n—————————————————————————————————————————————————————————————————————————————————————\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n analyze_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients with event (%)\")\n ) %>%\n analyze_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 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}\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{1} - Censored observation: range maximum\n——————————————————————————————————————————————————————————————————————————————————\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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) %>%\n prune_table()\n\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 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}\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{1} - Censored observation: range maximum\n———————————————————————————————————————————————————————————————————————————————————\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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 strata = \"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) %>%\n prune_table()\n\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 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}\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{1} - Censored observation: range maximum\n—————————————————————————————————————————————————————————————————————————————————————\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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) %>%\n prune_table()\n\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 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}\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{1} - Censored observation: range maximum\n—————————————————————————————————————————————————————————————————————————————————————\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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) %>%\n prune_table()\n\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 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}\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{1} - Censored observation: range maximum\n—————————————————————————————————————————————————————————————————————————————————————\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADTTE <- df_explicit_na(ADTTE)\n})\ndatanames <- c(\"ADSL\", \"ADTTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADTTE <- data[[\"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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:36:21 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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 analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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) %>%\n prune_table()\n\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 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}\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{1} - Censored observation: range maximum\n—————————————————————————————————————————————————————————————————————————————————————\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n analyze_vars(\n vars = \"is_event\",\n .stats = \"count_fraction\",\n .labels = c(count_fraction = \"Patients with event (%)\")\n ) %>%\n analyze_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 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}\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{1} - Censored observation: range maximum\n——————————————————————————————————————————————————————————————————————————————————\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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) %>%\n prune_table()\n\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 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}\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{1} - Censored observation: range maximum\n———————————————————————————————————————————————————————————————————————————————————\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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 strata = \"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) %>%\n prune_table()\n\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 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}\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{1} - Censored observation: range maximum\n—————————————————————————————————————————————————————————————————————————————————————\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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) %>%\n prune_table()\n\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 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}\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{1} - Censored observation: range maximum\n—————————————————————————————————————————————————————————————————————————————————————\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\", ref_group = \"A: Drug X\") %>%\n analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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) %>%\n prune_table()\n\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 0.5 to 16.4 {1} 0.9 to 16.3 {1} 0.5 to 16.3 {1}\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{1} - Censored observation: range maximum\n—————————————————————————————————————————————————————————————————————————————————————\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADTTE <- df_explicit_na(ADTTE)\n})\ndatanames <- c(\"ADSL\", \"ADTTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADTTE <- data[[\"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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:36:51 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Efficacy", @@ -698,7 +698,7 @@ "href": "tables/ADA/adat04a.html", "title": "ADAT04A", "section": "", - "text": "Data Setup\nSummary of Treatment Emergent NAbs\nteal App\nReproducibility\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 = .)) {\n `ADA interpreted per sample result` == \"TRUE\"\n } else {\n FALSE\n },\n PNABBLFL = if (exists(\"NAB interpreted per sample result\", where = .)) {\n `NAB interpreted per sample result` == \"TRUE\"\n } else {\n FALSE\n },\n NNABBLFL = if (exists(\"NAB interpreted per sample result\", where = .)) {\n `NAB interpreted per sample result` == \"FALSE\"\n } else {\n FALSE\n }\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 = .)) {\n `ADA interpreted per sample result` == \"TRUE\"\n } else {\n FALSE\n },\n TENABPFL = if (exists(\"Treatment Emergent - Positive, Neutralizing Antibody\", where = .)) {\n `Treatment Emergent - Positive, Neutralizing Antibody` == \"TRUE\"\n } else {\n FALSE\n },\n TINPBFL = if (exists(\"Treatment induced ADA, Neutralizing Antibody\", where = .)) {\n `Treatment induced ADA, Neutralizing Antibody` == \"TRUE\"\n } else {\n FALSE\n },\n TENPBFL = if (exists(\"Treatment enhanced ADA, Neutralizing Antibody\", where = .)) {\n `Treatment enhanced ADA, Neutralizing Antibody` == \"TRUE\"\n } else {\n FALSE\n },\n NABNFL = if (exists(\"NAB interpreted per sample result\", where = .)) {\n `NAB interpreted per sample result` == \"FALSE\"\n } else {\n FALSE\n },\n TUNPBFL = if (exists(\"Treatment unaffected, Neutralizing Antibody\", where = .)) {\n `Treatment unaffected, Neutralizing Antibody` == \"TRUE\"\n } else {\n FALSE\n }\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\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])\n\nmain_footer(result) <- \"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 0 0 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 0 0 0 \nTreatment-induced NAb 0 0 0 0 0 \nTreatment-enhanced NAb 0 0 0 0 0 \nPatients negative for NAb 0 0 0 0 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:35:42 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 dplyr_1.1.4 \n[4] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[7] formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 withr_3.0.0 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nSummary of Treatment Emergent NAbs\nteal App\nReproducibility\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 = .)) {\n `ADA interpreted per sample result` == \"TRUE\"\n } else {\n FALSE\n },\n PNABBLFL = if (exists(\"NAB interpreted per sample result\", where = .)) {\n `NAB interpreted per sample result` == \"TRUE\"\n } else {\n FALSE\n },\n NNABBLFL = if (exists(\"NAB interpreted per sample result\", where = .)) {\n `NAB interpreted per sample result` == \"FALSE\"\n } else {\n FALSE\n }\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 = .)) {\n `ADA interpreted per sample result` == \"TRUE\"\n } else {\n FALSE\n },\n TENABPFL = if (exists(\"Treatment Emergent - Positive, Neutralizing Antibody\", where = .)) {\n `Treatment Emergent - Positive, Neutralizing Antibody` == \"TRUE\"\n } else {\n FALSE\n },\n TINPBFL = if (exists(\"Treatment induced ADA, Neutralizing Antibody\", where = .)) {\n `Treatment induced ADA, Neutralizing Antibody` == \"TRUE\"\n } else {\n FALSE\n },\n TENPBFL = if (exists(\"Treatment enhanced ADA, Neutralizing Antibody\", where = .)) {\n `Treatment enhanced ADA, Neutralizing Antibody` == \"TRUE\"\n } else {\n FALSE\n },\n NABNFL = if (exists(\"NAB interpreted per sample result\", where = .)) {\n `NAB interpreted per sample result` == \"FALSE\"\n } else {\n FALSE\n },\n TUNPBFL = if (exists(\"Treatment unaffected, Neutralizing Antibody\", where = .)) {\n `Treatment unaffected, Neutralizing Antibody` == \"TRUE\"\n } else {\n FALSE\n }\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\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])\n\nmain_footer(result) <- \"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 0 0 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 0 0 0 \nTreatment-induced NAb 0 0 0 0 0 \nTreatment-enhanced NAb 0 0 0 0 0 \nPatients negative for NAb 0 0 0 0 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:36:11 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 dplyr_1.1.4 \n[4] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[7] formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 withr_3.0.0 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "ADA", @@ -710,7 +710,7 @@ "href": "tables/ADA/adat01.html", "title": "ADAT01", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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 = .)) {\n `Treatment Emergent - Positive` == \"TRUE\"\n } else {\n FALSE\n },\n TIFL = if (exists(\"Treatment induced ADA\", where = .)) {\n `Treatment induced ADA` == \"TRUE\"\n } else {\n FALSE\n },\n TEFL = if (exists(\"Treatment enhanced ADA\", where = .)) {\n `Treatment enhanced ADA` == \"TRUE\"\n } else {\n FALSE\n },\n NTEFL = if (exists(\"Treatment Emergent - Negative\", where = .)) {\n `Treatment Emergent - Negative` == \"TRUE\"\n } else {\n FALSE\n },\n TUFL = if (exists(\"Treatment unaffected\", where = .)) {\n `Treatment unaffected` == \"TRUE\"\n } else {\n FALSE\n }\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\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)\n\nmain_footer(result) <- \"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%) 0 0 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 0 0 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 0 0 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:35:30 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 dplyr_1.1.4 \n[4] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[7] formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 withr_3.0.0 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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 = .)) {\n `Treatment Emergent - Positive` == \"TRUE\"\n } else {\n FALSE\n },\n TIFL = if (exists(\"Treatment induced ADA\", where = .)) {\n `Treatment induced ADA` == \"TRUE\"\n } else {\n FALSE\n },\n TEFL = if (exists(\"Treatment enhanced ADA\", where = .)) {\n `Treatment enhanced ADA` == \"TRUE\"\n } else {\n FALSE\n },\n NTEFL = if (exists(\"Treatment Emergent - Negative\", where = .)) {\n `Treatment Emergent - Negative` == \"TRUE\"\n } else {\n FALSE\n },\n TUFL = if (exists(\"Treatment unaffected\", where = .)) {\n `Treatment unaffected` == \"TRUE\"\n } else {\n FALSE\n }\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\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)\n\nmain_footer(result) <- \"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%) 0 0 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 0 0 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 0 0 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:35:59 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 dplyr_1.1.4 \n[4] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[7] formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 withr_3.0.0 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "ADA", @@ -722,7 +722,7 @@ "href": "tables/ADA/adat04b.html", "title": "ADAT04B", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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 = .)) {\n `ADA interpreted per sample result` == \"TRUE\"\n } else {\n FALSE\n },\n PNABBLFL = if (exists(\"NAB interpreted per sample result\", where = .)) {\n `NAB interpreted per sample result` == \"TRUE\"\n } else {\n FALSE\n },\n NNABBLFL = if (exists(\"NAB interpreted per sample result\", where = .)) {\n `NAB interpreted per sample result` == \"FALSE\"\n } else {\n FALSE\n }\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\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])\n\nmain_footer(result) <- \"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 0 0 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 0 0 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:35:18 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 dplyr_1.1.4 \n[4] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[7] formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 withr_3.0.0 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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 = .)) {\n `ADA interpreted per sample result` == \"TRUE\"\n } else {\n FALSE\n },\n PNABBLFL = if (exists(\"NAB interpreted per sample result\", where = .)) {\n `NAB interpreted per sample result` == \"TRUE\"\n } else {\n FALSE\n },\n NNABBLFL = if (exists(\"NAB interpreted per sample result\", where = .)) {\n `NAB interpreted per sample result` == \"FALSE\"\n } else {\n FALSE\n }\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\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])\n\nmain_footer(result) <- \"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 0 0 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 0 0 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:35:46 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 dplyr_1.1.4 \n[4] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[7] formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 withr_3.0.0 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "ADA", @@ -734,7 +734,7 @@ "href": "listings/lab-results/lbl02a.html", "title": "LBL02A", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb_x <- adlb %>%\n filter(\n ANRIND %in% c(\"LOW\", \"HIGH\"),\n !ATOXGR %in% c(\"0\", \"\"),\n LBTEST != \"\"\n ) %>%\n mutate(\n LBTEST_U = paste0(LBTEST, \" (\", AVALU, \")\"),\n CPID = paste(SITEID, SUBJID, sep = \"/\"),\n ADTM = toupper(format(as.Date(ADTM), \"%d%b%Y\")),\n AVAL = format(round(AVAL, 1), nsmall = 1),\n LBNRNG = paste(format(round(ANRLO, 1), nsmall = 1), format(round(ANRHI, 1), nsmall = 1), sep = \" - \"),\n ANRIND_GR = factor(\n case_when(\n ANRIND == \"LOW\" ~ paste0(\"L\", sub(\"-\", \"\", ATOXGR)),\n ANRIND == \"HIGH\" ~ paste0(\"H\", ATOXGR)\n )\n )\n ) %>%\n select(LBTEST_U, TRT01A, CPID, ADY, ADTM, AVAL, ADY, LBNRNG, ANRIND_GR) %>%\n unique() %>%\n arrange(CPID, ADY) %>%\n group_by(LBTEST_U, CPID) %>%\n mutate(DLD = ADY - lag(ADY)) %>%\n ungroup() %>%\n mutate(DLD = ifelse(is.na(DLD), 0, DLD))\n\nout <- adlb_x %>%\n select(LBTEST_U, TRT01A, CPID, ADY, ADTM, DLD, AVAL, LBNRNG, ANRIND_GR)\n\nvar_labels(out) <- names(out)\nout <- out %>%\n var_relabel(\n LBTEST_U = \"Lab Test (Unit)\",\n TRT01A = \"Treatment\",\n CPID = \"Center/Patient ID\",\n ADY = \"Study\\nDay\",\n ADTM = \"Date\",\n DLD = \"Days Since\\nLast Dose of\\nStudy Drug\",\n AVAL = \"Result\",\n LBNRNG = \"Lab Normal\\nRange\",\n ANRIND_GR = \"NCI\\nCTCAE\\nGrade\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"LBTEST_U\", \"CPID\"),\n disp_cols = names(out),\n main_title = \"Listing of Laboratory Abnormalities Defined by NCI CTCAE Grade >= 1\",\n main_footer = \"NCI CTCAE grade is displayed as abnormal high (H) or low (L) followed by the grade.\"\n)\n\nhead(lsting, 20)\n\nListing of Laboratory Abnormalities Defined by NCI CTCAE Grade >= 1\n\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Days Since NCI \n Study Last Dose of Lab Normal CTCAE\nTreatment Lab Test (Unit) Center/Patient ID Day Date Study Drug Result Range Grade\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X Alanine Aminotransferase Measurement (U/L) BRA-1/id-105 80 27MAY2020 0 4.3 7.0 - 55.0 L4 \n 398 10APR2021 318 3.7 7.0 - 55.0 L3 \n BRA-1/id-93 207 13JAN2021 0 6.1 7.0 - 55.0 L1 \n BRA-11/id-397 326 19MAY2021 0 1.5 7.0 - 55.0 L1 \n BRA-14/id-23 594 22JUN2021 0 0.6 7.0 - 55.0 L1 \n BRA-2/id-296 281 30OCT2021 0 2.6 7.0 - 55.0 L1 \n 734 26JAN2023 453 3.9 7.0 - 55.0 L1 \n CAN-1/id-18 465 12APR2022 0 1.8 7.0 - 55.0 L2 \n CHN-1/id-133 127 13DEC2020 0 5.6 7.0 - 55.0 L2 \n 197 21FEB2021 70 1.2 7.0 - 55.0 L4 \n CHN-1/id-199 277 11OCT2020 0 5.3 7.0 - 55.0 L4 \n 672 10NOV2021 395 6.8 7.0 - 55.0 L2 \n CHN-1/id-235 348 25JUN2020 0 3.0 7.0 - 55.0 L3 \n 381 28JUL2020 33 4.7 7.0 - 55.0 L1 \n CHN-1/id-26 905 07JAN2023 0 1.1 7.0 - 55.0 L1 \n CHN-1/id-275 364 01JUN2021 0 5.1 7.0 - 55.0 L2 \n CHN-1/id-277 483 12MAY2022 0 1.1 7.0 - 55.0 L4 \n CHN-1/id-287 182 23MAY2020 0 5.9 7.0 - 55.0 L2 \n 191 01JUN2020 9 5.3 7.0 - 55.0 L3 \n 515 21APR2021 324 2.9 7.0 - 55.0 L4 \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nNCI CTCAE grade is displayed as abnormal high (H) or low (L) followed by the grade.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:35:09 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 pkgconfig_2.0.3 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb_x <- adlb %>%\n filter(\n ANRIND %in% c(\"LOW\", \"HIGH\"),\n !ATOXGR %in% c(\"0\", \"\"),\n LBTEST != \"\"\n ) %>%\n mutate(\n LBTEST_U = paste0(LBTEST, \" (\", AVALU, \")\"),\n CPID = paste(SITEID, SUBJID, sep = \"/\"),\n ADTM = toupper(format(as.Date(ADTM), \"%d%b%Y\")),\n AVAL = format(round(AVAL, 1), nsmall = 1),\n LBNRNG = paste(format(round(ANRLO, 1), nsmall = 1), format(round(ANRHI, 1), nsmall = 1), sep = \" - \"),\n ANRIND_GR = factor(\n case_when(\n ANRIND == \"LOW\" ~ paste0(\"L\", sub(\"-\", \"\", ATOXGR)),\n ANRIND == \"HIGH\" ~ paste0(\"H\", ATOXGR)\n )\n )\n ) %>%\n select(LBTEST_U, TRT01A, CPID, ADY, ADTM, AVAL, ADY, LBNRNG, ANRIND_GR) %>%\n unique() %>%\n arrange(CPID, ADY) %>%\n group_by(LBTEST_U, CPID) %>%\n mutate(DLD = ADY - lag(ADY)) %>%\n ungroup() %>%\n mutate(DLD = ifelse(is.na(DLD), 0, DLD))\n\nout <- adlb_x %>%\n select(LBTEST_U, TRT01A, CPID, ADY, ADTM, DLD, AVAL, LBNRNG, ANRIND_GR)\n\nvar_labels(out) <- names(out)\nout <- out %>%\n var_relabel(\n LBTEST_U = \"Lab Test (Unit)\",\n TRT01A = \"Treatment\",\n CPID = \"Center/Patient ID\",\n ADY = \"Study\\nDay\",\n ADTM = \"Date\",\n DLD = \"Days Since\\nLast Dose of\\nStudy Drug\",\n AVAL = \"Result\",\n LBNRNG = \"Lab Normal\\nRange\",\n ANRIND_GR = \"NCI\\nCTCAE\\nGrade\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"LBTEST_U\", \"CPID\"),\n disp_cols = names(out),\n main_title = \"Listing of Laboratory Abnormalities Defined by NCI CTCAE Grade >= 1\",\n main_footer = \"NCI CTCAE grade is displayed as abnormal high (H) or low (L) followed by the grade.\"\n)\n\nhead(lsting, 20)\n\nListing of Laboratory Abnormalities Defined by NCI CTCAE Grade >= 1\n\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Days Since NCI \n Study Last Dose of Lab Normal CTCAE\nTreatment Lab Test (Unit) Center/Patient ID Day Date Study Drug Result Range Grade\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X Alanine Aminotransferase Measurement (U/L) BRA-1/id-105 80 27MAY2020 0 4.3 7.0 - 55.0 L4 \n 398 10APR2021 318 3.7 7.0 - 55.0 L3 \n BRA-1/id-93 207 13JAN2021 0 6.1 7.0 - 55.0 L1 \n BRA-11/id-397 326 19MAY2021 0 1.5 7.0 - 55.0 L1 \n BRA-14/id-23 594 22JUN2021 0 0.6 7.0 - 55.0 L1 \n BRA-2/id-296 281 30OCT2021 0 2.6 7.0 - 55.0 L1 \n 734 26JAN2023 453 3.9 7.0 - 55.0 L1 \n CAN-1/id-18 465 12APR2022 0 1.8 7.0 - 55.0 L2 \n CHN-1/id-133 127 13DEC2020 0 5.6 7.0 - 55.0 L2 \n 197 21FEB2021 70 1.2 7.0 - 55.0 L4 \n CHN-1/id-199 277 11OCT2020 0 5.3 7.0 - 55.0 L4 \n 672 10NOV2021 395 6.8 7.0 - 55.0 L2 \n CHN-1/id-235 348 25JUN2020 0 3.0 7.0 - 55.0 L3 \n 381 28JUL2020 33 4.7 7.0 - 55.0 L1 \n CHN-1/id-26 905 07JAN2023 0 1.1 7.0 - 55.0 L1 \n CHN-1/id-275 364 01JUN2021 0 5.1 7.0 - 55.0 L2 \n CHN-1/id-277 483 12MAY2022 0 1.1 7.0 - 55.0 L4 \n CHN-1/id-287 182 23MAY2020 0 5.9 7.0 - 55.0 L2 \n 191 01JUN2020 9 5.3 7.0 - 55.0 L3 \n 515 21APR2021 324 2.9 7.0 - 55.0 L4 \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nNCI CTCAE grade is displayed as abnormal high (H) or low (L) followed by the grade.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:35:36 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 pkgconfig_2.0.3 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Lab Results", @@ -746,7 +746,7 @@ "href": "listings/lab-results/lbl02b.html", "title": "LBL02B", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb_x <- adlb %>%\n filter(\n !sub(\"-\", \"\", ATOXGR) %in% c(\"\", \"0\", \"1\"),\n LBTEST != \"\",\n !is.na(ADY),\n !ANRIND %in% c(\"\", \"NORMAL\")\n ) %>%\n mutate(\n CPID = paste(SITEID, SUBJID, sep = \"/\"),\n ADTM = toupper(format(as.Date(ADTM), \"%d%b%Y\")),\n AVAL = format(round(AVAL, 1), nsmall = 1),\n LBNRNG = paste(format(round(ANRLO, 1), nsmall = 1), format(round(ANRHI, 1), nsmall = 1), sep = \" - \"),\n ANRIND_GR = factor(\n case_when(\n ANRIND == \"LOW\" ~ paste0(\"L\", sub(\"-\", \"\", ATOXGR)),\n ANRIND == \"HIGH\" ~ paste0(\"H\", ATOXGR)\n )\n )\n ) %>%\n select(LBTEST, TRT01A, CPID, ADY, ADTM, AVAL, AVALU, LBNRNG, ANRIND_GR) %>%\n unique() %>%\n arrange(CPID, ADY) %>%\n group_by(LBTEST, CPID) %>%\n mutate(DLD = ADY - lag(ADY)) %>%\n ungroup() %>%\n mutate(DLD = ifelse(is.na(DLD), 0, DLD))\n\nout <- adlb_x %>%\n select(LBTEST, TRT01A, CPID, ADY, ADTM, DLD, AVAL, AVALU, LBNRNG, ANRIND_GR)\n\nvar_labels(out) <- names(out)\nout <- out %>%\n var_relabel(\n LBTEST = \"Lab Test\",\n TRT01A = \"Treatment\",\n CPID = \"Center/Patient ID\",\n ADY = \"Study\\nDay\",\n ADTM = \"Date\",\n DLD = \"Days Since\\nLast Dose of\\nStudy Drug\",\n AVAL = \"Result\",\n AVALU = \"Unit\",\n LBNRNG = \"Lab Normal\\nRange\",\n ANRIND_GR = \"NCI\\nCTCAE\\nGrade\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"LBTEST\", \"CPID\"),\n disp_cols = names(out),\n main_title = \"Listing of Laboratory Abnormalities Defined by NCI CTCAE Grade >= 2\",\n main_footer = \"NCI CTCAE grade is displayed as abnormal high (H) or low (L) followed by the grade.\"\n)\n\nhead(lsting, 20)\n\nListing of Laboratory Abnormalities Defined by NCI CTCAE Grade >= 2\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Days Since NCI \n Study Last Dose of Lab Normal CTCAE\nTreatment Lab Test Center/Patient ID Day Date Study Drug Result Unit Range Grade\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X Alanine Aminotransferase Measurement BRA-1/id-105 80 27MAY2020 0 4.3 U/L 7.0 - 55.0 L4 \n 398 10APR2021 318 3.7 U/L 7.0 - 55.0 L3 \n CAN-1/id-18 465 12APR2022 0 1.8 U/L 7.0 - 55.0 L2 \n CHN-1/id-133 127 13DEC2020 0 5.6 U/L 7.0 - 55.0 L2 \n 197 21FEB2021 70 1.2 U/L 7.0 - 55.0 L4 \n CHN-1/id-199 277 11OCT2020 0 5.3 U/L 7.0 - 55.0 L4 \n 672 10NOV2021 395 6.8 U/L 7.0 - 55.0 L2 \n CHN-1/id-235 348 25JUN2020 0 3.0 U/L 7.0 - 55.0 L3 \n CHN-1/id-275 364 01JUN2021 0 5.1 U/L 7.0 - 55.0 L2 \n CHN-1/id-277 483 12MAY2022 0 1.1 U/L 7.0 - 55.0 L4 \n CHN-1/id-287 182 23MAY2020 0 5.9 U/L 7.0 - 55.0 L2 \n 191 01JUN2020 9 5.3 U/L 7.0 - 55.0 L3 \n 515 21APR2021 324 2.9 U/L 7.0 - 55.0 L4 \n CHN-1/id-315 289 05JUN2020 0 4.6 U/L 7.0 - 55.0 L4 \n 599 11APR2021 310 5.2 U/L 7.0 - 55.0 L4 \n CHN-1/id-316 971 14MAY2023 0 3.6 U/L 7.0 - 55.0 L4 \n CHN-1/id-360 689 01APR2022 0 4.7 U/L 7.0 - 55.0 L2 \n CHN-1/id-371 81 01MAY2021 0 5.9 U/L 7.0 - 55.0 L2 \n CHN-1/id-47 236 11SEP2020 0 4.4 U/L 7.0 - 55.0 L3 \n CHN-1/id-53 98 13FEB2020 0 6.4 U/L 7.0 - 55.0 L2 \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nNCI CTCAE grade is displayed as abnormal high (H) or low (L) followed by the grade.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:35:02 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 pkgconfig_2.0.3 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb_x <- adlb %>%\n filter(\n !sub(\"-\", \"\", ATOXGR) %in% c(\"\", \"0\", \"1\"),\n LBTEST != \"\",\n !is.na(ADY),\n !ANRIND %in% c(\"\", \"NORMAL\")\n ) %>%\n mutate(\n CPID = paste(SITEID, SUBJID, sep = \"/\"),\n ADTM = toupper(format(as.Date(ADTM), \"%d%b%Y\")),\n AVAL = format(round(AVAL, 1), nsmall = 1),\n LBNRNG = paste(format(round(ANRLO, 1), nsmall = 1), format(round(ANRHI, 1), nsmall = 1), sep = \" - \"),\n ANRIND_GR = factor(\n case_when(\n ANRIND == \"LOW\" ~ paste0(\"L\", sub(\"-\", \"\", ATOXGR)),\n ANRIND == \"HIGH\" ~ paste0(\"H\", ATOXGR)\n )\n )\n ) %>%\n select(LBTEST, TRT01A, CPID, ADY, ADTM, AVAL, AVALU, LBNRNG, ANRIND_GR) %>%\n unique() %>%\n arrange(CPID, ADY) %>%\n group_by(LBTEST, CPID) %>%\n mutate(DLD = ADY - lag(ADY)) %>%\n ungroup() %>%\n mutate(DLD = ifelse(is.na(DLD), 0, DLD))\n\nout <- adlb_x %>%\n select(LBTEST, TRT01A, CPID, ADY, ADTM, DLD, AVAL, AVALU, LBNRNG, ANRIND_GR)\n\nvar_labels(out) <- names(out)\nout <- out %>%\n var_relabel(\n LBTEST = \"Lab Test\",\n TRT01A = \"Treatment\",\n CPID = \"Center/Patient ID\",\n ADY = \"Study\\nDay\",\n ADTM = \"Date\",\n DLD = \"Days Since\\nLast Dose of\\nStudy Drug\",\n AVAL = \"Result\",\n AVALU = \"Unit\",\n LBNRNG = \"Lab Normal\\nRange\",\n ANRIND_GR = \"NCI\\nCTCAE\\nGrade\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"LBTEST\", \"CPID\"),\n disp_cols = names(out),\n main_title = \"Listing of Laboratory Abnormalities Defined by NCI CTCAE Grade >= 2\",\n main_footer = \"NCI CTCAE grade is displayed as abnormal high (H) or low (L) followed by the grade.\"\n)\n\nhead(lsting, 20)\n\nListing of Laboratory Abnormalities Defined by NCI CTCAE Grade >= 2\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Days Since NCI \n Study Last Dose of Lab Normal CTCAE\nTreatment Lab Test Center/Patient ID Day Date Study Drug Result Unit Range Grade\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X Alanine Aminotransferase Measurement BRA-1/id-105 80 27MAY2020 0 4.3 U/L 7.0 - 55.0 L4 \n 398 10APR2021 318 3.7 U/L 7.0 - 55.0 L3 \n CAN-1/id-18 465 12APR2022 0 1.8 U/L 7.0 - 55.0 L2 \n CHN-1/id-133 127 13DEC2020 0 5.6 U/L 7.0 - 55.0 L2 \n 197 21FEB2021 70 1.2 U/L 7.0 - 55.0 L4 \n CHN-1/id-199 277 11OCT2020 0 5.3 U/L 7.0 - 55.0 L4 \n 672 10NOV2021 395 6.8 U/L 7.0 - 55.0 L2 \n CHN-1/id-235 348 25JUN2020 0 3.0 U/L 7.0 - 55.0 L3 \n CHN-1/id-275 364 01JUN2021 0 5.1 U/L 7.0 - 55.0 L2 \n CHN-1/id-277 483 12MAY2022 0 1.1 U/L 7.0 - 55.0 L4 \n CHN-1/id-287 182 23MAY2020 0 5.9 U/L 7.0 - 55.0 L2 \n 191 01JUN2020 9 5.3 U/L 7.0 - 55.0 L3 \n 515 21APR2021 324 2.9 U/L 7.0 - 55.0 L4 \n CHN-1/id-315 289 05JUN2020 0 4.6 U/L 7.0 - 55.0 L4 \n 599 11APR2021 310 5.2 U/L 7.0 - 55.0 L4 \n CHN-1/id-316 971 14MAY2023 0 3.6 U/L 7.0 - 55.0 L4 \n CHN-1/id-360 689 01APR2022 0 4.7 U/L 7.0 - 55.0 L2 \n CHN-1/id-371 81 01MAY2021 0 5.9 U/L 7.0 - 55.0 L2 \n CHN-1/id-47 236 11SEP2020 0 4.4 U/L 7.0 - 55.0 L3 \n CHN-1/id-53 98 13FEB2020 0 6.4 U/L 7.0 - 55.0 L2 \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nNCI CTCAE grade is displayed as abnormal high (H) or low (L) followed by the grade.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:35:29 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 pkgconfig_2.0.3 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Lab Results", @@ -758,7 +758,7 @@ "href": "listings/lab-results/lbl02a_rls.html", "title": "LBL02A_RLS", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb_x <- adlb %>%\n filter(\n LBTEST != \"\"\n ) %>%\n mutate(\n LBTEST_U = paste0(LBTEST, \" (\", AVALU, \")\"),\n CPID = paste(SITEID, SUBJID, sep = \"/\")\n ) %>%\n mutate(CRC = paste(\"40%\", \"40%\", sep = \" / \"))\n\nstd_rng <- adlb_x %>%\n group_by(LBTEST_U) %>%\n summarise(\n STD_RNG_LO = stats::quantile(AVAL, probs = c(0.1), na.rm = TRUE),\n STD_RNG_HI = stats::quantile(AVAL, probs = c(0.9), na.rm = TRUE)\n ) %>%\n ungroup()\n\nadlb_x <- adlb_x %>%\n left_join(std_rng, by = \"LBTEST_U\") %>%\n mutate(\n AVAL = format(round(AVAL, 1), nsmall = 1),\n PCHG = format(round(PCHG, 1), nsmall = 1),\n LBNRNG = paste(ANRLO, ANRHI, sep = \" - \"),\n STD_RNG_LO = format(round(STD_RNG_LO, 1), nsmall = 1),\n STD_RNG_HI = format(round(STD_RNG_HI, 1), nsmall = 1)\n ) %>%\n mutate(\n STD_RNG = paste(STD_RNG_LO, STD_RNG_HI, sep = \" - \"),\n ANRIND = factor(case_when(\n ANRIND == \"LOW\" & AVAL > STD_RNG_LO ~ \"L\",\n ANRIND == \"HIGH\" & AVAL < STD_RNG_HI ~ \"H\",\n ANRIND == \"LOW\" & AVAL <= STD_RNG_LO ~ \"LL\",\n ANRIND == \"HIGH\" & AVAL >= STD_RNG_HI ~ \"HH\",\n TRUE ~ \"\"\n ))\n ) %>%\n select(LBTEST_U, TRT01A, CPID, ADY, AVAL, PCHG, STD_RNG, LBNRNG, CRC, ANRIND) %>%\n unique() %>%\n arrange(CPID, ADY) %>%\n group_by(LBTEST_U, CPID) %>%\n mutate(DLD = ADY - lag(ADY)) %>%\n ungroup() %>%\n mutate(DLD = ifelse(is.na(DLD), 0, DLD))\n\nout <- adlb_x %>%\n select(LBTEST_U, TRT01A, CPID, ADY, DLD, AVAL, PCHG, STD_RNG, LBNRNG, CRC, ANRIND)\n\nvar_labels(out) <- names(out)\nout <- out %>%\n var_relabel(\n LBTEST_U = \"Lab Test (Unit)\",\n TRT01A = \"Treatment\",\n CPID = \"Center/Patient ID\",\n ADY = \"Study\\nDay\",\n DLD = \"Days Since\\nLast Dose of\\nStudy Drug\",\n AVAL = \"Result\",\n PCHG = \"% Change\\nfrom\\nBaseline\",\n STD_RNG = \"Standard\\nReference\\nRange\",\n LBNRNG = \"Marked\\nReference\\nRange\",\n CRC = \"Clinically\\nRelevant\\nChange\\nDec./Inc.\",\n ANRIND = \"Abnormality\\nFlag\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"LBTEST_U\", \"CPID\"),\n disp_cols = names(out),\n main_title = \"Listing of Laboratory Abnormalities Defined by Roche Safety Lab Standardization\",\n main_footer = \"Standard reference range, marked reference range and clinically relevant change from baseline are from the Roche Safety Lab Standardization guideline. Abnormalities are flagged as high (H) or low (L) if outside the standard reference range; high high (HH) or low low (LL) if outside the marked reference range with a clinically relevant change from baseline.\" \n)\n\nhead(lsting, 20)\n\nListing of Laboratory Abnormalities Defined by Roche Safety Lab Standardization\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Clinically \n Days Since % Change Standard Marked Relevant \n Study Last Dose of from Reference Reference Change Abnormality\nTreatment Lab Test (Unit) Center/Patient ID Day Study Drug Result Baseline Range Range Dec./Inc. Flag \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X Alanine Aminotransferase Measurement (U/L) BRA-1/id-105 80 0 4.3 NA 5.5 - 31.1 7 - 55 40% / 40% LL \n 149 69 24.7 0.0 5.5 - 31.1 7 - 55 40% / 40% \n 314 165 24.9 0.7 5.5 - 31.1 7 - 55 40% / 40% \n 398 84 3.7 -85.2 5.5 - 31.1 7 - 55 40% / 40% LL \n 470 72 18.5 -24.9 5.5 - 31.1 7 - 55 40% / 40% \n 528 58 7.7 -68.7 5.5 - 31.1 7 - 55 40% / 40% \n 535 7 23.5 -4.8 5.5 - 31.1 7 - 55 40% / 40% \n BRA-1/id-134 225 0 7.4 NA 5.5 - 31.1 7 - 55 40% / 40% \n 227 2 16.4 0.0 5.5 - 31.1 7 - 55 40% / 40% \n 255 28 11.2 -32.0 5.5 - 31.1 7 - 55 40% / 40% \n 269 14 15.9 -3.2 5.5 - 31.1 7 - 55 40% / 40% \n 357 88 24.4 48.3 5.5 - 31.1 7 - 55 40% / 40% \n 436 79 16.0 -2.4 5.5 - 31.1 7 - 55 40% / 40% \n 440 4 17.2 4.8 5.5 - 31.1 7 - 55 40% / 40% \n BRA-1/id-42 176 0 16.6 NA 5.5 - 31.1 7 - 55 40% / 40% \n 477 301 16.5 0.0 5.5 - 31.1 7 - 55 40% / 40% \n 534 57 18.7 13.4 5.5 - 31.1 7 - 55 40% / 40% \n 550 16 11.4 -30.6 5.5 - 31.1 7 - 55 40% / 40% \n 569 19 21.7 31.3 5.5 - 31.1 7 - 55 40% / 40% \n 608 39 24.6 49.2 5.5 - 31.1 7 - 55 40% / 40% \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nStandard reference range, marked reference range and clinically relevant change from baseline are from the Roche Safety Lab Standardization guideline. Abnormalities are flagged as high (H) or low (L) if outside the standard reference range; high high (HH) or low low (LL) if outside the marked reference range with a clinically relevant change from baseline.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:55 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 pkgconfig_2.0.3 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb_x <- adlb %>%\n filter(\n LBTEST != \"\"\n ) %>%\n mutate(\n LBTEST_U = paste0(LBTEST, \" (\", AVALU, \")\"),\n CPID = paste(SITEID, SUBJID, sep = \"/\")\n ) %>%\n mutate(CRC = paste(\"40%\", \"40%\", sep = \" / \"))\n\nstd_rng <- adlb_x %>%\n group_by(LBTEST_U) %>%\n summarise(\n STD_RNG_LO = stats::quantile(AVAL, probs = c(0.1), na.rm = TRUE),\n STD_RNG_HI = stats::quantile(AVAL, probs = c(0.9), na.rm = TRUE)\n ) %>%\n ungroup()\n\nadlb_x <- adlb_x %>%\n left_join(std_rng, by = \"LBTEST_U\") %>%\n mutate(\n AVAL = format(round(AVAL, 1), nsmall = 1),\n PCHG = format(round(PCHG, 1), nsmall = 1),\n LBNRNG = paste(ANRLO, ANRHI, sep = \" - \"),\n STD_RNG_LO = format(round(STD_RNG_LO, 1), nsmall = 1),\n STD_RNG_HI = format(round(STD_RNG_HI, 1), nsmall = 1)\n ) %>%\n mutate(\n STD_RNG = paste(STD_RNG_LO, STD_RNG_HI, sep = \" - \"),\n ANRIND = factor(case_when(\n ANRIND == \"LOW\" & AVAL > STD_RNG_LO ~ \"L\",\n ANRIND == \"HIGH\" & AVAL < STD_RNG_HI ~ \"H\",\n ANRIND == \"LOW\" & AVAL <= STD_RNG_LO ~ \"LL\",\n ANRIND == \"HIGH\" & AVAL >= STD_RNG_HI ~ \"HH\",\n TRUE ~ \"\"\n ))\n ) %>%\n select(LBTEST_U, TRT01A, CPID, ADY, AVAL, PCHG, STD_RNG, LBNRNG, CRC, ANRIND) %>%\n unique() %>%\n arrange(CPID, ADY) %>%\n group_by(LBTEST_U, CPID) %>%\n mutate(DLD = ADY - lag(ADY)) %>%\n ungroup() %>%\n mutate(DLD = ifelse(is.na(DLD), 0, DLD))\n\nout <- adlb_x %>%\n select(LBTEST_U, TRT01A, CPID, ADY, DLD, AVAL, PCHG, STD_RNG, LBNRNG, CRC, ANRIND)\n\nvar_labels(out) <- names(out)\nout <- out %>%\n var_relabel(\n LBTEST_U = \"Lab Test (Unit)\",\n TRT01A = \"Treatment\",\n CPID = \"Center/Patient ID\",\n ADY = \"Study\\nDay\",\n DLD = \"Days Since\\nLast Dose of\\nStudy Drug\",\n AVAL = \"Result\",\n PCHG = \"% Change\\nfrom\\nBaseline\",\n STD_RNG = \"Standard\\nReference\\nRange\",\n LBNRNG = \"Marked\\nReference\\nRange\",\n CRC = \"Clinically\\nRelevant\\nChange\\nDec./Inc.\",\n ANRIND = \"Abnormality\\nFlag\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"LBTEST_U\", \"CPID\"),\n disp_cols = names(out),\n main_title = \"Listing of Laboratory Abnormalities Defined by Roche Safety Lab Standardization\",\n main_footer = \"Standard reference range, marked reference range and clinically relevant change from baseline are from the Roche Safety Lab Standardization guideline. Abnormalities are flagged as high (H) or low (L) if outside the standard reference range; high high (HH) or low low (LL) if outside the marked reference range with a clinically relevant change from baseline.\" \n)\n\nhead(lsting, 20)\n\nListing of Laboratory Abnormalities Defined by Roche Safety Lab Standardization\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Clinically \n Days Since % Change Standard Marked Relevant \n Study Last Dose of from Reference Reference Change Abnormality\nTreatment Lab Test (Unit) Center/Patient ID Day Study Drug Result Baseline Range Range Dec./Inc. Flag \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X Alanine Aminotransferase Measurement (U/L) BRA-1/id-105 80 0 4.3 NA 5.5 - 31.1 7 - 55 40% / 40% LL \n 149 69 24.7 0.0 5.5 - 31.1 7 - 55 40% / 40% \n 314 165 24.9 0.7 5.5 - 31.1 7 - 55 40% / 40% \n 398 84 3.7 -85.2 5.5 - 31.1 7 - 55 40% / 40% LL \n 470 72 18.5 -24.9 5.5 - 31.1 7 - 55 40% / 40% \n 528 58 7.7 -68.7 5.5 - 31.1 7 - 55 40% / 40% \n 535 7 23.5 -4.8 5.5 - 31.1 7 - 55 40% / 40% \n BRA-1/id-134 225 0 7.4 NA 5.5 - 31.1 7 - 55 40% / 40% \n 227 2 16.4 0.0 5.5 - 31.1 7 - 55 40% / 40% \n 255 28 11.2 -32.0 5.5 - 31.1 7 - 55 40% / 40% \n 269 14 15.9 -3.2 5.5 - 31.1 7 - 55 40% / 40% \n 357 88 24.4 48.3 5.5 - 31.1 7 - 55 40% / 40% \n 436 79 16.0 -2.4 5.5 - 31.1 7 - 55 40% / 40% \n 440 4 17.2 4.8 5.5 - 31.1 7 - 55 40% / 40% \n BRA-1/id-42 176 0 16.6 NA 5.5 - 31.1 7 - 55 40% / 40% \n 477 301 16.5 0.0 5.5 - 31.1 7 - 55 40% / 40% \n 534 57 18.7 13.4 5.5 - 31.1 7 - 55 40% / 40% \n 550 16 11.4 -30.6 5.5 - 31.1 7 - 55 40% / 40% \n 569 19 21.7 31.3 5.5 - 31.1 7 - 55 40% / 40% \n 608 39 24.6 49.2 5.5 - 31.1 7 - 55 40% / 40% \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nStandard reference range, marked reference range and clinically relevant change from baseline are from the Roche Safety Lab Standardization guideline. Abnormalities are flagged as high (H) or low (L) if outside the standard reference range; high high (HH) or low low (LL) if outside the marked reference range with a clinically relevant change from baseline.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:35:21 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 pkgconfig_2.0.3 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Lab Results", @@ -770,7 +770,7 @@ "href": "listings/concomitant-medications/cml02b_gl.html", "title": "CML02B_GL", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\nout <- adcm %>%\n select(ATC1, ATC2, ATC3, ATC4, CMDECOD, CMTRT) %>%\n unique()\n\nvar_labels(out) <- c(\n ATC1 = \"ATC Class Level 1\",\n ATC2 = \"ATC Class Level 2\",\n ATC3 = \"ATC Class Level 3\",\n ATC4 = \"ATC Class Level 4\",\n CMDECOD = \"WHODrug Preferred Name\",\n CMTRT = \"Investigator-Specified\\nTreatment Term\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\"),\n disp_cols = names(out),\n main_title = \"Listing of Concomitant Medication Class, Preferred Name, and Investigator-Specified Terms\"\n)\n\nhead(lsting, 20)\n\nListing of Concomitant Medication Class, Preferred Name, and Investigator-Specified Terms\n\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Investigator-Specified\nATC Class Level 1 ATC Class Level 2 ATC Class Level 3 ATC Class Level 4 WHODrug Preferred Name Treatment Term \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n ATCCLAS1 A ATCCLAS2 A ATCCLAS3 A ATCCLAS4 A medname A_2/3 A_2/3 \n medname A_3/3 A_3/3 \n medname A_1/3 A_1/3 \n ATCCLAS1 A p2 ATCCLAS2 A p2 ATCCLAS3 A p2 ATCCLAS4 A p2 medname A_3/3 A_3/3 \n ATCCLAS1 B ATCCLAS2 B ATCCLAS3 B ATCCLAS4 B medname B_1/4 B_1/4 \n medname B_4/4 B_4/4 \n medname B_2/4 B_2/4 \n medname B_3/4 B_3/4 \n ATCCLAS1 B p2 ATCCLAS2 B p2 ATCCLAS3 B p2 ATCCLAS4 B p2 medname B_1/4 B_1/4 \n medname B_2/4 B_2/4 \n ATCCLAS1 B p3 ATCCLAS2 B p3 ATCCLAS3 B p3 ATCCLAS4 B p3 medname B_1/4 B_1/4 \n medname B_2/4 B_2/4 \n ATCCLAS1 C ATCCLAS2 C ATCCLAS3 C ATCCLAS4 C medname C_1/2 C_1/2 \n medname C_2/2 C_2/2 \n ATCCLAS1 C p2 ATCCLAS2 C p2 ATCCLAS3 C p2 ATCCLAS4 C p2 medname C_1/2 C_1/2 \n medname C_2/2 C_2/2 \n ATCCLAS1 C p3 ATCCLAS2 C p3 ATCCLAS3 C p3 ATCCLAS4 C p3 medname C_2/2 C_2/2 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:47 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\nout <- adcm %>%\n select(ATC1, ATC2, ATC3, ATC4, CMDECOD, CMTRT) %>%\n unique()\n\nvar_labels(out) <- c(\n ATC1 = \"ATC Class Level 1\",\n ATC2 = \"ATC Class Level 2\",\n ATC3 = \"ATC Class Level 3\",\n ATC4 = \"ATC Class Level 4\",\n CMDECOD = \"WHODrug Preferred Name\",\n CMTRT = \"Investigator-Specified\\nTreatment Term\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\"),\n disp_cols = names(out),\n main_title = \"Listing of Concomitant Medication Class, Preferred Name, and Investigator-Specified Terms\"\n)\n\nhead(lsting, 20)\n\nListing of Concomitant Medication Class, Preferred Name, and Investigator-Specified Terms\n\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Investigator-Specified\nATC Class Level 1 ATC Class Level 2 ATC Class Level 3 ATC Class Level 4 WHODrug Preferred Name Treatment Term \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n ATCCLAS1 A ATCCLAS2 A ATCCLAS3 A ATCCLAS4 A medname A_2/3 A_2/3 \n medname A_3/3 A_3/3 \n medname A_1/3 A_1/3 \n ATCCLAS1 A p2 ATCCLAS2 A p2 ATCCLAS3 A p2 ATCCLAS4 A p2 medname A_3/3 A_3/3 \n ATCCLAS1 B ATCCLAS2 B ATCCLAS3 B ATCCLAS4 B medname B_1/4 B_1/4 \n medname B_4/4 B_4/4 \n medname B_2/4 B_2/4 \n medname B_3/4 B_3/4 \n ATCCLAS1 B p2 ATCCLAS2 B p2 ATCCLAS3 B p2 ATCCLAS4 B p2 medname B_1/4 B_1/4 \n medname B_2/4 B_2/4 \n ATCCLAS1 B p3 ATCCLAS2 B p3 ATCCLAS3 B p3 ATCCLAS4 B p3 medname B_1/4 B_1/4 \n medname B_2/4 B_2/4 \n ATCCLAS1 C ATCCLAS2 C ATCCLAS3 C ATCCLAS4 C medname C_1/2 C_1/2 \n medname C_2/2 C_2/2 \n ATCCLAS1 C p2 ATCCLAS2 C p2 ATCCLAS3 C p2 ATCCLAS4 C p2 medname C_1/2 C_1/2 \n medname C_2/2 C_2/2 \n ATCCLAS1 C p3 ATCCLAS2 C p3 ATCCLAS3 C p3 ATCCLAS4 C p3 medname C_2/2 C_2/2 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:35:13 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Concomitant Medications", @@ -782,7 +782,7 @@ "href": "listings/concomitant-medications/cml01.html", "title": "CML01", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\nout <- adcm %>%\n filter(!is.na(CMDECOD)) %>%\n mutate(\n ID = paste(SITEID, SUBJID, sep = \"/\"),\n AGSXRC = paste(AGE, SEX, RACE, sep = \"/\"),\n TRTSD = toupper(format(as.Date(TRTSDTM), \"%d%b%Y\")),\n CMASTD = toupper(format(as.Date(ASTDTM), \"%d%b%Y\")),\n CMSTRFL = ifelse(ASTDY < 0, \"Yes\", \"No\"),\n CMENRFL = ifelse(CMENRTPT == \"ONGOING\", \"Yes\", \"No\")\n ) %>%\n select(\n ID, AGSXRC, TRT01A, CMDECOD, TRTSD, CMASTD, ASTDY, ADURN,\n CMSTRFL, CMENRFL, CMDOSE, CMDOSU, CMDOSFRQ, CMROUTE\n )\n\nvar_labels(out) <- c(\n ID = \"Center/Patient ID\",\n AGSXRC = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n CMDECOD = \"Medication Name\",\n TRTSD = \"Date of First\\nStudy Drug\\nAdministration\",\n CMASTD = \"Medication\\nStart Date\",\n ASTDY = \"Study Day\",\n ADURN = \"Duration\\n(days)\",\n CMSTRFL = \"Previous?\",\n CMENRFL = \"Ongoing\\nat Final\\nContact?\",\n CMDOSE = \"Dose\",\n CMDOSU = \"Dose Unit\",\n CMDOSFRQ = \"Frequency\",\n CMROUTE = \"Route\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"ID\", \"AGSXRC\", \"CMDECOD\"),\n disp_cols = names(out),\n main_title = \"Listing of Previous and Concomitant Medications\"\n)\n\nhead(lsting, 20)\n\nListing of Previous and Concomitant Medications\n\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Date of First Ongoing \n Study Drug Medication Duration at Final \nTreatment Center/Patient ID Age/Sex/Race Medication Name Administration Start Date Study Day (days) Previous? Contact? Dose Dose Unit Frequency Route \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-134 47/M/WHITE medname A_2/3 04NOV2020 21SEP2021 321 -148 No No 30 mg/breath Q4H INTRAMUSCULAR\n 04NOV2020 02DEC2021 393 -42 No No 41 umol/L TWICE UNKNOWN \n medname B_1/4 04NOV2020 15APR2021 162 -172 No No 25 ug/kg/day Q4H INTRAVENOUS \n 04NOV2020 15APR2021 162 -172 No No 25 ug/kg/day Q4H INTRAVENOUS \n 04NOV2020 15APR2021 162 -172 No No 25 ug/kg/day Q4H INTRAVENOUS \n medname C_1/2 04NOV2020 19MAY2021 196 -165 No No 22 ug/mL TID INHALED \n 04NOV2020 19MAY2021 196 -165 No No 22 ug/mL TID INHALED \n BRA-1/id-42 36/M/BLACK OR AFRICAN AMERICAN medname A_2/3 01JAN2020 09JUN2020 160 -258 No Yes 48 DROP QD INTRAVENOUS \n 01JAN2020 04APR2021 459 -194 No Yes 57 ug/kg/day Q4W NASAL \n 01JAN2020 15APR2021 470 -130 No Yes 83 ug/kg/day Q4H UNKNOWN \n 01JAN2020 20APR2021 475 -112 No Yes 17 ug/kg/day Q4H SUBCUTANEOUS \n medname A_3/3 01JAN2020 03OCT2021 641 -14 No Yes 68 % 4 TIMES PER MONTH UNKNOWN \n 01JAN2020 03OCT2021 641 -14 No Yes 68 % 4 TIMES PER MONTH UNKNOWN \n medname B_1/4 01JAN2020 19OCT2020 292 -49 No Yes 5 ug/mL TWICE UNKNOWN \n 01JAN2020 19OCT2020 292 -49 No Yes 5 ug/mL TWICE UNKNOWN \n 01JAN2020 19OCT2020 292 -49 No Yes 5 ug/mL TWICE UNKNOWN \n medname B_2/4 01JAN2020 11MAY2021 496 -161 No Yes 83 ug/mL TWICE RECTAL \n 01JAN2020 11MAY2021 496 -161 No Yes 83 ug/mL TWICE RECTAL \n 01JAN2020 11MAY2021 496 -161 No Yes 83 ug/mL TWICE RECTAL \n medname B_3/4 01JAN2020 09FEB2020 39 -505 No Yes 85 ug QD SUBCUTANEOUS \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:40 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 pkgconfig_2.0.3 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\nout <- adcm %>%\n filter(!is.na(CMDECOD)) %>%\n mutate(\n ID = paste(SITEID, SUBJID, sep = \"/\"),\n AGSXRC = paste(AGE, SEX, RACE, sep = \"/\"),\n TRTSD = toupper(format(as.Date(TRTSDTM), \"%d%b%Y\")),\n CMASTD = toupper(format(as.Date(ASTDTM), \"%d%b%Y\")),\n CMSTRFL = ifelse(ASTDY < 0, \"Yes\", \"No\"),\n CMENRFL = ifelse(CMENRTPT == \"ONGOING\", \"Yes\", \"No\")\n ) %>%\n select(\n ID, AGSXRC, TRT01A, CMDECOD, TRTSD, CMASTD, ASTDY, ADURN,\n CMSTRFL, CMENRFL, CMDOSE, CMDOSU, CMDOSFRQ, CMROUTE\n )\n\nvar_labels(out) <- c(\n ID = \"Center/Patient ID\",\n AGSXRC = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n CMDECOD = \"Medication Name\",\n TRTSD = \"Date of First\\nStudy Drug\\nAdministration\",\n CMASTD = \"Medication\\nStart Date\",\n ASTDY = \"Study Day\",\n ADURN = \"Duration\\n(days)\",\n CMSTRFL = \"Previous?\",\n CMENRFL = \"Ongoing\\nat Final\\nContact?\",\n CMDOSE = \"Dose\",\n CMDOSU = \"Dose Unit\",\n CMDOSFRQ = \"Frequency\",\n CMROUTE = \"Route\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"ID\", \"AGSXRC\", \"CMDECOD\"),\n disp_cols = names(out),\n main_title = \"Listing of Previous and Concomitant Medications\"\n)\n\nhead(lsting, 20)\n\nListing of Previous and Concomitant Medications\n\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Date of First Ongoing \n Study Drug Medication Duration at Final \nTreatment Center/Patient ID Age/Sex/Race Medication Name Administration Start Date Study Day (days) Previous? Contact? Dose Dose Unit Frequency Route \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-134 47/M/WHITE medname A_2/3 04NOV2020 21SEP2021 321 -148 No No 30 mg/breath Q4H INTRAMUSCULAR\n 04NOV2020 02DEC2021 393 -42 No No 41 umol/L TWICE UNKNOWN \n medname B_1/4 04NOV2020 15APR2021 162 -172 No No 25 ug/kg/day Q4H INTRAVENOUS \n 04NOV2020 15APR2021 162 -172 No No 25 ug/kg/day Q4H INTRAVENOUS \n 04NOV2020 15APR2021 162 -172 No No 25 ug/kg/day Q4H INTRAVENOUS \n medname C_1/2 04NOV2020 19MAY2021 196 -165 No No 22 ug/mL TID INHALED \n 04NOV2020 19MAY2021 196 -165 No No 22 ug/mL TID INHALED \n BRA-1/id-42 36/M/BLACK OR AFRICAN AMERICAN medname A_2/3 01JAN2020 09JUN2020 160 -258 No Yes 48 DROP QD INTRAVENOUS \n 01JAN2020 04APR2021 459 -194 No Yes 57 ug/kg/day Q4W NASAL \n 01JAN2020 15APR2021 470 -130 No Yes 83 ug/kg/day Q4H UNKNOWN \n 01JAN2020 20APR2021 475 -112 No Yes 17 ug/kg/day Q4H SUBCUTANEOUS \n medname A_3/3 01JAN2020 03OCT2021 641 -14 No Yes 68 % 4 TIMES PER MONTH UNKNOWN \n 01JAN2020 03OCT2021 641 -14 No Yes 68 % 4 TIMES PER MONTH UNKNOWN \n medname B_1/4 01JAN2020 19OCT2020 292 -49 No Yes 5 ug/mL TWICE UNKNOWN \n 01JAN2020 19OCT2020 292 -49 No Yes 5 ug/mL TWICE UNKNOWN \n 01JAN2020 19OCT2020 292 -49 No Yes 5 ug/mL TWICE UNKNOWN \n medname B_2/4 01JAN2020 11MAY2021 496 -161 No Yes 83 ug/mL TWICE RECTAL \n 01JAN2020 11MAY2021 496 -161 No Yes 83 ug/mL TWICE RECTAL \n 01JAN2020 11MAY2021 496 -161 No Yes 83 ug/mL TWICE RECTAL \n medname B_3/4 01JAN2020 09FEB2020 39 -505 No Yes 85 ug QD SUBCUTANEOUS \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:35:05 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 pkgconfig_2.0.3 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Concomitant Medications", @@ -794,7 +794,7 @@ "href": "listings/pharmacokinetic/pkpl02.html", "title": "PKPL02", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(rlistings)\nlibrary(scda)\n\ndrug_a <- \"Plasma Drug X\"\nspec <- \"Urine\"\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\nadpp_x <- adpp %>% filter(\n PPCAT == drug_a,\n PPSPEC == spec\n)\n\nout <- adpp_x %>%\n mutate(PARAM = paste0(PARAM, \" (\", AVALU, \")\")) %>%\n select(TRT01A, USUBJID, AVISIT, PARAM, AVAL) %>%\n unique() %>%\n tidyr::pivot_wider(\n id_cols = c(TRT01A, USUBJID, AVISIT),\n names_from = PARAM,\n values_from = AVAL\n )\n\nvar_labels(out) <- names(out)\nout <- out %>% var_relabel(\n TRT01A = \"Treatment Group\",\n USUBJID = \"Subject ID\",\n AVISIT = \"Visit\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"USUBJID\", \"AVISIT\"),\n disp_cols = names(out),\n main_title = paste(\"Listing of\", drug_a, spec, \"PK Parameters, PK Population\\nProtocol: xxnnnnn\"),\n subtitles = paste(\"Analyte:\", drug_a)\n)\n\nhead(lsting, 20)\n\nListing of Plasma Drug X Urine PK Parameters, PK Population\nProtocol: xxnnnnn\nAnalyte: Plasma Drug X\n\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Group Subject ID Visit Renal CL (L/hr) Renal CL Norm by Dose (L/hr/mg) Amt Rec from T1 to T2 (mg) Pct Rec from T1 to T2 (%)\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X AB12345-BRA-1-id-105 SCREENING 0.0538423152160391 0.00441769893771616 2.15210785813109 17.8220657702531 \n CYCLE 1 DAY 1 0.0480828455497337 0.00418360874479016 1.77968465488986 13.4821873677008 \n CYCLE 1 DAY 2 0.0524191320174391 0.00574562025709617 1.7751362634173 11.7748899262287 \n AB12345-BRA-1-id-134 SCREENING 0.054828756388858 0.00489378524965625 1.69069405572207 14.6782255303037 \n CYCLE 1 DAY 1 0.0463628883891636 0.00281388401660215 1.03364773182262 15.2049132671477 \n CYCLE 1 DAY 2 0.0542853013687975 0.00480239019141706 2.07978470495693 16.6499332185177 \n AB12345-BRA-1-id-42 SCREENING 0.0479776607513692 0.00620670551445586 1.49259200502984 12.4632371401908 \n CYCLE 1 DAY 1 0.060136833920038 0.00423749524975822 2.002399829348 16.1228873656652 \n CYCLE 1 DAY 2 0.0222050225259149 0.0041513339034891 1.65173021070619 10.129985981426 \n AB12345-BRA-1-id-93 SCREENING 0.0429283028076499 0.00450841008626937 0.882348047230192 19.8088728992851 \n CYCLE 1 DAY 1 0.0343747382858835 0.00495342578722049 1.73500915591676 14.8733500411057 \n CYCLE 1 DAY 2 0.0474831008867497 0.00415970555107753 1.30298887256052 14.9616973312841 \n AB12345-BRA-11-id-217 SCREENING 0.0524432563610182 0.00439177770746837 1.16344390767412 16.584779611686 \n CYCLE 1 DAY 1 0.0411628011374518 0.00567801310981526 1.11763922430636 19.3000982041101 \n CYCLE 1 DAY 2 0.0672581292323284 0.00400060865194939 1.45655867480937 10.1596117673893 \n AB12345-BRA-11-id-345 SCREENING 0.044070189259969 0.00561835429596993 1.43739076299198 15.4875095868721 \n CYCLE 1 DAY 1 0.0362275034574886 0.0038765297501434 0.96604915921 17.1567306808389 \n CYCLE 1 DAY 2 0.0416331541840018 0.00462187415243145 1.27070193721417 19.2547757988484 \n AB12345-BRA-11-id-397 SCREENING 0.0379747899730378 0.0047876948377162 1.67729762147252 11.6015615292251 \n CYCLE 1 DAY 1 0.0430467407701829 0.00463308440642305 1.1695965192594 12.5511219923965 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:33 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 rlistings_0.2.7.9013 tibble_3.2.1 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(rlistings)\nlibrary(scda)\n\ndrug_a <- \"Plasma Drug X\"\nspec <- \"Urine\"\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\nadpp_x <- adpp %>% filter(\n PPCAT == drug_a,\n PPSPEC == spec\n)\n\nout <- adpp_x %>%\n mutate(PARAM = paste0(PARAM, \" (\", AVALU, \")\")) %>%\n select(TRT01A, USUBJID, AVISIT, PARAM, AVAL) %>%\n unique() %>%\n tidyr::pivot_wider(\n id_cols = c(TRT01A, USUBJID, AVISIT),\n names_from = PARAM,\n values_from = AVAL\n )\n\nvar_labels(out) <- names(out)\nout <- out %>% var_relabel(\n TRT01A = \"Treatment Group\",\n USUBJID = \"Subject ID\",\n AVISIT = \"Visit\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"USUBJID\", \"AVISIT\"),\n disp_cols = names(out),\n main_title = paste(\"Listing of\", drug_a, spec, \"PK Parameters, PK Population\\nProtocol: xxnnnnn\"),\n subtitles = paste(\"Analyte:\", drug_a)\n)\n\nhead(lsting, 20)\n\nListing of Plasma Drug X Urine PK Parameters, PK Population\nProtocol: xxnnnnn\nAnalyte: Plasma Drug X\n\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Group Subject ID Visit Renal CL (L/hr) Renal CL Norm by Dose (L/hr/mg) Amt Rec from T1 to T2 (mg) Pct Rec from T1 to T2 (%)\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X AB12345-BRA-1-id-105 SCREENING 0.0538423152160391 0.00441769893771616 2.15210785813109 17.8220657702531 \n CYCLE 1 DAY 1 0.0480828455497337 0.00418360874479016 1.77968465488986 13.4821873677008 \n CYCLE 1 DAY 2 0.0524191320174391 0.00574562025709617 1.7751362634173 11.7748899262287 \n AB12345-BRA-1-id-134 SCREENING 0.054828756388858 0.00489378524965625 1.69069405572207 14.6782255303037 \n CYCLE 1 DAY 1 0.0463628883891636 0.00281388401660215 1.03364773182262 15.2049132671477 \n CYCLE 1 DAY 2 0.0542853013687975 0.00480239019141706 2.07978470495693 16.6499332185177 \n AB12345-BRA-1-id-42 SCREENING 0.0479776607513692 0.00620670551445586 1.49259200502984 12.4632371401908 \n CYCLE 1 DAY 1 0.060136833920038 0.00423749524975822 2.002399829348 16.1228873656652 \n CYCLE 1 DAY 2 0.0222050225259149 0.0041513339034891 1.65173021070619 10.129985981426 \n AB12345-BRA-1-id-93 SCREENING 0.0429283028076499 0.00450841008626937 0.882348047230192 19.8088728992851 \n CYCLE 1 DAY 1 0.0343747382858835 0.00495342578722049 1.73500915591676 14.8733500411057 \n CYCLE 1 DAY 2 0.0474831008867497 0.00415970555107753 1.30298887256052 14.9616973312841 \n AB12345-BRA-11-id-217 SCREENING 0.0524432563610182 0.00439177770746837 1.16344390767412 16.584779611686 \n CYCLE 1 DAY 1 0.0411628011374518 0.00567801310981526 1.11763922430636 19.3000982041101 \n CYCLE 1 DAY 2 0.0672581292323284 0.00400060865194939 1.45655867480937 10.1596117673893 \n AB12345-BRA-11-id-345 SCREENING 0.044070189259969 0.00561835429596993 1.43739076299198 15.4875095868721 \n CYCLE 1 DAY 1 0.0362275034574886 0.0038765297501434 0.96604915921 17.1567306808389 \n CYCLE 1 DAY 2 0.0416331541840018 0.00462187415243145 1.27070193721417 19.2547757988484 \n AB12345-BRA-11-id-397 SCREENING 0.0379747899730378 0.0047876948377162 1.67729762147252 11.6015615292251 \n CYCLE 1 DAY 1 0.0430467407701829 0.00463308440642305 1.1695965192594 12.5511219923965 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:34:57 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 rlistings_0.2.7.9013 tibble_3.2.1 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Pharmacokinetic", @@ -806,7 +806,7 @@ "href": "listings/pharmacokinetic/pkpl04.html", "title": "PKPL04", "section": "", - "text": "Data Setup\nStandard Listing - CYCLE 1 DAY 1\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(rlistings)\nlibrary(scda)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\n\nvisit <- \"CYCLE 1 DAY 1\"\ndrug_a <- \"Plasma Drug X\" # numerator drug\ndrug_b <- \"Plasma Drug Y\" # denominator drug\n\nadpp_x <- adpp %>%\n filter(\n AVISIT == visit,\n PPCAT %in% c(drug_a, drug_b),\n PARAMCD %in% c(\"CMAX\", \"AUCIFO\")\n ) %>%\n mutate(\n PARAM_U = paste0(PARAM, \" (\", AVALU, \")\")\n )\n\nadpp_ratio <- adpp_x %>%\n tidyr::pivot_wider(\n id_cols = c(USUBJID, PARAM_U),\n names_from = PPCAT,\n values_from = AVAL\n )\n\nadpp_ratio[, paste0(drug_a, \"/\", drug_b)] <- as.numeric(unlist(adpp_ratio[, drug_a] / adpp_ratio[, drug_b]))\n\nout <- adpp_ratio %>%\n tidyr::pivot_wider(\n id_cols = USUBJID,\n names_from = PARAM_U,\n names_glue = \"{PARAM_U}\\n{.value}\",\n values_from = c(all_of(drug_a), all_of(drug_b), paste0(drug_a, \"/\", drug_b))\n ) %>%\n select(names(.)[c(1:2, 4, 6, 3, 5, 7)])\n\nvar_labels(out) <- names(out)\nout <- out %>% var_relabel(USUBJID = \"Subject ID\")\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = \"USUBJID\",\n disp_cols = names(out),\n main_title = paste0(\n \"Listing of Individual \", drug_a, \" \", paste(unique(adpp_x$PARAM), collapse = \" and \"), \" Ratios following \",\n unique(adpp_x$REGIMEN), \" \", paste(drug_a, drug_b, sep = \" or \"), \", PK Population\\nProtocol: xxnnnnn\",\n \"\\nVisit: \", unique(adpp_x$AVISIT)\n ),\n subtitles = paste0(\"\\nAnalytes: \", paste(drug_a, drug_b, sep = \" and \"))\n)\n\nhead(lsting, 20)\n\nListing of Individual Plasma Drug X AUC Infinity Obs and Max Conc Ratios following BID Plasma Drug X or Plasma Drug Y, PK Population\nProtocol: xxnnnnn\nVisit: CYCLE 1 DAY 1\n\nAnalytes: Plasma Drug X and Plasma Drug Y\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n AUC Infinity Obs (day*ug/mL) AUC Infinity Obs (day*ug/mL) AUC Infinity Obs (day*ug/mL) Max Conc (ug/mL) Max Conc (ug/mL) Max Conc (ug/mL) \n Subject ID Plasma Drug X Plasma Drug Y Plasma Drug X/Plasma Drug Y Plasma Drug X Plasma Drug Y Plasma Drug X/Plasma Drug Y\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAB12345-BRA-1-id-105 246.349321001289 NA NA 31.2264481880236 NA NA \nAB12345-BRA-1-id-134 248.519038520728 NA NA 21.7795763901966 NA NA \nAB12345-BRA-1-id-141 204.038850147211 191.797779791421 1.06382279486812 29.5409649407056 38.8911230490524 0.759581174949522 \nAB12345-BRA-1-id-265 196.360864588266 218.652833415662 0.898048570973609 35.6328283094637 34.2215467219396 1.04123956170044 \n AB12345-BRA-1-id-42 210.528307366678 NA NA 26.7845825535397 NA NA \n AB12345-BRA-1-id-93 160.406798051843 NA NA 17.5296885232566 NA NA \nAB12345-BRA-11-id-171 217.543269983548 180.798322952882 1.20323721166508 30.3782220474834 31.615072576154 0.960877820992148 \nAB12345-BRA-11-id-217 272.094354596647 NA NA 34.2812274648873 NA NA \nAB12345-BRA-11-id-237 148.094218281784 193.694022424355 0.764578154907287 32.9103242471385 38.7385450224575 0.849549827647366 \nAB12345-BRA-11-id-321 206.178847103577 216.464946980475 0.95248145244585 33.0064256549217 28.4783979285037 1.1589986816599 \nAB12345-BRA-11-id-345 228.51025073098 NA NA 39.7523164840323 NA NA \nAB12345-BRA-11-id-397 201.536920713046 NA NA 36.5841424116449 NA NA \nAB12345-BRA-11-id-50 189.012389008811 NA NA 21.1977400008473 NA NA \n AB12345-BRA-11-id-9 235.477941027941 207.851453783084 1.13291457308587 27.1559637630099 28.2923295654501 0.959834844995305 \nAB12345-BRA-13-id-177 185.956676853099 NA NA 31.0405525087113 NA NA \nAB12345-BRA-14-id-120 209.878908685802 301.584778421544 0.695920098435608 31.8076450080362 22.9229189133965 1.38759139393227 \nAB12345-BRA-14-id-23 270.799396057463 NA NA 29.2804222629517 NA NA \nAB12345-BRA-15-id-36 183.877364155027 NA NA 37.9405096212457 NA NA \nAB12345-BRA-2-id-296 216.092875093089 NA NA 27.3509307000219 NA NA \nAB12345-BRA-4-id-368 203.23438144437 149.30280248041 1.36122281744199 38.3952821076341 30.8121148640987 1.24610992387189 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:26 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 rlistings_0.2.7.9013 tibble_3.2.1 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing - CYCLE 1 DAY 1\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(rlistings)\nlibrary(scda)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\n\nvisit <- \"CYCLE 1 DAY 1\"\ndrug_a <- \"Plasma Drug X\" # numerator drug\ndrug_b <- \"Plasma Drug Y\" # denominator drug\n\nadpp_x <- adpp %>%\n filter(\n AVISIT == visit,\n PPCAT %in% c(drug_a, drug_b),\n PARAMCD %in% c(\"CMAX\", \"AUCIFO\")\n ) %>%\n mutate(\n PARAM_U = paste0(PARAM, \" (\", AVALU, \")\")\n )\n\nadpp_ratio <- adpp_x %>%\n tidyr::pivot_wider(\n id_cols = c(USUBJID, PARAM_U),\n names_from = PPCAT,\n values_from = AVAL\n )\n\nadpp_ratio[, paste0(drug_a, \"/\", drug_b)] <- as.numeric(unlist(adpp_ratio[, drug_a] / adpp_ratio[, drug_b]))\n\nout <- adpp_ratio %>%\n tidyr::pivot_wider(\n id_cols = USUBJID,\n names_from = PARAM_U,\n names_glue = \"{PARAM_U}\\n{.value}\",\n values_from = c(all_of(drug_a), all_of(drug_b), paste0(drug_a, \"/\", drug_b))\n ) %>%\n select(names(.)[c(1:2, 4, 6, 3, 5, 7)])\n\nvar_labels(out) <- names(out)\nout <- out %>% var_relabel(USUBJID = \"Subject ID\")\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = \"USUBJID\",\n disp_cols = names(out),\n main_title = paste0(\n \"Listing of Individual \", drug_a, \" \", paste(unique(adpp_x$PARAM), collapse = \" and \"), \" Ratios following \",\n unique(adpp_x$REGIMEN), \" \", paste(drug_a, drug_b, sep = \" or \"), \", PK Population\\nProtocol: xxnnnnn\",\n \"\\nVisit: \", unique(adpp_x$AVISIT)\n ),\n subtitles = paste0(\"\\nAnalytes: \", paste(drug_a, drug_b, sep = \" and \"))\n)\n\nhead(lsting, 20)\n\nListing of Individual Plasma Drug X AUC Infinity Obs and Max Conc Ratios following BID Plasma Drug X or Plasma Drug Y, PK Population\nProtocol: xxnnnnn\nVisit: CYCLE 1 DAY 1\n\nAnalytes: Plasma Drug X and Plasma Drug Y\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n AUC Infinity Obs (day*ug/mL) AUC Infinity Obs (day*ug/mL) AUC Infinity Obs (day*ug/mL) Max Conc (ug/mL) Max Conc (ug/mL) Max Conc (ug/mL) \n Subject ID Plasma Drug X Plasma Drug Y Plasma Drug X/Plasma Drug Y Plasma Drug X Plasma Drug Y Plasma Drug X/Plasma Drug Y\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAB12345-BRA-1-id-105 246.349321001289 NA NA 31.2264481880236 NA NA \nAB12345-BRA-1-id-134 248.519038520728 NA NA 21.7795763901966 NA NA \nAB12345-BRA-1-id-141 204.038850147211 191.797779791421 1.06382279486812 29.5409649407056 38.8911230490524 0.759581174949522 \nAB12345-BRA-1-id-265 196.360864588266 218.652833415662 0.898048570973609 35.6328283094637 34.2215467219396 1.04123956170044 \n AB12345-BRA-1-id-42 210.528307366678 NA NA 26.7845825535397 NA NA \n AB12345-BRA-1-id-93 160.406798051843 NA NA 17.5296885232566 NA NA \nAB12345-BRA-11-id-171 217.543269983548 180.798322952882 1.20323721166508 30.3782220474834 31.615072576154 0.960877820992148 \nAB12345-BRA-11-id-217 272.094354596647 NA NA 34.2812274648873 NA NA \nAB12345-BRA-11-id-237 148.094218281784 193.694022424355 0.764578154907287 32.9103242471385 38.7385450224575 0.849549827647366 \nAB12345-BRA-11-id-321 206.178847103577 216.464946980475 0.95248145244585 33.0064256549217 28.4783979285037 1.1589986816599 \nAB12345-BRA-11-id-345 228.51025073098 NA NA 39.7523164840323 NA NA \nAB12345-BRA-11-id-397 201.536920713046 NA NA 36.5841424116449 NA NA \nAB12345-BRA-11-id-50 189.012389008811 NA NA 21.1977400008473 NA NA \n AB12345-BRA-11-id-9 235.477941027941 207.851453783084 1.13291457308587 27.1559637630099 28.2923295654501 0.959834844995305 \nAB12345-BRA-13-id-177 185.956676853099 NA NA 31.0405525087113 NA NA \nAB12345-BRA-14-id-120 209.878908685802 301.584778421544 0.695920098435608 31.8076450080362 22.9229189133965 1.38759139393227 \nAB12345-BRA-14-id-23 270.799396057463 NA NA 29.2804222629517 NA NA \nAB12345-BRA-15-id-36 183.877364155027 NA NA 37.9405096212457 NA NA \nAB12345-BRA-2-id-296 216.092875093089 NA NA 27.3509307000219 NA NA \nAB12345-BRA-4-id-368 203.23438144437 149.30280248041 1.36122281744199 38.3952821076341 30.8121148640987 1.24610992387189 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:34:50 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 rlistings_0.2.7.9013 tibble_3.2.1 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Pharmacokinetic", @@ -818,7 +818,7 @@ "href": "listings/pharmacokinetic/pkcl02.html", "title": "PKCL02", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(rlistings)\nlibrary(scda)\n\ndrug_a <- \"Drug X\"\nspec <- \"URINE\"\n\nadpc <- synthetic_cdisc_dataset(\"latest\", \"adpc\")\nadpc_x <- adpc %>%\n mutate(REGIMEN = ifelse(\"REGIMEN\" %in% names(adpc), REGIMEN, \"BID\")) %>%\n filter(\n grepl(drug_a, PARAM),\n ASMED == spec\n )\n\nout <- adpc_x %>%\n tidyr::pivot_longer(\n cols = c(AVAL, PCVOL),\n names_to = \"URCD\",\n values_to = \"VALUE\"\n ) %>%\n mutate(\n URCD = case_when(\n URCD == \"AVAL\" ~ \"UR_Conc\",\n URCD == \"PCVOL\" ~ \"Vurine\",\n TRUE ~ URCD\n ),\n UNIT = case_when(\n URCD == \"UR_Conc\" ~ as.character(AVALU),\n URCD == \"Vurine\" ~ as.character(PCVOLU),\n TRUE ~ \"NA\"\n )\n ) %>%\n mutate(\n PARAM_INT = paste0(\n URCD, \" (\", UNIT, \") -\\nUrine Collection\\nInterval\",\n ifelse(PCTPT == \"Predose\", \"\", \" (hours)\"), \":\\n\",\n gsub(\"[PTH]\", \"\", PCTPT)\n )\n ) %>%\n select(TRT01A, USUBJID, VISIT, PARAM_INT, VALUE) %>%\n unique() %>%\n tidyr::pivot_wider(\n id_cols = c(TRT01A, USUBJID, VISIT),\n names_from = PARAM_INT,\n values_from = VALUE\n )\n\nvar_labels(out) <- names(out)\nout <- out %>% var_relabel(\n TRT01A = \"Treatment Group\",\n USUBJID = \"Subject ID\",\n VISIT = \"Visit\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"USUBJID\", \"VISIT\"),\n disp_cols = names(out),\n main_title = paste0(\n \"Listing of \", drug_a, \" Urine Concentration and Volumes following \", unique(adpc_x$REGIMEN)[1],\n \" of \", drug_a, \", PK Population\\nProtocol: xxnnnnn\"\n ),\n subtitles = paste(\"Analyte:\", drug_a)\n)\n\nhead(lsting, 20)\n\nListing of Drug X Urine Concentration and Volumes following BID of Drug X, PK Population\nProtocol: xxnnnnn\nAnalyte: Drug X\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n UR_Conc (ug/mL) - Vurine (mL) - UR_Conc (ug/mL) - Vurine (mL) - UR_Conc (ug/mL) - Vurine (mL) - UR_Conc (ug/mL) - Vurine (mL) - UR_Conc (ug/mL) - Vurine (mL) - \n Urine Collection Urine Collection Urine Collection Urine Collection Urine Collection Urine Collection Urine Collection Urine Collection Urine Collection Urine Collection \n Interval: Interval: Interval (hours): Interval (hours): Interval (hours): Interval (hours): Interval (hours): Interval (hours): Interval (hours): Interval (hours):\nTreatment Group Subject ID Visit redose redose 0 - 4 0 - 4 4 - 8 4 - 8 8 - 12 8 - 12 0 - 24 0 - 24 \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X AB12345-BRA-1-id-105 Day 1 0 713.94 5.461 96.92 0.562 235.38 0.049 384.98 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 735.22 \n AB12345-BRA-1-id-134 Day 1 0 1068.83 4.064 145.1 0.178 352.39 0.006 576.35 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 1080.14 \n AB12345-BRA-1-id-42 Day 1 0 817.09 4.277 110.93 0.305 269.39 0.018 440.6 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 737.25 \n AB12345-BRA-1-id-93 Day 1 0 864.61 4.324 117.38 0.278 285.06 0.015 466.23 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 757.23 \n AB12345-BRA-11-id-217 Day 1 0 724.93 6.225 98.41 0.672 239.01 0.059 390.91 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 1185.46 \n AB12345-BRA-11-id-345 Day 1 0 840.09 6.511 114.05 0.588 276.98 0.04 453.01 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 883.89 \n AB12345-BRA-11-id-397 Day 1 0 974.41 5.478 132.28 0.354 321.26 0.017 525.44 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 918.67 \n AB12345-BRA-11-id-50 Day 1 0 922.97 4.122 125.3 0.228 304.3 0.01 497.7 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 808.08 \n AB12345-BRA-13-id-177 Day 1 0 694.09 4.267 94.23 0.421 228.84 0.038 374.28 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 908.45 \n AB12345-BRA-14-id-23 Day 1 0 722.84 4.254 98.13 0.386 238.32 0.032 389.78 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 862.1 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:18 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 rlistings_0.2.7.9013 tibble_3.2.1 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(rlistings)\nlibrary(scda)\n\ndrug_a <- \"Drug X\"\nspec <- \"URINE\"\n\nadpc <- synthetic_cdisc_dataset(\"latest\", \"adpc\")\nadpc_x <- adpc %>%\n mutate(REGIMEN = ifelse(\"REGIMEN\" %in% names(adpc), REGIMEN, \"BID\")) %>%\n filter(\n grepl(drug_a, PARAM),\n ASMED == spec\n )\n\nout <- adpc_x %>%\n tidyr::pivot_longer(\n cols = c(AVAL, PCVOL),\n names_to = \"URCD\",\n values_to = \"VALUE\"\n ) %>%\n mutate(\n URCD = case_when(\n URCD == \"AVAL\" ~ \"UR_Conc\",\n URCD == \"PCVOL\" ~ \"Vurine\",\n TRUE ~ URCD\n ),\n UNIT = case_when(\n URCD == \"UR_Conc\" ~ as.character(AVALU),\n URCD == \"Vurine\" ~ as.character(PCVOLU),\n TRUE ~ \"NA\"\n )\n ) %>%\n mutate(\n PARAM_INT = paste0(\n URCD, \" (\", UNIT, \") -\\nUrine Collection\\nInterval\",\n ifelse(PCTPT == \"Predose\", \"\", \" (hours)\"), \":\\n\",\n gsub(\"[PTH]\", \"\", PCTPT)\n )\n ) %>%\n select(TRT01A, USUBJID, VISIT, PARAM_INT, VALUE) %>%\n unique() %>%\n tidyr::pivot_wider(\n id_cols = c(TRT01A, USUBJID, VISIT),\n names_from = PARAM_INT,\n values_from = VALUE\n )\n\nvar_labels(out) <- names(out)\nout <- out %>% var_relabel(\n TRT01A = \"Treatment Group\",\n USUBJID = \"Subject ID\",\n VISIT = \"Visit\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"USUBJID\", \"VISIT\"),\n disp_cols = names(out),\n main_title = paste0(\n \"Listing of \", drug_a, \" Urine Concentration and Volumes following \", unique(adpc_x$REGIMEN)[1],\n \" of \", drug_a, \", PK Population\\nProtocol: xxnnnnn\"\n ),\n subtitles = paste(\"Analyte:\", drug_a)\n)\n\nhead(lsting, 20)\n\nListing of Drug X Urine Concentration and Volumes following BID of Drug X, PK Population\nProtocol: xxnnnnn\nAnalyte: Drug X\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n UR_Conc (ug/mL) - Vurine (mL) - UR_Conc (ug/mL) - Vurine (mL) - UR_Conc (ug/mL) - Vurine (mL) - UR_Conc (ug/mL) - Vurine (mL) - UR_Conc (ug/mL) - Vurine (mL) - \n Urine Collection Urine Collection Urine Collection Urine Collection Urine Collection Urine Collection Urine Collection Urine Collection Urine Collection Urine Collection \n Interval: Interval: Interval (hours): Interval (hours): Interval (hours): Interval (hours): Interval (hours): Interval (hours): Interval (hours): Interval (hours):\nTreatment Group Subject ID Visit redose redose 0 - 4 0 - 4 4 - 8 4 - 8 8 - 12 8 - 12 0 - 24 0 - 24 \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X AB12345-BRA-1-id-105 Day 1 0 713.94 5.461 96.92 0.562 235.38 0.049 384.98 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 735.22 \n AB12345-BRA-1-id-134 Day 1 0 1068.83 4.064 145.1 0.178 352.39 0.006 576.35 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 1080.14 \n AB12345-BRA-1-id-42 Day 1 0 817.09 4.277 110.93 0.305 269.39 0.018 440.6 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 737.25 \n AB12345-BRA-1-id-93 Day 1 0 864.61 4.324 117.38 0.278 285.06 0.015 466.23 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 757.23 \n AB12345-BRA-11-id-217 Day 1 0 724.93 6.225 98.41 0.672 239.01 0.059 390.91 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 1185.46 \n AB12345-BRA-11-id-345 Day 1 0 840.09 6.511 114.05 0.588 276.98 0.04 453.01 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 883.89 \n AB12345-BRA-11-id-397 Day 1 0 974.41 5.478 132.28 0.354 321.26 0.017 525.44 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 918.67 \n AB12345-BRA-11-id-50 Day 1 0 922.97 4.122 125.3 0.228 304.3 0.01 497.7 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 808.08 \n AB12345-BRA-13-id-177 Day 1 0 694.09 4.267 94.23 0.421 228.84 0.038 374.28 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 908.45 \n AB12345-BRA-14-id-23 Day 1 0 722.84 4.254 98.13 0.386 238.32 0.032 389.78 NA NA \n Day 2 NA NA NA NA NA NA NA NA 0 862.1 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:34:42 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 rlistings_0.2.7.9013 tibble_3.2.1 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Pharmacokinetic", @@ -830,7 +830,7 @@ "href": "listings/disposition/dsl02.html", "title": "DSL02", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\nout <- adsl %>%\n filter(AEWITHFL == \"Y\") %>%\n mutate(\n ID = paste(SITEID, SUBJID, sep = \"/\"),\n ASR = paste(AGE, SEX, RACE, sep = \"/\"),\n DISCONT = ifelse(!is.na(DCSREAS) & EOSSTT != \"COMPLETED\", \"Yes\", \"No\"),\n SSADTM = as.POSIXct(\n strftime(TRTSDTM, format = \"%Y-%m-%d %H:%M:%S\"),\n format = \"%Y-%m-%d\",\n tz = \"UTC\"\n ),\n SSAEDY = as.numeric(ceiling(difftime(EOSDT, SSADTM, units = \"days\"))),\n RANDEDY = as.numeric(ceiling(difftime(EOSDT, RANDDT, units = \"days\"))),\n ) %>%\n filter(DISCONT == \"Yes\") %>%\n select(ID, ASR, TRT01A, SSADTM, EOSDY, SSAEDY, RANDEDY, DCSREAS)\n\nvar_labels(out) <- c(\n ID = \"Center/Patient ID\",\n ASR = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n SSADTM = \"Date of First\\nStudy Drug\\nAdministration\",\n EOSDY = \"Day of Last\\nStudy Drug\\nAdministration\",\n SSAEDY = \"Day of Study\\nDiscontinuation\\nRelative to First\\nStudy Drug\\nAdministration\",\n RANDEDY = \"Day of Study\\nDiscontinuation\\nRelative to\\nRandomization\",\n DCSREAS = \"Reason for\\nDiscontinuation\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = \"TRT01A\",\n disp_cols = names(out),\n main_title = \"Listing of Patients Who Discontinued Early from Study\"\n)\n\nhead(lsting, 20)\n\nListing of Patients Who Discontinued Early from Study\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Day of Study \n Discontinuation Day of Study \n Date of First Day of Last Relative to First Discontinuation \n Study Drug Study Drug Study Drug Relative to Reason for \n Treatment Center/Patient ID Age/Sex/Race Administration Administration Administration Randomization Discontinuation \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X CHN-1/id-62 36/F/WHITE 2020-11-22 455 454 455 DEATH \n B: Placebo CHN-9/id-11 28/F/NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 2021-01-27 388 387 388 DEATH \nC: Combination USA-11/id-136 38/F/ASIAN 2019-10-02 865 864 868 DEATH \n USA-11/id-100 40/F/ASIAN 2020-03-10 705 705 707 LACK OF EFFICACY\n CHN-11/id-91 44/M/BLACK OR AFRICAN AMERICAN 2020-05-29 625 625 626 DEATH \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:11 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\nout <- adsl %>%\n filter(AEWITHFL == \"Y\") %>%\n mutate(\n ID = paste(SITEID, SUBJID, sep = \"/\"),\n ASR = paste(AGE, SEX, RACE, sep = \"/\"),\n DISCONT = ifelse(!is.na(DCSREAS) & EOSSTT != \"COMPLETED\", \"Yes\", \"No\"),\n SSADTM = as.POSIXct(\n strftime(TRTSDTM, format = \"%Y-%m-%d %H:%M:%S\"),\n format = \"%Y-%m-%d\",\n tz = \"UTC\"\n ),\n SSAEDY = as.numeric(ceiling(difftime(EOSDT, SSADTM, units = \"days\"))),\n RANDEDY = as.numeric(ceiling(difftime(EOSDT, RANDDT, units = \"days\"))),\n ) %>%\n filter(DISCONT == \"Yes\") %>%\n select(ID, ASR, TRT01A, SSADTM, EOSDY, SSAEDY, RANDEDY, DCSREAS)\n\nvar_labels(out) <- c(\n ID = \"Center/Patient ID\",\n ASR = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n SSADTM = \"Date of First\\nStudy Drug\\nAdministration\",\n EOSDY = \"Day of Last\\nStudy Drug\\nAdministration\",\n SSAEDY = \"Day of Study\\nDiscontinuation\\nRelative to First\\nStudy Drug\\nAdministration\",\n RANDEDY = \"Day of Study\\nDiscontinuation\\nRelative to\\nRandomization\",\n DCSREAS = \"Reason for\\nDiscontinuation\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = \"TRT01A\",\n disp_cols = names(out),\n main_title = \"Listing of Patients Who Discontinued Early from Study\"\n)\n\nhead(lsting, 20)\n\nListing of Patients Who Discontinued Early from Study\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Day of Study \n Discontinuation Day of Study \n Date of First Day of Last Relative to First Discontinuation \n Study Drug Study Drug Study Drug Relative to Reason for \n Treatment Center/Patient ID Age/Sex/Race Administration Administration Administration Randomization Discontinuation \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X CHN-1/id-62 36/F/WHITE 2020-11-22 455 454 455 DEATH \n B: Placebo CHN-9/id-11 28/F/NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 2021-01-27 388 387 388 DEATH \nC: Combination USA-11/id-136 38/F/ASIAN 2019-10-02 865 864 868 DEATH \n USA-11/id-100 40/F/ASIAN 2020-03-10 705 705 707 LACK OF EFFICACY\n CHN-11/id-91 44/M/BLACK OR AFRICAN AMERICAN 2020-05-29 625 625 626 DEATH \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:34:34 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Disposition", @@ -842,7 +842,7 @@ "href": "listings/adverse-events/ael02_ed.html", "title": "AEL02_ED", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\nlibrary(lubridate)\n\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nadae_anl <- adae %>%\n filter(SAFFL == \"Y\") %>%\n mutate(\n DHM = as.period(LDOSEDTM %--% ASTDTM),\n TMOM = minute(DHM) + ifelse(second(DHM) >= 30, 1, 0),\n TMOH = hour(DHM) + ifelse(TMOM == 60, 1, 0),\n TMOD = day(DHM) + ifelse(TMOH == 24, 1, 0)\n ) %>%\n mutate(\n TMOM = TMOM %% 60,\n TMOH = TMOH %% 24\n )\n\nout <- adae_anl %>%\n mutate(\n ADURN = AENDY - ASTDY + 1,\n cent_subj = paste(SITEID, SUBJID, sep = \"/\"),\n ASR = paste(AGE, SEX, RACE, sep = \"/\"),\n AESER_F = if_else(AESER == \"Y\", \"Yes\", \"No\", \"\"),\n AEREL_F = if_else(AEREL == \"Y\", \"Yes\", \"No\", \"\"),\n AECONTRT_F = if_else(AECONTRT == \"Y\", \"Yes\", \"No\", \"\"),\n AEOUT_F = case_when(\n AEOUT == \"FATAL\" ~ 1,\n AEOUT == \"NOT RECOVERED/NOT RESOLVED\" ~ 2,\n AEOUT == \"RECOVERED/RESOLVED\" ~ 3,\n AEOUT == \"RECOVERED/RESOLVED WITH SEQUELAE\" ~ 4,\n AEOUT == \"RECOVERING/RESOLVING\" ~ 5,\n AEOUT == \"UNKNOWN\" ~ 6\n ),\n AEACN_F = case_when(\n AEACN == \"DOSE INCREASED\" ~ 1,\n AEACN == \"DOSE NOT CHANGED\" ~ 2,\n AEACN == \"DOSE REDUCED\" | AEACN == \"DOSE RATE REDUCED\" ~ 3,\n AEACN == \"DRUG INTERRUPTED\" ~ 4,\n AEACN == \"DRUG WITHDRAWN\" ~ 5,\n AEACN == \"NOT APPLICABLE\" | AEACN == \"NOT EVALUABLE\" ~ 6,\n AEACN == \"UNKNOWN\" ~ 7\n )\n ) %>%\n select(\n cent_subj, ASR, TRT01A, AEDECOD, ASTDY, TMOD, TMOH, TMOM,\n ADURN, AESER_F, AESEV, AEREL_F, AEOUT_F, AECONTRT_F, AEACN_F\n )\n\nout <- out %>% var_relabel(\n cent_subj = \"Center/Patient ID\",\n ASR = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n AEDECOD = \"Adverse\\nEvent MedDRA\\nPreferred Term\",\n ASTDY = \"Study\\nDay of\\nOnset\",\n TMOD = \"Time from\\nLast Dose\\nto Onset\\ndays\",\n TMOH = \"Time from\\nLast Dose\\nto Onset\\nhrs\",\n TMOM = \"Time from\\nLast Dose\\nto Onset\\nmins\",\n ADURN = \"AE\\nDuration\\nin Days\",\n AESER_F = \"Serious\",\n AESEV = \"Most\\nExtreme\\nIntensity\",\n AEREL_F = \"Caused by\\nStudy\\nDrug\",\n AEOUT_F = \"Outcome\\n(1)\",\n AECONTRT_F = \"Treatment\\nfor AE\",\n AEACN_F = \"Action\\nTaken\\n(2)\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"cent_subj\", \"ASR\"),\n disp_cols = names(out),\n main_title = \"Listing of Adverse Events (for early development studies)\",\n main_footer = \"\n(1) Outcome: 1 = fatal; 2 = not recovered/not resolved; 3 = recovered/resolved;\n 4 = recovered/resolved with sequelae; 5 = recovering/resolving; 6 = unknown.\n(2) Action taken with study drug: 1 = dose increased; 2 = dose not changed;\n 3 = dose reduced; 4 = drug interrupted; 5 = drug withdrawn; 6 = not applicable;\n 7 = unknown.\n* Study day derived from imputed onset date.\n** Duration derived from imputed onset date and/or end date.\"\n)\n\nhead(lsting, 20)\n\nListing of Adverse Events (for early development studies)\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Time from Time from Time from \n Adverse Study Last Dose Last Dose Last Dose AE Most Caused by Action\n Event MedDRA Day of to Onset to Onset to Onset Duration Extreme Study Outcome Treatment Taken \nTreatment Center/Patient ID Age/Sex/Race Preferred Term Onset days hrs mins in Days Serious Intensity Drug (1) for AE (2) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-134 47/M/WHITE dcd B.2.1.2.1 162 7 19 4 173 No MODERATE No 5 Yes 2 \n dcd D.1.1.4.2 196 1 20 48 166 No MODERATE No 5 No 2 \n dcd A.1.1.1.2 321 28 12 54 149 Yes MODERATE No 5 Yes 2 \n dcd A.1.1.1.2 393 12 19 17 43 Yes MODERATE No 5 No 5 \n BRA-1/id-42 36/M/BLACK OR AFRICAN AMERICAN dcd C.2.1.2.1 39 30 9 4 506 No MODERATE Yes 2 No 6 \n dcd D.1.1.1.1 64 26 17 10 630 Yes SEVERE Yes 1 No 6 \n dcd C.2.1.2.1 95 4 12 58 306 No MODERATE Yes 5 No 2 \n dcd A.1.1.1.2 160 24 5 57 259 Yes MODERATE No 2 Yes 2 \n dcd B.2.2.3.1 292 9 23 4 50 Yes MILD No 3 No 2 \n dcd A.1.1.1.2 459 9 5 4 195 Yes MODERATE No 5 Yes 2 \n dcd B.1.1.1.1 470 6 5 0 131 Yes SEVERE Yes 1 No 6 \n dcd A.1.1.1.2 475 20 16 16 113 Yes MODERATE No 4 Yes 2 \n dcd C.1.1.1.3 496 5 5 28 162 No SEVERE Yes 5 Yes 2 \n dcd B.1.1.1.1 641 8 17 4 15 Yes SEVERE Yes 1 Yes 6 \n BRA-1/id-93 34/F/ASIAN dcd D.1.1.4.2 44 18 15 39 47 No MODERATE No 5 Yes 2 \n dcd D.2.1.5.3 79 2 3 58 300 No MILD Yes 5 No 3 \n dcd A.1.1.1.1 136 22 1 19 78 No MILD No 3 Yes 2 \n dcd D.2.1.5.3 260 12 12 26 305 No MILD Yes 5 No 2 \n dcd C.1.1.1.3 281 4 14 52 106 No SEVERE Yes 5 Yes 2 \n dcd D.1.1.1.1 316 6 12 43 250 Yes SEVERE Yes 1 No 6 \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\n\n(1) Outcome: 1 = fatal; 2 = not recovered/not resolved; 3 = recovered/resolved;\n 4 = recovered/resolved with sequelae; 5 = recovering/resolving; 6 = unknown.\n(2) Action taken with study drug: 1 = dose increased; 2 = dose not changed;\n 3 = dose reduced; 4 = drug interrupted; 5 = drug withdrawn; 6 = not applicable;\n 7 = unknown.\n* Study day derived from imputed onset date.\n** Duration derived from imputed onset date and/or end date.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:05 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] lubridate_1.9.3 rlistings_0.2.7.9013 tibble_3.2.1 \n[4] formatters_0.5.5.9020 scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 timechange_0.3.0 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 \n[29] utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 \n[33] withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\nlibrary(lubridate)\n\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nadae_anl <- adae %>%\n filter(SAFFL == \"Y\") %>%\n mutate(\n DHM = as.period(LDOSEDTM %--% ASTDTM),\n TMOM = minute(DHM) + ifelse(second(DHM) >= 30, 1, 0),\n TMOH = hour(DHM) + ifelse(TMOM == 60, 1, 0),\n TMOD = day(DHM) + ifelse(TMOH == 24, 1, 0)\n ) %>%\n mutate(\n TMOM = TMOM %% 60,\n TMOH = TMOH %% 24\n )\n\nout <- adae_anl %>%\n mutate(\n ADURN = AENDY - ASTDY + 1,\n cent_subj = paste(SITEID, SUBJID, sep = \"/\"),\n ASR = paste(AGE, SEX, RACE, sep = \"/\"),\n AESER_F = if_else(AESER == \"Y\", \"Yes\", \"No\", \"\"),\n AEREL_F = if_else(AEREL == \"Y\", \"Yes\", \"No\", \"\"),\n AECONTRT_F = if_else(AECONTRT == \"Y\", \"Yes\", \"No\", \"\"),\n AEOUT_F = case_when(\n AEOUT == \"FATAL\" ~ 1,\n AEOUT == \"NOT RECOVERED/NOT RESOLVED\" ~ 2,\n AEOUT == \"RECOVERED/RESOLVED\" ~ 3,\n AEOUT == \"RECOVERED/RESOLVED WITH SEQUELAE\" ~ 4,\n AEOUT == \"RECOVERING/RESOLVING\" ~ 5,\n AEOUT == \"UNKNOWN\" ~ 6\n ),\n AEACN_F = case_when(\n AEACN == \"DOSE INCREASED\" ~ 1,\n AEACN == \"DOSE NOT CHANGED\" ~ 2,\n AEACN == \"DOSE REDUCED\" | AEACN == \"DOSE RATE REDUCED\" ~ 3,\n AEACN == \"DRUG INTERRUPTED\" ~ 4,\n AEACN == \"DRUG WITHDRAWN\" ~ 5,\n AEACN == \"NOT APPLICABLE\" | AEACN == \"NOT EVALUABLE\" ~ 6,\n AEACN == \"UNKNOWN\" ~ 7\n )\n ) %>%\n select(\n cent_subj, ASR, TRT01A, AEDECOD, ASTDY, TMOD, TMOH, TMOM,\n ADURN, AESER_F, AESEV, AEREL_F, AEOUT_F, AECONTRT_F, AEACN_F\n )\n\nout <- out %>% var_relabel(\n cent_subj = \"Center/Patient ID\",\n ASR = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n AEDECOD = \"Adverse\\nEvent MedDRA\\nPreferred Term\",\n ASTDY = \"Study\\nDay of\\nOnset\",\n TMOD = \"Time from\\nLast Dose\\nto Onset\\ndays\",\n TMOH = \"Time from\\nLast Dose\\nto Onset\\nhrs\",\n TMOM = \"Time from\\nLast Dose\\nto Onset\\nmins\",\n ADURN = \"AE\\nDuration\\nin Days\",\n AESER_F = \"Serious\",\n AESEV = \"Most\\nExtreme\\nIntensity\",\n AEREL_F = \"Caused by\\nStudy\\nDrug\",\n AEOUT_F = \"Outcome\\n(1)\",\n AECONTRT_F = \"Treatment\\nfor AE\",\n AEACN_F = \"Action\\nTaken\\n(2)\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"cent_subj\", \"ASR\"),\n disp_cols = names(out),\n main_title = \"Listing of Adverse Events (for early development studies)\",\n main_footer = \"\n(1) Outcome: 1 = fatal; 2 = not recovered/not resolved; 3 = recovered/resolved;\n 4 = recovered/resolved with sequelae; 5 = recovering/resolving; 6 = unknown.\n(2) Action taken with study drug: 1 = dose increased; 2 = dose not changed;\n 3 = dose reduced; 4 = drug interrupted; 5 = drug withdrawn; 6 = not applicable;\n 7 = unknown.\n* Study day derived from imputed onset date.\n** Duration derived from imputed onset date and/or end date.\"\n)\n\nhead(lsting, 20)\n\nListing of Adverse Events (for early development studies)\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Time from Time from Time from \n Adverse Study Last Dose Last Dose Last Dose AE Most Caused by Action\n Event MedDRA Day of to Onset to Onset to Onset Duration Extreme Study Outcome Treatment Taken \nTreatment Center/Patient ID Age/Sex/Race Preferred Term Onset days hrs mins in Days Serious Intensity Drug (1) for AE (2) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-134 47/M/WHITE dcd B.2.1.2.1 162 7 19 4 173 No MODERATE No 5 Yes 2 \n dcd D.1.1.4.2 196 1 20 48 166 No MODERATE No 5 No 2 \n dcd A.1.1.1.2 321 28 12 54 149 Yes MODERATE No 5 Yes 2 \n dcd A.1.1.1.2 393 12 19 17 43 Yes MODERATE No 5 No 5 \n BRA-1/id-42 36/M/BLACK OR AFRICAN AMERICAN dcd C.2.1.2.1 39 30 9 4 506 No MODERATE Yes 2 No 6 \n dcd D.1.1.1.1 64 26 17 10 630 Yes SEVERE Yes 1 No 6 \n dcd C.2.1.2.1 95 4 12 58 306 No MODERATE Yes 5 No 2 \n dcd A.1.1.1.2 160 24 5 57 259 Yes MODERATE No 2 Yes 2 \n dcd B.2.2.3.1 292 9 23 4 50 Yes MILD No 3 No 2 \n dcd A.1.1.1.2 459 9 5 4 195 Yes MODERATE No 5 Yes 2 \n dcd B.1.1.1.1 470 6 5 0 131 Yes SEVERE Yes 1 No 6 \n dcd A.1.1.1.2 475 20 16 16 113 Yes MODERATE No 4 Yes 2 \n dcd C.1.1.1.3 496 5 5 28 162 No SEVERE Yes 5 Yes 2 \n dcd B.1.1.1.1 641 8 17 4 15 Yes SEVERE Yes 1 Yes 6 \n BRA-1/id-93 34/F/ASIAN dcd D.1.1.4.2 44 18 15 39 47 No MODERATE No 5 Yes 2 \n dcd D.2.1.5.3 79 2 3 58 300 No MILD Yes 5 No 3 \n dcd A.1.1.1.1 136 22 1 19 78 No MILD No 3 Yes 2 \n dcd D.2.1.5.3 260 12 12 26 305 No MILD Yes 5 No 2 \n dcd C.1.1.1.3 281 4 14 52 106 No SEVERE Yes 5 Yes 2 \n dcd D.1.1.1.1 316 6 12 43 250 Yes SEVERE Yes 1 No 6 \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\n\n(1) Outcome: 1 = fatal; 2 = not recovered/not resolved; 3 = recovered/resolved;\n 4 = recovered/resolved with sequelae; 5 = recovering/resolving; 6 = unknown.\n(2) Action taken with study drug: 1 = dose increased; 2 = dose not changed;\n 3 = dose reduced; 4 = drug interrupted; 5 = drug withdrawn; 6 = not applicable;\n 7 = unknown.\n* Study day derived from imputed onset date.\n** Duration derived from imputed onset date and/or end date.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:34:27 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] lubridate_1.9.3 rlistings_0.2.7.9013 tibble_3.2.1 \n[4] formatters_0.5.5.9021 scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 timechange_0.3.0 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 \n[29] utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 \n[33] withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Adverse Events", @@ -854,7 +854,7 @@ "href": "listings/adverse-events/ael01_nollt.html", "title": "AEL01_NOLLT", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nout <- adae %>%\n select(AESOC, AEDECOD, AETERM) %>%\n unique()\n\nvar_labels(out) <- c(\n AESOC = \"MedDRA System Organ Class\",\n AEDECOD = \"MedDRA Preferred Term\",\n AETERM = \"Investigator-Specified\\nAdverse Event Term\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"AESOC\", \"AEDECOD\"),\n disp_cols = names(out),\n main_title = \"Listing of Preferred Terms and Investigator-Specified Adverse Event Terms\"\n)\n\nhead(lsting, 20)\n\nListing of Preferred Terms and Investigator-Specified Adverse Event Terms\n\n——————————————————————————————————————————————————————————————————————————\n Investigator-Specified\nMedDRA System Organ Class MedDRA Preferred Term Adverse Event Term \n——————————————————————————————————————————————————————————————————————————\n cl A dcd A.1.1.1.1 trm A.1.1.1.1 \n dcd A.1.1.1.2 trm A.1.1.1.2 \n cl B dcd B.1.1.1.1 trm B.1.1.1.1 \n dcd B.2.1.2.1 trm B.2.1.2.1 \n dcd B.2.2.3.1 trm B.2.2.3.1 \n cl C dcd C.1.1.1.3 trm C.1.1.1.3 \n dcd C.2.1.2.1 trm C.2.1.2.1 \n cl D dcd D.1.1.1.1 trm D.1.1.1.1 \n dcd D.1.1.4.2 trm D.1.1.4.2 \n dcd D.2.1.5.3 trm D.2.1.5.3 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:33:57 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nout <- adae %>%\n select(AESOC, AEDECOD, AETERM) %>%\n unique()\n\nvar_labels(out) <- c(\n AESOC = \"MedDRA System Organ Class\",\n AEDECOD = \"MedDRA Preferred Term\",\n AETERM = \"Investigator-Specified\\nAdverse Event Term\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"AESOC\", \"AEDECOD\"),\n disp_cols = names(out),\n main_title = \"Listing of Preferred Terms and Investigator-Specified Adverse Event Terms\"\n)\n\nhead(lsting, 20)\n\nListing of Preferred Terms and Investigator-Specified Adverse Event Terms\n\n——————————————————————————————————————————————————————————————————————————\n Investigator-Specified\nMedDRA System Organ Class MedDRA Preferred Term Adverse Event Term \n——————————————————————————————————————————————————————————————————————————\n cl A dcd A.1.1.1.1 trm A.1.1.1.1 \n dcd A.1.1.1.2 trm A.1.1.1.2 \n cl B dcd B.1.1.1.1 trm B.1.1.1.1 \n dcd B.2.1.2.1 trm B.2.1.2.1 \n dcd B.2.2.3.1 trm B.2.2.3.1 \n cl C dcd C.1.1.1.3 trm C.1.1.1.3 \n dcd C.2.1.2.1 trm C.2.1.2.1 \n cl D dcd D.1.1.1.1 trm D.1.1.1.1 \n dcd D.1.1.4.2 trm D.1.1.4.2 \n dcd D.2.1.5.3 trm D.2.1.5.3 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:34:19 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Adverse Events", @@ -866,7 +866,7 @@ "href": "listings/adverse-events/ael04.html", "title": "AEL04", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\nout <- adsl %>%\n filter(!is.na(DTHADY)) %>%\n mutate(\n ID = paste(SITEID, SUBJID, sep = \"/\"),\n AGSXRC = paste(AGE, SEX, RACE, sep = \"/\"),\n TRTSD = toupper(format(as.Date(TRTSDTM), \"%d%b%Y\"))\n ) %>%\n arrange(SUBJID) %>%\n select(ID, AGSXRC, TRT01A, TRTSD, EOSDY, DTHADY, DTHCAUS, ADTHAUT)\n\nvar_labels(out) <- c(\n ID = \"Center/Patient ID\",\n AGSXRC = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n TRTSD = \"Date of First\\nStudy Drug\\nAdministration\",\n EOSDY = \"Day of Last\\nStudy Drug\\nAdministration\",\n DTHADY = \"Day of\\nDeath\",\n DTHCAUS = \"Cause of Death\",\n ADTHAUT = \"Autopsy\\nPerformed?\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"ID\"),\n disp_cols = names(out),\n main_title = \"Listing of Patient Deaths\"\n)\n\nhead(lsting, 20)\n\nListing of Patient Deaths\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Date of First Day of Last \n Study Drug Study Drug Day of Autopsy \nTreatment Center/Patient ID Age/Sex/Race Administration Administration Death Cause of Death Performed?\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-134 47/M/WHITE 04NOV2020 473 496 ADVERSE EVENT Yes \n BRA-1/id-93 34/F/ASIAN 20JUN2020 610 657 ADVERSE EVENT Yes \n BRA-11/id-217 43/M/ASIAN 28SEP2019 871 893 ADVERSE EVENT Yes \n BRA-15/id-36 38/F/ASIAN 08JAN2020 767 812 DISEASE PROGRESSION Yes \n CAN-11/id-139 31/M/ASIAN 15SEP2020 519 563 ADVERSE EVENT Yes \n CHN-1/id-123 27/F/ASIAN 28JAN2020 750 750 DISEASE PROGRESSION Yes \n CHN-1/id-199 27/M/BLACK OR AFRICAN AMERICAN 08JAN2020 773 779 DISEASE PROGRESSION Yes \n CHN-1/id-235 39/M/ASIAN 13JUL2019 950 968 ADVERSE EVENT Yes \n CHN-1/id-62 36/F/WHITE 22NOV2020 455 497 ADVERSE EVENT Yes \n CHN-12/id-258 45/M/WHITE 01MAR2020 721 756 SUICIDE No \n CHN-15/id-14 38/F/BLACK OR AFRICAN AMERICAN 29SEP2019 871 919 DISEASE PROGRESSION Yes \n CHN-17/id-182 37/M/BLACK OR AFRICAN AMERICAN 18SEP2019 879 902 LOST TO FOLLOW UP NA \n CHN-17/id-92 29/M/ASIAN 01MAR2020 720 721 LOST TO FOLLOW UP NA \n CHN-2/id-22 29/M/ASIAN 15JAN2021 393 409 MISSING NA \n CHN-2/id-223 29/F/ASIAN 18NOV2020 453 468 DISEASE PROGRESSION Yes \n CHN-2/id-272 41/F/ASIAN 11JAN2020 768 773 DISEASE PROGRESSION Yes \n CHN-2/id-274 40/F/ASIAN 14OCT2019 860 890 SUICIDE No \n CHN-3/id-128 32/M/ASIAN 24FEB2019 1084 1105 ADVERSE EVENT Yes \n CHN-5/id-108 28/F/BLACK OR AFRICAN AMERICAN 11SEP2019 886 935 MISSING NA \n CHN-6/id-30 29/M/ASIAN 24AUG2020 539 578 Post-study reporting of death No \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:33:51 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 pkgconfig_2.0.3 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\nout <- adsl %>%\n filter(!is.na(DTHADY)) %>%\n mutate(\n ID = paste(SITEID, SUBJID, sep = \"/\"),\n AGSXRC = paste(AGE, SEX, RACE, sep = \"/\"),\n TRTSD = toupper(format(as.Date(TRTSDTM), \"%d%b%Y\"))\n ) %>%\n arrange(SUBJID) %>%\n select(ID, AGSXRC, TRT01A, TRTSD, EOSDY, DTHADY, DTHCAUS, ADTHAUT)\n\nvar_labels(out) <- c(\n ID = \"Center/Patient ID\",\n AGSXRC = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n TRTSD = \"Date of First\\nStudy Drug\\nAdministration\",\n EOSDY = \"Day of Last\\nStudy Drug\\nAdministration\",\n DTHADY = \"Day of\\nDeath\",\n DTHCAUS = \"Cause of Death\",\n ADTHAUT = \"Autopsy\\nPerformed?\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"ID\"),\n disp_cols = names(out),\n main_title = \"Listing of Patient Deaths\"\n)\n\nhead(lsting, 20)\n\nListing of Patient Deaths\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Date of First Day of Last \n Study Drug Study Drug Day of Autopsy \nTreatment Center/Patient ID Age/Sex/Race Administration Administration Death Cause of Death Performed?\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-134 47/M/WHITE 04NOV2020 473 496 ADVERSE EVENT Yes \n BRA-1/id-93 34/F/ASIAN 20JUN2020 610 657 ADVERSE EVENT Yes \n BRA-11/id-217 43/M/ASIAN 28SEP2019 871 893 ADVERSE EVENT Yes \n BRA-15/id-36 38/F/ASIAN 08JAN2020 767 812 DISEASE PROGRESSION Yes \n CAN-11/id-139 31/M/ASIAN 15SEP2020 519 563 ADVERSE EVENT Yes \n CHN-1/id-123 27/F/ASIAN 28JAN2020 750 750 DISEASE PROGRESSION Yes \n CHN-1/id-199 27/M/BLACK OR AFRICAN AMERICAN 08JAN2020 773 779 DISEASE PROGRESSION Yes \n CHN-1/id-235 39/M/ASIAN 13JUL2019 950 968 ADVERSE EVENT Yes \n CHN-1/id-62 36/F/WHITE 22NOV2020 455 497 ADVERSE EVENT Yes \n CHN-12/id-258 45/M/WHITE 01MAR2020 721 756 SUICIDE No \n CHN-15/id-14 38/F/BLACK OR AFRICAN AMERICAN 29SEP2019 871 919 DISEASE PROGRESSION Yes \n CHN-17/id-182 37/M/BLACK OR AFRICAN AMERICAN 18SEP2019 879 902 LOST TO FOLLOW UP NA \n CHN-17/id-92 29/M/ASIAN 01MAR2020 720 721 LOST TO FOLLOW UP NA \n CHN-2/id-22 29/M/ASIAN 15JAN2021 393 409 MISSING NA \n CHN-2/id-223 29/F/ASIAN 18NOV2020 453 468 DISEASE PROGRESSION Yes \n CHN-2/id-272 41/F/ASIAN 11JAN2020 768 773 DISEASE PROGRESSION Yes \n CHN-2/id-274 40/F/ASIAN 14OCT2019 860 890 SUICIDE No \n CHN-3/id-128 32/M/ASIAN 24FEB2019 1084 1105 ADVERSE EVENT Yes \n CHN-5/id-108 28/F/BLACK OR AFRICAN AMERICAN 11SEP2019 886 935 MISSING NA \n CHN-6/id-30 29/M/ASIAN 24AUG2020 539 578 Post-study reporting of death No \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:34:12 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 pkgconfig_2.0.3 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Adverse Events", @@ -878,7 +878,7 @@ "href": "listings/development-safety-update-report/dsur4.html", "title": "DSUR4", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\nout <- adsl %>%\n filter(DTHFL == \"Y\") %>%\n mutate(ID = paste(SITEID, SUBJID, sep = \"/\")) %>%\n select(ARM, ID, DTHCAUS)\ndeath_num <- length(unique(out$ID))\nvar_labels(out) <- c(\n ARM = \"Treatment Group\",\n ID = \"Center/Patient ID\",\n DTHCAUS = \"Cause of Death\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"ARM\"),\n disp_cols = names(out),\n main_title = \"Listing of Patients Who Died During Reporting Period\",\n subtitles = paste(\"Number of patient deaths during reporting period =\", death_num)\n)\n\nhead(lsting, 20)\n\nListing of Patients Who Died During Reporting Period\nNumber of patient deaths during reporting period = 70\n\n———————————————————————————————————————————————————————————————————\nTreatment Group Center/Patient ID Cause of Death \n———————————————————————————————————————————————————————————————————\n A: Drug X CHN-3/id-128 ADVERSE EVENT \n RUS-1/id-52 DISEASE PROGRESSION \n CHN-1/id-235 ADVERSE EVENT \n CHN-5/id-108 MISSING \n CHN-17/id-182 LOST TO FOLLOW UP \n BRA-11/id-217 ADVERSE EVENT \n CHN-15/id-14 DISEASE PROGRESSION \n CHN-2/id-274 SUICIDE \n USA-11/id-339 UNKNOWN \n BRA-15/id-36 DISEASE PROGRESSION \n CHN-1/id-199 DISEASE PROGRESSION \n CHN-2/id-272 DISEASE PROGRESSION \n CHN-1/id-123 DISEASE PROGRESSION \n CHN-12/id-258 SUICIDE \n CHN-17/id-92 LOST TO FOLLOW UP \n NGA-1/id-46 DISEASE PROGRESSION \n BRA-1/id-93 ADVERSE EVENT \n CHN-6/id-30 Post-study reporting of death\n CAN-11/id-139 ADVERSE EVENT \n GBR-1/id-319 ADVERSE EVENT \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:33:44 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\nout <- adsl %>%\n filter(DTHFL == \"Y\") %>%\n mutate(ID = paste(SITEID, SUBJID, sep = \"/\")) %>%\n select(ARM, ID, DTHCAUS)\ndeath_num <- length(unique(out$ID))\nvar_labels(out) <- c(\n ARM = \"Treatment Group\",\n ID = \"Center/Patient ID\",\n DTHCAUS = \"Cause of Death\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"ARM\"),\n disp_cols = names(out),\n main_title = \"Listing of Patients Who Died During Reporting Period\",\n subtitles = paste(\"Number of patient deaths during reporting period =\", death_num)\n)\n\nhead(lsting, 20)\n\nListing of Patients Who Died During Reporting Period\nNumber of patient deaths during reporting period = 70\n\n———————————————————————————————————————————————————————————————————\nTreatment Group Center/Patient ID Cause of Death \n———————————————————————————————————————————————————————————————————\n A: Drug X CHN-3/id-128 ADVERSE EVENT \n RUS-1/id-52 DISEASE PROGRESSION \n CHN-1/id-235 ADVERSE EVENT \n CHN-5/id-108 MISSING \n CHN-17/id-182 LOST TO FOLLOW UP \n BRA-11/id-217 ADVERSE EVENT \n CHN-15/id-14 DISEASE PROGRESSION \n CHN-2/id-274 SUICIDE \n USA-11/id-339 UNKNOWN \n BRA-15/id-36 DISEASE PROGRESSION \n CHN-1/id-199 DISEASE PROGRESSION \n CHN-2/id-272 DISEASE PROGRESSION \n CHN-1/id-123 DISEASE PROGRESSION \n CHN-12/id-258 SUICIDE \n CHN-17/id-92 LOST TO FOLLOW UP \n NGA-1/id-46 DISEASE PROGRESSION \n BRA-1/id-93 ADVERSE EVENT \n CHN-6/id-30 Post-study reporting of death\n CAN-11/id-139 ADVERSE EVENT \n GBR-1/id-319 ADVERSE EVENT \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:34:05 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Development Safety Update Report", @@ -890,7 +890,7 @@ "href": "listings/ADA/adal02.html", "title": "ADAL02", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(rlistings)\nlibrary(scda)\n\nadab <- synthetic_cdisc_dataset(\"latest\", \"adab\") %>%\n filter(NFRLT %% 1 == 0 & NFRLT > 0)\n\ntrt <- \"A: Drug X\"\ndrug_a <- \"A: Drug X Antibody\"\ndrugcd <- unique(adab$PARAMCD[adab$PARAM == \"Antibody titer units\"])[1]\nmin_titer <- 1.10\n\nadab_x <- adab %>%\n filter(\n ARM == trt,\n PARCAT1 == drug_a,\n ADPBLPFL == \"Y\"\n ) %>%\n select(-PARAMCD, -AVALC, -AVALU, -ARRLT, -NRRLT) %>%\n unique() %>%\n tidyr::pivot_wider(\n names_from = PARAM,\n values_from = AVAL\n ) %>%\n filter(if_any(matches(\"Treatment Emergent - Positive\"), ~ .x == 1)) %>%\n # filter(`Treatment Emergent - Positive` == 1) %>%\n mutate(\n VISN = factor(paste0(\n VISIT, \"\\n(Day \",\n ifelse(\n NFRLT %% 1 == 0,\n NFRLT,\n as.character(format(round(NFRLT, 2), nsmall = 2))\n ),\n \")\"\n )),\n PTES = ifelse(\n ifelse(\"Treatment induced ADA\" %in% names(.), `Treatment induced ADA` == 1, FALSE),\n ifelse(\n \"Transient ADA\" %in% names(.) & `Transient ADA` == 1,\n \"Induced (Transient)\",\n \"Induced (Persistent)\"\n ),\n \"Enhanced\"\n )\n ) %>%\n mutate(\n AVAL = paste0(\n ifelse(\n ifelse(\"ADA interpreted per sample result\" %in% names(.), `ADA interpreted per sample result` == 0, FALSE),\n \"NEGATIVE\",\n ifelse(\n ifelse(\"Antibody titer units\" %in% names(.), !is.na(`Antibody titer units`), FALSE),\n ifelse(\n `Antibody titer units` < min_titer,\n paste0(\"<\", format(min_titer, nsmall = 2)),\n as.character(format(round(`Antibody titer units`, 2), nsmall = 2))\n ),\n \"---\"\n )\n ),\n ifelse(\n ifelse(\"NAB interpreted per sample result\" %in% names(.), `NAB interpreted per sample result` == 1, FALSE),\n \"*\",\n \"\"\n )\n )\n )\n\nout <- adab_x %>%\n select(USUBJID, VISN, AVAL, PTES) %>%\n tidyr::pivot_wider(\n names_from = VISN,\n values_from = AVAL\n ) %>%\n select(USUBJID, unique(adab_x$VISN[order(adab_x$NFRLT)]), PTES)\n\nvar_labels(out) <- names(out)\n\nout <- out %>%\n var_relabel(\n USUBJID = \"Subject ID\",\n PTES = \"Patient Treatment\\nEmergent ADA Status\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = \"USUBJID\",\n disp_cols = names(out),\n main_title = paste0(\n \"Listing of Anti-\", drugcd, \" Antibody Data for Treatment Emergent ADA Positive Patients, PK Population\",\n \"\\nProtocol: \", unique(adab$PARCAT1)[1]\n ),\n subtitles = paste(\"\\nTreatment Group:\", trt),\n \n main_footer = \"Minimum reportable titer = 1.10 (example only)\n--- = No sample evaluated\nADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies)\nNumber of patients positive for Treatment Emergent ADA = the number of post-baseline evaluable patients determined to have treatment-induced ADA or treatment-enhanced ADA during the study period.\nTreatment-induced ADA = a patient with negative or missing baseline ADA result(s) and at least one positive post-baseline ADA result.\nTreatment-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.\nTransient ADA = ADA positive result detected (a) at only one post-baseline sampling timepoint (excluding last timepoint) OR (b) at 2 or more timepoints during treatment where the first and last ADA positive samples are separated by a period of < 16 weeks, irrespective of any negative samples in between.\nPersistent ADA = ADA positive result detected (a) at the last post-baseline sampling timepoint, OR (b) at 2 or more time points during treatment where the first and last ADA positive samples are separated by a period ≥ 16 weeks, irrespective of any negative samples in between.\nAsterisk denotes sample that tested positive for Neutralizing Antibodies.\"\n \n)\n\nhead(lsting, 20)\n\nListing of Anti-R1800000 Antibody Data for Treatment Emergent ADA Positive Patients, PK Population\nProtocol: A: Drug X Antibody\n\nTreatment Group: A: Drug X\n\n—————————————————————————————————————————————————————\n Day 2 Patient Treatment \n Subject ID (Day 1) Emergent ADA Status\n—————————————————————————————————————————————————————\nAB12345-BRA-1-id-105 --- Enhanced \nAB12345-BRA-1-id-134 --- Enhanced \n AB12345-BRA-1-id-42 --- Enhanced \n AB12345-BRA-1-id-93 --- Enhanced \nAB12345-BRA-11-id-217 --- Enhanced \nAB12345-BRA-11-id-345 --- Enhanced \nAB12345-BRA-11-id-397 --- Enhanced \nAB12345-BRA-11-id-50 --- Enhanced \nAB12345-BRA-13-id-177 --- Enhanced \nAB12345-BRA-14-id-23 --- Enhanced \nAB12345-BRA-15-id-36 --- Enhanced \nAB12345-BRA-2-id-296 --- Enhanced \nAB12345-BRA-6-id-369 --- Enhanced \n AB12345-CAN-1-id-18 --- Enhanced \nAB12345-CAN-11-id-139 --- Enhanced \nAB12345-CAN-14-id-104 --- Enhanced \nAB12345-CHN-1-id-119 --- Enhanced \nAB12345-CHN-1-id-123 --- Enhanced \nAB12345-CHN-1-id-133 --- Enhanced \nAB12345-CHN-1-id-199 --- Enhanced \n—————————————————————————————————————————————————————\n\nMinimum reportable titer = 1.10 (example only)\n--- = No sample evaluated\nADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies)\nNumber of patients positive for Treatment Emergent ADA = the number of post-baseline evaluable patients determined to have treatment-induced ADA or treatment-enhanced ADA during the study period.\nTreatment-induced ADA = a patient with negative or missing baseline ADA result(s) and at least one positive post-baseline ADA result.\nTreatment-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.\nTransient ADA = ADA positive result detected (a) at only one post-baseline sampling timepoint (excluding last timepoint) OR (b) at 2 or more timepoints during treatment where the first and last ADA positive samples are separated by a period of < 16 weeks, irrespective of any negative samples in between.\nPersistent ADA = ADA positive result detected (a) at the last post-baseline sampling timepoint, OR (b) at 2 or more time points during treatment where the first and last ADA positive samples are separated by a period ≥ 16 weeks, irrespective of any negative samples in between.\nAsterisk denotes sample that tested positive for Neutralizing Antibodies.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:33:36 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 rlistings_0.2.7.9013 tibble_3.2.1 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(rlistings)\nlibrary(scda)\n\nadab <- synthetic_cdisc_dataset(\"latest\", \"adab\") %>%\n filter(NFRLT %% 1 == 0 & NFRLT > 0)\n\ntrt <- \"A: Drug X\"\ndrug_a <- \"A: Drug X Antibody\"\ndrugcd <- unique(adab$PARAMCD[adab$PARAM == \"Antibody titer units\"])[1]\nmin_titer <- 1.10\n\nadab_x <- adab %>%\n filter(\n ARM == trt,\n PARCAT1 == drug_a,\n ADPBLPFL == \"Y\"\n ) %>%\n select(-PARAMCD, -AVALC, -AVALU, -ARRLT, -NRRLT) %>%\n unique() %>%\n tidyr::pivot_wider(\n names_from = PARAM,\n values_from = AVAL\n ) %>%\n filter(if_any(matches(\"Treatment Emergent - Positive\"), ~ .x == 1)) %>%\n # filter(`Treatment Emergent - Positive` == 1) %>%\n mutate(\n VISN = factor(paste0(\n VISIT, \"\\n(Day \",\n ifelse(\n NFRLT %% 1 == 0,\n NFRLT,\n as.character(format(round(NFRLT, 2), nsmall = 2))\n ),\n \")\"\n )),\n PTES = ifelse(\n ifelse(\"Treatment induced ADA\" %in% names(.), `Treatment induced ADA` == 1, FALSE),\n ifelse(\n \"Transient ADA\" %in% names(.) & `Transient ADA` == 1,\n \"Induced (Transient)\",\n \"Induced (Persistent)\"\n ),\n \"Enhanced\"\n )\n ) %>%\n mutate(\n AVAL = paste0(\n ifelse(\n ifelse(\"ADA interpreted per sample result\" %in% names(.), `ADA interpreted per sample result` == 0, FALSE),\n \"NEGATIVE\",\n ifelse(\n ifelse(\"Antibody titer units\" %in% names(.), !is.na(`Antibody titer units`), FALSE),\n ifelse(\n `Antibody titer units` < min_titer,\n paste0(\"<\", format(min_titer, nsmall = 2)),\n as.character(format(round(`Antibody titer units`, 2), nsmall = 2))\n ),\n \"---\"\n )\n ),\n ifelse(\n ifelse(\"NAB interpreted per sample result\" %in% names(.), `NAB interpreted per sample result` == 1, FALSE),\n \"*\",\n \"\"\n )\n )\n )\n\nout <- adab_x %>%\n select(USUBJID, VISN, AVAL, PTES) %>%\n tidyr::pivot_wider(\n names_from = VISN,\n values_from = AVAL\n ) %>%\n select(USUBJID, unique(adab_x$VISN[order(adab_x$NFRLT)]), PTES)\n\nvar_labels(out) <- names(out)\n\nout <- out %>%\n var_relabel(\n USUBJID = \"Subject ID\",\n PTES = \"Patient Treatment\\nEmergent ADA Status\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = \"USUBJID\",\n disp_cols = names(out),\n main_title = paste0(\n \"Listing of Anti-\", drugcd, \" Antibody Data for Treatment Emergent ADA Positive Patients, PK Population\",\n \"\\nProtocol: \", unique(adab$PARCAT1)[1]\n ),\n subtitles = paste(\"\\nTreatment Group:\", trt),\n \n main_footer = \"Minimum reportable titer = 1.10 (example only)\n--- = No sample evaluated\nADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies)\nNumber of patients positive for Treatment Emergent ADA = the number of post-baseline evaluable patients determined to have treatment-induced ADA or treatment-enhanced ADA during the study period.\nTreatment-induced ADA = a patient with negative or missing baseline ADA result(s) and at least one positive post-baseline ADA result.\nTreatment-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.\nTransient ADA = ADA positive result detected (a) at only one post-baseline sampling timepoint (excluding last timepoint) OR (b) at 2 or more timepoints during treatment where the first and last ADA positive samples are separated by a period of < 16 weeks, irrespective of any negative samples in between.\nPersistent ADA = ADA positive result detected (a) at the last post-baseline sampling timepoint, OR (b) at 2 or more time points during treatment where the first and last ADA positive samples are separated by a period ≥ 16 weeks, irrespective of any negative samples in between.\nAsterisk denotes sample that tested positive for Neutralizing Antibodies.\"\n \n)\n\nhead(lsting, 20)\n\nListing of Anti-R1800000 Antibody Data for Treatment Emergent ADA Positive Patients, PK Population\nProtocol: A: Drug X Antibody\n\nTreatment Group: A: Drug X\n\n—————————————————————————————————————————————————————\n Day 2 Patient Treatment \n Subject ID (Day 1) Emergent ADA Status\n—————————————————————————————————————————————————————\nAB12345-BRA-1-id-105 --- Enhanced \nAB12345-BRA-1-id-134 --- Enhanced \n AB12345-BRA-1-id-42 --- Enhanced \n AB12345-BRA-1-id-93 --- Enhanced \nAB12345-BRA-11-id-217 --- Enhanced \nAB12345-BRA-11-id-345 --- Enhanced \nAB12345-BRA-11-id-397 --- Enhanced \nAB12345-BRA-11-id-50 --- Enhanced \nAB12345-BRA-13-id-177 --- Enhanced \nAB12345-BRA-14-id-23 --- Enhanced \nAB12345-BRA-15-id-36 --- Enhanced \nAB12345-BRA-2-id-296 --- Enhanced \nAB12345-BRA-6-id-369 --- Enhanced \n AB12345-CAN-1-id-18 --- Enhanced \nAB12345-CAN-11-id-139 --- Enhanced \nAB12345-CAN-14-id-104 --- Enhanced \nAB12345-CHN-1-id-119 --- Enhanced \nAB12345-CHN-1-id-123 --- Enhanced \nAB12345-CHN-1-id-133 --- Enhanced \nAB12345-CHN-1-id-199 --- Enhanced \n—————————————————————————————————————————————————————\n\nMinimum reportable titer = 1.10 (example only)\n--- = No sample evaluated\nADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies)\nNumber of patients positive for Treatment Emergent ADA = the number of post-baseline evaluable patients determined to have treatment-induced ADA or treatment-enhanced ADA during the study period.\nTreatment-induced ADA = a patient with negative or missing baseline ADA result(s) and at least one positive post-baseline ADA result.\nTreatment-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.\nTransient ADA = ADA positive result detected (a) at only one post-baseline sampling timepoint (excluding last timepoint) OR (b) at 2 or more timepoints during treatment where the first and last ADA positive samples are separated by a period of < 16 weeks, irrespective of any negative samples in between.\nPersistent ADA = ADA positive result detected (a) at the last post-baseline sampling timepoint, OR (b) at 2 or more time points during treatment where the first and last ADA positive samples are separated by a period ≥ 16 weeks, irrespective of any negative samples in between.\nAsterisk denotes sample that tested positive for Neutralizing Antibodies.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:33:57 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 rlistings_0.2.7.9013 tibble_3.2.1 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "ADA", @@ -959,7 +959,7 @@ "href": "listings/efficacy/oncl01.html", "title": "ONCL01", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadrs <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\nout_ex <- adex %>%\n filter(PARAMCD == \"TNDOSE\") %>%\n mutate(ID = paste(SITEID, SUBJID, sep = \"/\")) %>%\n select(ID, AVAL)\n\nout_rs <- adrs %>%\n filter(PARAM %in% c(\"Investigator End Of Induction Response\", \"Best Confirmed Overall Response by Investigator\")) %>%\n mutate(ID = paste(SITEID, SUBJID, sep = \"/\")) %>%\n select(ID, AVALC, PARAM) %>%\n tidyr::pivot_wider(\n id_cols = ID,\n names_from = PARAM,\n values_from = AVALC\n ) %>%\n right_join(out_ex, ., by = \"ID\", multiple = \"all\")\n\nadtte_flt <- adtte %>%\n filter(PARAMCD %in% c(\"OS\", \"PFS\", \"CRSD\")) %>%\n mutate(\n PARAM = paste(PARAM, paste0(\"(\", AVALU, \")\"), sep = \" \"), ID = paste(SITEID, SUBJID, sep = \"/\"),\n trigeventpfs = ifelse(CNSR == 0, EVNTDESC, NA)\n )\n\n# Select triggering event variable\nout_trg <- adtte_flt %>%\n select(ID, trigeventpfs)\n\nout_tte <- adtte_flt %>%\n select(ID, TRT01A, PARAM, AVAL, trigeventpfs) %>%\n tidyr::pivot_wider(\n id_cols = c(ID, TRT01A),\n names_from = PARAM,\n values_from = AVAL\n ) %>%\n mutate_at(\n c(\"Overall Survival (DAYS)\", \"Progression Free Survival (DAYS)\", \"Duration of Confirmed Response (DAYS)\"),\n function(x) format(round(x, 1), nsmall = 1)\n ) %>%\n select(\n ID,\n TRT01A,\n `Overall Survival (DAYS)`,\n `Progression Free Survival (DAYS)`,\n `Duration of Confirmed Response (DAYS)`\n ) %>%\n right_join(out_trg, ., by = \"ID\", multiple = \"all\")\n\nout <- out_tte %>%\n right_join(out_rs, ., by = \"ID\", multiple = \"all\") %>%\n select(\n \"ID\", \"TRT01A\", \"AVAL\", \"Best Confirmed Overall Response by Investigator\",\n \"Investigator End Of Induction Response\", \"Overall Survival (DAYS)\", \"Progression Free Survival (DAYS)\",\n \"trigeventpfs\", \"Duration of Confirmed Response (DAYS)\"\n )\n\nvar_labels(out) <- names(out)\nout <- out %>%\n var_relabel(\n ID = \"Center/Patient ID\",\n TRT01A = \"Treatment\",\n AVAL = \"Number of Doses\\nReceived\",\n `Best Confirmed Overall Response by Investigator` = \"Best Confirmed\\nOverall Response\\nby Investigator\",\n `Investigator End Of Induction Response` = \"Investigator\\nEnd Of Induction\\nResponse\",\n trigeventpfs = \"Triggering Event\\n for PFS\",\n `Overall Survival (DAYS)` = \"Overall Survival\\n(days)\",\n `Progression Free Survival (DAYS)` = \"PFS\\n(days)\",\n `Duration of Confirmed Response (DAYS)` = \"Duration of\\nConfirmed Response\\n(days)\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"ID\"),\n disp_cols = names(out),\n main_title = \"Listing of Individual Efficacy Data\",\n main_footer = \"PFS = Progression Free Survival\"\n)\n\nhead(lsting, 20)\n\nListing of Individual Efficacy Data\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Best Confirmed Investigator Duration of \n Number of Doses Overall Response End Of Induction Overall Survival PFS Triggering Event Confirmed Response\nTreatment Center/Patient ID Received by Investigator Response (days) (days) for PFS (days) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-105 7 CR CR 402.6 235.7 Disease Progression 119.6 \n 7 CR CR 402.6 235.7 NA 119.6 \n 7 CR CR 402.6 235.7 NA 119.6 \n BRA-1/id-134 7 CR CR 90.1 90.1 Death 90.1 \n 7 CR CR 90.1 90.1 Death 90.1 \n 7 CR CR 90.1 90.1 Death 90.1 \n BRA-1/id-42 7 PR PR 407.0 204.6 Disease Progression 193.9 \n 7 PR PR 407.0 204.6 NA 193.9 \n 7 PR PR 407.0 204.6 NA 193.9 \n BRA-1/id-93 7 CR PD 316.0 255.7 NA 140.3 \n 7 CR PD 316.0 255.7 NA 140.3 \n 7 CR PD 316.0 255.7 NA 140.3 \n BRA-11/id-217 7 CR CR 293.0 293.0 Disease Progression 153.2 \n 7 CR CR 293.0 293.0 Death 153.2 \n 7 CR CR 293.0 293.0 Death 153.2 \n BRA-11/id-345 7 CR CR 305.5 272.6 NA 150.6 \n 7 CR CR 305.5 272.6 NA 150.6 \n 7 CR CR 305.5 272.6 NA 150.6 \n BRA-11/id-397 7 PR PR 138.7 138.7 Death 138.7 \n 7 PR PR 138.7 138.7 Death 138.7 \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nPFS = Progression Free Survival\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:33:41 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4\n[25] testthat_3.2.1 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadrs <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\nadtte <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\nout_ex <- adex %>%\n filter(PARAMCD == \"TNDOSE\") %>%\n mutate(ID = paste(SITEID, SUBJID, sep = \"/\")) %>%\n select(ID, AVAL)\n\nout_rs <- adrs %>%\n filter(PARAM %in% c(\"Investigator End Of Induction Response\", \"Best Confirmed Overall Response by Investigator\")) %>%\n mutate(ID = paste(SITEID, SUBJID, sep = \"/\")) %>%\n select(ID, AVALC, PARAM) %>%\n tidyr::pivot_wider(\n id_cols = ID,\n names_from = PARAM,\n values_from = AVALC\n ) %>%\n right_join(out_ex, ., by = \"ID\", multiple = \"all\")\n\nadtte_flt <- adtte %>%\n filter(PARAMCD %in% c(\"OS\", \"PFS\", \"CRSD\")) %>%\n mutate(\n PARAM = paste(PARAM, paste0(\"(\", AVALU, \")\"), sep = \" \"), ID = paste(SITEID, SUBJID, sep = \"/\"),\n trigeventpfs = ifelse(CNSR == 0, EVNTDESC, NA)\n )\n\n# Select triggering event variable\nout_trg <- adtte_flt %>%\n select(ID, trigeventpfs)\n\nout_tte <- adtte_flt %>%\n select(ID, TRT01A, PARAM, AVAL, trigeventpfs) %>%\n tidyr::pivot_wider(\n id_cols = c(ID, TRT01A),\n names_from = PARAM,\n values_from = AVAL\n ) %>%\n mutate_at(\n c(\"Overall Survival (DAYS)\", \"Progression Free Survival (DAYS)\", \"Duration of Confirmed Response (DAYS)\"),\n function(x) format(round(x, 1), nsmall = 1)\n ) %>%\n select(\n ID,\n TRT01A,\n `Overall Survival (DAYS)`,\n `Progression Free Survival (DAYS)`,\n `Duration of Confirmed Response (DAYS)`\n ) %>%\n right_join(out_trg, ., by = \"ID\", multiple = \"all\")\n\nout <- out_tte %>%\n right_join(out_rs, ., by = \"ID\", multiple = \"all\") %>%\n select(\n \"ID\", \"TRT01A\", \"AVAL\", \"Best Confirmed Overall Response by Investigator\",\n \"Investigator End Of Induction Response\", \"Overall Survival (DAYS)\", \"Progression Free Survival (DAYS)\",\n \"trigeventpfs\", \"Duration of Confirmed Response (DAYS)\"\n )\n\nvar_labels(out) <- names(out)\nout <- out %>%\n var_relabel(\n ID = \"Center/Patient ID\",\n TRT01A = \"Treatment\",\n AVAL = \"Number of Doses\\nReceived\",\n `Best Confirmed Overall Response by Investigator` = \"Best Confirmed\\nOverall Response\\nby Investigator\",\n `Investigator End Of Induction Response` = \"Investigator\\nEnd Of Induction\\nResponse\",\n trigeventpfs = \"Triggering Event\\n for PFS\",\n `Overall Survival (DAYS)` = \"Overall Survival\\n(days)\",\n `Progression Free Survival (DAYS)` = \"PFS\\n(days)\",\n `Duration of Confirmed Response (DAYS)` = \"Duration of\\nConfirmed Response\\n(days)\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"ID\"),\n disp_cols = names(out),\n main_title = \"Listing of Individual Efficacy Data\",\n main_footer = \"PFS = Progression Free Survival\"\n)\n\nhead(lsting, 20)\n\nListing of Individual Efficacy Data\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Best Confirmed Investigator Duration of \n Number of Doses Overall Response End Of Induction Overall Survival PFS Triggering Event Confirmed Response\nTreatment Center/Patient ID Received by Investigator Response (days) (days) for PFS (days) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-105 7 CR CR 402.6 235.7 Disease Progression 119.6 \n 7 CR CR 402.6 235.7 NA 119.6 \n 7 CR CR 402.6 235.7 NA 119.6 \n BRA-1/id-134 7 CR CR 90.1 90.1 Death 90.1 \n 7 CR CR 90.1 90.1 Death 90.1 \n 7 CR CR 90.1 90.1 Death 90.1 \n BRA-1/id-42 7 PR PR 407.0 204.6 Disease Progression 193.9 \n 7 PR PR 407.0 204.6 NA 193.9 \n 7 PR PR 407.0 204.6 NA 193.9 \n BRA-1/id-93 7 CR PD 316.0 255.7 NA 140.3 \n 7 CR PD 316.0 255.7 NA 140.3 \n 7 CR PD 316.0 255.7 NA 140.3 \n BRA-11/id-217 7 CR CR 293.0 293.0 Disease Progression 153.2 \n 7 CR CR 293.0 293.0 Death 153.2 \n 7 CR CR 293.0 293.0 Death 153.2 \n BRA-11/id-345 7 CR CR 305.5 272.6 NA 150.6 \n 7 CR CR 305.5 272.6 NA 150.6 \n 7 CR CR 305.5 272.6 NA 150.6 \n BRA-11/id-397 7 PR PR 138.7 138.7 Death 138.7 \n 7 PR PR 138.7 138.7 Death 138.7 \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nPFS = Progression Free Survival\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:34:01 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4\n[25] testthat_3.2.1 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Efficacy", @@ -971,7 +971,7 @@ "href": "listings/medical-history/mhl01.html", "title": "MHL01", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadmh <- synthetic_cdisc_dataset(\"latest\", \"admh\")\n\nout <- admh %>%\n mutate(\n ASR = paste(AGE, SEX, RACE, sep = \"/\"),\n ID = paste(SITEID, SUBJID, sep = \"/\"),\n TRTSDTM = toupper(format(as.Date(TRTSDTM), \"%d%b%Y\")),\n ASTDTM = toupper(format(as.Date(ASTDTM), \"%d%b%Y\")),\n AENDTM = toupper(format(as.Date(AENDTM), \"%d%b%Y\"))\n ) %>%\n select(ID, ASR, TRT01A, MHBODSYS, MHDECOD, TRTSDTM, ASTDTM, ASTDY, AENDTM, AENDY, ATIREL)\n\nvar_labels(out) <- c(\n ID = \"Center/Patient ID\",\n ASR = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n MHBODSYS = \"SOC\",\n MHDECOD = \"Disease Term\",\n TRTSDTM = \"Date of First\\nStudy Drug\\nAdministration\",\n ASTDTM = \"Start Date\\nof Disease\",\n ASTDY = \"Start Day\\nof Disease\",\n AENDTM = \"End Date\\nof Disease\",\n AENDY = \"End Day\\nof Disease\",\n ATIREL = \"Time Relation\\nof Disease\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"ID\", \"ASR\", \"MHBODSYS\", \"MHDECOD\"),\n disp_cols = names(out),\n main_title = \"Listing of Medical History and Concurrent Diseases\"\n)\n\nhead(lsting, 20)\n\nListing of Medical History and Concurrent Diseases\n\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Date of First \n Study Drug Start Date Start Day End Date End Day Time Relation \nTreatment Center/Patient ID Age/Sex/Race SOC Disease Term Administration of Disease of Disease of Disease of Disease of Disease \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-134 47/M/WHITE cl A trm A_2/2 04NOV2020 21SEP2021 321 16FEB2022 469 PRIOR_CONCOMITANT\n 04NOV2020 02DEC2021 393 13JAN2022 435 PRIOR_CONCOMITANT\n cl B trm B_2/3 04NOV2020 15APR2021 162 04OCT2021 334 PRIOR_CONCOMITANT\n cl D trm D_2/3 04NOV2020 19MAY2021 196 31OCT2021 361 PRIOR_CONCOMITANT\n BRA-1/id-42 36/M/BLACK OR AFRICAN AMERICAN cl A trm A_2/2 01JAN2020 09JUN2020 160 22FEB2021 418 PRIOR_CONCOMITANT\n 01JAN2020 04APR2021 459 15OCT2021 653 PRIOR_CONCOMITANT\n 01JAN2020 20APR2021 475 10AUG2021 587 PRIOR_CONCOMITANT\n cl B trm B_1/3 01JAN2020 15APR2021 470 23AUG2021 600 PRIOR_CONCOMITANT\n 01JAN2020 03OCT2021 641 17OCT2021 655 PRIOR_CONCOMITANT\n trm B_3/3 01JAN2020 19OCT2020 292 07DEC2020 341 PRIOR_CONCOMITANT\n cl C trm C_1/2 01JAN2020 11MAY2021 496 19OCT2021 657 PRIOR_CONCOMITANT\n trm C_2/2 01JAN2020 09FEB2020 39 28JUN2021 544 PRIOR_CONCOMITANT\n 01JAN2020 05APR2020 95 04FEB2021 400 PRIOR_CONCOMITANT\n cl D trm D_1/3 01JAN2020 05MAR2020 64 24NOV2021 693 PRIOR_CONCOMITANT\n BRA-1/id-93 34/F/ASIAN cl A trm A_1/2 20JUN2020 03NOV2020 136 19JAN2021 213 PRIOR_CONCOMITANT\n cl B trm B_1/3 20JUN2020 25NOV2021 523 18DEC2021 546 PRIOR_CONCOMITANT\n trm B_3/3 20JUN2020 06FEB2022 596 15FEB2022 605 PRIOR_CONCOMITANT\n cl C trm C_1/2 20JUN2020 28MAR2021 281 11JUL2021 386 PRIOR_CONCOMITANT\n cl D trm D_1/3 20JUN2020 02MAY2021 316 06JAN2022 565 PRIOR_CONCOMITANT\n trm D_2/3 20JUN2020 03AUG2020 44 18SEP2020 90 PRIOR_CONCOMITANT\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:33:47 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 pkgconfig_2.0.3 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadmh <- synthetic_cdisc_dataset(\"latest\", \"admh\")\n\nout <- admh %>%\n mutate(\n ASR = paste(AGE, SEX, RACE, sep = \"/\"),\n ID = paste(SITEID, SUBJID, sep = \"/\"),\n TRTSDTM = toupper(format(as.Date(TRTSDTM), \"%d%b%Y\")),\n ASTDTM = toupper(format(as.Date(ASTDTM), \"%d%b%Y\")),\n AENDTM = toupper(format(as.Date(AENDTM), \"%d%b%Y\"))\n ) %>%\n select(ID, ASR, TRT01A, MHBODSYS, MHDECOD, TRTSDTM, ASTDTM, ASTDY, AENDTM, AENDY, ATIREL)\n\nvar_labels(out) <- c(\n ID = \"Center/Patient ID\",\n ASR = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n MHBODSYS = \"SOC\",\n MHDECOD = \"Disease Term\",\n TRTSDTM = \"Date of First\\nStudy Drug\\nAdministration\",\n ASTDTM = \"Start Date\\nof Disease\",\n ASTDY = \"Start Day\\nof Disease\",\n AENDTM = \"End Date\\nof Disease\",\n AENDY = \"End Day\\nof Disease\",\n ATIREL = \"Time Relation\\nof Disease\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"ID\", \"ASR\", \"MHBODSYS\", \"MHDECOD\"),\n disp_cols = names(out),\n main_title = \"Listing of Medical History and Concurrent Diseases\"\n)\n\nhead(lsting, 20)\n\nListing of Medical History and Concurrent Diseases\n\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Date of First \n Study Drug Start Date Start Day End Date End Day Time Relation \nTreatment Center/Patient ID Age/Sex/Race SOC Disease Term Administration of Disease of Disease of Disease of Disease of Disease \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-134 47/M/WHITE cl A trm A_2/2 04NOV2020 21SEP2021 321 16FEB2022 469 PRIOR_CONCOMITANT\n 04NOV2020 02DEC2021 393 13JAN2022 435 PRIOR_CONCOMITANT\n cl B trm B_2/3 04NOV2020 15APR2021 162 04OCT2021 334 PRIOR_CONCOMITANT\n cl D trm D_2/3 04NOV2020 19MAY2021 196 31OCT2021 361 PRIOR_CONCOMITANT\n BRA-1/id-42 36/M/BLACK OR AFRICAN AMERICAN cl A trm A_2/2 01JAN2020 09JUN2020 160 22FEB2021 418 PRIOR_CONCOMITANT\n 01JAN2020 04APR2021 459 15OCT2021 653 PRIOR_CONCOMITANT\n 01JAN2020 20APR2021 475 10AUG2021 587 PRIOR_CONCOMITANT\n cl B trm B_1/3 01JAN2020 15APR2021 470 23AUG2021 600 PRIOR_CONCOMITANT\n 01JAN2020 03OCT2021 641 17OCT2021 655 PRIOR_CONCOMITANT\n trm B_3/3 01JAN2020 19OCT2020 292 07DEC2020 341 PRIOR_CONCOMITANT\n cl C trm C_1/2 01JAN2020 11MAY2021 496 19OCT2021 657 PRIOR_CONCOMITANT\n trm C_2/2 01JAN2020 09FEB2020 39 28JUN2021 544 PRIOR_CONCOMITANT\n 01JAN2020 05APR2020 95 04FEB2021 400 PRIOR_CONCOMITANT\n cl D trm D_1/3 01JAN2020 05MAR2020 64 24NOV2021 693 PRIOR_CONCOMITANT\n BRA-1/id-93 34/F/ASIAN cl A trm A_1/2 20JUN2020 03NOV2020 136 19JAN2021 213 PRIOR_CONCOMITANT\n cl B trm B_1/3 20JUN2020 25NOV2021 523 18DEC2021 546 PRIOR_CONCOMITANT\n trm B_3/3 20JUN2020 06FEB2022 596 15FEB2022 605 PRIOR_CONCOMITANT\n cl C trm C_1/2 20JUN2020 28MAR2021 281 11JUL2021 386 PRIOR_CONCOMITANT\n cl D trm D_1/3 20JUN2020 02MAY2021 316 06JAN2022 565 PRIOR_CONCOMITANT\n trm D_2/3 20JUN2020 03AUG2020 44 18SEP2020 90 PRIOR_CONCOMITANT\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:34:09 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 pkgconfig_2.0.3 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Medical History", @@ -983,7 +983,7 @@ "href": "listings/adverse-events/ael03.html", "title": "AEL03", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nout <- adae %>%\n filter(AESER == \"Y\") %>%\n mutate(\n CPID = paste(SITEID, SUBJID, sep = \"/\"),\n ASR = paste(AGE, SEX, RACE, sep = \"/\"),\n Date_First = toupper(format(as.Date(TRTSDTM), \"%d%b%Y\")),\n Duration = AENDY - ASTDY + 1,\n Related = ifelse(AEREL == \"Y\", \"Yes\", ifelse(AEREL == \"N\", \"No\", \"\")),\n Outcome = case_when(\n AEOUT == \"FATAL\" ~ 1,\n AEOUT == \"NOT RECOVERED/NOT RESOLVED\" ~ 2,\n AEOUT == \"RECOVERED/RESOLVED\" ~ 3,\n AEOUT == \"RECOVERED/RESOLVED WITH SEQUELAE\" ~ 4,\n AEOUT == \"RECOVERING/RESOLVING\" ~ 5,\n AEOUT == \"UNKNOWN\" ~ 6\n ),\n Treated = ifelse(AECONTRT == \"Y\", \"Yes\", ifelse(AECONTRT == \"N\", \"No\", \"\")),\n Action = case_when(\n AEACN == \"DOSE INCREASED\" ~ 1,\n AEACN == \"DOSE NOT CHANGED\" ~ 2,\n AEACN == \"DOSE REDUCED\" | AEACN == \"DOSE RATE REDUCED\" ~ 3,\n AEACN == \"DRUG INTERRUPTED\" ~ 4,\n AEACN == \"DRUG WITHDRAWN\" ~ 5,\n AEACN == \"NOT APPLICABLE\" | AEACN == \"NOT EVALUABLE\" ~ 6,\n AEACN == \"UNKNOWN\" ~ 7\n ),\n SERREAS = case_when(\n AESDTH == \"Y\" ~ \"1\",\n AESLIFE == \"Y\" ~ \"2\",\n AESHOSP == \"Y\" ~ \"3\",\n AESDISAB == \"Y\" ~ \"4\",\n AESCONG == \"Y\" ~ \"5\",\n AESMIE == \"Y\" ~ \"6\",\n TRUE ~ \" \"\n )\n ) %>%\n select(CPID, ASR, TRT01A, AEDECOD, Date_First, ASTDY, Duration, AESEV, Related, Outcome, Treated, Action, SERREAS)\n\nvar_labels(out) <- c(\n CPID = \"Center/Patient ID\",\n ASR = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n AEDECOD = \"Adverse\\nEvent MedDRA\\nPreferred Term\",\n Date_First = \"Date of\\nFirst Study\\nDrug\\nAdministration\",\n ASTDY = \"Study\\nDay of\\nOnset\",\n Duration = \"AE\\nDuration\\nin Days\",\n AESEV = \"Most\\nExtreme\\nIntensity\",\n Related = \"Caused by\\nStudy\\nDrug\",\n Outcome = \"Outcome\\n(1)\",\n Treated = \"Treatment\\nfor AE\",\n Action = \"Action\\nTaken\\n(2)\",\n SERREAS = \"Reason\\nClassified\\nas Serious\\n(3)\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"CPID\", \"ASR\"),\n disp_cols = names(out),\n main_title = \"Listing of Serious Adverse Events\",\n main_footer = \"\n(1) Outcome: 1 = fatal; 2 = not recovered/not resolved; 3 = recovered/resolved;\n 4 = recovered/resolved with sequelae; 5 = recovering/resolving; 6 = unknown.\n(2) Action taken with study drug: 1 = dose increased; 2 = dose not changed;\n 3 = dose reduced; 4 = drug interrupted; 5 = drug withdrawn; 6 = not applicable;\n 7 = unknown.\n(3) Reason classified as serious: 1 = resulted in death; 2 = life threatening;\n 3 = required prolonged in patient hospitalization; 4 = disabling;\n 5 = a congenital anomaly/birth defect in offspring of study subject;\n 6 = does not meet any of the above serious criteria, but may jeopardize the subject,\n and may require medical or surgical intervention to prevent one of the outcomes listed above.\n* Study day derived from imputed onset date.\n** Duration derived from imputed onset date and/or end date.\"\n)\n\nhead(lsting, 20)\n\nListing of Serious Adverse Events\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Date of Reason \n Adverse First Study Study AE Most Caused by Action Classified\n Event MedDRA Drug Day of Duration Extreme Study Outcome Treatment Taken as Serious\nTreatment Center/Patient ID Age/Sex/Race Preferred Term Administration Onset in Days Intensity Drug (1) for AE (2) (3) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-134 47/M/WHITE dcd A.1.1.1.2 04NOV2020 321 149 MODERATE No 5 Yes 2 4 \n dcd A.1.1.1.2 04NOV2020 393 43 MODERATE No 5 No 5 5 \n BRA-1/id-42 36/M/BLACK OR AFRICAN AMERICAN dcd D.1.1.1.1 01JAN2020 64 630 SEVERE Yes 1 No 6 1 \n dcd A.1.1.1.2 01JAN2020 160 259 MODERATE No 2 Yes 2 4 \n dcd B.2.2.3.1 01JAN2020 292 50 MILD No 3 No 2 4 \n dcd A.1.1.1.2 01JAN2020 459 195 MODERATE No 5 Yes 2 5 \n dcd B.1.1.1.1 01JAN2020 470 131 SEVERE Yes 1 No 6 1 \n dcd A.1.1.1.2 01JAN2020 475 113 MODERATE No 4 Yes 2 4 \n dcd B.1.1.1.1 01JAN2020 641 15 SEVERE Yes 1 Yes 6 1 \n BRA-1/id-93 34/F/ASIAN dcd D.1.1.1.1 20JUN2020 316 250 SEVERE Yes 1 No 6 1 \n dcd B.1.1.1.1 20JUN2020 523 24 SEVERE Yes 1 No 6 1 \n dcd B.2.2.3.1 20JUN2020 596 10 MILD No 3 Yes 2 4 \n BRA-11/id-345 37/F/WHITE dcd B.1.1.1.1 18AUG2020 1009 35 SEVERE Yes 1 No 6 1 \n BRA-11/id-397 38/M/ASIAN dcd D.1.1.1.1 27JUN2020 516 441 SEVERE Yes 1 No 6 1 \n dcd B.1.1.1.1 27JUN2020 1011 30 SEVERE Yes 1 Yes 6 1 \n BRA-11/id-50 26/M/BLACK OR AFRICAN AMERICAN dcd A.1.1.1.2 28APR2019 1007 68 MODERATE No 3 Yes 2 5 \n BRA-13/id-177 24/M/WHITE dcd B.1.1.1.1 30AUG2020 249 470 SEVERE Yes 1 No 6 1 \n dcd B.1.1.1.1 30AUG2020 1012 33 SEVERE Yes 1 No 6 1 \n BRA-15/id-36 38/F/ASIAN dcd B.1.1.1.1 08JAN2020 372 154 SEVERE Yes 1 Yes 6 1 \n dcd A.1.1.1.2 08JAN2020 573 134 MODERATE No 3 Yes 2 3 \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\n\n(1) Outcome: 1 = fatal; 2 = not recovered/not resolved; 3 = recovered/resolved;\n 4 = recovered/resolved with sequelae; 5 = recovering/resolving; 6 = unknown.\n(2) Action taken with study drug: 1 = dose increased; 2 = dose not changed;\n 3 = dose reduced; 4 = drug interrupted; 5 = drug withdrawn; 6 = not applicable;\n 7 = unknown.\n(3) Reason classified as serious: 1 = resulted in death; 2 = life threatening;\n 3 = required prolonged in patient hospitalization; 4 = disabling;\n 5 = a congenital anomaly/birth defect in offspring of study subject;\n 6 = does not meet any of the above serious criteria, but may jeopardize the subject,\n and may require medical or surgical intervention to prevent one of the outcomes listed above.\n* Study day derived from imputed onset date.\n** Duration derived from imputed onset date and/or end date.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:33:54 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nout <- adae %>%\n filter(AESER == \"Y\") %>%\n mutate(\n CPID = paste(SITEID, SUBJID, sep = \"/\"),\n ASR = paste(AGE, SEX, RACE, sep = \"/\"),\n Date_First = toupper(format(as.Date(TRTSDTM), \"%d%b%Y\")),\n Duration = AENDY - ASTDY + 1,\n Related = ifelse(AEREL == \"Y\", \"Yes\", ifelse(AEREL == \"N\", \"No\", \"\")),\n Outcome = case_when(\n AEOUT == \"FATAL\" ~ 1,\n AEOUT == \"NOT RECOVERED/NOT RESOLVED\" ~ 2,\n AEOUT == \"RECOVERED/RESOLVED\" ~ 3,\n AEOUT == \"RECOVERED/RESOLVED WITH SEQUELAE\" ~ 4,\n AEOUT == \"RECOVERING/RESOLVING\" ~ 5,\n AEOUT == \"UNKNOWN\" ~ 6\n ),\n Treated = ifelse(AECONTRT == \"Y\", \"Yes\", ifelse(AECONTRT == \"N\", \"No\", \"\")),\n Action = case_when(\n AEACN == \"DOSE INCREASED\" ~ 1,\n AEACN == \"DOSE NOT CHANGED\" ~ 2,\n AEACN == \"DOSE REDUCED\" | AEACN == \"DOSE RATE REDUCED\" ~ 3,\n AEACN == \"DRUG INTERRUPTED\" ~ 4,\n AEACN == \"DRUG WITHDRAWN\" ~ 5,\n AEACN == \"NOT APPLICABLE\" | AEACN == \"NOT EVALUABLE\" ~ 6,\n AEACN == \"UNKNOWN\" ~ 7\n ),\n SERREAS = case_when(\n AESDTH == \"Y\" ~ \"1\",\n AESLIFE == \"Y\" ~ \"2\",\n AESHOSP == \"Y\" ~ \"3\",\n AESDISAB == \"Y\" ~ \"4\",\n AESCONG == \"Y\" ~ \"5\",\n AESMIE == \"Y\" ~ \"6\",\n TRUE ~ \" \"\n )\n ) %>%\n select(CPID, ASR, TRT01A, AEDECOD, Date_First, ASTDY, Duration, AESEV, Related, Outcome, Treated, Action, SERREAS)\n\nvar_labels(out) <- c(\n CPID = \"Center/Patient ID\",\n ASR = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n AEDECOD = \"Adverse\\nEvent MedDRA\\nPreferred Term\",\n Date_First = \"Date of\\nFirst Study\\nDrug\\nAdministration\",\n ASTDY = \"Study\\nDay of\\nOnset\",\n Duration = \"AE\\nDuration\\nin Days\",\n AESEV = \"Most\\nExtreme\\nIntensity\",\n Related = \"Caused by\\nStudy\\nDrug\",\n Outcome = \"Outcome\\n(1)\",\n Treated = \"Treatment\\nfor AE\",\n Action = \"Action\\nTaken\\n(2)\",\n SERREAS = \"Reason\\nClassified\\nas Serious\\n(3)\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"CPID\", \"ASR\"),\n disp_cols = names(out),\n main_title = \"Listing of Serious Adverse Events\",\n main_footer = \"\n(1) Outcome: 1 = fatal; 2 = not recovered/not resolved; 3 = recovered/resolved;\n 4 = recovered/resolved with sequelae; 5 = recovering/resolving; 6 = unknown.\n(2) Action taken with study drug: 1 = dose increased; 2 = dose not changed;\n 3 = dose reduced; 4 = drug interrupted; 5 = drug withdrawn; 6 = not applicable;\n 7 = unknown.\n(3) Reason classified as serious: 1 = resulted in death; 2 = life threatening;\n 3 = required prolonged in patient hospitalization; 4 = disabling;\n 5 = a congenital anomaly/birth defect in offspring of study subject;\n 6 = does not meet any of the above serious criteria, but may jeopardize the subject,\n and may require medical or surgical intervention to prevent one of the outcomes listed above.\n* Study day derived from imputed onset date.\n** Duration derived from imputed onset date and/or end date.\"\n)\n\nhead(lsting, 20)\n\nListing of Serious Adverse Events\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Date of Reason \n Adverse First Study Study AE Most Caused by Action Classified\n Event MedDRA Drug Day of Duration Extreme Study Outcome Treatment Taken as Serious\nTreatment Center/Patient ID Age/Sex/Race Preferred Term Administration Onset in Days Intensity Drug (1) for AE (2) (3) \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-134 47/M/WHITE dcd A.1.1.1.2 04NOV2020 321 149 MODERATE No 5 Yes 2 4 \n dcd A.1.1.1.2 04NOV2020 393 43 MODERATE No 5 No 5 5 \n BRA-1/id-42 36/M/BLACK OR AFRICAN AMERICAN dcd D.1.1.1.1 01JAN2020 64 630 SEVERE Yes 1 No 6 1 \n dcd A.1.1.1.2 01JAN2020 160 259 MODERATE No 2 Yes 2 4 \n dcd B.2.2.3.1 01JAN2020 292 50 MILD No 3 No 2 4 \n dcd A.1.1.1.2 01JAN2020 459 195 MODERATE No 5 Yes 2 5 \n dcd B.1.1.1.1 01JAN2020 470 131 SEVERE Yes 1 No 6 1 \n dcd A.1.1.1.2 01JAN2020 475 113 MODERATE No 4 Yes 2 4 \n dcd B.1.1.1.1 01JAN2020 641 15 SEVERE Yes 1 Yes 6 1 \n BRA-1/id-93 34/F/ASIAN dcd D.1.1.1.1 20JUN2020 316 250 SEVERE Yes 1 No 6 1 \n dcd B.1.1.1.1 20JUN2020 523 24 SEVERE Yes 1 No 6 1 \n dcd B.2.2.3.1 20JUN2020 596 10 MILD No 3 Yes 2 4 \n BRA-11/id-345 37/F/WHITE dcd B.1.1.1.1 18AUG2020 1009 35 SEVERE Yes 1 No 6 1 \n BRA-11/id-397 38/M/ASIAN dcd D.1.1.1.1 27JUN2020 516 441 SEVERE Yes 1 No 6 1 \n dcd B.1.1.1.1 27JUN2020 1011 30 SEVERE Yes 1 Yes 6 1 \n BRA-11/id-50 26/M/BLACK OR AFRICAN AMERICAN dcd A.1.1.1.2 28APR2019 1007 68 MODERATE No 3 Yes 2 5 \n BRA-13/id-177 24/M/WHITE dcd B.1.1.1.1 30AUG2020 249 470 SEVERE Yes 1 No 6 1 \n dcd B.1.1.1.1 30AUG2020 1012 33 SEVERE Yes 1 No 6 1 \n BRA-15/id-36 38/F/ASIAN dcd B.1.1.1.1 08JAN2020 372 154 SEVERE Yes 1 Yes 6 1 \n dcd A.1.1.1.2 08JAN2020 573 134 MODERATE No 3 Yes 2 3 \n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\n\n(1) Outcome: 1 = fatal; 2 = not recovered/not resolved; 3 = recovered/resolved;\n 4 = recovered/resolved with sequelae; 5 = recovering/resolving; 6 = unknown.\n(2) Action taken with study drug: 1 = dose increased; 2 = dose not changed;\n 3 = dose reduced; 4 = drug interrupted; 5 = drug withdrawn; 6 = not applicable;\n 7 = unknown.\n(3) Reason classified as serious: 1 = resulted in death; 2 = life threatening;\n 3 = required prolonged in patient hospitalization; 4 = disabling;\n 5 = a congenital anomaly/birth defect in offspring of study subject;\n 6 = does not meet any of the above serious criteria, but may jeopardize the subject,\n and may require medical or surgical intervention to prevent one of the outcomes listed above.\n* Study day derived from imputed onset date.\n** Duration derived from imputed onset date and/or end date.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:34:16 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Adverse Events", @@ -995,7 +995,7 @@ "href": "listings/adverse-events/ael02.html", "title": "AEL02", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nout <- adae %>%\n mutate(\n CPID = paste(SITEID, SUBJID, sep = \"/\"),\n ASR = paste(AGE, SEX, RACE, sep = \"/\"),\n Date_First = toupper(format(as.Date(TRTSDTM), \"%d%b%Y\")),\n Duration = AENDY - ASTDY + 1,\n Serious = ifelse(AESER == \"Y\", \"Yes\", ifelse(AESER == \"N\", \"No\", \"\")),\n Related = ifelse(AEREL == \"Y\", \"Yes\", ifelse(AEREL == \"N\", \"No\", \"\")),\n Outcome = case_when(\n AEOUT == \"FATAL\" ~ 1,\n AEOUT == \"NOT RECOVERED/NOT RESOLVED\" ~ 2,\n AEOUT == \"RECOVERED/RESOLVED\" ~ 3,\n AEOUT == \"RECOVERED/RESOLVED WITH SEQUELAE\" ~ 4,\n AEOUT == \"RECOVERING/RESOLVING\" ~ 5,\n AEOUT == \"UNKNOWN\" ~ 6\n ),\n Treated = ifelse(AECONTRT == \"Y\", \"Yes\", ifelse(AECONTRT == \"N\", \"No\", \"\")),\n Action = case_when(\n AEACN == \"DOSE INCREASED\" ~ 1,\n AEACN == \"DOSE NOT CHANGED\" ~ 2,\n AEACN == \"DOSE REDUCED\" | AEACN == \"DOSE RATE REDUCED\" ~ 3,\n AEACN == \"DRUG INTERRUPTED\" ~ 4,\n AEACN == \"DRUG WITHDRAWN\" ~ 5,\n AEACN == \"NOT APPLICABLE\" | AEACN == \"NOT EVALUABLE\" ~ 6,\n AEACN == \"UNKNOWN\" ~ 7\n )\n ) %>%\n select(CPID, ASR, TRT01A, AEDECOD, Date_First, ASTDY, Duration, Serious, AESEV, Related, Outcome, Treated, Action)\n\nvar_labels(out) <- c(\n CPID = \"Center/Patient ID\",\n ASR = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n AEDECOD = \"Adverse\\nEvent MedDRA\\nPreferred Term\",\n Date_First = \"Date of\\nFirst Study\\nDrug\\nAdministration\",\n ASTDY = \"Study\\nDay of\\nOnset\",\n Duration = \"AE\\nDuration\\nin Days\",\n Serious = \"Serious\",\n AESEV = \"Most\\nExtreme\\nIntensity\",\n Related = \"Caused by\\nStudy\\nDrug\",\n Outcome = \"Outcome\\n(1)\",\n Treated = \"Treatment\\nfor AE\",\n Action = \"Action\\nTaken\\n(2)\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"CPID\", \"ASR\"),\n disp_cols = names(out),\n main_title = \"Listing of Adverse Events\",\n main_footer = \"\n(1) Outcome: 1 = fatal; 2 = not recovered/not resolved; 3 = recovered/resolved;\n 4 = recovered/resolved with sequelae; 5 = recovering/resolving; 6 = unknown.\n(2) Action taken with study drug: 1 = dose increased; 2 = dose not changed;\n 3 = dose reduced; 4 = drug interrupted; 5 = drug withdrawn; 6 = not applicable;\n 7 = unknown.\n* Study day derived from imputed onset date.\n** Duration derived from imputed onset date and/or end date.\"\n)\n\nhead(lsting, 20)\n\nListing of Adverse Events\n\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Date of \n Adverse First Study Study AE Most Caused by Action\n Event MedDRA Drug Day of Duration Extreme Study Outcome Treatment Taken \nTreatment Center/Patient ID Age/Sex/Race Preferred Term Administration Onset in Days Serious Intensity Drug (1) for AE (2) \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-134 47/M/WHITE dcd B.2.1.2.1 04NOV2020 162 173 No MODERATE No 5 Yes 2 \n dcd D.1.1.4.2 04NOV2020 196 166 No MODERATE No 5 No 2 \n dcd A.1.1.1.2 04NOV2020 321 149 Yes MODERATE No 5 Yes 2 \n dcd A.1.1.1.2 04NOV2020 393 43 Yes MODERATE No 5 No 5 \n BRA-1/id-42 36/M/BLACK OR AFRICAN AMERICAN dcd C.2.1.2.1 01JAN2020 39 506 No MODERATE Yes 2 No 6 \n dcd D.1.1.1.1 01JAN2020 64 630 Yes SEVERE Yes 1 No 6 \n dcd C.2.1.2.1 01JAN2020 95 306 No MODERATE Yes 5 No 2 \n dcd A.1.1.1.2 01JAN2020 160 259 Yes MODERATE No 2 Yes 2 \n dcd B.2.2.3.1 01JAN2020 292 50 Yes MILD No 3 No 2 \n dcd A.1.1.1.2 01JAN2020 459 195 Yes MODERATE No 5 Yes 2 \n dcd B.1.1.1.1 01JAN2020 470 131 Yes SEVERE Yes 1 No 6 \n dcd A.1.1.1.2 01JAN2020 475 113 Yes MODERATE No 4 Yes 2 \n dcd C.1.1.1.3 01JAN2020 496 162 No SEVERE Yes 5 Yes 2 \n dcd B.1.1.1.1 01JAN2020 641 15 Yes SEVERE Yes 1 Yes 6 \n BRA-1/id-93 34/F/ASIAN dcd D.1.1.4.2 20JUN2020 44 47 No MODERATE No 5 Yes 2 \n dcd D.2.1.5.3 20JUN2020 79 300 No MILD Yes 5 No 3 \n dcd A.1.1.1.1 20JUN2020 136 78 No MILD No 3 Yes 2 \n dcd D.2.1.5.3 20JUN2020 260 305 No MILD Yes 5 No 2 \n dcd C.1.1.1.3 20JUN2020 281 106 No SEVERE Yes 5 Yes 2 \n dcd D.1.1.1.1 20JUN2020 316 250 Yes SEVERE Yes 1 No 6 \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\n\n(1) Outcome: 1 = fatal; 2 = not recovered/not resolved; 3 = recovered/resolved;\n 4 = recovered/resolved with sequelae; 5 = recovering/resolving; 6 = unknown.\n(2) Action taken with study drug: 1 = dose increased; 2 = dose not changed;\n 3 = dose reduced; 4 = drug interrupted; 5 = drug withdrawn; 6 = not applicable;\n 7 = unknown.\n* Study day derived from imputed onset date.\n** Duration derived from imputed onset date and/or end date.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:01 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 pkgconfig_2.0.3 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nout <- adae %>%\n mutate(\n CPID = paste(SITEID, SUBJID, sep = \"/\"),\n ASR = paste(AGE, SEX, RACE, sep = \"/\"),\n Date_First = toupper(format(as.Date(TRTSDTM), \"%d%b%Y\")),\n Duration = AENDY - ASTDY + 1,\n Serious = ifelse(AESER == \"Y\", \"Yes\", ifelse(AESER == \"N\", \"No\", \"\")),\n Related = ifelse(AEREL == \"Y\", \"Yes\", ifelse(AEREL == \"N\", \"No\", \"\")),\n Outcome = case_when(\n AEOUT == \"FATAL\" ~ 1,\n AEOUT == \"NOT RECOVERED/NOT RESOLVED\" ~ 2,\n AEOUT == \"RECOVERED/RESOLVED\" ~ 3,\n AEOUT == \"RECOVERED/RESOLVED WITH SEQUELAE\" ~ 4,\n AEOUT == \"RECOVERING/RESOLVING\" ~ 5,\n AEOUT == \"UNKNOWN\" ~ 6\n ),\n Treated = ifelse(AECONTRT == \"Y\", \"Yes\", ifelse(AECONTRT == \"N\", \"No\", \"\")),\n Action = case_when(\n AEACN == \"DOSE INCREASED\" ~ 1,\n AEACN == \"DOSE NOT CHANGED\" ~ 2,\n AEACN == \"DOSE REDUCED\" | AEACN == \"DOSE RATE REDUCED\" ~ 3,\n AEACN == \"DRUG INTERRUPTED\" ~ 4,\n AEACN == \"DRUG WITHDRAWN\" ~ 5,\n AEACN == \"NOT APPLICABLE\" | AEACN == \"NOT EVALUABLE\" ~ 6,\n AEACN == \"UNKNOWN\" ~ 7\n )\n ) %>%\n select(CPID, ASR, TRT01A, AEDECOD, Date_First, ASTDY, Duration, Serious, AESEV, Related, Outcome, Treated, Action)\n\nvar_labels(out) <- c(\n CPID = \"Center/Patient ID\",\n ASR = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n AEDECOD = \"Adverse\\nEvent MedDRA\\nPreferred Term\",\n Date_First = \"Date of\\nFirst Study\\nDrug\\nAdministration\",\n ASTDY = \"Study\\nDay of\\nOnset\",\n Duration = \"AE\\nDuration\\nin Days\",\n Serious = \"Serious\",\n AESEV = \"Most\\nExtreme\\nIntensity\",\n Related = \"Caused by\\nStudy\\nDrug\",\n Outcome = \"Outcome\\n(1)\",\n Treated = \"Treatment\\nfor AE\",\n Action = \"Action\\nTaken\\n(2)\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"CPID\", \"ASR\"),\n disp_cols = names(out),\n main_title = \"Listing of Adverse Events\",\n main_footer = \"\n(1) Outcome: 1 = fatal; 2 = not recovered/not resolved; 3 = recovered/resolved;\n 4 = recovered/resolved with sequelae; 5 = recovering/resolving; 6 = unknown.\n(2) Action taken with study drug: 1 = dose increased; 2 = dose not changed;\n 3 = dose reduced; 4 = drug interrupted; 5 = drug withdrawn; 6 = not applicable;\n 7 = unknown.\n* Study day derived from imputed onset date.\n** Duration derived from imputed onset date and/or end date.\"\n)\n\nhead(lsting, 20)\n\nListing of Adverse Events\n\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Date of \n Adverse First Study Study AE Most Caused by Action\n Event MedDRA Drug Day of Duration Extreme Study Outcome Treatment Taken \nTreatment Center/Patient ID Age/Sex/Race Preferred Term Administration Onset in Days Serious Intensity Drug (1) for AE (2) \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-134 47/M/WHITE dcd B.2.1.2.1 04NOV2020 162 173 No MODERATE No 5 Yes 2 \n dcd D.1.1.4.2 04NOV2020 196 166 No MODERATE No 5 No 2 \n dcd A.1.1.1.2 04NOV2020 321 149 Yes MODERATE No 5 Yes 2 \n dcd A.1.1.1.2 04NOV2020 393 43 Yes MODERATE No 5 No 5 \n BRA-1/id-42 36/M/BLACK OR AFRICAN AMERICAN dcd C.2.1.2.1 01JAN2020 39 506 No MODERATE Yes 2 No 6 \n dcd D.1.1.1.1 01JAN2020 64 630 Yes SEVERE Yes 1 No 6 \n dcd C.2.1.2.1 01JAN2020 95 306 No MODERATE Yes 5 No 2 \n dcd A.1.1.1.2 01JAN2020 160 259 Yes MODERATE No 2 Yes 2 \n dcd B.2.2.3.1 01JAN2020 292 50 Yes MILD No 3 No 2 \n dcd A.1.1.1.2 01JAN2020 459 195 Yes MODERATE No 5 Yes 2 \n dcd B.1.1.1.1 01JAN2020 470 131 Yes SEVERE Yes 1 No 6 \n dcd A.1.1.1.2 01JAN2020 475 113 Yes MODERATE No 4 Yes 2 \n dcd C.1.1.1.3 01JAN2020 496 162 No SEVERE Yes 5 Yes 2 \n dcd B.1.1.1.1 01JAN2020 641 15 Yes SEVERE Yes 1 Yes 6 \n BRA-1/id-93 34/F/ASIAN dcd D.1.1.4.2 20JUN2020 44 47 No MODERATE No 5 Yes 2 \n dcd D.2.1.5.3 20JUN2020 79 300 No MILD Yes 5 No 3 \n dcd A.1.1.1.1 20JUN2020 136 78 No MILD No 3 Yes 2 \n dcd D.2.1.5.3 20JUN2020 260 305 No MILD Yes 5 No 2 \n dcd C.1.1.1.3 20JUN2020 281 106 No SEVERE Yes 5 Yes 2 \n dcd D.1.1.1.1 20JUN2020 316 250 Yes SEVERE Yes 1 No 6 \n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\n\n(1) Outcome: 1 = fatal; 2 = not recovered/not resolved; 3 = recovered/resolved;\n 4 = recovered/resolved with sequelae; 5 = recovering/resolving; 6 = unknown.\n(2) Action taken with study drug: 1 = dose increased; 2 = dose not changed;\n 3 = dose reduced; 4 = drug interrupted; 5 = drug withdrawn; 6 = not applicable;\n 7 = unknown.\n* Study day derived from imputed onset date.\n** Duration derived from imputed onset date and/or end date.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:34:23 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 pkgconfig_2.0.3 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Adverse Events", @@ -1007,7 +1007,7 @@ "href": "listings/adverse-events/ael01.html", "title": "AEL01", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nout <- adae %>%\n select(AESOC, AEDECOD, AELLT, AETERM) %>%\n unique()\n\nvar_labels(out) <- c(\n AESOC = \"MedDRA System Organ Class\",\n AEDECOD = \"MedDRA Preferred Term\",\n AELLT = \"MedDRA Lowest Level Term\",\n AETERM = \"Investigator-Specified\\nAdverse Event Term\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"AESOC\", \"AEDECOD\", \"AELLT\"),\n disp_cols = names(out),\n main_title = \"Listing of Preferred Terms, Lowest Level Terms, and Investigator-Specified Adverse Event Terms\"\n)\n\nhead(lsting, 20)\n\nListing of Preferred Terms, Lowest Level Terms, and Investigator-Specified Adverse Event Terms\n\n—————————————————————————————————————————————————————————————————————————————————————————————————————\n Investigator-Specified\nMedDRA System Organ Class MedDRA Preferred Term MedDRA Lowest Level Term Adverse Event Term \n—————————————————————————————————————————————————————————————————————————————————————————————————————\n cl A dcd A.1.1.1.1 llt A.1.1.1.1 trm A.1.1.1.1 \n dcd A.1.1.1.2 llt A.1.1.1.2 trm A.1.1.1.2 \n cl B dcd B.1.1.1.1 llt B.1.1.1.1 trm B.1.1.1.1 \n dcd B.2.1.2.1 llt B.2.1.2.1 trm B.2.1.2.1 \n dcd B.2.2.3.1 llt B.2.2.3.1 trm B.2.2.3.1 \n cl C dcd C.1.1.1.3 llt C.1.1.1.3 trm C.1.1.1.3 \n dcd C.2.1.2.1 llt C.2.1.2.1 trm C.2.1.2.1 \n cl D dcd D.1.1.1.1 llt D.1.1.1.1 trm D.1.1.1.1 \n dcd D.1.1.4.2 llt D.1.1.4.2 trm D.1.1.4.2 \n dcd D.2.1.5.3 llt D.2.1.5.3 trm D.2.1.5.3 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:08 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\nout <- adae %>%\n select(AESOC, AEDECOD, AELLT, AETERM) %>%\n unique()\n\nvar_labels(out) <- c(\n AESOC = \"MedDRA System Organ Class\",\n AEDECOD = \"MedDRA Preferred Term\",\n AELLT = \"MedDRA Lowest Level Term\",\n AETERM = \"Investigator-Specified\\nAdverse Event Term\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"AESOC\", \"AEDECOD\", \"AELLT\"),\n disp_cols = names(out),\n main_title = \"Listing of Preferred Terms, Lowest Level Terms, and Investigator-Specified Adverse Event Terms\"\n)\n\nhead(lsting, 20)\n\nListing of Preferred Terms, Lowest Level Terms, and Investigator-Specified Adverse Event Terms\n\n—————————————————————————————————————————————————————————————————————————————————————————————————————\n Investigator-Specified\nMedDRA System Organ Class MedDRA Preferred Term MedDRA Lowest Level Term Adverse Event Term \n—————————————————————————————————————————————————————————————————————————————————————————————————————\n cl A dcd A.1.1.1.1 llt A.1.1.1.1 trm A.1.1.1.1 \n dcd A.1.1.1.2 llt A.1.1.1.2 trm A.1.1.1.2 \n cl B dcd B.1.1.1.1 llt B.1.1.1.1 trm B.1.1.1.1 \n dcd B.2.1.2.1 llt B.2.1.2.1 trm B.2.1.2.1 \n dcd B.2.2.3.1 llt B.2.2.3.1 trm B.2.2.3.1 \n cl C dcd C.1.1.1.3 llt C.1.1.1.3 trm C.1.1.1.3 \n dcd C.2.1.2.1 llt C.2.1.2.1 trm C.2.1.2.1 \n cl D dcd D.1.1.1.1 llt D.1.1.1.1 trm D.1.1.1.1 \n dcd D.1.1.4.2 llt D.1.1.4.2 trm D.1.1.4.2 \n dcd D.2.1.5.3 llt D.2.1.5.3 trm D.2.1.5.3 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:34:31 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Adverse Events", @@ -1019,7 +1019,7 @@ "href": "listings/disposition/dsl01.html", "title": "DSL01", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\nout <- adsl %>%\n filter(AEWITHFL == \"Y\") %>%\n mutate(\n ID = paste(SITEID, SUBJID, sep = \"/\"),\n ASR = paste(AGE, SEX, RACE, sep = \"/\"),\n SSADM = toupper(format(as.Date(TRTSDTM), format = \"%d%b%Y\")),\n STDWD = as.numeric(ceiling(difftime(TRTEDTM, TRTSDTM, units = \"days\"))),\n DISCONT = ifelse(!is.na(DCSREAS) & toupper(EOSSTT) == \"DISCONTINUED\", \"Yes\", \"No\")\n ) %>%\n select(ID, ASR, TRT01A, SSADM, STDWD, DISCONT)\n\nvar_labels(out) <- c(\n ID = \"Center/Patient ID\",\n ASR = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n SSADM = \"Date of First\\nStudy Drug\\nAdministration\",\n STDWD = \"Study Day\\nof Withdrawal\",\n DISCONT = \"Discontinued\\nEarly from Study?\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = \"TRT01A\",\n disp_cols = names(out),\n main_title = \"Listing of Patients with Study Drug Withdrawn Due to Adverse Events\"\n)\n\nhead(lsting, 20)\n\nListing of Patients with Study Drug Withdrawn Due to Adverse Events\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Date of First \n Study Drug Study Day Discontinued \n Treatment Center/Patient ID Age/Sex/Race Administration of Withdrawal Early from Study?\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X RUS-18/id-359 47/F/BLACK OR AFRICAN AMERICAN 08JUN2019 1096 No \n BRA-1/id-42 36/M/BLACK OR AFRICAN AMERICAN 01JAN2020 NA No \n CHN-11/id-256 23/M/ASIAN 17MAR2020 1096 No \n CHN-1/id-26 29/M/WHITE 16JUL2020 1096 No \n CHN-1/id-62 36/F/WHITE 22NOV2020 455 Yes \n B: Placebo CHN-7/id-28 40/M/AMERICAN INDIAN OR ALASKA NATIVE 11MAR2019 1096 No \n CHN-13/id-102 37/M/ASIAN 23MAR2019 1096 No \n CHN-3/id-333 30/F/BLACK OR AFRICAN AMERICAN 13JAN2020 NA No \n USA-12/id-226 30/M/WHITE 29JAN2020 NA No \n CHN-9/id-147 26/F/ASIAN 06FEB2020 NA No \n USA-11/id-157 50/M/WHITE 14JUN2020 1096 No \n CHN-9/id-11 28/F/NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 27JAN2021 388 Yes \nC: Combination CHN-15/id-262 35/M/BLACK OR AFRICAN AMERICAN 26FEB2019 1096 No \n NGA-11/id-173 24/F/BLACK OR AFRICAN AMERICAN 10MAR2019 1096 No \n CHN-11/id-263 34/F/ASIAN 03APR2019 1096 No \n PAK-2/id-191 38/F/AMERICAN INDIAN OR ALASKA NATIVE 07APR2019 1096 No \n USA-11/id-136 38/F/ASIAN 02OCT2019 865 Yes \n CHN-17/id-31 35/F/ASIAN 17NOV2019 NA No \n BRA-11/id-237 64/F/ASIAN 10MAR2020 1096 No \n USA-11/id-100 40/F/ASIAN 10MAR2020 705 Yes \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:15 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\nout <- adsl %>%\n filter(AEWITHFL == \"Y\") %>%\n mutate(\n ID = paste(SITEID, SUBJID, sep = \"/\"),\n ASR = paste(AGE, SEX, RACE, sep = \"/\"),\n SSADM = toupper(format(as.Date(TRTSDTM), format = \"%d%b%Y\")),\n STDWD = as.numeric(ceiling(difftime(TRTEDTM, TRTSDTM, units = \"days\"))),\n DISCONT = ifelse(!is.na(DCSREAS) & toupper(EOSSTT) == \"DISCONTINUED\", \"Yes\", \"No\")\n ) %>%\n select(ID, ASR, TRT01A, SSADM, STDWD, DISCONT)\n\nvar_labels(out) <- c(\n ID = \"Center/Patient ID\",\n ASR = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n SSADM = \"Date of First\\nStudy Drug\\nAdministration\",\n STDWD = \"Study Day\\nof Withdrawal\",\n DISCONT = \"Discontinued\\nEarly from Study?\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = \"TRT01A\",\n disp_cols = names(out),\n main_title = \"Listing of Patients with Study Drug Withdrawn Due to Adverse Events\"\n)\n\nhead(lsting, 20)\n\nListing of Patients with Study Drug Withdrawn Due to Adverse Events\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Date of First \n Study Drug Study Day Discontinued \n Treatment Center/Patient ID Age/Sex/Race Administration of Withdrawal Early from Study?\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X RUS-18/id-359 47/F/BLACK OR AFRICAN AMERICAN 08JUN2019 1096 No \n BRA-1/id-42 36/M/BLACK OR AFRICAN AMERICAN 01JAN2020 NA No \n CHN-11/id-256 23/M/ASIAN 17MAR2020 1096 No \n CHN-1/id-26 29/M/WHITE 16JUL2020 1096 No \n CHN-1/id-62 36/F/WHITE 22NOV2020 455 Yes \n B: Placebo CHN-7/id-28 40/M/AMERICAN INDIAN OR ALASKA NATIVE 11MAR2019 1096 No \n CHN-13/id-102 37/M/ASIAN 23MAR2019 1096 No \n CHN-3/id-333 30/F/BLACK OR AFRICAN AMERICAN 13JAN2020 NA No \n USA-12/id-226 30/M/WHITE 29JAN2020 NA No \n CHN-9/id-147 26/F/ASIAN 06FEB2020 NA No \n USA-11/id-157 50/M/WHITE 14JUN2020 1096 No \n CHN-9/id-11 28/F/NATIVE HAWAIIAN OR OTHER PACIFIC ISLANDER 27JAN2021 388 Yes \nC: Combination CHN-15/id-262 35/M/BLACK OR AFRICAN AMERICAN 26FEB2019 1096 No \n NGA-11/id-173 24/F/BLACK OR AFRICAN AMERICAN 10MAR2019 1096 No \n CHN-11/id-263 34/F/ASIAN 03APR2019 1096 No \n PAK-2/id-191 38/F/AMERICAN INDIAN OR ALASKA NATIVE 07APR2019 1096 No \n USA-11/id-136 38/F/ASIAN 02OCT2019 865 Yes \n CHN-17/id-31 35/F/ASIAN 17NOV2019 NA No \n BRA-11/id-237 64/F/ASIAN 10MAR2020 1096 No \n USA-11/id-100 40/F/ASIAN 10MAR2020 705 Yes \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:34:38 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Disposition", @@ -1031,7 +1031,7 @@ "href": "listings/pharmacokinetic/pkpl01.html", "title": "PKPL01", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(rlistings)\nlibrary(scda)\n\ndrug_a <- \"Plasma Drug X\"\nspec <- \"Plasma\"\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\nadpp_x <- adpp %>% filter(\n PPCAT == drug_a,\n PPSPEC == spec\n)\n\nout <- adpp_x %>%\n mutate(PARAM = paste0(PARAM, \" (\", AVALU, \")\")) %>%\n select(TRT01A, USUBJID, AVISIT, PARAM, AVAL) %>%\n tidyr::pivot_wider(\n id_cols = c(TRT01A, USUBJID, AVISIT),\n names_from = PARAM,\n values_from = AVAL\n )\n\nvar_labels(out) <- names(out)\nout <- out %>% var_relabel(\n TRT01A = \"Treatment Group\",\n USUBJID = \"Subject ID\",\n AVISIT = \"Visit\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"USUBJID\", \"AVISIT\"),\n disp_cols = names(out),\n main_title = paste(\"Listing of\", drug_a, spec, \"PK Parameters, PK Population\\nProtocol: xxnnnnn\"),\n subtitles = paste(\"Analyte:\", drug_a)\n)\n\nhead(lsting, 20)\n\nListing of Plasma Drug X Plasma PK Parameters, PK Population\nProtocol: xxnnnnn\nAnalyte: Plasma Drug X\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Group Subject ID Visit AUC Infinity Obs (day*ug/mL) Max Conc (ug/mL) Total CL Obs (ml/day/kg)\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X AB12345-BRA-1-id-105 SCREENING 145.191684898102 35.5067335878638 5.1567601025515 \n CYCLE 1 DAY 1 246.349321001289 31.2264481880236 4.41386730113941 \n CYCLE 1 DAY 2 225.443483077171 43.4987268488453 4.81490455551286 \n AB12345-BRA-1-id-134 SCREENING 157.461703380688 32.1171292884992 6.0374125711965 \n CYCLE 1 DAY 1 248.519038520728 21.7795763901966 4.561839813278 \n CYCLE 1 DAY 2 230.794839837734 21.0627132276049 6.95200595313275 \n AB12345-BRA-1-id-42 SCREENING 194.224015921831 20.4565798423567 6.33709739029277 \n CYCLE 1 DAY 1 210.528307366678 26.7845825535397 3.50776680376268 \n CYCLE 1 DAY 2 167.592869235882 34.8276545020143 4.11969088323673 \n AB12345-BRA-1-id-93 SCREENING 186.75868084484 27.3983170052516 3.40495133575408 \n CYCLE 1 DAY 1 160.406798051843 17.5296885232566 3.8508725098954 \n CYCLE 1 DAY 2 252.04512291352 32.4903879259459 6.21586252565961 \n AB12345-BRA-11-id-217 SCREENING 215.367414313054 20.8879942219526 6.55883385955605 \n CYCLE 1 DAY 1 272.094354596647 34.2812274648873 5.04441608634882 \n CYCLE 1 DAY 2 174.183265394136 23.04243406023 4.07416508597243 \n AB12345-BRA-11-id-345 SCREENING 235.746948097021 26.5740342881269 5.52059967823211 \n CYCLE 1 DAY 1 228.51025073098 39.7523164840323 6.32996327499752 \n CYCLE 1 DAY 2 120.712762389698 24.37143486359 5.02620823564574 \n AB12345-BRA-11-id-397 SCREENING 165.925716319045 21.8770819414152 6.3713157196375 \n CYCLE 1 DAY 1 201.536920713046 36.5841424116449 4.32440907316618 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:22 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 rlistings_0.2.7.9013 tibble_3.2.1 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(rlistings)\nlibrary(scda)\n\ndrug_a <- \"Plasma Drug X\"\nspec <- \"Plasma\"\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\nadpp_x <- adpp %>% filter(\n PPCAT == drug_a,\n PPSPEC == spec\n)\n\nout <- adpp_x %>%\n mutate(PARAM = paste0(PARAM, \" (\", AVALU, \")\")) %>%\n select(TRT01A, USUBJID, AVISIT, PARAM, AVAL) %>%\n tidyr::pivot_wider(\n id_cols = c(TRT01A, USUBJID, AVISIT),\n names_from = PARAM,\n values_from = AVAL\n )\n\nvar_labels(out) <- names(out)\nout <- out %>% var_relabel(\n TRT01A = \"Treatment Group\",\n USUBJID = \"Subject ID\",\n AVISIT = \"Visit\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"USUBJID\", \"AVISIT\"),\n disp_cols = names(out),\n main_title = paste(\"Listing of\", drug_a, spec, \"PK Parameters, PK Population\\nProtocol: xxnnnnn\"),\n subtitles = paste(\"Analyte:\", drug_a)\n)\n\nhead(lsting, 20)\n\nListing of Plasma Drug X Plasma PK Parameters, PK Population\nProtocol: xxnnnnn\nAnalyte: Plasma Drug X\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Group Subject ID Visit AUC Infinity Obs (day*ug/mL) Max Conc (ug/mL) Total CL Obs (ml/day/kg)\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X AB12345-BRA-1-id-105 SCREENING 145.191684898102 35.5067335878638 5.1567601025515 \n CYCLE 1 DAY 1 246.349321001289 31.2264481880236 4.41386730113941 \n CYCLE 1 DAY 2 225.443483077171 43.4987268488453 4.81490455551286 \n AB12345-BRA-1-id-134 SCREENING 157.461703380688 32.1171292884992 6.0374125711965 \n CYCLE 1 DAY 1 248.519038520728 21.7795763901966 4.561839813278 \n CYCLE 1 DAY 2 230.794839837734 21.0627132276049 6.95200595313275 \n AB12345-BRA-1-id-42 SCREENING 194.224015921831 20.4565798423567 6.33709739029277 \n CYCLE 1 DAY 1 210.528307366678 26.7845825535397 3.50776680376268 \n CYCLE 1 DAY 2 167.592869235882 34.8276545020143 4.11969088323673 \n AB12345-BRA-1-id-93 SCREENING 186.75868084484 27.3983170052516 3.40495133575408 \n CYCLE 1 DAY 1 160.406798051843 17.5296885232566 3.8508725098954 \n CYCLE 1 DAY 2 252.04512291352 32.4903879259459 6.21586252565961 \n AB12345-BRA-11-id-217 SCREENING 215.367414313054 20.8879942219526 6.55883385955605 \n CYCLE 1 DAY 1 272.094354596647 34.2812274648873 5.04441608634882 \n CYCLE 1 DAY 2 174.183265394136 23.04243406023 4.07416508597243 \n AB12345-BRA-11-id-345 SCREENING 235.746948097021 26.5740342881269 5.52059967823211 \n CYCLE 1 DAY 1 228.51025073098 39.7523164840323 6.32996327499752 \n CYCLE 1 DAY 2 120.712762389698 24.37143486359 5.02620823564574 \n AB12345-BRA-11-id-397 SCREENING 165.925716319045 21.8770819414152 6.3713157196375 \n CYCLE 1 DAY 1 201.536920713046 36.5841424116449 4.32440907316618 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:34:46 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 rlistings_0.2.7.9013 tibble_3.2.1 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Pharmacokinetic", @@ -1043,7 +1043,7 @@ "href": "listings/pharmacokinetic/pkcl01.html", "title": "PKCL01", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(rlistings)\nlibrary(scda)\nlibrary(dplyr)\n\nadpc <- synthetic_cdisc_dataset(\"latest\", \"adpc\")\n\nanalyte <- \"Plasma Drug X\"\n\nout <- adpc %>%\n filter(PARAM == analyte) %>%\n select(ARM, USUBJID, VISIT, NFRLT, AFRLT, AVAL)\n\nvar_labels(out) <- c(\n ARM = \"Treatment Group\",\n USUBJID = \"Subject ID\",\n VISIT = \"Visit\",\n NFRLT = paste0(\"Nominal Sampling\\nTime (\", adpc$RELTMU[1], \")\"),\n AFRLT = paste0(\"Actual Time\\nFrom First\\nDose (\", adpc$RELTMU[1], \")\"),\n AVAL = paste0(\"Concentration\\n(\", adpc$AVALU[1], \")\")\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"ARM\", \"USUBJID\", \"VISIT\"),\n disp_cols = names(out),\n main_title = paste(\n \"Listing of\",\n analyte,\n \"Concentration by Treatment Group, Subject and Nominal Time, PK Population\\nProtocol: xxnnnnn\"\n ),\n subtitles = paste(\"Analyte:\", analyte)\n)\n\nhead(lsting, 20)\n\nListing of Plasma Drug X Concentration by Treatment Group, Subject and Nominal Time, PK Population\nProtocol: xxnnnnn\nAnalyte: Plasma Drug X\n\n———————————————————————————————————————————————————————————————————————————————————————————————\n Actual Time \n Nominal Sampling From First Concentration\nTreatment Group Subject ID Visit Time (hr) Dose (hr) (ug/mL) \n———————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X AB12345-BRA-1-id-105 Day 1 0 0 0 \n 0.5 0.5 10.404 \n 1 1 13.987 \n 1.5 1.5 14.142 \n 2 2 12.744 \n 3 3 8.803 \n 4 4 5.461 \n 8 8 0.562 \n 12 12 0.049 \n Day 2 24 24 0 \n AB12345-BRA-1-id-134 Day 1 0 0 0 \n 0.5 0.5 14.405 \n 1 1 17.863 \n 1.5 1.5 16.613 \n 2 2 13.735 \n 3 3 7.923 \n 4 4 4.064 \n 8 8 0.178 \n 12 12 0.006 \n Day 2 24 24 0 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:29 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 scda_0.1.6.9017 rlistings_0.2.7.9013 \n[4] tibble_3.2.1 formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(rlistings)\nlibrary(scda)\nlibrary(dplyr)\n\nadpc <- synthetic_cdisc_dataset(\"latest\", \"adpc\")\n\nanalyte <- \"Plasma Drug X\"\n\nout <- adpc %>%\n filter(PARAM == analyte) %>%\n select(ARM, USUBJID, VISIT, NFRLT, AFRLT, AVAL)\n\nvar_labels(out) <- c(\n ARM = \"Treatment Group\",\n USUBJID = \"Subject ID\",\n VISIT = \"Visit\",\n NFRLT = paste0(\"Nominal Sampling\\nTime (\", adpc$RELTMU[1], \")\"),\n AFRLT = paste0(\"Actual Time\\nFrom First\\nDose (\", adpc$RELTMU[1], \")\"),\n AVAL = paste0(\"Concentration\\n(\", adpc$AVALU[1], \")\")\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"ARM\", \"USUBJID\", \"VISIT\"),\n disp_cols = names(out),\n main_title = paste(\n \"Listing of\",\n analyte,\n \"Concentration by Treatment Group, Subject and Nominal Time, PK Population\\nProtocol: xxnnnnn\"\n ),\n subtitles = paste(\"Analyte:\", analyte)\n)\n\nhead(lsting, 20)\n\nListing of Plasma Drug X Concentration by Treatment Group, Subject and Nominal Time, PK Population\nProtocol: xxnnnnn\nAnalyte: Plasma Drug X\n\n———————————————————————————————————————————————————————————————————————————————————————————————\n Actual Time \n Nominal Sampling From First Concentration\nTreatment Group Subject ID Visit Time (hr) Dose (hr) (ug/mL) \n———————————————————————————————————————————————————————————————————————————————————————————————\n A: Drug X AB12345-BRA-1-id-105 Day 1 0 0 0 \n 0.5 0.5 10.404 \n 1 1 13.987 \n 1.5 1.5 14.142 \n 2 2 12.744 \n 3 3 8.803 \n 4 4 5.461 \n 8 8 0.562 \n 12 12 0.049 \n Day 2 24 24 0 \n AB12345-BRA-1-id-134 Day 1 0 0 0 \n 0.5 0.5 14.405 \n 1 1 17.863 \n 1.5 1.5 16.613 \n 2 2 13.735 \n 3 3 7.923 \n 4 4 4.064 \n 8 8 0.178 \n 12 12 0.006 \n Day 2 24 24 0 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:34:54 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 scda_0.1.6.9017 rlistings_0.2.7.9013 \n[4] tibble_3.2.1 formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Pharmacokinetic", @@ -1055,7 +1055,7 @@ "href": "listings/ECG/egl01.html", "title": "EGL01", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\nget_param_unit_range <- function(dataset) {\n u_rng <- lapply(unique(dataset$PARAMCD), function(p) {\n dat <- dataset %>% filter(PARAMCD == p)\n list(\n unit = unique(dat$AVALU),\n range = paste0(unique(dat$ANRLO), \"-\", unique(dat$ANRHI))\n )\n })\n names(u_rng) <- unique(dataset$PARAMCD)\n u_rng\n}\n\neg_u_rng <- get_param_unit_range(adeg)\n\nadeg_sub <- adeg %>%\n filter(!is.na(AVAL) & SAFFL == \"Y\" & ANL01FL == \"Y\" & !is.na(EGSEQ) & PARAMCD != \"ECGINTP\") %>%\n mutate(\n CRTNPT = paste(SITEID, sub(\"^.*-([[:alnum:]]+)$\", \"\\\\1\", SUBJID), sep = \"/\"),\n AGSXRC = paste(AGE, SEX, RACE, sep = \"/\"),\n AVAL = format(round(AVAL, 2), nsmall = 2),\n AVAL_ANRIND = ifelse(ANRIND %in% c(\"NORMAL\", \"\"), AVAL, paste(AVAL, substr(ANRIND, 1, 1), sep = \"/\")),\n CHG = format(round(CHG, 2), nsmall = 2)\n )\n\nanl_eg <- adeg_sub %>%\n select(SUBJID, CRTNPT, AGSXRC, TRT01A, PARAMCD, AVAL_ANRIND, CHG, ADY, AVISIT, ADTM) %>%\n tidyr::pivot_wider(\n id_cols = c(SUBJID, CRTNPT, AGSXRC, TRT01A, ADY, AVISIT, ADTM),\n names_from = PARAMCD,\n values_from = c(AVAL_ANRIND, CHG)\n )\n\nout <- anl_eg %>%\n select(\n CRTNPT,\n AGSXRC,\n TRT01A,\n AVISIT,\n ADY,\n AVAL_ANRIND_HR,\n CHG_HR,\n AVAL_ANRIND_QT,\n CHG_QT,\n AVAL_ANRIND_RR,\n CHG_RR\n ) %>%\n var_relabel(\n CRTNPT = \"Center/Subject ID\",\n AGSXRC = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n AVISIT = \"Visit\",\n ADY = \"Study\\nDay\",\n AVAL_ANRIND_HR = paste0(\"Heart Rate Result\\n(\", eg_u_rng$HR$unit, \");\\nRange:(\", eg_u_rng$HR$range, \")\"),\n CHG_HR = \"Heart Rate\\nChange from BL\",\n AVAL_ANRIND_QT = paste0(\"QT Duration Result\\n(\", eg_u_rng$QT$unit, \");\\nRange:(\", eg_u_rng$QT$range, \")\"),\n CHG_QT = \"QT Duration\\nChange from BL\",\n AVAL_ANRIND_RR = paste0(\"RR Duration Result\\n(\", eg_u_rng$RR$unit, \");\\nRange:(\", eg_u_rng$RR$range, \")\"),\n CHG_RR = \"RR Duration\\nChange from BL\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"CRTNPT\", \"AGSXRC\", \"AVISIT\", \"ADY\"),\n disp_cols = names(out),\n main_title = \"Listing of ECG Data: Safety-Evaluable Patients\",\n main_footer = \"Baseline is the patient's last observation prior to initiation of study drug. Abnormalities are flagged as high (H) or low (L) if outside the Roche standard reference range.\" \n)\n\nhead(lsting, 20)\n\nListing of ECG Data: Safety-Evaluable Patients\n\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Heart Rate Result QT Duration Result RR Duration Result \n Study (beats/min); Heart Rate (msec); QT Duration (msec); RR Duration \nTreatment Center/Subject ID Age/Sex/Race Visit Day Range:(40-100) Change from BL Range:(200-500) Change from BL Range:(600-1500) Change from BL\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/105 38/M/BLACK OR AFRICAN AMERICAN BASELINE 149 66.94 NA 441.78 NA 896.59 NA \n WEEK 1 DAY 8 314 63.18 -3.76 365.68 -76.10 1376.26 479.67 \n WEEK 2 DAY 15 398 57.57 -9.37 355.48 -86.29 799.57 -97.02 \n WEEK 3 DAY 22 470 73.36 6.42 352.45 -89.33 1015.00 118.41 \n WEEK 4 DAY 29 528 53.72 -13.22 388.42 -53.36 1189.29 292.70 \n WEEK 5 DAY 36 535 58.25 -8.69 291.77 -150.01 936.09 39.50 \n BRA-1/134 47/M/WHITE BASELINE 227 46.99 NA 385.29 NA 835.17 NA \n WEEK 1 DAY 8 255 48.38 1.39 453.74 68.46 901.86 66.68 \n WEEK 2 DAY 15 269 35.40/L -11.59 413.54 28.26 892.01 56.84 \n WEEK 3 DAY 22 357 60.50 13.51 394.23 8.95 490.18/L -344.99 \n WEEK 4 DAY 29 436 82.28 35.29 398.29 13.00 757.96 -77.21 \n WEEK 5 DAY 36 440 38.89/L -8.10 339.38 -45.91 880.26 45.08 \n BRA-1/42 36/M/BLACK OR AFRICAN AMERICAN BASELINE 477 56.19 NA 190.94/L NA 1276.65 NA \n WEEK 1 DAY 8 534 85.24 29.05 483.71 292.77 735.11 -541.54 \n WEEK 2 DAY 15 550 55.53 -0.66 386.60 195.66 1092.71 -183.94 \n WEEK 3 DAY 22 569 65.37 9.18 311.08 120.14 1227.15 -49.50 \n WEEK 4 DAY 29 608 65.13 8.93 329.78 138.83 250.18/L -1026.47 \n WEEK 5 DAY 36 675 49.03 -7.16 470.67 279.73 1321.21 44.56 \n BRA-1/93 34/F/ASIAN BASELINE 73 72.12 NA 306.64 NA 1324.80 NA \n WEEK 1 DAY 8 207 66.88 -5.24 190.50/L -116.14 1495.37 170.58 \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nBaseline is the patient's last observation prior to initiation of study drug. Abnormalities are flagged as high (H) or low (L) if outside the Roche standard reference range.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:37 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadeg <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\nget_param_unit_range <- function(dataset) {\n u_rng <- lapply(unique(dataset$PARAMCD), function(p) {\n dat <- dataset %>% filter(PARAMCD == p)\n list(\n unit = unique(dat$AVALU),\n range = paste0(unique(dat$ANRLO), \"-\", unique(dat$ANRHI))\n )\n })\n names(u_rng) <- unique(dataset$PARAMCD)\n u_rng\n}\n\neg_u_rng <- get_param_unit_range(adeg)\n\nadeg_sub <- adeg %>%\n filter(!is.na(AVAL) & SAFFL == \"Y\" & ANL01FL == \"Y\" & !is.na(EGSEQ) & PARAMCD != \"ECGINTP\") %>%\n mutate(\n CRTNPT = paste(SITEID, sub(\"^.*-([[:alnum:]]+)$\", \"\\\\1\", SUBJID), sep = \"/\"),\n AGSXRC = paste(AGE, SEX, RACE, sep = \"/\"),\n AVAL = format(round(AVAL, 2), nsmall = 2),\n AVAL_ANRIND = ifelse(ANRIND %in% c(\"NORMAL\", \"\"), AVAL, paste(AVAL, substr(ANRIND, 1, 1), sep = \"/\")),\n CHG = format(round(CHG, 2), nsmall = 2)\n )\n\nanl_eg <- adeg_sub %>%\n select(SUBJID, CRTNPT, AGSXRC, TRT01A, PARAMCD, AVAL_ANRIND, CHG, ADY, AVISIT, ADTM) %>%\n tidyr::pivot_wider(\n id_cols = c(SUBJID, CRTNPT, AGSXRC, TRT01A, ADY, AVISIT, ADTM),\n names_from = PARAMCD,\n values_from = c(AVAL_ANRIND, CHG)\n )\n\nout <- anl_eg %>%\n select(\n CRTNPT,\n AGSXRC,\n TRT01A,\n AVISIT,\n ADY,\n AVAL_ANRIND_HR,\n CHG_HR,\n AVAL_ANRIND_QT,\n CHG_QT,\n AVAL_ANRIND_RR,\n CHG_RR\n ) %>%\n var_relabel(\n CRTNPT = \"Center/Subject ID\",\n AGSXRC = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n AVISIT = \"Visit\",\n ADY = \"Study\\nDay\",\n AVAL_ANRIND_HR = paste0(\"Heart Rate Result\\n(\", eg_u_rng$HR$unit, \");\\nRange:(\", eg_u_rng$HR$range, \")\"),\n CHG_HR = \"Heart Rate\\nChange from BL\",\n AVAL_ANRIND_QT = paste0(\"QT Duration Result\\n(\", eg_u_rng$QT$unit, \");\\nRange:(\", eg_u_rng$QT$range, \")\"),\n CHG_QT = \"QT Duration\\nChange from BL\",\n AVAL_ANRIND_RR = paste0(\"RR Duration Result\\n(\", eg_u_rng$RR$unit, \");\\nRange:(\", eg_u_rng$RR$range, \")\"),\n CHG_RR = \"RR Duration\\nChange from BL\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"CRTNPT\", \"AGSXRC\", \"AVISIT\", \"ADY\"),\n disp_cols = names(out),\n main_title = \"Listing of ECG Data: Safety-Evaluable Patients\",\n main_footer = \"Baseline is the patient's last observation prior to initiation of study drug. Abnormalities are flagged as high (H) or low (L) if outside the Roche standard reference range.\" \n)\n\nhead(lsting, 20)\n\nListing of ECG Data: Safety-Evaluable Patients\n\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Heart Rate Result QT Duration Result RR Duration Result \n Study (beats/min); Heart Rate (msec); QT Duration (msec); RR Duration \nTreatment Center/Subject ID Age/Sex/Race Visit Day Range:(40-100) Change from BL Range:(200-500) Change from BL Range:(600-1500) Change from BL\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/105 38/M/BLACK OR AFRICAN AMERICAN BASELINE 149 66.94 NA 441.78 NA 896.59 NA \n WEEK 1 DAY 8 314 63.18 -3.76 365.68 -76.10 1376.26 479.67 \n WEEK 2 DAY 15 398 57.57 -9.37 355.48 -86.29 799.57 -97.02 \n WEEK 3 DAY 22 470 73.36 6.42 352.45 -89.33 1015.00 118.41 \n WEEK 4 DAY 29 528 53.72 -13.22 388.42 -53.36 1189.29 292.70 \n WEEK 5 DAY 36 535 58.25 -8.69 291.77 -150.01 936.09 39.50 \n BRA-1/134 47/M/WHITE BASELINE 227 46.99 NA 385.29 NA 835.17 NA \n WEEK 1 DAY 8 255 48.38 1.39 453.74 68.46 901.86 66.68 \n WEEK 2 DAY 15 269 35.40/L -11.59 413.54 28.26 892.01 56.84 \n WEEK 3 DAY 22 357 60.50 13.51 394.23 8.95 490.18/L -344.99 \n WEEK 4 DAY 29 436 82.28 35.29 398.29 13.00 757.96 -77.21 \n WEEK 5 DAY 36 440 38.89/L -8.10 339.38 -45.91 880.26 45.08 \n BRA-1/42 36/M/BLACK OR AFRICAN AMERICAN BASELINE 477 56.19 NA 190.94/L NA 1276.65 NA \n WEEK 1 DAY 8 534 85.24 29.05 483.71 292.77 735.11 -541.54 \n WEEK 2 DAY 15 550 55.53 -0.66 386.60 195.66 1092.71 -183.94 \n WEEK 3 DAY 22 569 65.37 9.18 311.08 120.14 1227.15 -49.50 \n WEEK 4 DAY 29 608 65.13 8.93 329.78 138.83 250.18/L -1026.47 \n WEEK 5 DAY 36 675 49.03 -7.16 470.67 279.73 1321.21 44.56 \n BRA-1/93 34/F/ASIAN BASELINE 73 72.12 NA 306.64 NA 1324.80 NA \n WEEK 1 DAY 8 207 66.88 -5.24 190.50/L -116.14 1495.37 170.58 \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nBaseline is the patient's last observation prior to initiation of study drug. Abnormalities are flagged as high (H) or low (L) if outside the Roche standard reference range.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:35:01 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "ECG", @@ -1067,7 +1067,7 @@ "href": "listings/concomitant-medications/cml02a_gl.html", "title": "CML02A_GL", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\nout <- adcm %>%\n select(ATC2, CMDECOD, CMTRT) %>%\n unique()\n\nvar_labels(out) <- c(\n ATC2 = \"ATC Class Level 2\",\n CMDECOD = \"WHODrug Preferred Name\",\n CMTRT = \"Investigator-Specified\\nTreatment Term\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"ATC2\", \"CMDECOD\", \"CMTRT\"),\n disp_cols = names(out),\n main_title = \"Listing of Concomitant Medication Class Level 2, Preferred Name, and Investigator-Specified Terms\"\n)\n\nhead(lsting, 20)\n\nListing of Concomitant Medication Class Level 2, Preferred Name, and Investigator-Specified Terms\n\n———————————————————————————————————————————————————————————————————\n Investigator-Specified\nATC Class Level 2 WHODrug Preferred Name Treatment Term \n———————————————————————————————————————————————————————————————————\n ATCCLAS2 A medname A_1/3 A_1/3 \n medname A_2/3 A_2/3 \n medname A_3/3 A_3/3 \n ATCCLAS2 A p2 medname A_3/3 A_3/3 \n ATCCLAS2 B medname B_1/4 B_1/4 \n medname B_2/4 B_2/4 \n medname B_3/4 B_3/4 \n medname B_4/4 B_4/4 \n ATCCLAS2 B p2 medname B_1/4 B_1/4 \n medname B_2/4 B_2/4 \n ATCCLAS2 B p3 medname B_1/4 B_1/4 \n medname B_2/4 B_2/4 \n ATCCLAS2 C medname C_1/2 C_1/2 \n medname C_2/2 C_2/2 \n ATCCLAS2 C p2 medname C_1/2 C_1/2 \n medname C_2/2 C_2/2 \n ATCCLAS2 C p3 medname C_2/2 C_2/2 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:44 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(rlistings)\n\nadcm <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\nout <- adcm %>%\n select(ATC2, CMDECOD, CMTRT) %>%\n unique()\n\nvar_labels(out) <- c(\n ATC2 = \"ATC Class Level 2\",\n CMDECOD = \"WHODrug Preferred Name\",\n CMTRT = \"Investigator-Specified\\nTreatment Term\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"ATC2\", \"CMDECOD\", \"CMTRT\"),\n disp_cols = names(out),\n main_title = \"Listing of Concomitant Medication Class Level 2, Preferred Name, and Investigator-Specified Terms\"\n)\n\nhead(lsting, 20)\n\nListing of Concomitant Medication Class Level 2, Preferred Name, and Investigator-Specified Terms\n\n———————————————————————————————————————————————————————————————————\n Investigator-Specified\nATC Class Level 2 WHODrug Preferred Name Treatment Term \n———————————————————————————————————————————————————————————————————\n ATCCLAS2 A medname A_1/3 A_1/3 \n medname A_2/3 A_2/3 \n medname A_3/3 A_3/3 \n ATCCLAS2 A p2 medname A_3/3 A_3/3 \n ATCCLAS2 B medname B_1/4 B_1/4 \n medname B_2/4 B_2/4 \n medname B_3/4 B_3/4 \n medname B_4/4 B_4/4 \n ATCCLAS2 B p2 medname B_1/4 B_1/4 \n medname B_2/4 B_2/4 \n ATCCLAS2 B p3 medname B_1/4 B_1/4 \n medname B_2/4 B_2/4 \n ATCCLAS2 C medname C_1/2 C_1/2 \n medname C_2/2 C_2/2 \n ATCCLAS2 C p2 medname C_1/2 C_1/2 \n medname C_2/2 C_2/2 \n ATCCLAS2 C p3 medname C_2/2 C_2/2 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:35:09 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 pkgconfig_2.0.3 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Concomitant Medications", @@ -1079,7 +1079,7 @@ "href": "listings/vital-signs/vsl01.html", "title": "VSL01", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadvs <- synthetic_cdisc_dataset(\"latest\", \"advs\")\n\nget_param_unit_range <- function(dataset) {\n u_rng <- lapply(unique(dataset$PARAMCD), function(p) {\n dat <- dataset %>% filter(PARAMCD == p)\n list(\n unit = unique(dat$AVALU),\n range = paste0(unique(dat$ANRLO), \"-\", unique(dat$ANRHI))\n )\n })\n names(u_rng) <- unique(dataset$PARAMCD)\n u_rng\n}\n\nvs_u_rng <- get_param_unit_range(advs)\n\nadvs_sub <- advs %>%\n filter(!is.na(AVAL) & SAFFL == \"Y\" & ONTRTFL == \"Y\" & !is.na(VSSEQ)) %>%\n mutate(\n CRTNPT = paste(SITEID, sub(\"^.*-([[:alnum:]]+)$\", \"\\\\1\", SUBJID), sep = \"/\"),\n AGSXRC = paste(AGE, SEX, RACE, sep = \"/\"),\n AVAL = format(round(AVAL, 2), nsmall = 2),\n AVAL_ANRIND = ifelse(ANRIND %in% c(\"NORMAL\", \"\"), AVAL, paste(AVAL, substr(ANRIND, 1, 1), sep = \"/\")),\n CHG = format(round(CHG, 2), nsmall = 2)\n )\n\nanl_vs <- advs_sub %>%\n select(SUBJID, CRTNPT, AGSXRC, TRT01A, PARAMCD, AVAL_ANRIND, CHG, ADY, AVISIT, ADTM) %>%\n tidyr::pivot_wider(\n id_cols = c(SUBJID, CRTNPT, AGSXRC, TRT01A, ADY, AVISIT, ADTM),\n names_from = PARAMCD,\n values_from = c(AVAL_ANRIND, CHG)\n )\n\nout <- anl_vs %>%\n select(\n CRTNPT, AGSXRC, TRT01A, AVISIT, ADY, AVAL_ANRIND_WEIGHT, CHG_WEIGHT, AVAL_ANRIND_TEMP, CHG_TEMP, AVAL_ANRIND_DIABP,\n CHG_DIABP, AVAL_ANRIND_SYSBP, CHG_SYSBP, AVAL_ANRIND_PULSE, CHG_PULSE, AVAL_ANRIND_RESP, CHG_RESP\n ) %>%\n var_relabel(\n CRTNPT = \"Center/Subject ID\",\n AGSXRC = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n AVISIT = \"Visit\",\n ADY = \"Study\\nDay\",\n AVAL_ANRIND_WEIGHT = paste0(\n \"Weight\\nResult\\n(\",\n vs_u_rng$WEIGHT$unit,\n \");\\nRange:(\",\n vs_u_rng$WEIGHT$range,\n \")\"\n ),\n CHG_WEIGHT = \"Weight\\nChange from BL\",\n AVAL_ANRIND_TEMP = paste0(\n \"Temperature Result\\n(\",\n vs_u_rng$TEMP$unit,\n \");\\nRange:(\",\n vs_u_rng$TEMP$range,\n \")\"\n ),\n CHG_TEMP = \"Temperature Rate\\nChange from BL\",\n AVAL_ANRIND_DIABP = paste0(\n \"Diastolic Blood\\nPressure,\\nSitting\\nResult\\n(\",\n vs_u_rng$DIABP$unit,\n \");\\nRange:(\",\n vs_u_rng$DIABP$range,\n \")\"\n ),\n CHG_DIABP = \"Diastolic Blood\\nPressure,\\nSitting\\nChange from BL\",\n AVAL_ANRIND_SYSBP = paste0(\n \"Systolic Blood\\nPressure,\\nSitting\\n(\",\n vs_u_rng$SYSBP$unit,\n \");\\nRange:(\",\n vs_u_rng$SYSBP$range,\n \")\"\n ),\n CHG_SYSBP = \"Systolic Blood\\nPressure,\\nSitting\\nChange from BL\",\n AVAL_ANRIND_PULSE = paste0(\n \"Pulse Rate Result\\n(\",\n vs_u_rng$PULSE$unit,\n \");\\nRange:(\",\n vs_u_rng$PULSE$range,\n \")\"\n ),\n CHG_PULSE = \"Pulse Rate\\nChange from BL\",\n AVAL_ANRIND_RESP = paste0(\n \"Respiratory Rate\\nResult\\n(\",\n vs_u_rng$RESP$unit,\n \");\\nRange:(\",\n vs_u_rng$RESP$range,\n \")\"\n ),\n CHG_RESP = \"Respiratory Rate\\nChange from BL\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"CRTNPT\", \"AGSXRC\", \"AVISIT\"),\n disp_cols = names(out),\n main_title = \"Listing of Vital Signs: Safety-Evaluable Patients\",\n main_footer = \"Baseline is the patient's last observation prior to initiation of study drug. Abnormalities are flagged as high (H) or low (L) if outside the Roche standard reference range.\" \n)\n\nhead(lsting, 20)\n\nListing of Vital Signs: Safety-Evaluable Patients\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Diastolic Blood \n Pressure, Systolic Blood \n Weight Sitting Diastolic Blood Pressure, Systolic Blood Respiratory Rate \n Result Temperature Result Result Pressure, Sitting Pressure, Pulse Rate Result Result \n Study (Kg); Weight (C); Temperature Rate (Pa); Sitting (Pa); Sitting (beats/min); Pulse Rate (breaths/min); Respiratory Rate\nTreatment Center/Subject ID Age/Sex/Race Visit Day Range:(40-100) Change from BL Range:(36.1-37.2) Change from BL Range:(80-120) Change from BL Range:(120-180) Change from BL Range:(60-100) Change from BL Range:(12-20) Change from BL \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/105 38/M/BLACK OR AFRICAN AMERICAN WEEK 1 DAY 8 189 90.96 24.62 36.79 -1.88 101.10 -12.65 181.05/H 3.70 84.91 -2.05 18.34 1.13 \n WEEK 2 DAY 15 323 41.40 -24.93 36.52 -2.14 111.02 -2.72 132.47 -44.88 71.54 -15.42 9.81/L -7.40 \n WEEK 3 DAY 22 492 60.55 -5.78 35.03/L -3.64 88.35 -25.39 112.67/L -64.68 33.75/L -53.22 21.23/H 4.02 \n WEEK 4 DAY 29 550 69.69 3.36 35.71/L -2.95 100.74 -13.00 194.88/H 17.53 97.51 10.54 12.50 -4.71 \n WEEK 5 DAY 36 628 81.64 15.30 36.01/L -2.65 123.17/H 9.43 140.33 -37.02 62.50 -24.47 10.91/L -6.30 \n BRA-1/134 47/M/WHITE WEEK 1 DAY 8 203 42.95 -12.51 36.39 -1.38 112.71 26.38 148.69 -52.75 69.12 3.72 15.31 -2.84 \n WEEK 2 DAY 15 326 20.36/L -35.09 35.75/L -2.03 98.42 12.09 188.08/H -13.36 68.79 3.40 17.60 -0.55 \n WEEK 3 DAY 22 363 46.33 -9.12 35.43/L -2.34 97.88 11.55 160.05 -41.39 90.21 24.81 18.15 0.00 \n WEEK 4 DAY 29 367 43.83 -11.62 36.01/L -1.76 98.97 12.65 132.19 -69.25 88.39 23.00 19.62 1.48 \n WEEK 5 DAY 36 417 31.75/L -23.71 36.35 -1.42 124.26/H 37.94 134.30 -67.14 88.64 23.25 20.08/H 1.94 \n BRA-1/42 36/M/BLACK OR AFRICAN AMERICAN WEEK 1 DAY 8 265 115.27/H 8.42 37.35/H -1.67 107.32 5.90 173.89 27.40 66.14 26.13 9.23/L 7.13 \n WEEK 2 DAY 15 313 45.84 -61.01 36.01/L -3.01 110.97 9.55 144.75 -1.74 109.71/H 69.70 7.18/L 5.08 \n WEEK 3 DAY 22 325 85.70 -21.14 37.71/H -1.31 124.13/H 22.71 89.08/L -57.41 90.29 50.28 25.16/H 23.05 \n WEEK 4 DAY 29 535 44.64 -62.21 36.44 -2.58 79.51/L -21.91 140.78 -5.71 82.44 42.43 14.06 11.95 \n WEEK 5 DAY 36 729 85.21 -21.64 35.78/L -3.23 105.26 3.84 126.60 -19.89 88.71 48.70 25.98/H 23.87 \n BRA-1/93 34/F/ASIAN WEEK 1 DAY 8 402 47.51 -35.34 35.50/L -0.83 94.27 17.98 98.82/L -61.71 72.44 -7.85 14.97 0.22 \n WEEK 2 DAY 15 460 67.64 -15.21 37.96/H 1.62 109.98 33.69 104.21/L -56.32 104.70/H 24.41 14.90 0.16 \n WEEK 3 DAY 22 464 53.06 -29.78 36.33 -0.01 90.17 13.87 139.66 -20.87 111.13/H 30.85 22.86/H 8.12 \n WEEK 4 DAY 29 496 61.68 -21.17 33.52/L -2.82 112.76 36.47 128.82 -31.70 72.89 -7.39 20.77/H 6.03 \n WEEK 5 DAY 36 538 53.98 -28.86 35.71/L -0.63 80.20 3.91 137.16 -23.37 96.63 16.35 18.10 3.36 \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nBaseline is the patient's last observation prior to initiation of study drug. Abnormalities are flagged as high (H) or low (L) if outside the Roche standard reference range.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:51 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadvs <- synthetic_cdisc_dataset(\"latest\", \"advs\")\n\nget_param_unit_range <- function(dataset) {\n u_rng <- lapply(unique(dataset$PARAMCD), function(p) {\n dat <- dataset %>% filter(PARAMCD == p)\n list(\n unit = unique(dat$AVALU),\n range = paste0(unique(dat$ANRLO), \"-\", unique(dat$ANRHI))\n )\n })\n names(u_rng) <- unique(dataset$PARAMCD)\n u_rng\n}\n\nvs_u_rng <- get_param_unit_range(advs)\n\nadvs_sub <- advs %>%\n filter(!is.na(AVAL) & SAFFL == \"Y\" & ONTRTFL == \"Y\" & !is.na(VSSEQ)) %>%\n mutate(\n CRTNPT = paste(SITEID, sub(\"^.*-([[:alnum:]]+)$\", \"\\\\1\", SUBJID), sep = \"/\"),\n AGSXRC = paste(AGE, SEX, RACE, sep = \"/\"),\n AVAL = format(round(AVAL, 2), nsmall = 2),\n AVAL_ANRIND = ifelse(ANRIND %in% c(\"NORMAL\", \"\"), AVAL, paste(AVAL, substr(ANRIND, 1, 1), sep = \"/\")),\n CHG = format(round(CHG, 2), nsmall = 2)\n )\n\nanl_vs <- advs_sub %>%\n select(SUBJID, CRTNPT, AGSXRC, TRT01A, PARAMCD, AVAL_ANRIND, CHG, ADY, AVISIT, ADTM) %>%\n tidyr::pivot_wider(\n id_cols = c(SUBJID, CRTNPT, AGSXRC, TRT01A, ADY, AVISIT, ADTM),\n names_from = PARAMCD,\n values_from = c(AVAL_ANRIND, CHG)\n )\n\nout <- anl_vs %>%\n select(\n CRTNPT, AGSXRC, TRT01A, AVISIT, ADY, AVAL_ANRIND_WEIGHT, CHG_WEIGHT, AVAL_ANRIND_TEMP, CHG_TEMP, AVAL_ANRIND_DIABP,\n CHG_DIABP, AVAL_ANRIND_SYSBP, CHG_SYSBP, AVAL_ANRIND_PULSE, CHG_PULSE, AVAL_ANRIND_RESP, CHG_RESP\n ) %>%\n var_relabel(\n CRTNPT = \"Center/Subject ID\",\n AGSXRC = \"Age/Sex/Race\",\n TRT01A = \"Treatment\",\n AVISIT = \"Visit\",\n ADY = \"Study\\nDay\",\n AVAL_ANRIND_WEIGHT = paste0(\n \"Weight\\nResult\\n(\",\n vs_u_rng$WEIGHT$unit,\n \");\\nRange:(\",\n vs_u_rng$WEIGHT$range,\n \")\"\n ),\n CHG_WEIGHT = \"Weight\\nChange from BL\",\n AVAL_ANRIND_TEMP = paste0(\n \"Temperature Result\\n(\",\n vs_u_rng$TEMP$unit,\n \");\\nRange:(\",\n vs_u_rng$TEMP$range,\n \")\"\n ),\n CHG_TEMP = \"Temperature Rate\\nChange from BL\",\n AVAL_ANRIND_DIABP = paste0(\n \"Diastolic Blood\\nPressure,\\nSitting\\nResult\\n(\",\n vs_u_rng$DIABP$unit,\n \");\\nRange:(\",\n vs_u_rng$DIABP$range,\n \")\"\n ),\n CHG_DIABP = \"Diastolic Blood\\nPressure,\\nSitting\\nChange from BL\",\n AVAL_ANRIND_SYSBP = paste0(\n \"Systolic Blood\\nPressure,\\nSitting\\n(\",\n vs_u_rng$SYSBP$unit,\n \");\\nRange:(\",\n vs_u_rng$SYSBP$range,\n \")\"\n ),\n CHG_SYSBP = \"Systolic Blood\\nPressure,\\nSitting\\nChange from BL\",\n AVAL_ANRIND_PULSE = paste0(\n \"Pulse Rate Result\\n(\",\n vs_u_rng$PULSE$unit,\n \");\\nRange:(\",\n vs_u_rng$PULSE$range,\n \")\"\n ),\n CHG_PULSE = \"Pulse Rate\\nChange from BL\",\n AVAL_ANRIND_RESP = paste0(\n \"Respiratory Rate\\nResult\\n(\",\n vs_u_rng$RESP$unit,\n \");\\nRange:(\",\n vs_u_rng$RESP$range,\n \")\"\n ),\n CHG_RESP = \"Respiratory Rate\\nChange from BL\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"CRTNPT\", \"AGSXRC\", \"AVISIT\"),\n disp_cols = names(out),\n main_title = \"Listing of Vital Signs: Safety-Evaluable Patients\",\n main_footer = \"Baseline is the patient's last observation prior to initiation of study drug. Abnormalities are flagged as high (H) or low (L) if outside the Roche standard reference range.\" \n)\n\nhead(lsting, 20)\n\nListing of Vital Signs: Safety-Evaluable Patients\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Diastolic Blood \n Pressure, Systolic Blood \n Weight Sitting Diastolic Blood Pressure, Systolic Blood Respiratory Rate \n Result Temperature Result Result Pressure, Sitting Pressure, Pulse Rate Result Result \n Study (Kg); Weight (C); Temperature Rate (Pa); Sitting (Pa); Sitting (beats/min); Pulse Rate (breaths/min); Respiratory Rate\nTreatment Center/Subject ID Age/Sex/Race Visit Day Range:(40-100) Change from BL Range:(36.1-37.2) Change from BL Range:(80-120) Change from BL Range:(120-180) Change from BL Range:(60-100) Change from BL Range:(12-20) Change from BL \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/105 38/M/BLACK OR AFRICAN AMERICAN WEEK 1 DAY 8 189 90.96 24.62 36.79 -1.88 101.10 -12.65 181.05/H 3.70 84.91 -2.05 18.34 1.13 \n WEEK 2 DAY 15 323 41.40 -24.93 36.52 -2.14 111.02 -2.72 132.47 -44.88 71.54 -15.42 9.81/L -7.40 \n WEEK 3 DAY 22 492 60.55 -5.78 35.03/L -3.64 88.35 -25.39 112.67/L -64.68 33.75/L -53.22 21.23/H 4.02 \n WEEK 4 DAY 29 550 69.69 3.36 35.71/L -2.95 100.74 -13.00 194.88/H 17.53 97.51 10.54 12.50 -4.71 \n WEEK 5 DAY 36 628 81.64 15.30 36.01/L -2.65 123.17/H 9.43 140.33 -37.02 62.50 -24.47 10.91/L -6.30 \n BRA-1/134 47/M/WHITE WEEK 1 DAY 8 203 42.95 -12.51 36.39 -1.38 112.71 26.38 148.69 -52.75 69.12 3.72 15.31 -2.84 \n WEEK 2 DAY 15 326 20.36/L -35.09 35.75/L -2.03 98.42 12.09 188.08/H -13.36 68.79 3.40 17.60 -0.55 \n WEEK 3 DAY 22 363 46.33 -9.12 35.43/L -2.34 97.88 11.55 160.05 -41.39 90.21 24.81 18.15 0.00 \n WEEK 4 DAY 29 367 43.83 -11.62 36.01/L -1.76 98.97 12.65 132.19 -69.25 88.39 23.00 19.62 1.48 \n WEEK 5 DAY 36 417 31.75/L -23.71 36.35 -1.42 124.26/H 37.94 134.30 -67.14 88.64 23.25 20.08/H 1.94 \n BRA-1/42 36/M/BLACK OR AFRICAN AMERICAN WEEK 1 DAY 8 265 115.27/H 8.42 37.35/H -1.67 107.32 5.90 173.89 27.40 66.14 26.13 9.23/L 7.13 \n WEEK 2 DAY 15 313 45.84 -61.01 36.01/L -3.01 110.97 9.55 144.75 -1.74 109.71/H 69.70 7.18/L 5.08 \n WEEK 3 DAY 22 325 85.70 -21.14 37.71/H -1.31 124.13/H 22.71 89.08/L -57.41 90.29 50.28 25.16/H 23.05 \n WEEK 4 DAY 29 535 44.64 -62.21 36.44 -2.58 79.51/L -21.91 140.78 -5.71 82.44 42.43 14.06 11.95 \n WEEK 5 DAY 36 729 85.21 -21.64 35.78/L -3.23 105.26 3.84 126.60 -19.89 88.71 48.70 25.98/H 23.87 \n BRA-1/93 34/F/ASIAN WEEK 1 DAY 8 402 47.51 -35.34 35.50/L -0.83 94.27 17.98 98.82/L -61.71 72.44 -7.85 14.97 0.22 \n WEEK 2 DAY 15 460 67.64 -15.21 37.96/H 1.62 109.98 33.69 104.21/L -56.32 104.70/H 24.41 14.90 0.16 \n WEEK 3 DAY 22 464 53.06 -29.78 36.33 -0.01 90.17 13.87 139.66 -20.87 111.13/H 30.85 22.86/H 8.12 \n WEEK 4 DAY 29 496 61.68 -21.17 33.52/L -2.82 112.76 36.47 128.82 -31.70 72.89 -7.39 20.77/H 6.03 \n WEEK 5 DAY 36 538 53.98 -28.86 35.71/L -0.63 80.20 3.91 137.16 -23.37 96.63 16.35 18.10 3.36 \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nBaseline is the patient's last observation prior to initiation of study drug. Abnormalities are flagged as high (H) or low (L) if outside the Roche standard reference range.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:35:17 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Vital Signs", @@ -1091,7 +1091,7 @@ "href": "listings/lab-results/lbl01.html", "title": "LBL01", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb_x <- adlb %>%\n filter(!is.na(AVAL) & !is.na(LBSEQ) & !is.na(ADY) & ANRIND != \"\") %>%\n mutate(\n CPID = paste(SITEID, SUBJID, sep = \"/\"),\n PARAM_U = paste0(PARAMCD, \"\\n(\", AVALU, \" / NCI CTCAE grade)\"),\n ANRIND = factor(\n case_when(\n ANRIND == \"LOW\" ~ \"L\",\n ANRIND == \"HIGH\" ~ \"H\",\n TRUE ~ as.character(ANRIND)\n ),\n levels = c(\"\", \"H\", \"L\", \"NORMAL\")\n ),\n AVALC = as.character(format(round(AVAL, 2), nsmall = 2))\n ) %>%\n mutate(AVAL_GR = ifelse(\n !ANRIND %in% c(\"H\", \"L\"),\n AVALC,\n paste(AVALC, paste0(ANRIND, sub(\"-\", \"\", ATOXGR)), sep = \" / \")\n )) %>%\n select(CPID, TRT01A, ADY, LBSEQ, PARAM_U, AVAL_GR) %>%\n unique()\n\nout <- adlb_x %>%\n arrange(CPID, ADY, PARAM_U, LBSEQ) %>%\n tidyr::pivot_wider(\n id_cols = c(TRT01A, CPID, ADY),\n names_from = PARAM_U,\n values_from = AVAL_GR\n ) %>%\n group_by(CPID) %>%\n mutate(DLD = ADY - lag(ADY)) %>%\n ungroup() %>%\n select(CPID, TRT01A, ADY, DLD, unique(adlb_x$PARAM_U))\n\nvar_labels(out) <- names(out)\nout <- out %>%\n var_relabel(\n TRT01A = \"Treatment\",\n CPID = \"Center/Patient ID\",\n ADY = \"Study\\nDay\",\n DLD = \"Days Since\\nLast Dose of\\nStudy Drug\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"CPID\"),\n disp_cols = names(out),\n main_title = \"Listing of Laboratory Test Results\",\n main_footer = \"NCI CTCAE grade is displayed as abnormal high (H) or low (L) followed by the grade.\"\n)\n\nhead(lsting, 20)\n\nListing of Laboratory Test Results\n\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Days Since \n Study Last Dose of ALT CRP IGA \nTreatment Center/Patient ID Day Study Drug (U/L / NCI CTCAE grade) (mg/L / NCI CTCAE grade) (g/L / NCI CTCAE grade)\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-105 80 NA 4.30 / L4 9.09 2.84 \n 149 69 24.70 9.15 2.93 \n 314 165 24.87 10.89 / H2 2.66 \n 398 84 3.67 / L3 8.14 2.86 \n 470 72 18.55 10.59 / H3 2.88 \n 528 58 7.73 10.09 / H3 2.93 \n 535 7 23.51 9.20 2.88 \n BRA-1/id-134 225 NA 7.37 10.46 / H1 2.86 \n 227 2 16.42 7.43 / L1 2.76 \n 255 28 11.16 9.41 2.75 \n 269 14 15.89 10.02 / H4 2.84 \n 357 88 24.35 8.01 2.86 \n 436 79 16.03 8.51 2.98 \n 440 4 17.21 7.63 / L3 2.78 \n BRA-1/id-42 176 NA 16.56 8.88 2.75 \n 477 301 16.49 8.11 2.95 \n 534 57 18.71 8.78 2.95 \n 550 16 11.44 9.53 2.99 \n 569 19 21.66 10.32 / H2 3.00 / H1 \n 608 39 24.61 7.95 / L2 2.78 \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nNCI CTCAE grade is displayed as abnormal high (H) or low (L) followed by the grade.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:34:58 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb_x <- adlb %>%\n filter(!is.na(AVAL) & !is.na(LBSEQ) & !is.na(ADY) & ANRIND != \"\") %>%\n mutate(\n CPID = paste(SITEID, SUBJID, sep = \"/\"),\n PARAM_U = paste0(PARAMCD, \"\\n(\", AVALU, \" / NCI CTCAE grade)\"),\n ANRIND = factor(\n case_when(\n ANRIND == \"LOW\" ~ \"L\",\n ANRIND == \"HIGH\" ~ \"H\",\n TRUE ~ as.character(ANRIND)\n ),\n levels = c(\"\", \"H\", \"L\", \"NORMAL\")\n ),\n AVALC = as.character(format(round(AVAL, 2), nsmall = 2))\n ) %>%\n mutate(AVAL_GR = ifelse(\n !ANRIND %in% c(\"H\", \"L\"),\n AVALC,\n paste(AVALC, paste0(ANRIND, sub(\"-\", \"\", ATOXGR)), sep = \" / \")\n )) %>%\n select(CPID, TRT01A, ADY, LBSEQ, PARAM_U, AVAL_GR) %>%\n unique()\n\nout <- adlb_x %>%\n arrange(CPID, ADY, PARAM_U, LBSEQ) %>%\n tidyr::pivot_wider(\n id_cols = c(TRT01A, CPID, ADY),\n names_from = PARAM_U,\n values_from = AVAL_GR\n ) %>%\n group_by(CPID) %>%\n mutate(DLD = ADY - lag(ADY)) %>%\n ungroup() %>%\n select(CPID, TRT01A, ADY, DLD, unique(adlb_x$PARAM_U))\n\nvar_labels(out) <- names(out)\nout <- out %>%\n var_relabel(\n TRT01A = \"Treatment\",\n CPID = \"Center/Patient ID\",\n ADY = \"Study\\nDay\",\n DLD = \"Days Since\\nLast Dose of\\nStudy Drug\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"CPID\"),\n disp_cols = names(out),\n main_title = \"Listing of Laboratory Test Results\",\n main_footer = \"NCI CTCAE grade is displayed as abnormal high (H) or low (L) followed by the grade.\"\n)\n\nhead(lsting, 20)\n\nListing of Laboratory Test Results\n\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Days Since \n Study Last Dose of ALT CRP IGA \nTreatment Center/Patient ID Day Study Drug (U/L / NCI CTCAE grade) (mg/L / NCI CTCAE grade) (g/L / NCI CTCAE grade)\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-105 80 NA 4.30 / L4 9.09 2.84 \n 149 69 24.70 9.15 2.93 \n 314 165 24.87 10.89 / H2 2.66 \n 398 84 3.67 / L3 8.14 2.86 \n 470 72 18.55 10.59 / H3 2.88 \n 528 58 7.73 10.09 / H3 2.93 \n 535 7 23.51 9.20 2.88 \n BRA-1/id-134 225 NA 7.37 10.46 / H1 2.86 \n 227 2 16.42 7.43 / L1 2.76 \n 255 28 11.16 9.41 2.75 \n 269 14 15.89 10.02 / H4 2.84 \n 357 88 24.35 8.01 2.86 \n 436 79 16.03 8.51 2.98 \n 440 4 17.21 7.63 / L3 2.78 \n BRA-1/id-42 176 NA 16.56 8.88 2.75 \n 477 301 16.49 8.11 2.95 \n 534 57 18.71 8.78 2.95 \n 550 16 11.44 9.53 2.99 \n 569 19 21.66 10.32 / H2 3.00 / H1 \n 608 39 24.61 7.95 / L2 2.78 \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nNCI CTCAE grade is displayed as abnormal high (H) or low (L) followed by the grade.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:35:25 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Lab Results", @@ -1103,7 +1103,7 @@ "href": "listings/lab-results/lbl01_rls.html", "title": "LBL01_RLS", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n filter(!is.na(AVAL))\n\nadlb_x <- adlb %>%\n mutate(ANRIND = factor(\n case_when(\n ANRIND == \"LOW\" & AVAL > stats::quantile(adlb$AVAL, probs = c(0.1)) ~ \"L\",\n ANRIND == \"HIGH\" & AVAL < stats::quantile(adlb$AVAL, probs = c(0.9)) ~ \"H\",\n ANRIND == \"LOW\" & AVAL <= stats::quantile(adlb$AVAL, probs = c(0.1)) ~ \"LL\",\n ANRIND == \"HIGH\" & AVAL >= stats::quantile(adlb$AVAL, probs = c(0.9)) ~ \"HH\",\n TRUE ~ as.character(ANRIND)\n ),\n levels = c(\"\", \"H\", \"HH\", \"L\", \"LL\", \"NORMAL\")\n ))\n\nadlb_x <- adlb_x %>%\n filter(!is.na(LBSEQ) & !is.na(ADY) & ANRIND != \"\") %>%\n mutate(\n CPID = paste(SITEID, SUBJID, sep = \"/\"),\n PARAM_U = paste0(PARAMCD, \"\\n(\", AVALU, \")\"),\n AVALC = as.character(format(round(AVAL, 2), nsmall = 2))\n ) %>%\n mutate(AVAL_GR = ifelse(\n !ANRIND %in% c(\"H\", \"HH\", \"L\", \"LL\"),\n AVALC,\n paste(AVALC, ANRIND, sep = \" / \")\n )) %>%\n select(CPID, TRT01A, ADY, LBSEQ, PARAM_U, AVAL_GR) %>%\n unique()\n\nout <- adlb_x %>%\n arrange(CPID, ADY, PARAM_U, LBSEQ) %>%\n tidyr::pivot_wider(\n id_cols = c(TRT01A, CPID, ADY),\n names_from = PARAM_U,\n values_from = AVAL_GR\n ) %>%\n group_by(CPID) %>%\n mutate(DLD = ADY - lag(ADY)) %>%\n ungroup() %>%\n select(CPID, TRT01A, ADY, DLD, unique(adlb_x$PARAM_U))\n\nvar_labels(out) <- names(out)\nout <- out %>%\n var_relabel(\n TRT01A = \"Treatment\",\n CPID = \"Center/Patient ID\",\n ADY = \"Study\\nDay\",\n DLD = \"Days Since\\nLast Dose of\\nStudy Drug\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"CPID\"),\n disp_cols = names(out),\n main_title = \"Listing of Laboratory Test Results Using Roche Safety Lab Standardization\",\n main_footer = \"Abnormalities are flagged as high (H) or low (L) if outside the Roche standard reference range; high high (HH) or low low (LL) if outside the Roche marked reference range with a clinically relevant change from baseline. \" \n)\n\nhead(lsting, 20)\n\nListing of Laboratory Test Results Using Roche Safety Lab Standardization\n\n————————————————————————————————————————————————————————————————————————————————————————\n Days Since \n Study Last Dose of ALT CRP IGA \nTreatment Center/Patient ID Day Study Drug (U/L) (mg/L) (g/L) \n————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-105 80 NA 4.30 / L 9.09 2.84 \n 149 69 24.70 9.15 2.93 \n 314 165 24.87 10.89 / H 2.66 \n 398 84 3.67 / L 8.14 2.86 \n 470 72 18.55 10.59 / H 2.88 \n 528 58 7.73 10.09 / H 2.93 \n 535 7 23.51 9.20 2.88 \n BRA-1/id-134 225 NA 7.37 10.46 / H 2.86 \n 227 2 16.42 7.43 / L 2.76 \n 255 28 11.16 9.41 2.75 \n 269 14 15.89 10.02 / H 2.84 \n 357 88 24.35 8.01 2.86 \n 436 79 16.03 8.51 2.98 \n 440 4 17.21 7.63 / L 2.78 \n BRA-1/id-42 176 NA 16.56 8.88 2.75 \n 477 301 16.49 8.11 2.95 \n 534 57 18.71 8.78 2.95 \n 550 16 11.44 9.53 2.99 \n 569 19 21.66 10.32 / H 3.00 / H\n 608 39 24.61 7.95 / L 2.78 \n————————————————————————————————————————————————————————————————————————————————————————\n\nAbnormalities are flagged as high (H) or low (L) if outside the Roche standard reference range; high high (HH) or low low (LL) if outside the Roche marked reference range with a clinically relevant change from baseline. \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:35:06 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n filter(!is.na(AVAL))\n\nadlb_x <- adlb %>%\n mutate(ANRIND = factor(\n case_when(\n ANRIND == \"LOW\" & AVAL > stats::quantile(adlb$AVAL, probs = c(0.1)) ~ \"L\",\n ANRIND == \"HIGH\" & AVAL < stats::quantile(adlb$AVAL, probs = c(0.9)) ~ \"H\",\n ANRIND == \"LOW\" & AVAL <= stats::quantile(adlb$AVAL, probs = c(0.1)) ~ \"LL\",\n ANRIND == \"HIGH\" & AVAL >= stats::quantile(adlb$AVAL, probs = c(0.9)) ~ \"HH\",\n TRUE ~ as.character(ANRIND)\n ),\n levels = c(\"\", \"H\", \"HH\", \"L\", \"LL\", \"NORMAL\")\n ))\n\nadlb_x <- adlb_x %>%\n filter(!is.na(LBSEQ) & !is.na(ADY) & ANRIND != \"\") %>%\n mutate(\n CPID = paste(SITEID, SUBJID, sep = \"/\"),\n PARAM_U = paste0(PARAMCD, \"\\n(\", AVALU, \")\"),\n AVALC = as.character(format(round(AVAL, 2), nsmall = 2))\n ) %>%\n mutate(AVAL_GR = ifelse(\n !ANRIND %in% c(\"H\", \"HH\", \"L\", \"LL\"),\n AVALC,\n paste(AVALC, ANRIND, sep = \" / \")\n )) %>%\n select(CPID, TRT01A, ADY, LBSEQ, PARAM_U, AVAL_GR) %>%\n unique()\n\nout <- adlb_x %>%\n arrange(CPID, ADY, PARAM_U, LBSEQ) %>%\n tidyr::pivot_wider(\n id_cols = c(TRT01A, CPID, ADY),\n names_from = PARAM_U,\n values_from = AVAL_GR\n ) %>%\n group_by(CPID) %>%\n mutate(DLD = ADY - lag(ADY)) %>%\n ungroup() %>%\n select(CPID, TRT01A, ADY, DLD, unique(adlb_x$PARAM_U))\n\nvar_labels(out) <- names(out)\nout <- out %>%\n var_relabel(\n TRT01A = \"Treatment\",\n CPID = \"Center/Patient ID\",\n ADY = \"Study\\nDay\",\n DLD = \"Days Since\\nLast Dose of\\nStudy Drug\"\n )\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"CPID\"),\n disp_cols = names(out),\n main_title = \"Listing of Laboratory Test Results Using Roche Safety Lab Standardization\",\n main_footer = \"Abnormalities are flagged as high (H) or low (L) if outside the Roche standard reference range; high high (HH) or low low (LL) if outside the Roche marked reference range with a clinically relevant change from baseline. \" \n)\n\nhead(lsting, 20)\n\nListing of Laboratory Test Results Using Roche Safety Lab Standardization\n\n————————————————————————————————————————————————————————————————————————————————————————\n Days Since \n Study Last Dose of ALT CRP IGA \nTreatment Center/Patient ID Day Study Drug (U/L) (mg/L) (g/L) \n————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-105 80 NA 4.30 / L 9.09 2.84 \n 149 69 24.70 9.15 2.93 \n 314 165 24.87 10.89 / H 2.66 \n 398 84 3.67 / L 8.14 2.86 \n 470 72 18.55 10.59 / H 2.88 \n 528 58 7.73 10.09 / H 2.93 \n 535 7 23.51 9.20 2.88 \n BRA-1/id-134 225 NA 7.37 10.46 / H 2.86 \n 227 2 16.42 7.43 / L 2.76 \n 255 28 11.16 9.41 2.75 \n 269 14 15.89 10.02 / H 2.84 \n 357 88 24.35 8.01 2.86 \n 436 79 16.03 8.51 2.98 \n 440 4 17.21 7.63 / L 2.78 \n BRA-1/id-42 176 NA 16.56 8.88 2.75 \n 477 301 16.49 8.11 2.95 \n 534 57 18.71 8.78 2.95 \n 550 16 11.44 9.53 2.99 \n 569 19 21.66 10.32 / H 3.00 / H\n 608 39 24.61 7.95 / L 2.78 \n————————————————————————————————————————————————————————————————————————————————————————\n\nAbnormalities are flagged as high (H) or low (L) if outside the Roche standard reference range; high high (HH) or low low (LL) if outside the Roche marked reference range with a clinically relevant change from baseline. \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:35:33 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 purrr_1.0.2 generics_0.1.3 \n [9] jsonlite_1.8.8 glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1\n[13] brio_1.1.4 fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 \n[17] evaluate_0.23 fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 \n[21] compiler_4.3.3 codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 \n[25] pkgconfig_2.0.3 tidyr_1.3.1 digest_0.6.35 R6_2.5.1 \n[29] tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 \n[33] checkmate_2.3.1 withr_3.0.0 tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Lab Results", @@ -1115,7 +1115,7 @@ "href": "listings/exposure/exl01.html", "title": "EXL01", "section": "", - "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\nout <- adex %>%\n filter(PARAMCD == \"DOSE\" & !is.na(AVAL) & SAFFL == \"Y\") %>%\n mutate(\n CRTNPT = paste(SITEID, SUBJID, sep = \"/\")\n ) %>%\n arrange(CRTNPT, AVISIT) %>%\n select(CRTNPT, AVISIT, EXSTDY, EXENDY, TRT01A, AVAL, AVALU, EXDOSFRQ, EXROUTE)\n\nvar_labels(out) <- c(\n CRTNPT = \"Center/Subject ID\",\n AVISIT = \"Visit\",\n EXSTDY = \"Study Day\\nFrom\",\n EXENDY = \"Study Day\\nTo\",\n TRT01A = \"Treatment\",\n AVAL = \"Dose\",\n AVALU = \"Unit\",\n EXDOSFRQ = \"Frequency\",\n EXROUTE = \"Route\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"CRTNPT\", \"AVISIT\"),\n disp_cols = names(out),\n main_title = \"Listing of Exposure to Study Drug\"\n)\n\nhead(lsting, 20)\n\nListing of Exposure to Study Drug\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Study Day Study Day \nTreatment Center/Subject ID Visit From To Dose Unit Frequency Route \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-105 SCREENING -1 -1 960 mg ONCE INTRAVENOUS \n BASELINE 1 1 960 mg ONCE INTRAVENOUS \n WEEK 1 DAY 8 8 8 720 mg ONCE SUBCUTANEOUS\n WEEK 2 DAY 15 15 15 480 mg ONCE INTRAVENOUS \n WEEK 3 DAY 22 22 22 480 mg ONCE INTRAVENOUS \n WEEK 4 DAY 29 29 29 720 mg ONCE INTRAVENOUS \n WEEK 5 DAY 36 36 36 720 mg ONCE INTRAVENOUS \n BRA-1/id-134 SCREENING -1 -1 960 mg ONCE INTRAVENOUS \n BASELINE 1 1 720 mg ONCE INTRAVENOUS \n WEEK 1 DAY 8 8 8 720 mg ONCE INTRAVENOUS \n WEEK 2 DAY 15 15 15 960 mg ONCE INTRAVENOUS \n WEEK 3 DAY 22 22 22 720 mg ONCE INTRAVENOUS \n WEEK 4 DAY 29 29 29 960 mg ONCE INTRAVENOUS \n WEEK 5 DAY 36 36 36 960 mg ONCE INTRAVENOUS \n BRA-1/id-42 SCREENING -1 -1 960 mg ONCE INTRAVENOUS \n BASELINE 1 1 960 mg ONCE INTRAVENOUS \n WEEK 1 DAY 8 8 8 720 mg ONCE SUBCUTANEOUS\n WEEK 2 DAY 15 15 15 720 mg ONCE INTRAVENOUS \n WEEK 3 DAY 22 22 22 720 mg ONCE INTRAVENOUS \n WEEK 4 DAY 29 29 29 480 mg ONCE INTRAVENOUS \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:35:13 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9020\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 pkgconfig_2.0.3 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Listing\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(rlistings)\n\nadex <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\nout <- adex %>%\n filter(PARAMCD == \"DOSE\" & !is.na(AVAL) & SAFFL == \"Y\") %>%\n mutate(\n CRTNPT = paste(SITEID, SUBJID, sep = \"/\")\n ) %>%\n arrange(CRTNPT, AVISIT) %>%\n select(CRTNPT, AVISIT, EXSTDY, EXENDY, TRT01A, AVAL, AVALU, EXDOSFRQ, EXROUTE)\n\nvar_labels(out) <- c(\n CRTNPT = \"Center/Subject ID\",\n AVISIT = \"Visit\",\n EXSTDY = \"Study Day\\nFrom\",\n EXENDY = \"Study Day\\nTo\",\n TRT01A = \"Treatment\",\n AVAL = \"Dose\",\n AVALU = \"Unit\",\n EXDOSFRQ = \"Frequency\",\n EXROUTE = \"Route\"\n)\n\n\n\n\n\nCodelsting <- as_listing(\n out,\n key_cols = c(\"TRT01A\", \"CRTNPT\", \"AVISIT\"),\n disp_cols = names(out),\n main_title = \"Listing of Exposure to Study Drug\"\n)\n\nhead(lsting, 20)\n\nListing of Exposure to Study Drug\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Study Day Study Day \nTreatment Center/Subject ID Visit From To Dose Unit Frequency Route \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X BRA-1/id-105 SCREENING -1 -1 960 mg ONCE INTRAVENOUS \n BASELINE 1 1 960 mg ONCE INTRAVENOUS \n WEEK 1 DAY 8 8 8 720 mg ONCE SUBCUTANEOUS\n WEEK 2 DAY 15 15 15 480 mg ONCE INTRAVENOUS \n WEEK 3 DAY 22 22 22 480 mg ONCE INTRAVENOUS \n WEEK 4 DAY 29 29 29 720 mg ONCE INTRAVENOUS \n WEEK 5 DAY 36 36 36 720 mg ONCE INTRAVENOUS \n BRA-1/id-134 SCREENING -1 -1 960 mg ONCE INTRAVENOUS \n BASELINE 1 1 720 mg ONCE INTRAVENOUS \n WEEK 1 DAY 8 8 8 720 mg ONCE INTRAVENOUS \n WEEK 2 DAY 15 15 15 960 mg ONCE INTRAVENOUS \n WEEK 3 DAY 22 22 22 720 mg ONCE INTRAVENOUS \n WEEK 4 DAY 29 29 29 960 mg ONCE INTRAVENOUS \n WEEK 5 DAY 36 36 36 960 mg ONCE INTRAVENOUS \n BRA-1/id-42 SCREENING -1 -1 960 mg ONCE INTRAVENOUS \n BASELINE 1 1 960 mg ONCE INTRAVENOUS \n WEEK 1 DAY 8 8 8 720 mg ONCE SUBCUTANEOUS\n WEEK 2 DAY 15 15 15 720 mg ONCE INTRAVENOUS \n WEEK 3 DAY 22 22 22 720 mg ONCE INTRAVENOUS \n WEEK 4 DAY 29 29 29 480 mg ONCE INTRAVENOUS \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:35:40 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] rlistings_0.2.7.9013 tibble_3.2.1 formatters_0.5.5.9021\n[4] scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] vctrs_0.6.5 cli_3.6.2 knitr_1.45 rlang_1.1.3 \n [5] xfun_0.43 stringi_1.8.3 generics_0.1.3 jsonlite_1.8.8 \n [9] glue_1.7.0 backports_1.4.1 htmltools_0.5.8.1 brio_1.1.4 \n[13] fansi_1.0.6 rmarkdown_2.26 grid_4.3.3 evaluate_0.23 \n[17] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4 compiler_4.3.3 \n[21] codetools_0.2-20 htmlwidgets_1.6.4 testthat_3.2.1 pkgconfig_2.0.3 \n[25] digest_0.6.35 R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 \n[29] pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0 \n[33] tools_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Listings", "Exposure", @@ -1127,7 +1127,7 @@ "href": "tables/ADA/adat03.html", "title": "ADAT03", "section": "", - "text": "Data Setup\nStandard Table (μg/mL)\nteal App\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadab <- synthetic_cdisc_dataset(\"latest\", \"adab\")\nadpc <- synthetic_cdisc_dataset(\"latest\", \"adpc\")\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)\nadpc <- df_explicit_na(adpc)\n\n# Adjust zzz parameter\nmax_conc <- 15\n\nadpc <- adpc %>% select(USUBJID, NFRLT, AVAL, AVALU, AVALCAT1)\n\nanl <- adab %>%\n filter(., PARAM == \"ADA interpreted per sample result\") %>%\n select(-AVAL, AVALC, AVALU)\n\nanl <- merge(anl, adpc, by = c(\"USUBJID\", \"NFRLT\")) %>%\n mutate(AVAL_LT = ifelse(AVAL <= max_conc, TRUE, FALSE))\n\n\n\n\n\nCode# parameters in columns\nadat03_stats <- c(\"n\", \"mean\", \"sd\", \"median\", \"min\", \"max\", \"cv\", \"geom_mean\", \"count_fraction\")\nadat03_lbls <- c(\n n = \"Total Number\\nof Measurable\\n Samples\",\n mean = \"Mean\",\n sd = \"SD\",\n median = \"Median\",\n min = \"Minimum\",\n max = \"Maximum\",\n cv = \"CV (%)\",\n geom_mean = \"Geometric Mean\",\n count_fraction = paste0(\"Samples with\\nConcentration\\n≤ \", max_conc, \"μg/mL\")\n)\nadat03_fmts <- c(\n n = \"xx.\",\n mean = format_sigfig(3),\n sd = format_sigfig(3),\n median = format_sigfig(3),\n min = format_sigfig(3),\n max = format_sigfig(3),\n cv = \"xx.x\",\n geom_mean = format_sigfig(3),\n count_fraction = format_count_fraction\n)\n\nafun_list <- lapply(\n 1:9,\n function(i) make_afun(s_summary, .stats = adat03_stats[i], .formats = adat03_fmts[i], .labels = \"Overall\")\n)\n\n# lyt creation\nlyt <- basic_table() %>%\n split_rows_by(\n var = \"ARM\",\n label_pos = \"topleft\",\n split_label = \"Treatment Group\",\n split_fun = drop_split_levels,\n section_div = \"\"\n ) %>%\n add_rowcounts() %>%\n split_rows_by(\n var = \"VISIT\",\n label_pos = \"topleft\",\n split_label = \"Visit\",\n split_fun = drop_split_levels,\n child_labels = \"hidden\"\n ) %>%\n analyze_vars_in_cols(\n vars = c(rep(\"AVAL\", 8), \"AVAL_LT\"),\n .stats = adat03_stats,\n .labels = adat03_lbls,\n .formats = adat03_fmts\n ) %>%\n analyze_colvars(\n afun_list,\n nested = FALSE,\n extra_args = list(\".labels\" = \"Overall\")\n )\n\nresult <- build_table(lyt, anl, alt_counts_df = adsl)\n\nmain_title(result) <- paste(\n \"Summary of Serum Concentrations (μg/mL) at Timepoints Where ADA Samples Were Collected and Analyzed\\n\n Protocol:\", unique(adab$PARCAT1)[1]\n)\nsubtitles(result) <- paste(\"Analyte:\", unique(adab$PARAMCD)[1])\nfnotes_at_path(result, rowpath = NULL, colpath = c(\"multivars\", \"AVAL\")) <- \"Refers to the total no. of measurable ADA samples that have a corresponding measurable drug concentration sample (i.e. results with valid numeric values and LTRs). LTR results on post-dose samples are replaced by aaa µg/mL i.e. half of MQC value.\" \nfnotes_at_path(result, rowpath = NULL, colpath = c(\"multivars\", \"AVAL_LT\")) <- \"In validation, the assay was able to detect yyy ng/mL of surrogate ADA in the presence of zzz µg/mL of [drug]. BLQ = Below Limit of Quantitation, LTR = Lower than Reportable, MQC = Minimum Quantifiable Concentration, ADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies). RXXXXXXX is also known as [drug]\" \n\nresult\n\nSummary of Serum Concentrations (μg/mL) at Timepoints Where ADA Samples Were Collected and Analyzed\n\n Protocol: A: Drug X Antibody\nAnalyte: R1800000\n\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Total Number Samples with \nTreatment Group of Measurable Concentration\n Visit Samples {1} Mean SD Median Minimum Maximum CV (%) Geometric Mean ≤ 15μg/mL {2}\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X (N=536) \n Day 1 402 0 0 0 0 0 NA NA 402 (100%) \n Day 2 134 16.2 1.63 16.2 12.6 19.9 10.0 16.1 39 (29.1%) \n\nC: Combination (N=792) \n Day 1 528 0 0 0 0 0 NA NA 528 (100%) \n Day 2 264 24.7 8.65 22.5 12.6 39.5 35.0 23.2 28 (10.6%) \n\nOverall 1328 6.54 11.0 0 0 39.5 167.5 NA 997 (75.1%) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\n{1} - Refers to the total no. of measurable ADA samples that have a corresponding measurable drug concentration sample (i.e. results with valid numeric values and LTRs). LTR results on post-dose samples are replaced by aaa µg/mL i.e. half of MQC value.\n{2} - In validation, the assay was able to detect yyy ng/mL of surrogate ADA in the presence of zzz µg/mL of [drug]. BLQ = Below Limit of Quantitation, LTR = Lower than Reportable, MQC = Minimum Quantifiable Concentration, ADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies). RXXXXXXX is also known as [drug]\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:35:24 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9020 scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 withr_3.0.0 \n[33] Rdpack_2.6 digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 \n[37] vctrs_0.6.5 evaluate_0.23 glue_1.7.0 codetools_0.2-20 \n[41] survival_3.5-8 fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 \n[45] rmarkdown_2.26 tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table (μg/mL)\nteal App\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadab <- synthetic_cdisc_dataset(\"latest\", \"adab\")\nadpc <- synthetic_cdisc_dataset(\"latest\", \"adpc\")\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)\nadpc <- df_explicit_na(adpc)\n\n# Adjust zzz parameter\nmax_conc <- 15\n\nadpc <- adpc %>% select(USUBJID, NFRLT, AVAL, AVALU, AVALCAT1)\n\nanl <- adab %>%\n filter(., PARAM == \"ADA interpreted per sample result\") %>%\n select(-AVAL, AVALC, AVALU)\n\nanl <- merge(anl, adpc, by = c(\"USUBJID\", \"NFRLT\")) %>%\n mutate(AVAL_LT = ifelse(AVAL <= max_conc, TRUE, FALSE))\n\n\n\n\n\nCode# parameters in columns\nadat03_stats <- c(\"n\", \"mean\", \"sd\", \"median\", \"min\", \"max\", \"cv\", \"geom_mean\", \"count_fraction\")\nadat03_lbls <- c(\n n = \"Total Number\\nof Measurable\\n Samples\",\n mean = \"Mean\",\n sd = \"SD\",\n median = \"Median\",\n min = \"Minimum\",\n max = \"Maximum\",\n cv = \"CV (%)\",\n geom_mean = \"Geometric Mean\",\n count_fraction = paste0(\"Samples with\\nConcentration\\n≤ \", max_conc, \"μg/mL\")\n)\nadat03_fmts <- c(\n n = \"xx.\",\n mean = format_sigfig(3),\n sd = format_sigfig(3),\n median = format_sigfig(3),\n min = format_sigfig(3),\n max = format_sigfig(3),\n cv = \"xx.x\",\n geom_mean = format_sigfig(3),\n count_fraction = format_count_fraction\n)\n\nafun_list <- lapply(\n 1:9,\n function(i) make_afun(s_summary, .stats = adat03_stats[i], .formats = adat03_fmts[i], .labels = \"Overall\")\n)\n\n# lyt creation\nlyt <- basic_table() %>%\n split_rows_by(\n var = \"ARM\",\n label_pos = \"topleft\",\n split_label = \"Treatment Group\",\n split_fun = drop_split_levels,\n section_div = \"\"\n ) %>%\n add_rowcounts() %>%\n split_rows_by(\n var = \"VISIT\",\n label_pos = \"topleft\",\n split_label = \"Visit\",\n split_fun = drop_split_levels,\n child_labels = \"hidden\"\n ) %>%\n analyze_vars_in_cols(\n vars = c(rep(\"AVAL\", 8), \"AVAL_LT\"),\n .stats = adat03_stats,\n .labels = adat03_lbls,\n .formats = adat03_fmts\n ) %>%\n analyze_colvars(\n afun_list,\n nested = FALSE,\n extra_args = list(\".labels\" = \"Overall\")\n )\n\nresult <- build_table(lyt, anl, alt_counts_df = adsl)\n\nmain_title(result) <- paste(\n \"Summary of Serum Concentrations (μg/mL) at Timepoints Where ADA Samples Were Collected and Analyzed\\n\n Protocol:\", unique(adab$PARCAT1)[1]\n)\nsubtitles(result) <- paste(\"Analyte:\", unique(adab$PARAMCD)[1])\nfnotes_at_path(result, rowpath = NULL, colpath = c(\"multivars\", \"AVAL\")) <- \"Refers to the total no. of measurable ADA samples that have a corresponding measurable drug concentration sample (i.e. results with valid numeric values and LTRs). LTR results on post-dose samples are replaced by aaa µg/mL i.e. half of MQC value.\" \nfnotes_at_path(result, rowpath = NULL, colpath = c(\"multivars\", \"AVAL_LT\")) <- \"In validation, the assay was able to detect yyy ng/mL of surrogate ADA in the presence of zzz µg/mL of [drug]. BLQ = Below Limit of Quantitation, LTR = Lower than Reportable, MQC = Minimum Quantifiable Concentration, ADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies). RXXXXXXX is also known as [drug]\" \n\nresult\n\nSummary of Serum Concentrations (μg/mL) at Timepoints Where ADA Samples Were Collected and Analyzed\n\n Protocol: A: Drug X Antibody\nAnalyte: R1800000\n\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n Total Number Samples with \nTreatment Group of Measurable Concentration\n Visit Samples {1} Mean SD Median Minimum Maximum CV (%) Geometric Mean ≤ 15μg/mL {2}\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X (N=536) \n Day 1 402 0 0 0 0 0 NA NA 402 (100%) \n Day 2 134 16.2 1.63 16.2 12.6 19.9 10.0 16.1 39 (29.1%) \n\nC: Combination (N=792) \n Day 1 528 0 0 0 0 0 NA NA 528 (100%) \n Day 2 264 24.7 8.65 22.5 12.6 39.5 35.0 23.2 28 (10.6%) \n\nOverall 1328 6.54 11.0 0 0 39.5 167.5 NA 997 (75.1%) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\n{1} - Refers to the total no. of measurable ADA samples that have a corresponding measurable drug concentration sample (i.e. results with valid numeric values and LTRs). LTR results on post-dose samples are replaced by aaa µg/mL i.e. half of MQC value.\n{2} - In validation, the assay was able to detect yyy ng/mL of surrogate ADA in the presence of zzz µg/mL of [drug]. BLQ = Below Limit of Quantitation, LTR = Lower than Reportable, MQC = Minimum Quantifiable Concentration, ADA = Anti-Drug Antibodies (is also referred to as ATA, or Anti-Therapeutic Antibodies). RXXXXXXX is also known as [drug]\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:35:53 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9021 scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 withr_3.0.0 \n[33] Rdpack_2.6 digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 \n[37] vctrs_0.6.5 evaluate_0.23 glue_1.7.0 codetools_0.2-20 \n[41] survival_3.5-8 fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 \n[45] rmarkdown_2.26 tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "ADA", @@ -1139,7 +1139,7 @@ "href": "tables/ADA/adat02.html", "title": "ADAT02", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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 analyze_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 analyze_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 0 0 0 \n Persistent ADA 0 0 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:35:36 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 dplyr_1.1.4 tern_0.9.3.9031 \n[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 withr_3.0.0 \n[33] Rdpack_2.6 digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 \n[37] vctrs_0.6.5 evaluate_0.23 glue_1.7.0 codetools_0.2-20 \n[41] survival_3.5-8 fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 \n[45] rmarkdown_2.26 tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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 analyze_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 analyze_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 0 0 0 \n Persistent ADA 0 0 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:36:05 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9017 dplyr_1.1.4 tern_0.9.3.9031 \n[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 withr_3.0.0 \n[33] Rdpack_2.6 digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 \n[37] vctrs_0.6.5 evaluate_0.23 glue_1.7.0 codetools_0.2-20 \n[41] survival_3.5-8 fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 \n[45] rmarkdown_2.26 tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "ADA", @@ -1151,7 +1151,7 @@ "href": "tables/demography/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 App\nReproducibility\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 analyze_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 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 NOT REPORTED 6 (4.5%) 10 (7.5%) 11 (8.3%) 27 (6.8%) \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 analyze_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 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 NOT REPORTED 6 (4.5%) 10 (7.5%) 11 (8.3%) \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 analyze_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 analyze_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 analyze_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 analyze_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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\n # Include `EOSDY` and `DCSREAS` variables below because they contain missing data.\n stopifnot(\n any(is.na(ADSL$EOSDY)),\n any(is.na(ADSL$DCSREAS))\n )\n})\ndatanames <- \"ADSL\"\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:35:58 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tidyr_1.3.1 \n [9] dplyr_1.1.4 scda_0.1.6.9017 \n[11] tern_0.9.3.9031 rtables_0.6.6.9011 \n[13] magrittr_2.0.3 formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] glue_1.7.0 codetools_0.2-20 ps_1.7.6 \n[58] stringi_1.8.3 gtable_0.3.4 later_1.3.2 \n[61] shinycssloaders_1.0.0 munsell_0.5.1 tibble_3.2.1 \n[64] logger_0.3.0 pillar_1.9.0 htmltools_0.5.8.1 \n[67] brio_1.1.4 R6_2.5.1 Rdpack_2.6 \n[70] evaluate_0.23 lattice_0.22-6 rbibutils_2.2.16 \n[73] backports_1.4.1 memoise_2.0.1 broom_1.0.5 \n[76] teal.reporter_0.3.1.9002 bslib_0.7.0 httpuv_1.6.15 \n[79] Rcpp_1.0.12 shinyvalidate_0.1.3 coda_0.19-4.1 \n[82] nlme_3.1-164 checkmate_2.3.1 xfun_0.43 \n[85] zoo_1.8-12 forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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 analyze_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 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 NOT REPORTED 6 (4.5%) 10 (7.5%) 11 (8.3%) 27 (6.8%) \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 analyze_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 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 NOT REPORTED 6 (4.5%) 10 (7.5%) 11 (8.3%) \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 analyze_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 analyze_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 analyze_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 analyze_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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\n # Include `EOSDY` and `DCSREAS` variables below because they contain missing data.\n stopifnot(\n any(is.na(ADSL$EOSDY)),\n any(is.na(ADSL$DCSREAS))\n )\n})\ndatanames <- \"ADSL\"\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:36:28 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tidyr_1.3.1 \n [9] dplyr_1.1.4 scda_0.1.6.9017 \n[11] tern_0.9.3.9031 rtables_0.6.6.9011 \n[13] magrittr_2.0.3 formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] glue_1.7.0 codetools_0.2-20 ps_1.7.6 \n[58] stringi_1.8.3 gtable_0.3.4 later_1.3.2 \n[61] shinycssloaders_1.0.0 munsell_0.5.1 tibble_3.2.1 \n[64] logger_0.3.0 pillar_1.9.0 htmltools_0.5.8.1 \n[67] brio_1.1.4 R6_2.5.1 Rdpack_2.6 \n[70] evaluate_0.23 lattice_0.22-6 rbibutils_2.2.16 \n[73] backports_1.4.1 memoise_2.0.1 broom_1.0.5 \n[76] teal.reporter_0.3.1.9003 bslib_0.7.0 httpuv_1.6.15 \n[79] Rcpp_1.0.12 shinyvalidate_0.1.3 coda_0.19-4.1 \n[82] nlme_3.1-164 checkmate_2.3.1 xfun_0.43 \n[85] zoo_1.8-12 forcats_1.0.0 pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Demography", @@ -1163,7 +1163,7 @@ "href": "tables/efficacy/cmht01.html", "title": "CMHT01", "section": "", - "text": "Data Setup\nTable of Single Parameter\nTable of Multiple Parameters\nteal App\nReproducibility\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\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\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\n A: Drug X B: Placebo C: Combination \nParameter (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n})\ndatanames <- c(\"ADSL\", \"ADRS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADRS <- data[[\"ADRS\"]]\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)\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:36:43 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nTable of Single Parameter\nTable of Multiple Parameters\nteal App\nReproducibility\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\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\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\n A: Drug X B: Placebo C: Combination \nParameter (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n})\ndatanames <- c(\"ADSL\", \"ADRS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADRS <- data[[\"ADRS\"]]\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)\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:37:14 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Efficacy", @@ -1175,7 +1175,7 @@ "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 App\nReproducibility\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 analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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 prune_table(prune_func = prune_zeros_only)\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 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 analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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 prune_table(prune_func = prune_zeros_only)\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 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 analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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 prune_table(prune_func = prune_zeros_only)\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 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 analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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 prune_table(prune_func = prune_zeros_only)\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 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(tern)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADTTE <- df_explicit_na(ADTTE)\n})\ndatanames <- c(\"ADSL\", \"ADTTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADTTE <- data[[\"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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:37:18 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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 analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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 prune_table(prune_func = prune_zeros_only)\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 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 analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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 prune_table(prune_func = prune_zeros_only)\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 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 analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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 prune_table(prune_func = prune_zeros_only)\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 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 analyze_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 analyze(\"EVNTDESC\") %>%\n analyze_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 prune_table(prune_func = prune_zeros_only)\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 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(tern)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADTTE <- df_explicit_na(ADTTE)\n})\ndatanames <- c(\"ADSL\", \"ADTTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADTTE <- data[[\"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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:37:51 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Efficacy", @@ -1187,7 +1187,7 @@ "href": "tables/efficacy/cfbt01.html", "title": "CFBT01", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\n A: Drug X B: Placebo C: Combination \nParameter Change from Change from Change from \n Analysis Visit 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADQS <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADQS <- df_explicit_na(ADQS)\n})\ndatanames <- c(\"ADSL\", \"ADQS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADQS <- data[[\"ADQS\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(\n teal_slice(\"ADQS\", \"AVISIT\", selected = NULL),\n teal_slice(\"ADQS\", \"AVAL\", selected = NULL)\n )\n)\n\nshinyApp(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\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:37:50 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 \n[13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 \n[16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 \n[19] ps_1.7.6 purrr_1.0.2 xfun_0.43 \n[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002\n[25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[34] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[37] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[40] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[43] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[46] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[49] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[52] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[55] checkmate_2.3.1 shinyjs_2.1.0 plotly_4.10.4 \n[58] generics_0.1.3 chromote_0.2.0 ggplot2_3.5.0 \n[61] munsell_0.5.1 scales_1.3.0 xtable_1.8-4 \n[64] glue_1.7.0 emmeans_1.10.0 lazyeval_0.2.2 \n[67] tools_4.3.3 webshot2_0.1.1 data.table_1.15.4 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-4 \n[73] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[76] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[79] fansi_1.0.6 viridisLite_0.4.2 geepack_1.3.10 \n[82] gtable_0.3.4 sass_0.4.9 digest_0.6.35 \n[85] TH.data_1.1-2 htmlwidgets_1.6.4 memoise_2.0.1 \n[88] htmltools_0.5.8.1 lifecycle_1.0.4 httr_1.4.7 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\n A: Drug X B: Placebo C: Combination \nParameter Change from Change from Change from \n Analysis Visit 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADQS <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADQS <- df_explicit_na(ADQS)\n})\ndatanames <- c(\"ADSL\", \"ADQS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADQS <- data[[\"ADQS\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(\n teal_slice(\"ADQS\", \"AVISIT\", selected = NULL),\n teal_slice(\"ADQS\", \"AVAL\", selected = NULL)\n )\n)\n\nshinyApp(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\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:38:24 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 \n[13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 \n[16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 \n[19] ps_1.7.6 purrr_1.0.2 xfun_0.43 \n[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003\n[25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[34] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[37] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[40] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[43] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[46] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[49] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[52] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[55] checkmate_2.3.1 shinyjs_2.1.0 plotly_4.10.4 \n[58] generics_0.1.3 chromote_0.2.0 ggplot2_3.5.0 \n[61] munsell_0.5.1 scales_1.3.0 xtable_1.8-4 \n[64] glue_1.7.0 emmeans_1.10.0 lazyeval_0.2.2 \n[67] tools_4.3.3 webshot2_0.1.1 data.table_1.15.4 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-4 \n[73] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[76] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[79] fansi_1.0.6 viridisLite_0.4.2 geepack_1.3.10 \n[82] gtable_0.3.4 sass_0.4.9 digest_0.6.35 \n[85] TH.data_1.1-2 htmlwidgets_1.6.4 memoise_2.0.1 \n[88] htmltools_0.5.8.1 lifecycle_1.0.4 httr_1.4.7 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Efficacy", @@ -1199,7 +1199,7 @@ "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 App\nReproducibility\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\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADRS <- df_explicit_na(ADRS)\n\n ADSL <- ADSL %>%\n mutate(Dum_ARM = factor(rep(\"Single ARM\", nrow(.))))\n ADRS <- ADRS %>%\n mutate(Dum_ARM = factor(rep(\"Single ARM\", nrow(.))))\n})\ndatanames <- c(\"ADSL\", \"ADRS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADRS <- data[[\"ADRS\"]]\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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:38:20 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADRS <- df_explicit_na(ADRS)\n\n ADSL <- ADSL %>%\n mutate(Dum_ARM = factor(rep(\"Single ARM\", nrow(.))))\n ADRS <- ADRS %>%\n mutate(Dum_ARM = factor(rep(\"Single ARM\", nrow(.))))\n})\ndatanames <- c(\"ADSL\", \"ADRS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADRS <- data[[\"ADRS\"]]\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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:38:55 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Efficacy", @@ -1211,7 +1211,7 @@ "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 App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n})\ndatanames <- c(\"ADSL\", \"ADTTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADTTE <- data[[\"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\n## Setup App\napp <- init(\n data = data,\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)\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:38:59 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 broom_1.0.5 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 processx_3.8.4 \n[13] survival_3.5-8 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 abind_1.4-5 multcomp_1.4-25 \n[25] withr_3.0.0 purrr_1.0.2 shinyWidgets_0.8.4 \n[28] geepack_1.3.10 grid_4.3.3 fansi_1.0.6 \n[31] teal.logger_0.2.0.9001 xtable_1.8-4 colorspace_2.1-0 \n[34] ggplot2_3.5.0 emmeans_1.10.0 scales_1.3.0 \n[37] MASS_7.3-60.0.1 cli_3.6.2 mvtnorm_1.2-4 \n[40] rmarkdown_2.26 generics_0.1.3 cachem_1.0.8 \n[43] chromote_0.2.0 stringr_1.5.1 splines_4.3.3 \n[46] formatR_1.14 vctrs_0.6.5 webshot_0.5.5 \n[49] Matrix_1.6-5 sandwich_3.1-0 jsonlite_1.8.8 \n[52] carData_3.0-5 callr_3.7.6 car_3.1-2 \n[55] teal.widgets_0.4.2.9009 testthat_3.2.1 fontawesome_0.5.2 \n[58] jquerylib_0.1.4 tidyr_1.3.1 glue_1.7.0 \n[61] ps_1.7.6 codetools_0.2-20 stringi_1.8.3 \n[64] gtable_0.3.4 later_1.3.2 shinycssloaders_1.0.0 \n[67] munsell_0.5.1 tibble_3.2.1 logger_0.3.0 \n[70] pillar_1.9.0 htmltools_0.5.8.1 brio_1.1.4 \n[73] R6_2.5.1 Rdpack_2.6 evaluate_0.23 \n[76] lattice_0.22-6 rbibutils_2.2.16 backports_1.4.1 \n[79] memoise_2.0.1 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[82] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[85] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[88] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[91] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n})\ndatanames <- c(\"ADSL\", \"ADTTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADTTE <- data[[\"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\n## Setup App\napp <- init(\n data = data,\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)\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:39:36 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 broom_1.0.5 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 processx_3.8.4 \n[13] survival_3.5-8 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 abind_1.4-5 multcomp_1.4-25 \n[25] withr_3.0.0 purrr_1.0.2 shinyWidgets_0.8.4 \n[28] geepack_1.3.10 grid_4.3.3 fansi_1.0.6 \n[31] teal.logger_0.2.0.9001 xtable_1.8-4 colorspace_2.1-0 \n[34] ggplot2_3.5.0 emmeans_1.10.0 scales_1.3.0 \n[37] MASS_7.3-60.0.1 cli_3.6.2 mvtnorm_1.2-4 \n[40] rmarkdown_2.26 generics_0.1.3 cachem_1.0.8 \n[43] chromote_0.2.0 stringr_1.5.1 splines_4.3.3 \n[46] formatR_1.14 vctrs_0.6.5 webshot_0.5.5 \n[49] Matrix_1.6-5 sandwich_3.1-0 jsonlite_1.8.8 \n[52] carData_3.0-5 callr_3.7.6 car_3.1-2 \n[55] teal.widgets_0.4.2.9009 testthat_3.2.1 fontawesome_0.5.2 \n[58] jquerylib_0.1.4 tidyr_1.3.1 glue_1.7.0 \n[61] ps_1.7.6 codetools_0.2-20 stringi_1.8.3 \n[64] gtable_0.3.4 later_1.3.2 shinycssloaders_1.0.0 \n[67] munsell_0.5.1 tibble_3.2.1 logger_0.3.0 \n[70] pillar_1.9.0 htmltools_0.5.8.1 brio_1.1.4 \n[73] R6_2.5.1 Rdpack_2.6 evaluate_0.23 \n[76] lattice_0.22-6 rbibutils_2.2.16 backports_1.4.1 \n[79] memoise_2.0.1 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[82] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[85] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[88] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[91] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Efficacy", @@ -1223,7 +1223,7 @@ "href": "tables/efficacy/aovt03.html", "title": "AOVT03", "section": "", - "text": "This example will focus on data from multiple visits and take the interaction between visits and arms into consideration.\n\n\nData Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\nadqs_in <- adqs %>%\n filter(AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 5 DAY 36\")) %>%\n droplevels() %>%\n filter(PARAM %in% c(\"BFI All Questions\", \"Fatigue Interference\")) %>%\n mutate(CHG = ifelse(BMEASIFL == \"Y\", CHG, NA)) # only analyze evaluable population\n\n\n\n\n\nCoderesult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARMCD\", ref_group = \"ARM A\") %>%\n split_rows_by(\"PARAM\", split_fun = drop_split_levels) %>%\n summarize_ancova(\n vars = \"CHG\",\n variables = list(arm = \"ARMCD\", covariates = c(\"BASE\", \"AVISIT\", \"AVISIT*ARMCD\")),\n conf_level = 0.95,\n var_labels = \"WEEK 1 DAY 8\",\n table_names = \"WEEK 1 DAY 8\",\n interaction_y = \"WEEK 1 DAY 8\",\n interaction_item = \"AVISIT\"\n ) %>%\n summarize_ancova(\n vars = \"CHG\",\n variables = list(arm = \"ARMCD\", covariates = c(\"BASE\", \"AVISIT\", \"AVISIT*ARMCD\")),\n conf_level = 0.95,\n var_labels = \"WEEK 2 DAY 15\",\n table_names = \"WEEK 2 DAY 15\",\n interaction_y = \"WEEK 2 DAY 15\",\n interaction_item = \"AVISIT\"\n ) %>%\n summarize_ancova(\n vars = \"CHG\",\n variables = list(arm = \"ARMCD\", covariates = c(\"BASE\", \"AVISIT\", \"AVISIT*ARMCD\")),\n conf_level = 0.95,\n var_labels = \"WEEK 5 DAY 36\",\n table_names = \"WEEK 5 DAY 36\",\n interaction_y = \"WEEK 5 DAY 36\",\n interaction_item = \"AVISIT\"\n ) %>%\n build_table(adqs_in, alt_counts_df = adsl)\n\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————\nBFI All Questions \n WEEK 1 DAY 8 \n n 68 73 62 \n Adjusted Mean 4.34 5.96 3.90 \n Difference in Adjusted Means 1.62 -0.44 \n 95% CI (-1.75, 4.98) (-3.94, 3.06)\n p-value 0.3460 0.8059 \n WEEK 2 DAY 15 \n n 68 73 62 \n Adjusted Mean 12.99 11.23 9.86 \n Difference in Adjusted Means -1.76 -3.13 \n 95% CI (-5.12, 1.60) (-6.64, 0.37)\n p-value 0.3048 0.0795 \n WEEK 5 DAY 36 \n n 68 73 62 \n Adjusted Mean 23.88 23.08 28.21 \n Difference in Adjusted Means -0.81 4.33 \n 95% CI (-4.17, 2.56) (0.83, 7.83) \n p-value 0.6383 0.0155 \nFatigue Interference \n WEEK 1 DAY 8 \n n 68 73 62 \n Adjusted Mean 5.97 5.19 5.21 \n Difference in Adjusted Means -0.78 -0.76 \n 95% CI (-4.17, 2.61) (-4.30, 2.78)\n p-value 0.6522 0.6729 \n WEEK 2 DAY 15 \n n 68 73 62 \n Adjusted Mean 11.39 9.42 9.55 \n Difference in Adjusted Means -1.96 -1.84 \n 95% CI (-5.35, 1.43) (-5.37, 1.70)\n p-value 0.2560 0.3084 \n WEEK 5 DAY 36 \n n 68 73 62 \n Adjusted Mean 22.79 25.37 23.43 \n Difference in Adjusted Means 2.58 0.64 \n 95% CI (-0.81, 5.97) (-2.89, 4.18)\n p-value 0.1353 0.7212 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:39:25 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 tern_0.9.3.9031 rtables_0.6.6.9011 \n[4] magrittr_2.0.3 formatters_0.5.5.9020 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] sandwich_3.1-0 utf8_1.2.4 generics_0.1.3 tidyr_1.3.1 \n [5] stringi_1.8.3 lattice_0.22-6 digest_0.6.35 evaluate_0.23 \n [9] grid_4.3.3 estimability_1.5 mvtnorm_1.2-4 fastmap_1.1.1 \n[13] jsonlite_1.8.8 Matrix_1.6-5 backports_1.4.1 brio_1.1.4 \n[17] survival_3.5-8 multcomp_1.4-25 purrr_1.0.2 fansi_1.0.6 \n[21] scales_1.3.0 TH.data_1.1-2 codetools_0.2-20 Rdpack_2.6 \n[25] cli_3.6.2 rlang_1.1.3 rbibutils_2.2.16 munsell_0.5.1 \n[29] splines_4.3.3 yaml_2.3.8 tools_4.3.3 checkmate_2.3.1 \n[33] coda_0.19-4.1 colorspace_2.1-0 ggplot2_3.5.0 broom_1.0.5 \n[37] vctrs_0.6.5 R6_2.5.1 zoo_1.8-12 lifecycle_1.0.4 \n[41] emmeans_1.10.0 htmlwidgets_1.6.4 MASS_7.3-60.0.1 pkgconfig_2.0.3 \n[45] pillar_1.9.0 gtable_0.3.4 glue_1.7.0 xfun_0.43 \n[49] tibble_3.2.1 tidyselect_1.2.1 knitr_1.45 xtable_1.8-4 \n[53] htmltools_0.5.8.1 rmarkdown_2.26 testthat_3.2.1 compiler_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "This example will focus on data from multiple visits and take the interaction between visits and arms into consideration.\n\n\nData Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(tern)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadqs <- synthetic_cdisc_dataset(\"latest\", \"adqs\")\n\nadqs_in <- adqs %>%\n filter(AVISIT %in% c(\"WEEK 1 DAY 8\", \"WEEK 2 DAY 15\", \"WEEK 5 DAY 36\")) %>%\n droplevels() %>%\n filter(PARAM %in% c(\"BFI All Questions\", \"Fatigue Interference\")) %>%\n mutate(CHG = ifelse(BMEASIFL == \"Y\", CHG, NA)) # only analyze evaluable population\n\n\n\n\n\nCoderesult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARMCD\", ref_group = \"ARM A\") %>%\n split_rows_by(\"PARAM\", split_fun = drop_split_levels) %>%\n summarize_ancova(\n vars = \"CHG\",\n variables = list(arm = \"ARMCD\", covariates = c(\"BASE\", \"AVISIT\", \"AVISIT*ARMCD\")),\n conf_level = 0.95,\n var_labels = \"WEEK 1 DAY 8\",\n table_names = \"WEEK 1 DAY 8\",\n interaction_y = \"WEEK 1 DAY 8\",\n interaction_item = \"AVISIT\"\n ) %>%\n summarize_ancova(\n vars = \"CHG\",\n variables = list(arm = \"ARMCD\", covariates = c(\"BASE\", \"AVISIT\", \"AVISIT*ARMCD\")),\n conf_level = 0.95,\n var_labels = \"WEEK 2 DAY 15\",\n table_names = \"WEEK 2 DAY 15\",\n interaction_y = \"WEEK 2 DAY 15\",\n interaction_item = \"AVISIT\"\n ) %>%\n summarize_ancova(\n vars = \"CHG\",\n variables = list(arm = \"ARMCD\", covariates = c(\"BASE\", \"AVISIT\", \"AVISIT*ARMCD\")),\n conf_level = 0.95,\n var_labels = \"WEEK 5 DAY 36\",\n table_names = \"WEEK 5 DAY 36\",\n interaction_y = \"WEEK 5 DAY 36\",\n interaction_item = \"AVISIT\"\n ) %>%\n build_table(adqs_in, alt_counts_df = adsl)\n\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————\nBFI All Questions \n WEEK 1 DAY 8 \n n 68 73 62 \n Adjusted Mean 4.34 5.96 3.90 \n Difference in Adjusted Means 1.62 -0.44 \n 95% CI (-1.75, 4.98) (-3.94, 3.06)\n p-value 0.3460 0.8059 \n WEEK 2 DAY 15 \n n 68 73 62 \n Adjusted Mean 12.99 11.23 9.86 \n Difference in Adjusted Means -1.76 -3.13 \n 95% CI (-5.12, 1.60) (-6.64, 0.37)\n p-value 0.3048 0.0795 \n WEEK 5 DAY 36 \n n 68 73 62 \n Adjusted Mean 23.88 23.08 28.21 \n Difference in Adjusted Means -0.81 4.33 \n 95% CI (-4.17, 2.56) (0.83, 7.83) \n p-value 0.6383 0.0155 \nFatigue Interference \n WEEK 1 DAY 8 \n n 68 73 62 \n Adjusted Mean 5.97 5.19 5.21 \n Difference in Adjusted Means -0.78 -0.76 \n 95% CI (-4.17, 2.61) (-4.30, 2.78)\n p-value 0.6522 0.6729 \n WEEK 2 DAY 15 \n n 68 73 62 \n Adjusted Mean 11.39 9.42 9.55 \n Difference in Adjusted Means -1.96 -1.84 \n 95% CI (-5.35, 1.43) (-5.37, 1.70)\n p-value 0.2560 0.3084 \n WEEK 5 DAY 36 \n n 68 73 62 \n Adjusted Mean 22.79 25.37 23.43 \n Difference in Adjusted Means 2.58 0.64 \n 95% CI (-0.81, 5.97) (-2.89, 4.18)\n p-value 0.1353 0.7212 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:40:03 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 tern_0.9.3.9031 rtables_0.6.6.9011 \n[4] magrittr_2.0.3 formatters_0.5.5.9021 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] sandwich_3.1-0 utf8_1.2.4 generics_0.1.3 tidyr_1.3.1 \n [5] stringi_1.8.3 lattice_0.22-6 digest_0.6.35 evaluate_0.23 \n [9] grid_4.3.3 estimability_1.5 mvtnorm_1.2-4 fastmap_1.1.1 \n[13] jsonlite_1.8.8 Matrix_1.6-5 backports_1.4.1 brio_1.1.4 \n[17] survival_3.5-8 multcomp_1.4-25 purrr_1.0.2 fansi_1.0.6 \n[21] scales_1.3.0 TH.data_1.1-2 codetools_0.2-20 Rdpack_2.6 \n[25] cli_3.6.2 rlang_1.1.3 rbibutils_2.2.16 munsell_0.5.1 \n[29] splines_4.3.3 yaml_2.3.8 tools_4.3.3 checkmate_2.3.1 \n[33] coda_0.19-4.1 colorspace_2.1-0 ggplot2_3.5.0 broom_1.0.5 \n[37] vctrs_0.6.5 R6_2.5.1 zoo_1.8-12 lifecycle_1.0.4 \n[41] emmeans_1.10.0 htmlwidgets_1.6.4 MASS_7.3-60.0.1 pkgconfig_2.0.3 \n[45] pillar_1.9.0 gtable_0.3.4 glue_1.7.0 xfun_0.43 \n[49] tibble_3.2.1 tidyselect_1.2.1 knitr_1.45 xtable_1.8-4 \n[53] htmltools_0.5.8.1 rmarkdown_2.26 testthat_3.2.1 compiler_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Efficacy", @@ -1235,7 +1235,7 @@ "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 App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\") %>%\n filter(PARAMCD %in% c(\"BESRSPI\", \"INVET\"))\n})\ndatanames <- c(\"ADSL\", \"ADRS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADRS <- data[[\"ADRS\"]]\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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:40:00 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9020 dplyr_1.1.4 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 processx_3.8.4 \n[13] survival_3.5-8 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 abind_1.4-5 multcomp_1.4-25 \n[25] withr_3.0.0 purrr_1.0.2 shinyWidgets_0.8.4 \n[28] geepack_1.3.10 grid_4.3.3 fansi_1.0.6 \n[31] teal.logger_0.2.0.9001 xtable_1.8-4 colorspace_2.1-0 \n[34] ggplot2_3.5.0 emmeans_1.10.0 scales_1.3.0 \n[37] MASS_7.3-60.0.1 cli_3.6.2 mvtnorm_1.2-4 \n[40] rmarkdown_2.26 generics_0.1.3 cachem_1.0.8 \n[43] chromote_0.2.0 splines_4.3.3 formatR_1.14 \n[46] vctrs_0.6.5 webshot_0.5.5 Matrix_1.6-5 \n[49] sandwich_3.1-0 jsonlite_1.8.8 carData_3.0-5 \n[52] callr_3.7.6 car_3.1-2 teal.widgets_0.4.2.9009 \n[55] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[58] tidyr_1.3.1 glue_1.7.0 ps_1.7.6 \n[61] codetools_0.2-20 stringi_1.8.3 gtable_0.3.4 \n[64] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[67] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[70] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[73] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[76] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[79] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[82] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[85] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[88] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[91] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADRS <- synthetic_cdisc_dataset(\"latest\", \"adrs\") %>%\n filter(PARAMCD %in% c(\"BESRSPI\", \"INVET\"))\n})\ndatanames <- c(\"ADSL\", \"ADRS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADRS <- data[[\"ADRS\"]]\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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:40:38 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9021 dplyr_1.1.4 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 processx_3.8.4 \n[13] survival_3.5-8 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 abind_1.4-5 multcomp_1.4-25 \n[25] withr_3.0.0 purrr_1.0.2 shinyWidgets_0.8.4 \n[28] geepack_1.3.10 grid_4.3.3 fansi_1.0.6 \n[31] teal.logger_0.2.0.9001 xtable_1.8-4 colorspace_2.1-0 \n[34] ggplot2_3.5.0 emmeans_1.10.0 scales_1.3.0 \n[37] MASS_7.3-60.0.1 cli_3.6.2 mvtnorm_1.2-4 \n[40] rmarkdown_2.26 generics_0.1.3 cachem_1.0.8 \n[43] chromote_0.2.0 splines_4.3.3 formatR_1.14 \n[46] vctrs_0.6.5 webshot_0.5.5 Matrix_1.6-5 \n[49] sandwich_3.1-0 jsonlite_1.8.8 carData_3.0-5 \n[52] callr_3.7.6 car_3.1-2 teal.widgets_0.4.2.9009 \n[55] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[58] tidyr_1.3.1 glue_1.7.0 ps_1.7.6 \n[61] codetools_0.2-20 stringi_1.8.3 gtable_0.3.4 \n[64] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[67] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[70] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[73] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[76] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[79] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[82] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[85] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[88] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[91] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Efficacy", @@ -1247,7 +1247,7 @@ "href": "tables/medical-history/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 App\nReproducibility\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 vars = \"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 vars = \"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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n filter(SAFFL == \"Y\")\n ADMH <- synthetic_cdisc_dataset(\"latest\", \"admh\") %>%\n filter(SAFFL == \"Y\" & MHBODSYS != \"\" & MHDECOD != \"\")\n})\ndatanames <- c(\"ADSL\", \"ADMH\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADMH <- data[[\"ADMH\"]]\n\n## Setup App\napp <- init(\n data = data,\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, c(\"MHTERM\", \"MHDECOD\")),\n selected = c(\"MHDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(ADMH, c(\"MHBODSYS\", \"MHSOC\")),\n selected = \"MHBODSYS\"\n ),\n add_total = TRUE,\n event_type = \"condition\"\n )\n )\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:40:22 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] dplyr_1.1.4 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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 vars = \"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 vars = \"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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n filter(SAFFL == \"Y\")\n ADMH <- synthetic_cdisc_dataset(\"latest\", \"admh\") %>%\n filter(SAFFL == \"Y\" & MHBODSYS != \"\" & MHDECOD != \"\")\n})\ndatanames <- c(\"ADSL\", \"ADMH\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADMH <- data[[\"ADMH\"]]\n\n## Setup App\napp <- init(\n data = data,\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, c(\"MHTERM\", \"MHDECOD\")),\n selected = c(\"MHDECOD\")\n ),\n hlt = choices_selected(\n choices = variable_choices(ADMH, c(\"MHBODSYS\", \"MHSOC\")),\n selected = \"MHBODSYS\"\n ),\n add_total = TRUE,\n event_type = \"condition\"\n )\n )\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:41:02 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] dplyr_1.1.4 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Medical History", @@ -1259,7 +1259,7 @@ "href": "tables/adverse-events/aet05.html", "title": "AET05", "section": "", - "text": "Data Setup\nStandard Table\nTable Setting Type of Confidence Interval\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAETTE <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAETTE <- df_explicit_na(ADAETTE)\n\n ADAETTE <- ADAETTE %>%\n filter(PARAMCD %in% c(\"AETTE1\", \"AETTE2\", \"AETTE3\")) %>%\n mutate(is_event = CNSR == 0) %>%\n mutate(n_events = as.integer(is_event))\n})\ndatanames <- c(\"ADSL\", \"ADAETTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADAETTE <- data[[\"ADAETTE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:40:56 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9020 scda_0.1.6.9017 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nTable Setting Type of Confidence Interval\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAETTE <- synthetic_cdisc_dataset(\"latest\", \"adaette\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAETTE <- df_explicit_na(ADAETTE)\n\n ADAETTE <- ADAETTE %>%\n filter(PARAMCD %in% c(\"AETTE1\", \"AETTE2\", \"AETTE3\")) %>%\n mutate(is_event = CNSR == 0) %>%\n mutate(n_events = as.integer(is_event))\n})\ndatanames <- c(\"ADSL\", \"ADAETTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADAETTE <- data[[\"ADAETTE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:41:37 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9021 scda_0.1.6.9017 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Adverse Events", @@ -1271,7 +1271,7 @@ "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 App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADAE <- data[[\"ADAE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:41:44 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADAE <- data[[\"ADAE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:42:27 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Adverse Events", @@ -1283,7 +1283,7 @@ "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 App\nReproducibility\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) %>%\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 = -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\n A: Drug X B: Placebo C: Combination\nMedDRA 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%) \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 = -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 = 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 = 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 = 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 = 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 = 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 = 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAE <- df_explicit_na(ADAE)\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADAE <- data[[\"ADAE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:42:22 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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) %>%\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 = -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\n A: Drug X B: Placebo C: Combination\nMedDRA 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%) \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 = -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 = 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 = 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 = 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 = 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 = 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 = 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADAE <- df_explicit_na(ADAE)\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADAE <- data[[\"ADAE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:43:05 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Adverse Events", @@ -1295,7 +1295,7 @@ "href": "tables/adverse-events/aet02_smq.html", "title": "AET02_SMQ", "section": "", - "text": "Data Setup\nStandard Table\nTable with Customized Queries\nteal App\nReproducibility\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(\n df = adae,\n aag_summary = aag_summary,\n keys = c(\"STUDYID\", \"USUBJID\", \"ACTARMCD\", \"AEDECOD\")\n)\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) {\n !is(tr, \"ContentRow\") && all_zero_or_na(tr) && !grepl(\"Total number of\", obj_label(tr))\n}\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 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(\n vars = \"AEDECOD\",\n drop = FALSE\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nscore_ae_pts <- function(tt) {\n count_vals <- cell_values(tree_children(tt)[[\"USUBJID\"]])[[1]]\n sum(matrix(unlist(count_vals), nrow = length(count_vals), byrow = TRUE)[, 1])\n}\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 = score_ae_pts) %>%\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADAE <- data[[\"ADAE\"]]\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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:42:54 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 stringr_1.5.1 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nTable with Customized Queries\nteal App\nReproducibility\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(\n df = adae,\n aag_summary = aag_summary,\n keys = c(\"STUDYID\", \"USUBJID\", \"ACTARMCD\", \"AEDECOD\")\n)\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) {\n !is(tr, \"ContentRow\") && all_zero_or_na(tr) && !grepl(\"Total number of\", obj_label(tr))\n}\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 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(\n vars = \"AEDECOD\",\n drop = FALSE\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nscore_ae_pts <- function(tt) {\n count_vals <- cell_values(tree_children(tt)[[\"USUBJID\"]])[[1]]\n sum(matrix(unlist(count_vals), nrow = length(count_vals), byrow = TRUE)[, 1])\n}\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 = score_ae_pts) %>%\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADAE <- data[[\"ADAE\"]]\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\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:43:38 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 stringr_1.5.1 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Adverse Events", @@ -1307,7 +1307,7 @@ "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 App\nReproducibility\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_list = 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 analyze_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\n A: Drug X B: Placebo C: Combination \nMedDRA System Organ Class Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n MedDRA Preferred Term (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\n A: Drug X B: Placebo C: Combination \nMedDRA System Organ Class Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n MedDRA Preferred Term (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\n A: Drug X B: Placebo C: Combination \nMedDRA System Organ Class Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n MedDRA Preferred Term (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\n A: Drug X B: Placebo C: Combination \nMedDRA System Organ Class Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n MedDRA Preferred Term (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\n A: Drug X B: Placebo C: Combination \nMedDRA System Organ Class Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n MedDRA Preferred Term (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_list = 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 analyze_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\n A: Drug X B: Placebo C: Combination \nMedDRA System Organ Class 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 MedDRA Preferred Term (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_list = 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 analyze_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\n A: Drug X B: Placebo C: Combination \nMedDRA System Organ Class 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 MedDRA Preferred Term (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_list = grade_groups) %>%\n analyze_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\n 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 (%)\nMedDRA Preferred Term (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADAE <- data[[\"ADAE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:43:31 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9020 dplyr_1.1.4 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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_list = 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 analyze_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\n A: Drug X B: Placebo C: Combination \nMedDRA System Organ Class Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n MedDRA Preferred Term (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\n A: Drug X B: Placebo C: Combination \nMedDRA System Organ Class Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n MedDRA Preferred Term (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\n A: Drug X B: Placebo C: Combination \nMedDRA System Organ Class Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n MedDRA Preferred Term (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\n A: Drug X B: Placebo C: Combination \nMedDRA System Organ Class Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n MedDRA Preferred Term (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\n A: Drug X B: Placebo C: Combination \nMedDRA System Organ Class Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%) Any Grade (%) Grade 3-4 (%) Grade 5 (%)\n MedDRA Preferred Term (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_list = 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 analyze_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\n A: Drug X B: Placebo C: Combination \nMedDRA System Organ Class 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 MedDRA Preferred Term (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_list = 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 analyze_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\n A: Drug X B: Placebo C: Combination \nMedDRA System Organ Class 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 MedDRA Preferred Term (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_list = grade_groups) %>%\n analyze_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\n 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 (%)\nMedDRA Preferred Term (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADAE <- data[[\"ADAE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:44:17 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9021 dplyr_1.1.4 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Adverse Events", @@ -1319,7 +1319,7 @@ "href": "tables/adverse-events/aet09_smq.html", "title": "AET09_SMQ", "section": "", - "text": "Data Setup\nStandard Table\nTable with Customized Queries\nteal App\nReproducibility\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(\n df = adae_rel,\n aag_summary = aag_summary,\n keys = c(\"STUDYID\", \"USUBJID\", \"ACTARMCD\", \"AEDECOD\")\n)\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) {\n !is(tr, \"ContentRow\") && all_zero_or_na(tr) && !grepl(\"Total number of\", obj_label(tr))\n}\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 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(\n vars = \"AEDECOD\",\n drop = FALSE\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nscore_ae_pts <- function(tt) {\n count_vals <- cell_values(tree_children(tt)[[\"USUBJID\"]])[[1]]\n sum(matrix(unlist(count_vals), nrow = length(count_vals), byrow = TRUE)[, 1])\n}\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 = score_ae_pts) %>%\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\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(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADAE <- data[[\"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\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(teal_slice(\"ADAE\", \"AEREL\", selected = \"Y\"))\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:44:02 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 stringr_1.5.1 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nTable with Customized Queries\nteal App\nReproducibility\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(\n df = adae_rel,\n aag_summary = aag_summary,\n keys = c(\"STUDYID\", \"USUBJID\", \"ACTARMCD\", \"AEDECOD\")\n)\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) {\n !is(tr, \"ContentRow\") && all_zero_or_na(tr) && !grepl(\"Total number of\", obj_label(tr))\n}\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 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(\n vars = \"AEDECOD\",\n drop = FALSE\n ) %>%\n append_varlabels(adae, \"AEDECOD\", indent = 1L)\n\nscore_ae_pts <- function(tt) {\n count_vals <- cell_values(tree_children(tt)[[\"USUBJID\"]])[[1]]\n sum(matrix(unlist(count_vals), nrow = length(count_vals), byrow = TRUE)[, 1])\n}\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 = score_ae_pts) %>%\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\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(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADAE <- data[[\"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\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(teal_slice(\"ADAE\", \"AEREL\", selected = \"Y\"))\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:44:48 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 stringr_1.5.1 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Adverse Events", @@ -1331,7 +1331,7 @@ "href": "tables/adverse-events/aet03.html", "title": "AET03", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADAE <- data[[\"ADAE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:44:35 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] dplyr_1.1.4 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADAE <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n})\ndatanames <- c(\"ADSL\", \"ADAE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADAE <- data[[\"ADAE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:45:22 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] dplyr_1.1.4 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Adverse Events", @@ -1343,7 +1343,7 @@ "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 App\nReproducibility\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 analyze_vars(\"INVID\", .stats = \"count_fraction\") %>%\n append_varlabels(adsl, \"INVID\", 2L)\n\nresult <- build_table(lyt, adsl) %>%\n prune_table()\n\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 (37.5%) 3 (42.9%) 4 (36.4%) 10 (38.5%) \n INV ID NGA-11 1 (12.5%) 2 (28.6%) 3 (27.3%) 6 (23.1%) \n INV ID NGA-12 0 1 (14.3%) 1 (9.1%) 2 (7.7%) \n INV ID NGA-17 2 (25%) 0 0 2 (7.7%) \n INV ID NGA-2 1 (12.5%) 1 (14.3%) 0 2 (7.7%) \n INV ID NGA-4 1 (12.5%) 0 1 (9.1%) 2 (7.7%) \n INV ID NGA-5 0 0 1 (9.1%) 1 (3.8%) \n INV ID NGA-6 0 0 1 (9.1%) 1 (3.8%) \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 (28.4%) 20 (24.7%) 16 (25%) 57 (26%) \n INV ID CHN-10 0 1 (1.2%) 0 1 (0.5%) \n INV ID CHN-11 12 (16.2%) 20 (24.7%) 16 (25%) 48 (21.9%) \n INV ID CHN-12 4 (5.4%) 3 (3.7%) 1 (1.6%) 8 (3.7%) \n INV ID CHN-13 2 (2.7%) 6 (7.4%) 0 8 (3.7%) \n INV ID CHN-14 4 (5.4%) 2 (2.5%) 3 (4.7%) 9 (4.1%) \n INV ID CHN-15 2 (2.7%) 0 4 (6.2%) 6 (2.7%) \n INV ID CHN-16 0 3 (3.7%) 3 (4.7%) 6 (2.7%) \n INV ID CHN-17 4 (5.4%) 4 (4.9%) 3 (4.7%) 11 (5%) \n INV ID CHN-18 1 (1.4%) 0 2 (3.1%) 3 (1.4%) \n INV ID CHN-2 9 (12.2%) 4 (4.9%) 3 (4.7%) 16 (7.3%) \n INV ID CHN-3 5 (6.8%) 1 (1.2%) 5 (7.8%) 11 (5%) \n INV ID CHN-4 3 (4.1%) 3 (3.7%) 3 (4.7%) 9 (4.1%) \n INV ID CHN-5 4 (5.4%) 3 (3.7%) 4 (6.2%) 11 (5%) \n INV ID CHN-6 1 (1.4%) 3 (3.7%) 0 4 (1.8%) \n INV ID CHN-7 0 5 (6.2%) 1 (1.6%) 6 (2.7%) \n INV ID CHN-8 1 (1.4%) 1 (1.2%) 0 2 (0.9%) \n INV ID CHN-9 1 (1.4%) 2 (2.5%) 0 3 (1.4%) \n PAK 12 (9.0%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \n INV ID PAK-1 2 (16.7%) 4 (44.4%) 4 (40%) 10 (32.3%) \n INV ID PAK-11 4 (33.3%) 3 (33.3%) 2 (20%) 9 (29%) \n INV ID PAK-12 2 (16.7%) 0 0 2 (6.5%) \n INV ID PAK-13 1 (8.3%) 1 (11.1%) 0 2 (6.5%) \n INV ID PAK-14 1 (8.3%) 0 0 1 (3.2%) \n INV ID PAK-15 1 (8.3%) 0 0 1 (3.2%) \n INV ID PAK-2 1 (8.3%) 0 2 (20%) 3 (9.7%) \n INV ID PAK-4 0 1 (11.1%) 1 (10%) 2 (6.5%) \n INV ID PAK-5 0 0 1 (10%) 1 (3.2%) \n JPN 5 (3.7%) 4 (3.0%) 9 (6.8%) 18 (4.5%) \n INV ID JPN-1 2 (40%) 2 (50%) 1 (11.1%) 5 (27.8%) \n INV ID JPN-11 0 0 3 (33.3%) 3 (16.7%) \n INV ID JPN-12 0 0 1 (11.1%) 1 (5.6%) \n INV ID JPN-14 0 1 (25%) 0 1 (5.6%) \n INV ID JPN-17 0 0 2 (22.2%) 2 (11.1%) \n INV ID JPN-18 1 (20%) 0 0 1 (5.6%) \n INV ID JPN-2 0 0 1 (11.1%) 1 (5.6%) \n INV ID JPN-3 0 1 (25%) 0 1 (5.6%) \n INV ID JPN-5 1 (20%) 0 1 (11.1%) 2 (11.1%) \n INV ID JPN-6 1 (20%) 0 0 1 (5.6%) \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 (20%) 0 0 1 (5.3%) \n INV ID RUS-11 0 2 (25%) 2 (33.3%) 4 (21.1%) \n INV ID RUS-12 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-13 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-14 0 0 1 (16.7%) 1 (5.3%) \n INV ID RUS-16 1 (20%) 1 (12.5%) 0 2 (10.5%) \n INV ID RUS-18 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-2 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-3 0 0 1 (16.7%) 1 (5.3%) \n INV ID RUS-4 0 2 (25%) 1 (16.7%) 3 (15.8%) \n INV ID RUS-5 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-6 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-7 0 0 1 (16.7%) 1 (5.3%) \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 (50%) 0 1 (50%) 3 (33.3%) \n INV ID GBR-11 0 1 (33.3%) 1 (50%) 2 (22.2%) \n INV ID GBR-13 1 (25%) 0 0 1 (11.1%) \n INV ID GBR-15 1 (25%) 0 0 1 (11.1%) \n INV ID GBR-17 0 1 (33.3%) 0 1 (11.1%) \n INV ID GBR-6 0 1 (33.3%) 0 1 (11.1%) \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 (10%) 4 (30.8%) 5 (29.4%) 10 (25%) \n INV ID USA-11 4 (40%) 2 (15.4%) 3 (17.6%) 9 (22.5%) \n INV ID USA-12 1 (10%) 2 (15.4%) 3 (17.6%) 6 (15%) \n INV ID USA-14 1 (10%) 0 0 1 (2.5%) \n INV ID USA-15 0 1 (7.7%) 1 (5.9%) 2 (5%) \n INV ID USA-17 1 (10%) 1 (7.7%) 0 2 (5%) \n INV ID USA-19 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-2 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-3 1 (10%) 0 1 (5.9%) 2 (5%) \n INV ID USA-4 0 1 (7.7%) 1 (5.9%) 2 (5%) \n INV ID USA-5 0 1 (7.7%) 0 1 (2.5%) \n INV ID USA-6 0 1 (7.7%) 0 1 (2.5%) \n INV ID USA-8 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-9 1 (10%) 0 0 1 (2.5%) \n CAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2.0%) \n INV ID CAN-1 1 (33.3%) 1 (50%) 0 2 (25%) \n INV ID CAN-11 1 (33.3%) 0 1 (33.3%) 2 (25%) \n INV ID CAN-14 1 (33.3%) 0 0 1 (12.5%) \n INV ID CAN-4 0 1 (50%) 1 (33.3%) 2 (25%) \n INV ID CAN-5 0 0 1 (33.3%) 1 (12.5%) \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 (30.8%) 2 (28.6%) 2 (20%) 8 (26.7%) \n INV ID BRA-11 4 (30.8%) 0 4 (40%) 8 (26.7%) \n INV ID BRA-12 0 1 (14.3%) 0 1 (3.3%) \n INV ID BRA-13 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-14 1 (7.7%) 0 1 (10%) 2 (6.7%) \n INV ID BRA-15 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-2 1 (7.7%) 1 (14.3%) 0 2 (6.7%) \n INV ID BRA-3 0 2 (28.6%) 0 2 (6.7%) \n INV ID BRA-4 0 1 (14.3%) 1 (10%) 2 (6.7%) \n INV ID BRA-5 0 0 1 (10%) 1 (3.3%) \n INV ID BRA-6 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-7 0 0 1 (10%) 1 (3.3%) \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 analyze_vars(\"INVID\", .stats = \"count_fraction\") %>%\n append_varlabels(adsl, \"INVID\", 1L)\n\nresult <- build_table(lyt, adsl) %>%\n prune_table()\n\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 (28.4%) 20 (24.7%) 16 (25%) 57 (26%) \n INV ID CHN-10 0 1 (1.2%) 0 1 (0.5%) \n INV ID CHN-11 12 (16.2%) 20 (24.7%) 16 (25%) 48 (21.9%) \n INV ID CHN-12 4 (5.4%) 3 (3.7%) 1 (1.6%) 8 (3.7%) \n INV ID CHN-13 2 (2.7%) 6 (7.4%) 0 8 (3.7%) \n INV ID CHN-14 4 (5.4%) 2 (2.5%) 3 (4.7%) 9 (4.1%) \n INV ID CHN-15 2 (2.7%) 0 4 (6.2%) 6 (2.7%) \n INV ID CHN-16 0 3 (3.7%) 3 (4.7%) 6 (2.7%) \n INV ID CHN-17 4 (5.4%) 4 (4.9%) 3 (4.7%) 11 (5%) \n INV ID CHN-18 1 (1.4%) 0 2 (3.1%) 3 (1.4%) \n INV ID CHN-2 9 (12.2%) 4 (4.9%) 3 (4.7%) 16 (7.3%) \n INV ID CHN-3 5 (6.8%) 1 (1.2%) 5 (7.8%) 11 (5%) \n INV ID CHN-4 3 (4.1%) 3 (3.7%) 3 (4.7%) 9 (4.1%) \n INV ID CHN-5 4 (5.4%) 3 (3.7%) 4 (6.2%) 11 (5%) \n INV ID CHN-6 1 (1.4%) 3 (3.7%) 0 4 (1.8%) \n INV ID CHN-7 0 5 (6.2%) 1 (1.6%) 6 (2.7%) \n INV ID CHN-8 1 (1.4%) 1 (1.2%) 0 2 (0.9%) \n INV ID CHN-9 1 (1.4%) 2 (2.5%) 0 3 (1.4%) \nUSA 10 (7.5%) 13 (9.7%) 17 (12.9%) 40 (10.0%) \n INV ID USA-1 1 (10%) 4 (30.8%) 5 (29.4%) 10 (25%) \n INV ID USA-11 4 (40%) 2 (15.4%) 3 (17.6%) 9 (22.5%) \n INV ID USA-12 1 (10%) 2 (15.4%) 3 (17.6%) 6 (15%) \n INV ID USA-14 1 (10%) 0 0 1 (2.5%) \n INV ID USA-15 0 1 (7.7%) 1 (5.9%) 2 (5%) \n INV ID USA-17 1 (10%) 1 (7.7%) 0 2 (5%) \n INV ID USA-19 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-2 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-3 1 (10%) 0 1 (5.9%) 2 (5%) \n INV ID USA-4 0 1 (7.7%) 1 (5.9%) 2 (5%) \n INV ID USA-5 0 1 (7.7%) 0 1 (2.5%) \n INV ID USA-6 0 1 (7.7%) 0 1 (2.5%) \n INV ID USA-8 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-9 1 (10%) 0 0 1 (2.5%) \nBRA 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \n INV ID BRA-1 4 (30.8%) 2 (28.6%) 2 (20%) 8 (26.7%) \n INV ID BRA-11 4 (30.8%) 0 4 (40%) 8 (26.7%) \n INV ID BRA-12 0 1 (14.3%) 0 1 (3.3%) \n INV ID BRA-13 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-14 1 (7.7%) 0 1 (10%) 2 (6.7%) \n INV ID BRA-15 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-2 1 (7.7%) 1 (14.3%) 0 2 (6.7%) \n INV ID BRA-3 0 2 (28.6%) 0 2 (6.7%) \n INV ID BRA-4 0 1 (14.3%) 1 (10%) 2 (6.7%) \n INV ID BRA-5 0 0 1 (10%) 1 (3.3%) \n INV ID BRA-6 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-7 0 0 1 (10%) 1 (3.3%) \nPAK 12 (9.0%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \n INV ID PAK-1 2 (16.7%) 4 (44.4%) 4 (40%) 10 (32.3%) \n INV ID PAK-11 4 (33.3%) 3 (33.3%) 2 (20%) 9 (29%) \n INV ID PAK-12 2 (16.7%) 0 0 2 (6.5%) \n INV ID PAK-13 1 (8.3%) 1 (11.1%) 0 2 (6.5%) \n INV ID PAK-14 1 (8.3%) 0 0 1 (3.2%) \n INV ID PAK-15 1 (8.3%) 0 0 1 (3.2%) \n INV ID PAK-2 1 (8.3%) 0 2 (20%) 3 (9.7%) \n INV ID PAK-4 0 1 (11.1%) 1 (10%) 2 (6.5%) \n INV ID PAK-5 0 0 1 (10%) 1 (3.2%) \nNGA 8 (6.0%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \n INV ID NGA-1 3 (37.5%) 3 (42.9%) 4 (36.4%) 10 (38.5%) \n INV ID NGA-11 1 (12.5%) 2 (28.6%) 3 (27.3%) 6 (23.1%) \n INV ID NGA-12 0 1 (14.3%) 1 (9.1%) 2 (7.7%) \n INV ID NGA-17 2 (25%) 0 0 2 (7.7%) \n INV ID NGA-2 1 (12.5%) 1 (14.3%) 0 2 (7.7%) \n INV ID NGA-4 1 (12.5%) 0 1 (9.1%) 2 (7.7%) \n INV ID NGA-5 0 0 1 (9.1%) 1 (3.8%) \n INV ID NGA-6 0 0 1 (9.1%) 1 (3.8%) \nRUS 5 (3.7%) 8 (6.0%) 6 (4.5%) 19 (4.8%) \n INV ID RUS-1 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-11 0 2 (25%) 2 (33.3%) 4 (21.1%) \n INV ID RUS-12 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-13 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-14 0 0 1 (16.7%) 1 (5.3%) \n INV ID RUS-16 1 (20%) 1 (12.5%) 0 2 (10.5%) \n INV ID RUS-18 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-2 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-3 0 0 1 (16.7%) 1 (5.3%) \n INV ID RUS-4 0 2 (25%) 1 (16.7%) 3 (15.8%) \n INV ID RUS-5 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-6 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-7 0 0 1 (16.7%) 1 (5.3%) \nJPN 5 (3.7%) 4 (3.0%) 9 (6.8%) 18 (4.5%) \n INV ID JPN-1 2 (40%) 2 (50%) 1 (11.1%) 5 (27.8%) \n INV ID JPN-11 0 0 3 (33.3%) 3 (16.7%) \n INV ID JPN-12 0 0 1 (11.1%) 1 (5.6%) \n INV ID JPN-14 0 1 (25%) 0 1 (5.6%) \n INV ID JPN-17 0 0 2 (22.2%) 2 (11.1%) \n INV ID JPN-18 1 (20%) 0 0 1 (5.6%) \n INV ID JPN-2 0 0 1 (11.1%) 1 (5.6%) \n INV ID JPN-3 0 1 (25%) 0 1 (5.6%) \n INV ID JPN-5 1 (20%) 0 1 (11.1%) 2 (11.1%) \n INV ID JPN-6 1 (20%) 0 0 1 (5.6%) \nGBR 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID GBR-1 2 (50%) 0 1 (50%) 3 (33.3%) \n INV ID GBR-11 0 1 (33.3%) 1 (50%) 2 (22.2%) \n INV ID GBR-13 1 (25%) 0 0 1 (11.1%) \n INV ID GBR-15 1 (25%) 0 0 1 (11.1%) \n INV ID GBR-17 0 1 (33.3%) 0 1 (11.1%) \n INV ID GBR-6 0 1 (33.3%) 0 1 (11.1%) \nCAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2.0%) \n INV ID CAN-1 1 (33.3%) 1 (50%) 0 2 (25%) \n INV ID CAN-11 1 (33.3%) 0 1 (33.3%) 2 (25%) \n INV ID CAN-14 1 (33.3%) 0 0 1 (12.5%) \n INV ID CAN-4 0 1 (50%) 1 (33.3%) 2 (25%) \n INV ID CAN-5 0 0 1 (33.3%) 1 (12.5%) \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 analyze_vars(\"INVID_INVNAM\", .stats = \"count_fraction\") %>%\n append_varlabels(adsl, \"INVID_INVNAM\", 2L)\n\nresult <- build_table(lyt, adsl) %>%\n prune_table()\n\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 (37.5%) 3 (42.9%) 4 (36.4%) 10 (38.5%) \n INV ID NGA-11 / Dr. NGA-11 Doe 1 (12.5%) 2 (28.6%) 3 (27.3%) 6 (23.1%) \n INV ID NGA-12 / Dr. NGA-12 Doe 0 1 (14.3%) 1 (9.1%) 2 (7.7%) \n INV ID NGA-17 / Dr. NGA-17 Doe 2 (25%) 0 0 2 (7.7%) \n INV ID NGA-2 / Dr. NGA-2 Doe 1 (12.5%) 1 (14.3%) 0 2 (7.7%) \n INV ID NGA-4 / Dr. NGA-4 Doe 1 (12.5%) 0 1 (9.1%) 2 (7.7%) \n INV ID NGA-5 / Dr. NGA-5 Doe 0 0 1 (9.1%) 1 (3.8%) \n INV ID NGA-6 / Dr. NGA-6 Doe 0 0 1 (9.1%) 1 (3.8%) \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 (28.4%) 20 (24.7%) 16 (25%) 57 (26%) \n INV ID CHN-10 / Dr. CHN-10 Doe 0 1 (1.2%) 0 1 (0.5%) \n INV ID CHN-11 / Dr. CHN-11 Doe 12 (16.2%) 20 (24.7%) 16 (25%) 48 (21.9%) \n INV ID CHN-12 / Dr. CHN-12 Doe 4 (5.4%) 3 (3.7%) 1 (1.6%) 8 (3.7%) \n INV ID CHN-13 / Dr. CHN-13 Doe 2 (2.7%) 6 (7.4%) 0 8 (3.7%) \n INV ID CHN-14 / Dr. CHN-14 Doe 4 (5.4%) 2 (2.5%) 3 (4.7%) 9 (4.1%) \n INV ID CHN-15 / Dr. CHN-15 Doe 2 (2.7%) 0 4 (6.2%) 6 (2.7%) \n INV ID CHN-16 / Dr. CHN-16 Doe 0 3 (3.7%) 3 (4.7%) 6 (2.7%) \n INV ID CHN-17 / Dr. CHN-17 Doe 4 (5.4%) 4 (4.9%) 3 (4.7%) 11 (5%) \n INV ID CHN-18 / Dr. CHN-18 Doe 1 (1.4%) 0 2 (3.1%) 3 (1.4%) \n INV ID CHN-2 / Dr. CHN-2 Doe 9 (12.2%) 4 (4.9%) 3 (4.7%) 16 (7.3%) \n INV ID CHN-3 / Dr. CHN-3 Doe 5 (6.8%) 1 (1.2%) 5 (7.8%) 11 (5%) \n INV ID CHN-4 / Dr. CHN-4 Doe 3 (4.1%) 3 (3.7%) 3 (4.7%) 9 (4.1%) \n INV ID CHN-5 / Dr. CHN-5 Doe 4 (5.4%) 3 (3.7%) 4 (6.2%) 11 (5%) \n INV ID CHN-6 / Dr. CHN-6 Doe 1 (1.4%) 3 (3.7%) 0 4 (1.8%) \n INV ID CHN-7 / Dr. CHN-7 Doe 0 5 (6.2%) 1 (1.6%) 6 (2.7%) \n INV ID CHN-8 / Dr. CHN-8 Doe 1 (1.4%) 1 (1.2%) 0 2 (0.9%) \n INV ID CHN-9 / Dr. CHN-9 Doe 1 (1.4%) 2 (2.5%) 0 3 (1.4%) \n PAK 12 (9.0%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \n INV ID PAK-1 / Dr. PAK-1 Doe 2 (16.7%) 4 (44.4%) 4 (40%) 10 (32.3%) \n INV ID PAK-11 / Dr. PAK-11 Doe 4 (33.3%) 3 (33.3%) 2 (20%) 9 (29%) \n INV ID PAK-12 / Dr. PAK-12 Doe 2 (16.7%) 0 0 2 (6.5%) \n INV ID PAK-13 / Dr. PAK-13 Doe 1 (8.3%) 1 (11.1%) 0 2 (6.5%) \n INV ID PAK-14 / Dr. PAK-14 Doe 1 (8.3%) 0 0 1 (3.2%) \n INV ID PAK-15 / Dr. PAK-15 Doe 1 (8.3%) 0 0 1 (3.2%) \n INV ID PAK-2 / Dr. PAK-2 Doe 1 (8.3%) 0 2 (20%) 3 (9.7%) \n INV ID PAK-4 / Dr. PAK-4 Doe 0 1 (11.1%) 1 (10%) 2 (6.5%) \n INV ID PAK-5 / Dr. PAK-5 Doe 0 0 1 (10%) 1 (3.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 (40%) 2 (50%) 1 (11.1%) 5 (27.8%) \n INV ID JPN-11 / Dr. JPN-11 Doe 0 0 3 (33.3%) 3 (16.7%) \n INV ID JPN-12 / Dr. JPN-12 Doe 0 0 1 (11.1%) 1 (5.6%) \n INV ID JPN-14 / Dr. JPN-14 Doe 0 1 (25%) 0 1 (5.6%) \n INV ID JPN-17 / Dr. JPN-17 Doe 0 0 2 (22.2%) 2 (11.1%) \n INV ID JPN-18 / Dr. JPN-18 Doe 1 (20%) 0 0 1 (5.6%) \n INV ID JPN-2 / Dr. JPN-2 Doe 0 0 1 (11.1%) 1 (5.6%) \n INV ID JPN-3 / Dr. JPN-3 Doe 0 1 (25%) 0 1 (5.6%) \n INV ID JPN-5 / Dr. JPN-5 Doe 1 (20%) 0 1 (11.1%) 2 (11.1%) \n INV ID JPN-6 / Dr. JPN-6 Doe 1 (20%) 0 0 1 (5.6%) \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 (20%) 0 0 1 (5.3%) \n INV ID RUS-11 / Dr. RUS-11 Doe 0 2 (25%) 2 (33.3%) 4 (21.1%) \n INV ID RUS-12 / Dr. RUS-12 Doe 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-13 / Dr. RUS-13 Doe 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-14 / Dr. RUS-14 Doe 0 0 1 (16.7%) 1 (5.3%) \n INV ID RUS-16 / Dr. RUS-16 Doe 1 (20%) 1 (12.5%) 0 2 (10.5%) \n INV ID RUS-18 / Dr. RUS-18 Doe 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-2 / Dr. RUS-2 Doe 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-3 / Dr. RUS-3 Doe 0 0 1 (16.7%) 1 (5.3%) \n INV ID RUS-4 / Dr. RUS-4 Doe 0 2 (25%) 1 (16.7%) 3 (15.8%) \n INV ID RUS-5 / Dr. RUS-5 Doe 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-6 / Dr. RUS-6 Doe 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-7 / Dr. RUS-7 Doe 0 0 1 (16.7%) 1 (5.3%) \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 (50%) 0 1 (50%) 3 (33.3%) \n INV ID GBR-11 / Dr. GBR-11 Doe 0 1 (33.3%) 1 (50%) 2 (22.2%) \n INV ID GBR-13 / Dr. GBR-13 Doe 1 (25%) 0 0 1 (11.1%) \n INV ID GBR-15 / Dr. GBR-15 Doe 1 (25%) 0 0 1 (11.1%) \n INV ID GBR-17 / Dr. GBR-17 Doe 0 1 (33.3%) 0 1 (11.1%) \n INV ID GBR-6 / Dr. GBR-6 Doe 0 1 (33.3%) 0 1 (11.1%) \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 (10%) 4 (30.8%) 5 (29.4%) 10 (25%) \n INV ID USA-11 / Dr. USA-11 Doe 4 (40%) 2 (15.4%) 3 (17.6%) 9 (22.5%) \n INV ID USA-12 / Dr. USA-12 Doe 1 (10%) 2 (15.4%) 3 (17.6%) 6 (15%) \n INV ID USA-14 / Dr. USA-14 Doe 1 (10%) 0 0 1 (2.5%) \n INV ID USA-15 / Dr. USA-15 Doe 0 1 (7.7%) 1 (5.9%) 2 (5%) \n INV ID USA-17 / Dr. USA-17 Doe 1 (10%) 1 (7.7%) 0 2 (5%) \n INV ID USA-19 / Dr. USA-19 Doe 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-2 / Dr. USA-2 Doe 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-3 / Dr. USA-3 Doe 1 (10%) 0 1 (5.9%) 2 (5%) \n INV ID USA-4 / Dr. USA-4 Doe 0 1 (7.7%) 1 (5.9%) 2 (5%) \n INV ID USA-5 / Dr. USA-5 Doe 0 1 (7.7%) 0 1 (2.5%) \n INV ID USA-6 / Dr. USA-6 Doe 0 1 (7.7%) 0 1 (2.5%) \n INV ID USA-8 / Dr. USA-8 Doe 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-9 / Dr. USA-9 Doe 1 (10%) 0 0 1 (2.5%) \n CAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2.0%) \n INV ID CAN-1 / Dr. CAN-1 Doe 1 (33.3%) 1 (50%) 0 2 (25%) \n INV ID CAN-11 / Dr. CAN-11 Doe 1 (33.3%) 0 1 (33.3%) 2 (25%) \n INV ID CAN-14 / Dr. CAN-14 Doe 1 (33.3%) 0 0 1 (12.5%) \n INV ID CAN-4 / Dr. CAN-4 Doe 0 1 (50%) 1 (33.3%) 2 (25%) \n INV ID CAN-5 / Dr. CAN-5 Doe 0 0 1 (33.3%) 1 (12.5%) \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 (30.8%) 2 (28.6%) 2 (20%) 8 (26.7%) \n INV ID BRA-11 / Dr. BRA-11 Doe 4 (30.8%) 0 4 (40%) 8 (26.7%) \n INV ID BRA-12 / Dr. BRA-12 Doe 0 1 (14.3%) 0 1 (3.3%) \n INV ID BRA-13 / Dr. BRA-13 Doe 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-14 / Dr. BRA-14 Doe 1 (7.7%) 0 1 (10%) 2 (6.7%) \n INV ID BRA-15 / Dr. BRA-15 Doe 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-2 / Dr. BRA-2 Doe 1 (7.7%) 1 (14.3%) 0 2 (6.7%) \n INV ID BRA-3 / Dr. BRA-3 Doe 0 2 (28.6%) 0 2 (6.7%) \n INV ID BRA-4 / Dr. BRA-4 Doe 0 1 (14.3%) 1 (10%) 2 (6.7%) \n INV ID BRA-5 / Dr. BRA-5 Doe 0 0 1 (10%) 1 (3.3%) \n INV ID BRA-6 / Dr. BRA-6 Doe 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-7 / Dr. BRA-7 Doe 0 0 1 (10%) 1 (3.3%) \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 analyze_vars(\"INVID_INVNAM\", .stats = \"count_fraction\") %>%\n append_varlabels(adsl, \"INVID_INVNAM\", 1L)\n\nresult <- build_table(lyt, adsl) %>%\n prune_table()\n\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 (28.4%) 20 (24.7%) 16 (25%) 57 (26%) \n INV ID CHN-10 / Dr. CHN-10 Doe 0 1 (1.2%) 0 1 (0.5%) \n INV ID CHN-11 / Dr. CHN-11 Doe 12 (16.2%) 20 (24.7%) 16 (25%) 48 (21.9%) \n INV ID CHN-12 / Dr. CHN-12 Doe 4 (5.4%) 3 (3.7%) 1 (1.6%) 8 (3.7%) \n INV ID CHN-13 / Dr. CHN-13 Doe 2 (2.7%) 6 (7.4%) 0 8 (3.7%) \n INV ID CHN-14 / Dr. CHN-14 Doe 4 (5.4%) 2 (2.5%) 3 (4.7%) 9 (4.1%) \n INV ID CHN-15 / Dr. CHN-15 Doe 2 (2.7%) 0 4 (6.2%) 6 (2.7%) \n INV ID CHN-16 / Dr. CHN-16 Doe 0 3 (3.7%) 3 (4.7%) 6 (2.7%) \n INV ID CHN-17 / Dr. CHN-17 Doe 4 (5.4%) 4 (4.9%) 3 (4.7%) 11 (5%) \n INV ID CHN-18 / Dr. CHN-18 Doe 1 (1.4%) 0 2 (3.1%) 3 (1.4%) \n INV ID CHN-2 / Dr. CHN-2 Doe 9 (12.2%) 4 (4.9%) 3 (4.7%) 16 (7.3%) \n INV ID CHN-3 / Dr. CHN-3 Doe 5 (6.8%) 1 (1.2%) 5 (7.8%) 11 (5%) \n INV ID CHN-4 / Dr. CHN-4 Doe 3 (4.1%) 3 (3.7%) 3 (4.7%) 9 (4.1%) \n INV ID CHN-5 / Dr. CHN-5 Doe 4 (5.4%) 3 (3.7%) 4 (6.2%) 11 (5%) \n INV ID CHN-6 / Dr. CHN-6 Doe 1 (1.4%) 3 (3.7%) 0 4 (1.8%) \n INV ID CHN-7 / Dr. CHN-7 Doe 0 5 (6.2%) 1 (1.6%) 6 (2.7%) \n INV ID CHN-8 / Dr. CHN-8 Doe 1 (1.4%) 1 (1.2%) 0 2 (0.9%) \n INV ID CHN-9 / Dr. CHN-9 Doe 1 (1.4%) 2 (2.5%) 0 3 (1.4%) \nUSA 10 (7.5%) 13 (9.7%) 17 (12.9%) 40 (10.0%) \n INV ID USA-1 / Dr. USA-1 Doe 1 (10%) 4 (30.8%) 5 (29.4%) 10 (25%) \n INV ID USA-11 / Dr. USA-11 Doe 4 (40%) 2 (15.4%) 3 (17.6%) 9 (22.5%) \n INV ID USA-12 / Dr. USA-12 Doe 1 (10%) 2 (15.4%) 3 (17.6%) 6 (15%) \n INV ID USA-14 / Dr. USA-14 Doe 1 (10%) 0 0 1 (2.5%) \n INV ID USA-15 / Dr. USA-15 Doe 0 1 (7.7%) 1 (5.9%) 2 (5%) \n INV ID USA-17 / Dr. USA-17 Doe 1 (10%) 1 (7.7%) 0 2 (5%) \n INV ID USA-19 / Dr. USA-19 Doe 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-2 / Dr. USA-2 Doe 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-3 / Dr. USA-3 Doe 1 (10%) 0 1 (5.9%) 2 (5%) \n INV ID USA-4 / Dr. USA-4 Doe 0 1 (7.7%) 1 (5.9%) 2 (5%) \n INV ID USA-5 / Dr. USA-5 Doe 0 1 (7.7%) 0 1 (2.5%) \n INV ID USA-6 / Dr. USA-6 Doe 0 1 (7.7%) 0 1 (2.5%) \n INV ID USA-8 / Dr. USA-8 Doe 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-9 / Dr. USA-9 Doe 1 (10%) 0 0 1 (2.5%) \nBRA 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \n INV ID BRA-1 / Dr. BRA-1 Doe 4 (30.8%) 2 (28.6%) 2 (20%) 8 (26.7%) \n INV ID BRA-11 / Dr. BRA-11 Doe 4 (30.8%) 0 4 (40%) 8 (26.7%) \n INV ID BRA-12 / Dr. BRA-12 Doe 0 1 (14.3%) 0 1 (3.3%) \n INV ID BRA-13 / Dr. BRA-13 Doe 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-14 / Dr. BRA-14 Doe 1 (7.7%) 0 1 (10%) 2 (6.7%) \n INV ID BRA-15 / Dr. BRA-15 Doe 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-2 / Dr. BRA-2 Doe 1 (7.7%) 1 (14.3%) 0 2 (6.7%) \n INV ID BRA-3 / Dr. BRA-3 Doe 0 2 (28.6%) 0 2 (6.7%) \n INV ID BRA-4 / Dr. BRA-4 Doe 0 1 (14.3%) 1 (10%) 2 (6.7%) \n INV ID BRA-5 / Dr. BRA-5 Doe 0 0 1 (10%) 1 (3.3%) \n INV ID BRA-6 / Dr. BRA-6 Doe 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-7 / Dr. BRA-7 Doe 0 0 1 (10%) 1 (3.3%) \nPAK 12 (9.0%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \n INV ID PAK-1 / Dr. PAK-1 Doe 2 (16.7%) 4 (44.4%) 4 (40%) 10 (32.3%) \n INV ID PAK-11 / Dr. PAK-11 Doe 4 (33.3%) 3 (33.3%) 2 (20%) 9 (29%) \n INV ID PAK-12 / Dr. PAK-12 Doe 2 (16.7%) 0 0 2 (6.5%) \n INV ID PAK-13 / Dr. PAK-13 Doe 1 (8.3%) 1 (11.1%) 0 2 (6.5%) \n INV ID PAK-14 / Dr. PAK-14 Doe 1 (8.3%) 0 0 1 (3.2%) \n INV ID PAK-15 / Dr. PAK-15 Doe 1 (8.3%) 0 0 1 (3.2%) \n INV ID PAK-2 / Dr. PAK-2 Doe 1 (8.3%) 0 2 (20%) 3 (9.7%) \n INV ID PAK-4 / Dr. PAK-4 Doe 0 1 (11.1%) 1 (10%) 2 (6.5%) \n INV ID PAK-5 / Dr. PAK-5 Doe 0 0 1 (10%) 1 (3.2%) \nNGA 8 (6.0%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \n INV ID NGA-1 / Dr. NGA-1 Doe 3 (37.5%) 3 (42.9%) 4 (36.4%) 10 (38.5%) \n INV ID NGA-11 / Dr. NGA-11 Doe 1 (12.5%) 2 (28.6%) 3 (27.3%) 6 (23.1%) \n INV ID NGA-12 / Dr. NGA-12 Doe 0 1 (14.3%) 1 (9.1%) 2 (7.7%) \n INV ID NGA-17 / Dr. NGA-17 Doe 2 (25%) 0 0 2 (7.7%) \n INV ID NGA-2 / Dr. NGA-2 Doe 1 (12.5%) 1 (14.3%) 0 2 (7.7%) \n INV ID NGA-4 / Dr. NGA-4 Doe 1 (12.5%) 0 1 (9.1%) 2 (7.7%) \n INV ID NGA-5 / Dr. NGA-5 Doe 0 0 1 (9.1%) 1 (3.8%) \n INV ID NGA-6 / Dr. NGA-6 Doe 0 0 1 (9.1%) 1 (3.8%) \nRUS 5 (3.7%) 8 (6.0%) 6 (4.5%) 19 (4.8%) \n INV ID RUS-1 / Dr. RUS-1 Doe 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-11 / Dr. RUS-11 Doe 0 2 (25%) 2 (33.3%) 4 (21.1%) \n INV ID RUS-12 / Dr. RUS-12 Doe 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-13 / Dr. RUS-13 Doe 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-14 / Dr. RUS-14 Doe 0 0 1 (16.7%) 1 (5.3%) \n INV ID RUS-16 / Dr. RUS-16 Doe 1 (20%) 1 (12.5%) 0 2 (10.5%) \n INV ID RUS-18 / Dr. RUS-18 Doe 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-2 / Dr. RUS-2 Doe 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-3 / Dr. RUS-3 Doe 0 0 1 (16.7%) 1 (5.3%) \n INV ID RUS-4 / Dr. RUS-4 Doe 0 2 (25%) 1 (16.7%) 3 (15.8%) \n INV ID RUS-5 / Dr. RUS-5 Doe 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-6 / Dr. RUS-6 Doe 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-7 / Dr. RUS-7 Doe 0 0 1 (16.7%) 1 (5.3%) \nJPN 5 (3.7%) 4 (3.0%) 9 (6.8%) 18 (4.5%) \n INV ID JPN-1 / Dr. JPN-1 Doe 2 (40%) 2 (50%) 1 (11.1%) 5 (27.8%) \n INV ID JPN-11 / Dr. JPN-11 Doe 0 0 3 (33.3%) 3 (16.7%) \n INV ID JPN-12 / Dr. JPN-12 Doe 0 0 1 (11.1%) 1 (5.6%) \n INV ID JPN-14 / Dr. JPN-14 Doe 0 1 (25%) 0 1 (5.6%) \n INV ID JPN-17 / Dr. JPN-17 Doe 0 0 2 (22.2%) 2 (11.1%) \n INV ID JPN-18 / Dr. JPN-18 Doe 1 (20%) 0 0 1 (5.6%) \n INV ID JPN-2 / Dr. JPN-2 Doe 0 0 1 (11.1%) 1 (5.6%) \n INV ID JPN-3 / Dr. JPN-3 Doe 0 1 (25%) 0 1 (5.6%) \n INV ID JPN-5 / Dr. JPN-5 Doe 1 (20%) 0 1 (11.1%) 2 (11.1%) \n INV ID JPN-6 / Dr. JPN-6 Doe 1 (20%) 0 0 1 (5.6%) \nGBR 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID GBR-1 / Dr. GBR-1 Doe 2 (50%) 0 1 (50%) 3 (33.3%) \n INV ID GBR-11 / Dr. GBR-11 Doe 0 1 (33.3%) 1 (50%) 2 (22.2%) \n INV ID GBR-13 / Dr. GBR-13 Doe 1 (25%) 0 0 1 (11.1%) \n INV ID GBR-15 / Dr. GBR-15 Doe 1 (25%) 0 0 1 (11.1%) \n INV ID GBR-17 / Dr. GBR-17 Doe 0 1 (33.3%) 0 1 (11.1%) \n INV ID GBR-6 / Dr. GBR-6 Doe 0 1 (33.3%) 0 1 (11.1%) \nCAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2.0%) \n INV ID CAN-1 / Dr. CAN-1 Doe 1 (33.3%) 1 (50%) 0 2 (25%) \n INV ID CAN-11 / Dr. CAN-11 Doe 1 (33.3%) 0 1 (33.3%) 2 (25%) \n INV ID CAN-14 / Dr. CAN-14 Doe 1 (33.3%) 0 0 1 (12.5%) \n INV ID CAN-4 / Dr. CAN-4 Doe 0 1 (50%) 1 (33.3%) 2 (25%) \n INV ID CAN-5 / Dr. CAN-5 Doe 0 0 1 (33.3%) 1 (12.5%) \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\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 analyze_vars are additionally used when row_groups is deselected.\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(forcats)\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n\n adsl_labels <- col_labels(ADSL)\n\n ADSL <- 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\n col_labels(ADSL) <- c(adsl_labels, c(INVID_INVNAM = \"Investigator Number/Name\"))\n})\ndatanames <- \"ADSL\"\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:45:21 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9020 scda_0.1.6.9017 \n[13] forcats_1.0.0 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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 analyze_vars(\"INVID\", .stats = \"count_fraction\") %>%\n append_varlabels(adsl, \"INVID\", 2L)\n\nresult <- build_table(lyt, adsl) %>%\n prune_table()\n\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 (37.5%) 3 (42.9%) 4 (36.4%) 10 (38.5%) \n INV ID NGA-11 1 (12.5%) 2 (28.6%) 3 (27.3%) 6 (23.1%) \n INV ID NGA-12 0 1 (14.3%) 1 (9.1%) 2 (7.7%) \n INV ID NGA-17 2 (25%) 0 0 2 (7.7%) \n INV ID NGA-2 1 (12.5%) 1 (14.3%) 0 2 (7.7%) \n INV ID NGA-4 1 (12.5%) 0 1 (9.1%) 2 (7.7%) \n INV ID NGA-5 0 0 1 (9.1%) 1 (3.8%) \n INV ID NGA-6 0 0 1 (9.1%) 1 (3.8%) \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 (28.4%) 20 (24.7%) 16 (25%) 57 (26%) \n INV ID CHN-10 0 1 (1.2%) 0 1 (0.5%) \n INV ID CHN-11 12 (16.2%) 20 (24.7%) 16 (25%) 48 (21.9%) \n INV ID CHN-12 4 (5.4%) 3 (3.7%) 1 (1.6%) 8 (3.7%) \n INV ID CHN-13 2 (2.7%) 6 (7.4%) 0 8 (3.7%) \n INV ID CHN-14 4 (5.4%) 2 (2.5%) 3 (4.7%) 9 (4.1%) \n INV ID CHN-15 2 (2.7%) 0 4 (6.2%) 6 (2.7%) \n INV ID CHN-16 0 3 (3.7%) 3 (4.7%) 6 (2.7%) \n INV ID CHN-17 4 (5.4%) 4 (4.9%) 3 (4.7%) 11 (5%) \n INV ID CHN-18 1 (1.4%) 0 2 (3.1%) 3 (1.4%) \n INV ID CHN-2 9 (12.2%) 4 (4.9%) 3 (4.7%) 16 (7.3%) \n INV ID CHN-3 5 (6.8%) 1 (1.2%) 5 (7.8%) 11 (5%) \n INV ID CHN-4 3 (4.1%) 3 (3.7%) 3 (4.7%) 9 (4.1%) \n INV ID CHN-5 4 (5.4%) 3 (3.7%) 4 (6.2%) 11 (5%) \n INV ID CHN-6 1 (1.4%) 3 (3.7%) 0 4 (1.8%) \n INV ID CHN-7 0 5 (6.2%) 1 (1.6%) 6 (2.7%) \n INV ID CHN-8 1 (1.4%) 1 (1.2%) 0 2 (0.9%) \n INV ID CHN-9 1 (1.4%) 2 (2.5%) 0 3 (1.4%) \n PAK 12 (9.0%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \n INV ID PAK-1 2 (16.7%) 4 (44.4%) 4 (40%) 10 (32.3%) \n INV ID PAK-11 4 (33.3%) 3 (33.3%) 2 (20%) 9 (29%) \n INV ID PAK-12 2 (16.7%) 0 0 2 (6.5%) \n INV ID PAK-13 1 (8.3%) 1 (11.1%) 0 2 (6.5%) \n INV ID PAK-14 1 (8.3%) 0 0 1 (3.2%) \n INV ID PAK-15 1 (8.3%) 0 0 1 (3.2%) \n INV ID PAK-2 1 (8.3%) 0 2 (20%) 3 (9.7%) \n INV ID PAK-4 0 1 (11.1%) 1 (10%) 2 (6.5%) \n INV ID PAK-5 0 0 1 (10%) 1 (3.2%) \n JPN 5 (3.7%) 4 (3.0%) 9 (6.8%) 18 (4.5%) \n INV ID JPN-1 2 (40%) 2 (50%) 1 (11.1%) 5 (27.8%) \n INV ID JPN-11 0 0 3 (33.3%) 3 (16.7%) \n INV ID JPN-12 0 0 1 (11.1%) 1 (5.6%) \n INV ID JPN-14 0 1 (25%) 0 1 (5.6%) \n INV ID JPN-17 0 0 2 (22.2%) 2 (11.1%) \n INV ID JPN-18 1 (20%) 0 0 1 (5.6%) \n INV ID JPN-2 0 0 1 (11.1%) 1 (5.6%) \n INV ID JPN-3 0 1 (25%) 0 1 (5.6%) \n INV ID JPN-5 1 (20%) 0 1 (11.1%) 2 (11.1%) \n INV ID JPN-6 1 (20%) 0 0 1 (5.6%) \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 (20%) 0 0 1 (5.3%) \n INV ID RUS-11 0 2 (25%) 2 (33.3%) 4 (21.1%) \n INV ID RUS-12 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-13 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-14 0 0 1 (16.7%) 1 (5.3%) \n INV ID RUS-16 1 (20%) 1 (12.5%) 0 2 (10.5%) \n INV ID RUS-18 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-2 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-3 0 0 1 (16.7%) 1 (5.3%) \n INV ID RUS-4 0 2 (25%) 1 (16.7%) 3 (15.8%) \n INV ID RUS-5 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-6 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-7 0 0 1 (16.7%) 1 (5.3%) \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 (50%) 0 1 (50%) 3 (33.3%) \n INV ID GBR-11 0 1 (33.3%) 1 (50%) 2 (22.2%) \n INV ID GBR-13 1 (25%) 0 0 1 (11.1%) \n INV ID GBR-15 1 (25%) 0 0 1 (11.1%) \n INV ID GBR-17 0 1 (33.3%) 0 1 (11.1%) \n INV ID GBR-6 0 1 (33.3%) 0 1 (11.1%) \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 (10%) 4 (30.8%) 5 (29.4%) 10 (25%) \n INV ID USA-11 4 (40%) 2 (15.4%) 3 (17.6%) 9 (22.5%) \n INV ID USA-12 1 (10%) 2 (15.4%) 3 (17.6%) 6 (15%) \n INV ID USA-14 1 (10%) 0 0 1 (2.5%) \n INV ID USA-15 0 1 (7.7%) 1 (5.9%) 2 (5%) \n INV ID USA-17 1 (10%) 1 (7.7%) 0 2 (5%) \n INV ID USA-19 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-2 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-3 1 (10%) 0 1 (5.9%) 2 (5%) \n INV ID USA-4 0 1 (7.7%) 1 (5.9%) 2 (5%) \n INV ID USA-5 0 1 (7.7%) 0 1 (2.5%) \n INV ID USA-6 0 1 (7.7%) 0 1 (2.5%) \n INV ID USA-8 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-9 1 (10%) 0 0 1 (2.5%) \n CAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2.0%) \n INV ID CAN-1 1 (33.3%) 1 (50%) 0 2 (25%) \n INV ID CAN-11 1 (33.3%) 0 1 (33.3%) 2 (25%) \n INV ID CAN-14 1 (33.3%) 0 0 1 (12.5%) \n INV ID CAN-4 0 1 (50%) 1 (33.3%) 2 (25%) \n INV ID CAN-5 0 0 1 (33.3%) 1 (12.5%) \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 (30.8%) 2 (28.6%) 2 (20%) 8 (26.7%) \n INV ID BRA-11 4 (30.8%) 0 4 (40%) 8 (26.7%) \n INV ID BRA-12 0 1 (14.3%) 0 1 (3.3%) \n INV ID BRA-13 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-14 1 (7.7%) 0 1 (10%) 2 (6.7%) \n INV ID BRA-15 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-2 1 (7.7%) 1 (14.3%) 0 2 (6.7%) \n INV ID BRA-3 0 2 (28.6%) 0 2 (6.7%) \n INV ID BRA-4 0 1 (14.3%) 1 (10%) 2 (6.7%) \n INV ID BRA-5 0 0 1 (10%) 1 (3.3%) \n INV ID BRA-6 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-7 0 0 1 (10%) 1 (3.3%) \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 analyze_vars(\"INVID\", .stats = \"count_fraction\") %>%\n append_varlabels(adsl, \"INVID\", 1L)\n\nresult <- build_table(lyt, adsl) %>%\n prune_table()\n\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 (28.4%) 20 (24.7%) 16 (25%) 57 (26%) \n INV ID CHN-10 0 1 (1.2%) 0 1 (0.5%) \n INV ID CHN-11 12 (16.2%) 20 (24.7%) 16 (25%) 48 (21.9%) \n INV ID CHN-12 4 (5.4%) 3 (3.7%) 1 (1.6%) 8 (3.7%) \n INV ID CHN-13 2 (2.7%) 6 (7.4%) 0 8 (3.7%) \n INV ID CHN-14 4 (5.4%) 2 (2.5%) 3 (4.7%) 9 (4.1%) \n INV ID CHN-15 2 (2.7%) 0 4 (6.2%) 6 (2.7%) \n INV ID CHN-16 0 3 (3.7%) 3 (4.7%) 6 (2.7%) \n INV ID CHN-17 4 (5.4%) 4 (4.9%) 3 (4.7%) 11 (5%) \n INV ID CHN-18 1 (1.4%) 0 2 (3.1%) 3 (1.4%) \n INV ID CHN-2 9 (12.2%) 4 (4.9%) 3 (4.7%) 16 (7.3%) \n INV ID CHN-3 5 (6.8%) 1 (1.2%) 5 (7.8%) 11 (5%) \n INV ID CHN-4 3 (4.1%) 3 (3.7%) 3 (4.7%) 9 (4.1%) \n INV ID CHN-5 4 (5.4%) 3 (3.7%) 4 (6.2%) 11 (5%) \n INV ID CHN-6 1 (1.4%) 3 (3.7%) 0 4 (1.8%) \n INV ID CHN-7 0 5 (6.2%) 1 (1.6%) 6 (2.7%) \n INV ID CHN-8 1 (1.4%) 1 (1.2%) 0 2 (0.9%) \n INV ID CHN-9 1 (1.4%) 2 (2.5%) 0 3 (1.4%) \nUSA 10 (7.5%) 13 (9.7%) 17 (12.9%) 40 (10.0%) \n INV ID USA-1 1 (10%) 4 (30.8%) 5 (29.4%) 10 (25%) \n INV ID USA-11 4 (40%) 2 (15.4%) 3 (17.6%) 9 (22.5%) \n INV ID USA-12 1 (10%) 2 (15.4%) 3 (17.6%) 6 (15%) \n INV ID USA-14 1 (10%) 0 0 1 (2.5%) \n INV ID USA-15 0 1 (7.7%) 1 (5.9%) 2 (5%) \n INV ID USA-17 1 (10%) 1 (7.7%) 0 2 (5%) \n INV ID USA-19 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-2 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-3 1 (10%) 0 1 (5.9%) 2 (5%) \n INV ID USA-4 0 1 (7.7%) 1 (5.9%) 2 (5%) \n INV ID USA-5 0 1 (7.7%) 0 1 (2.5%) \n INV ID USA-6 0 1 (7.7%) 0 1 (2.5%) \n INV ID USA-8 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-9 1 (10%) 0 0 1 (2.5%) \nBRA 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \n INV ID BRA-1 4 (30.8%) 2 (28.6%) 2 (20%) 8 (26.7%) \n INV ID BRA-11 4 (30.8%) 0 4 (40%) 8 (26.7%) \n INV ID BRA-12 0 1 (14.3%) 0 1 (3.3%) \n INV ID BRA-13 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-14 1 (7.7%) 0 1 (10%) 2 (6.7%) \n INV ID BRA-15 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-2 1 (7.7%) 1 (14.3%) 0 2 (6.7%) \n INV ID BRA-3 0 2 (28.6%) 0 2 (6.7%) \n INV ID BRA-4 0 1 (14.3%) 1 (10%) 2 (6.7%) \n INV ID BRA-5 0 0 1 (10%) 1 (3.3%) \n INV ID BRA-6 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-7 0 0 1 (10%) 1 (3.3%) \nPAK 12 (9.0%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \n INV ID PAK-1 2 (16.7%) 4 (44.4%) 4 (40%) 10 (32.3%) \n INV ID PAK-11 4 (33.3%) 3 (33.3%) 2 (20%) 9 (29%) \n INV ID PAK-12 2 (16.7%) 0 0 2 (6.5%) \n INV ID PAK-13 1 (8.3%) 1 (11.1%) 0 2 (6.5%) \n INV ID PAK-14 1 (8.3%) 0 0 1 (3.2%) \n INV ID PAK-15 1 (8.3%) 0 0 1 (3.2%) \n INV ID PAK-2 1 (8.3%) 0 2 (20%) 3 (9.7%) \n INV ID PAK-4 0 1 (11.1%) 1 (10%) 2 (6.5%) \n INV ID PAK-5 0 0 1 (10%) 1 (3.2%) \nNGA 8 (6.0%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \n INV ID NGA-1 3 (37.5%) 3 (42.9%) 4 (36.4%) 10 (38.5%) \n INV ID NGA-11 1 (12.5%) 2 (28.6%) 3 (27.3%) 6 (23.1%) \n INV ID NGA-12 0 1 (14.3%) 1 (9.1%) 2 (7.7%) \n INV ID NGA-17 2 (25%) 0 0 2 (7.7%) \n INV ID NGA-2 1 (12.5%) 1 (14.3%) 0 2 (7.7%) \n INV ID NGA-4 1 (12.5%) 0 1 (9.1%) 2 (7.7%) \n INV ID NGA-5 0 0 1 (9.1%) 1 (3.8%) \n INV ID NGA-6 0 0 1 (9.1%) 1 (3.8%) \nRUS 5 (3.7%) 8 (6.0%) 6 (4.5%) 19 (4.8%) \n INV ID RUS-1 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-11 0 2 (25%) 2 (33.3%) 4 (21.1%) \n INV ID RUS-12 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-13 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-14 0 0 1 (16.7%) 1 (5.3%) \n INV ID RUS-16 1 (20%) 1 (12.5%) 0 2 (10.5%) \n INV ID RUS-18 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-2 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-3 0 0 1 (16.7%) 1 (5.3%) \n INV ID RUS-4 0 2 (25%) 1 (16.7%) 3 (15.8%) \n INV ID RUS-5 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-6 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-7 0 0 1 (16.7%) 1 (5.3%) \nJPN 5 (3.7%) 4 (3.0%) 9 (6.8%) 18 (4.5%) \n INV ID JPN-1 2 (40%) 2 (50%) 1 (11.1%) 5 (27.8%) \n INV ID JPN-11 0 0 3 (33.3%) 3 (16.7%) \n INV ID JPN-12 0 0 1 (11.1%) 1 (5.6%) \n INV ID JPN-14 0 1 (25%) 0 1 (5.6%) \n INV ID JPN-17 0 0 2 (22.2%) 2 (11.1%) \n INV ID JPN-18 1 (20%) 0 0 1 (5.6%) \n INV ID JPN-2 0 0 1 (11.1%) 1 (5.6%) \n INV ID JPN-3 0 1 (25%) 0 1 (5.6%) \n INV ID JPN-5 1 (20%) 0 1 (11.1%) 2 (11.1%) \n INV ID JPN-6 1 (20%) 0 0 1 (5.6%) \nGBR 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID GBR-1 2 (50%) 0 1 (50%) 3 (33.3%) \n INV ID GBR-11 0 1 (33.3%) 1 (50%) 2 (22.2%) \n INV ID GBR-13 1 (25%) 0 0 1 (11.1%) \n INV ID GBR-15 1 (25%) 0 0 1 (11.1%) \n INV ID GBR-17 0 1 (33.3%) 0 1 (11.1%) \n INV ID GBR-6 0 1 (33.3%) 0 1 (11.1%) \nCAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2.0%) \n INV ID CAN-1 1 (33.3%) 1 (50%) 0 2 (25%) \n INV ID CAN-11 1 (33.3%) 0 1 (33.3%) 2 (25%) \n INV ID CAN-14 1 (33.3%) 0 0 1 (12.5%) \n INV ID CAN-4 0 1 (50%) 1 (33.3%) 2 (25%) \n INV ID CAN-5 0 0 1 (33.3%) 1 (12.5%) \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 analyze_vars(\"INVID_INVNAM\", .stats = \"count_fraction\") %>%\n append_varlabels(adsl, \"INVID_INVNAM\", 2L)\n\nresult <- build_table(lyt, adsl) %>%\n prune_table()\n\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 (37.5%) 3 (42.9%) 4 (36.4%) 10 (38.5%) \n INV ID NGA-11 / Dr. NGA-11 Doe 1 (12.5%) 2 (28.6%) 3 (27.3%) 6 (23.1%) \n INV ID NGA-12 / Dr. NGA-12 Doe 0 1 (14.3%) 1 (9.1%) 2 (7.7%) \n INV ID NGA-17 / Dr. NGA-17 Doe 2 (25%) 0 0 2 (7.7%) \n INV ID NGA-2 / Dr. NGA-2 Doe 1 (12.5%) 1 (14.3%) 0 2 (7.7%) \n INV ID NGA-4 / Dr. NGA-4 Doe 1 (12.5%) 0 1 (9.1%) 2 (7.7%) \n INV ID NGA-5 / Dr. NGA-5 Doe 0 0 1 (9.1%) 1 (3.8%) \n INV ID NGA-6 / Dr. NGA-6 Doe 0 0 1 (9.1%) 1 (3.8%) \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 (28.4%) 20 (24.7%) 16 (25%) 57 (26%) \n INV ID CHN-10 / Dr. CHN-10 Doe 0 1 (1.2%) 0 1 (0.5%) \n INV ID CHN-11 / Dr. CHN-11 Doe 12 (16.2%) 20 (24.7%) 16 (25%) 48 (21.9%) \n INV ID CHN-12 / Dr. CHN-12 Doe 4 (5.4%) 3 (3.7%) 1 (1.6%) 8 (3.7%) \n INV ID CHN-13 / Dr. CHN-13 Doe 2 (2.7%) 6 (7.4%) 0 8 (3.7%) \n INV ID CHN-14 / Dr. CHN-14 Doe 4 (5.4%) 2 (2.5%) 3 (4.7%) 9 (4.1%) \n INV ID CHN-15 / Dr. CHN-15 Doe 2 (2.7%) 0 4 (6.2%) 6 (2.7%) \n INV ID CHN-16 / Dr. CHN-16 Doe 0 3 (3.7%) 3 (4.7%) 6 (2.7%) \n INV ID CHN-17 / Dr. CHN-17 Doe 4 (5.4%) 4 (4.9%) 3 (4.7%) 11 (5%) \n INV ID CHN-18 / Dr. CHN-18 Doe 1 (1.4%) 0 2 (3.1%) 3 (1.4%) \n INV ID CHN-2 / Dr. CHN-2 Doe 9 (12.2%) 4 (4.9%) 3 (4.7%) 16 (7.3%) \n INV ID CHN-3 / Dr. CHN-3 Doe 5 (6.8%) 1 (1.2%) 5 (7.8%) 11 (5%) \n INV ID CHN-4 / Dr. CHN-4 Doe 3 (4.1%) 3 (3.7%) 3 (4.7%) 9 (4.1%) \n INV ID CHN-5 / Dr. CHN-5 Doe 4 (5.4%) 3 (3.7%) 4 (6.2%) 11 (5%) \n INV ID CHN-6 / Dr. CHN-6 Doe 1 (1.4%) 3 (3.7%) 0 4 (1.8%) \n INV ID CHN-7 / Dr. CHN-7 Doe 0 5 (6.2%) 1 (1.6%) 6 (2.7%) \n INV ID CHN-8 / Dr. CHN-8 Doe 1 (1.4%) 1 (1.2%) 0 2 (0.9%) \n INV ID CHN-9 / Dr. CHN-9 Doe 1 (1.4%) 2 (2.5%) 0 3 (1.4%) \n PAK 12 (9.0%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \n INV ID PAK-1 / Dr. PAK-1 Doe 2 (16.7%) 4 (44.4%) 4 (40%) 10 (32.3%) \n INV ID PAK-11 / Dr. PAK-11 Doe 4 (33.3%) 3 (33.3%) 2 (20%) 9 (29%) \n INV ID PAK-12 / Dr. PAK-12 Doe 2 (16.7%) 0 0 2 (6.5%) \n INV ID PAK-13 / Dr. PAK-13 Doe 1 (8.3%) 1 (11.1%) 0 2 (6.5%) \n INV ID PAK-14 / Dr. PAK-14 Doe 1 (8.3%) 0 0 1 (3.2%) \n INV ID PAK-15 / Dr. PAK-15 Doe 1 (8.3%) 0 0 1 (3.2%) \n INV ID PAK-2 / Dr. PAK-2 Doe 1 (8.3%) 0 2 (20%) 3 (9.7%) \n INV ID PAK-4 / Dr. PAK-4 Doe 0 1 (11.1%) 1 (10%) 2 (6.5%) \n INV ID PAK-5 / Dr. PAK-5 Doe 0 0 1 (10%) 1 (3.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 (40%) 2 (50%) 1 (11.1%) 5 (27.8%) \n INV ID JPN-11 / Dr. JPN-11 Doe 0 0 3 (33.3%) 3 (16.7%) \n INV ID JPN-12 / Dr. JPN-12 Doe 0 0 1 (11.1%) 1 (5.6%) \n INV ID JPN-14 / Dr. JPN-14 Doe 0 1 (25%) 0 1 (5.6%) \n INV ID JPN-17 / Dr. JPN-17 Doe 0 0 2 (22.2%) 2 (11.1%) \n INV ID JPN-18 / Dr. JPN-18 Doe 1 (20%) 0 0 1 (5.6%) \n INV ID JPN-2 / Dr. JPN-2 Doe 0 0 1 (11.1%) 1 (5.6%) \n INV ID JPN-3 / Dr. JPN-3 Doe 0 1 (25%) 0 1 (5.6%) \n INV ID JPN-5 / Dr. JPN-5 Doe 1 (20%) 0 1 (11.1%) 2 (11.1%) \n INV ID JPN-6 / Dr. JPN-6 Doe 1 (20%) 0 0 1 (5.6%) \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 (20%) 0 0 1 (5.3%) \n INV ID RUS-11 / Dr. RUS-11 Doe 0 2 (25%) 2 (33.3%) 4 (21.1%) \n INV ID RUS-12 / Dr. RUS-12 Doe 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-13 / Dr. RUS-13 Doe 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-14 / Dr. RUS-14 Doe 0 0 1 (16.7%) 1 (5.3%) \n INV ID RUS-16 / Dr. RUS-16 Doe 1 (20%) 1 (12.5%) 0 2 (10.5%) \n INV ID RUS-18 / Dr. RUS-18 Doe 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-2 / Dr. RUS-2 Doe 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-3 / Dr. RUS-3 Doe 0 0 1 (16.7%) 1 (5.3%) \n INV ID RUS-4 / Dr. RUS-4 Doe 0 2 (25%) 1 (16.7%) 3 (15.8%) \n INV ID RUS-5 / Dr. RUS-5 Doe 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-6 / Dr. RUS-6 Doe 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-7 / Dr. RUS-7 Doe 0 0 1 (16.7%) 1 (5.3%) \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 (50%) 0 1 (50%) 3 (33.3%) \n INV ID GBR-11 / Dr. GBR-11 Doe 0 1 (33.3%) 1 (50%) 2 (22.2%) \n INV ID GBR-13 / Dr. GBR-13 Doe 1 (25%) 0 0 1 (11.1%) \n INV ID GBR-15 / Dr. GBR-15 Doe 1 (25%) 0 0 1 (11.1%) \n INV ID GBR-17 / Dr. GBR-17 Doe 0 1 (33.3%) 0 1 (11.1%) \n INV ID GBR-6 / Dr. GBR-6 Doe 0 1 (33.3%) 0 1 (11.1%) \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 (10%) 4 (30.8%) 5 (29.4%) 10 (25%) \n INV ID USA-11 / Dr. USA-11 Doe 4 (40%) 2 (15.4%) 3 (17.6%) 9 (22.5%) \n INV ID USA-12 / Dr. USA-12 Doe 1 (10%) 2 (15.4%) 3 (17.6%) 6 (15%) \n INV ID USA-14 / Dr. USA-14 Doe 1 (10%) 0 0 1 (2.5%) \n INV ID USA-15 / Dr. USA-15 Doe 0 1 (7.7%) 1 (5.9%) 2 (5%) \n INV ID USA-17 / Dr. USA-17 Doe 1 (10%) 1 (7.7%) 0 2 (5%) \n INV ID USA-19 / Dr. USA-19 Doe 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-2 / Dr. USA-2 Doe 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-3 / Dr. USA-3 Doe 1 (10%) 0 1 (5.9%) 2 (5%) \n INV ID USA-4 / Dr. USA-4 Doe 0 1 (7.7%) 1 (5.9%) 2 (5%) \n INV ID USA-5 / Dr. USA-5 Doe 0 1 (7.7%) 0 1 (2.5%) \n INV ID USA-6 / Dr. USA-6 Doe 0 1 (7.7%) 0 1 (2.5%) \n INV ID USA-8 / Dr. USA-8 Doe 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-9 / Dr. USA-9 Doe 1 (10%) 0 0 1 (2.5%) \n CAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2.0%) \n INV ID CAN-1 / Dr. CAN-1 Doe 1 (33.3%) 1 (50%) 0 2 (25%) \n INV ID CAN-11 / Dr. CAN-11 Doe 1 (33.3%) 0 1 (33.3%) 2 (25%) \n INV ID CAN-14 / Dr. CAN-14 Doe 1 (33.3%) 0 0 1 (12.5%) \n INV ID CAN-4 / Dr. CAN-4 Doe 0 1 (50%) 1 (33.3%) 2 (25%) \n INV ID CAN-5 / Dr. CAN-5 Doe 0 0 1 (33.3%) 1 (12.5%) \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 (30.8%) 2 (28.6%) 2 (20%) 8 (26.7%) \n INV ID BRA-11 / Dr. BRA-11 Doe 4 (30.8%) 0 4 (40%) 8 (26.7%) \n INV ID BRA-12 / Dr. BRA-12 Doe 0 1 (14.3%) 0 1 (3.3%) \n INV ID BRA-13 / Dr. BRA-13 Doe 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-14 / Dr. BRA-14 Doe 1 (7.7%) 0 1 (10%) 2 (6.7%) \n INV ID BRA-15 / Dr. BRA-15 Doe 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-2 / Dr. BRA-2 Doe 1 (7.7%) 1 (14.3%) 0 2 (6.7%) \n INV ID BRA-3 / Dr. BRA-3 Doe 0 2 (28.6%) 0 2 (6.7%) \n INV ID BRA-4 / Dr. BRA-4 Doe 0 1 (14.3%) 1 (10%) 2 (6.7%) \n INV ID BRA-5 / Dr. BRA-5 Doe 0 0 1 (10%) 1 (3.3%) \n INV ID BRA-6 / Dr. BRA-6 Doe 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-7 / Dr. BRA-7 Doe 0 0 1 (10%) 1 (3.3%) \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 analyze_vars(\"INVID_INVNAM\", .stats = \"count_fraction\") %>%\n append_varlabels(adsl, \"INVID_INVNAM\", 1L)\n\nresult <- build_table(lyt, adsl) %>%\n prune_table()\n\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 (28.4%) 20 (24.7%) 16 (25%) 57 (26%) \n INV ID CHN-10 / Dr. CHN-10 Doe 0 1 (1.2%) 0 1 (0.5%) \n INV ID CHN-11 / Dr. CHN-11 Doe 12 (16.2%) 20 (24.7%) 16 (25%) 48 (21.9%) \n INV ID CHN-12 / Dr. CHN-12 Doe 4 (5.4%) 3 (3.7%) 1 (1.6%) 8 (3.7%) \n INV ID CHN-13 / Dr. CHN-13 Doe 2 (2.7%) 6 (7.4%) 0 8 (3.7%) \n INV ID CHN-14 / Dr. CHN-14 Doe 4 (5.4%) 2 (2.5%) 3 (4.7%) 9 (4.1%) \n INV ID CHN-15 / Dr. CHN-15 Doe 2 (2.7%) 0 4 (6.2%) 6 (2.7%) \n INV ID CHN-16 / Dr. CHN-16 Doe 0 3 (3.7%) 3 (4.7%) 6 (2.7%) \n INV ID CHN-17 / Dr. CHN-17 Doe 4 (5.4%) 4 (4.9%) 3 (4.7%) 11 (5%) \n INV ID CHN-18 / Dr. CHN-18 Doe 1 (1.4%) 0 2 (3.1%) 3 (1.4%) \n INV ID CHN-2 / Dr. CHN-2 Doe 9 (12.2%) 4 (4.9%) 3 (4.7%) 16 (7.3%) \n INV ID CHN-3 / Dr. CHN-3 Doe 5 (6.8%) 1 (1.2%) 5 (7.8%) 11 (5%) \n INV ID CHN-4 / Dr. CHN-4 Doe 3 (4.1%) 3 (3.7%) 3 (4.7%) 9 (4.1%) \n INV ID CHN-5 / Dr. CHN-5 Doe 4 (5.4%) 3 (3.7%) 4 (6.2%) 11 (5%) \n INV ID CHN-6 / Dr. CHN-6 Doe 1 (1.4%) 3 (3.7%) 0 4 (1.8%) \n INV ID CHN-7 / Dr. CHN-7 Doe 0 5 (6.2%) 1 (1.6%) 6 (2.7%) \n INV ID CHN-8 / Dr. CHN-8 Doe 1 (1.4%) 1 (1.2%) 0 2 (0.9%) \n INV ID CHN-9 / Dr. CHN-9 Doe 1 (1.4%) 2 (2.5%) 0 3 (1.4%) \nUSA 10 (7.5%) 13 (9.7%) 17 (12.9%) 40 (10.0%) \n INV ID USA-1 / Dr. USA-1 Doe 1 (10%) 4 (30.8%) 5 (29.4%) 10 (25%) \n INV ID USA-11 / Dr. USA-11 Doe 4 (40%) 2 (15.4%) 3 (17.6%) 9 (22.5%) \n INV ID USA-12 / Dr. USA-12 Doe 1 (10%) 2 (15.4%) 3 (17.6%) 6 (15%) \n INV ID USA-14 / Dr. USA-14 Doe 1 (10%) 0 0 1 (2.5%) \n INV ID USA-15 / Dr. USA-15 Doe 0 1 (7.7%) 1 (5.9%) 2 (5%) \n INV ID USA-17 / Dr. USA-17 Doe 1 (10%) 1 (7.7%) 0 2 (5%) \n INV ID USA-19 / Dr. USA-19 Doe 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-2 / Dr. USA-2 Doe 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-3 / Dr. USA-3 Doe 1 (10%) 0 1 (5.9%) 2 (5%) \n INV ID USA-4 / Dr. USA-4 Doe 0 1 (7.7%) 1 (5.9%) 2 (5%) \n INV ID USA-5 / Dr. USA-5 Doe 0 1 (7.7%) 0 1 (2.5%) \n INV ID USA-6 / Dr. USA-6 Doe 0 1 (7.7%) 0 1 (2.5%) \n INV ID USA-8 / Dr. USA-8 Doe 0 0 1 (5.9%) 1 (2.5%) \n INV ID USA-9 / Dr. USA-9 Doe 1 (10%) 0 0 1 (2.5%) \nBRA 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \n INV ID BRA-1 / Dr. BRA-1 Doe 4 (30.8%) 2 (28.6%) 2 (20%) 8 (26.7%) \n INV ID BRA-11 / Dr. BRA-11 Doe 4 (30.8%) 0 4 (40%) 8 (26.7%) \n INV ID BRA-12 / Dr. BRA-12 Doe 0 1 (14.3%) 0 1 (3.3%) \n INV ID BRA-13 / Dr. BRA-13 Doe 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-14 / Dr. BRA-14 Doe 1 (7.7%) 0 1 (10%) 2 (6.7%) \n INV ID BRA-15 / Dr. BRA-15 Doe 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-2 / Dr. BRA-2 Doe 1 (7.7%) 1 (14.3%) 0 2 (6.7%) \n INV ID BRA-3 / Dr. BRA-3 Doe 0 2 (28.6%) 0 2 (6.7%) \n INV ID BRA-4 / Dr. BRA-4 Doe 0 1 (14.3%) 1 (10%) 2 (6.7%) \n INV ID BRA-5 / Dr. BRA-5 Doe 0 0 1 (10%) 1 (3.3%) \n INV ID BRA-6 / Dr. BRA-6 Doe 1 (7.7%) 0 0 1 (3.3%) \n INV ID BRA-7 / Dr. BRA-7 Doe 0 0 1 (10%) 1 (3.3%) \nPAK 12 (9.0%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \n INV ID PAK-1 / Dr. PAK-1 Doe 2 (16.7%) 4 (44.4%) 4 (40%) 10 (32.3%) \n INV ID PAK-11 / Dr. PAK-11 Doe 4 (33.3%) 3 (33.3%) 2 (20%) 9 (29%) \n INV ID PAK-12 / Dr. PAK-12 Doe 2 (16.7%) 0 0 2 (6.5%) \n INV ID PAK-13 / Dr. PAK-13 Doe 1 (8.3%) 1 (11.1%) 0 2 (6.5%) \n INV ID PAK-14 / Dr. PAK-14 Doe 1 (8.3%) 0 0 1 (3.2%) \n INV ID PAK-15 / Dr. PAK-15 Doe 1 (8.3%) 0 0 1 (3.2%) \n INV ID PAK-2 / Dr. PAK-2 Doe 1 (8.3%) 0 2 (20%) 3 (9.7%) \n INV ID PAK-4 / Dr. PAK-4 Doe 0 1 (11.1%) 1 (10%) 2 (6.5%) \n INV ID PAK-5 / Dr. PAK-5 Doe 0 0 1 (10%) 1 (3.2%) \nNGA 8 (6.0%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \n INV ID NGA-1 / Dr. NGA-1 Doe 3 (37.5%) 3 (42.9%) 4 (36.4%) 10 (38.5%) \n INV ID NGA-11 / Dr. NGA-11 Doe 1 (12.5%) 2 (28.6%) 3 (27.3%) 6 (23.1%) \n INV ID NGA-12 / Dr. NGA-12 Doe 0 1 (14.3%) 1 (9.1%) 2 (7.7%) \n INV ID NGA-17 / Dr. NGA-17 Doe 2 (25%) 0 0 2 (7.7%) \n INV ID NGA-2 / Dr. NGA-2 Doe 1 (12.5%) 1 (14.3%) 0 2 (7.7%) \n INV ID NGA-4 / Dr. NGA-4 Doe 1 (12.5%) 0 1 (9.1%) 2 (7.7%) \n INV ID NGA-5 / Dr. NGA-5 Doe 0 0 1 (9.1%) 1 (3.8%) \n INV ID NGA-6 / Dr. NGA-6 Doe 0 0 1 (9.1%) 1 (3.8%) \nRUS 5 (3.7%) 8 (6.0%) 6 (4.5%) 19 (4.8%) \n INV ID RUS-1 / Dr. RUS-1 Doe 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-11 / Dr. RUS-11 Doe 0 2 (25%) 2 (33.3%) 4 (21.1%) \n INV ID RUS-12 / Dr. RUS-12 Doe 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-13 / Dr. RUS-13 Doe 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-14 / Dr. RUS-14 Doe 0 0 1 (16.7%) 1 (5.3%) \n INV ID RUS-16 / Dr. RUS-16 Doe 1 (20%) 1 (12.5%) 0 2 (10.5%) \n INV ID RUS-18 / Dr. RUS-18 Doe 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-2 / Dr. RUS-2 Doe 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-3 / Dr. RUS-3 Doe 0 0 1 (16.7%) 1 (5.3%) \n INV ID RUS-4 / Dr. RUS-4 Doe 0 2 (25%) 1 (16.7%) 3 (15.8%) \n INV ID RUS-5 / Dr. RUS-5 Doe 0 1 (12.5%) 0 1 (5.3%) \n INV ID RUS-6 / Dr. RUS-6 Doe 1 (20%) 0 0 1 (5.3%) \n INV ID RUS-7 / Dr. RUS-7 Doe 0 0 1 (16.7%) 1 (5.3%) \nJPN 5 (3.7%) 4 (3.0%) 9 (6.8%) 18 (4.5%) \n INV ID JPN-1 / Dr. JPN-1 Doe 2 (40%) 2 (50%) 1 (11.1%) 5 (27.8%) \n INV ID JPN-11 / Dr. JPN-11 Doe 0 0 3 (33.3%) 3 (16.7%) \n INV ID JPN-12 / Dr. JPN-12 Doe 0 0 1 (11.1%) 1 (5.6%) \n INV ID JPN-14 / Dr. JPN-14 Doe 0 1 (25%) 0 1 (5.6%) \n INV ID JPN-17 / Dr. JPN-17 Doe 0 0 2 (22.2%) 2 (11.1%) \n INV ID JPN-18 / Dr. JPN-18 Doe 1 (20%) 0 0 1 (5.6%) \n INV ID JPN-2 / Dr. JPN-2 Doe 0 0 1 (11.1%) 1 (5.6%) \n INV ID JPN-3 / Dr. JPN-3 Doe 0 1 (25%) 0 1 (5.6%) \n INV ID JPN-5 / Dr. JPN-5 Doe 1 (20%) 0 1 (11.1%) 2 (11.1%) \n INV ID JPN-6 / Dr. JPN-6 Doe 1 (20%) 0 0 1 (5.6%) \nGBR 4 (3.0%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \n INV ID GBR-1 / Dr. GBR-1 Doe 2 (50%) 0 1 (50%) 3 (33.3%) \n INV ID GBR-11 / Dr. GBR-11 Doe 0 1 (33.3%) 1 (50%) 2 (22.2%) \n INV ID GBR-13 / Dr. GBR-13 Doe 1 (25%) 0 0 1 (11.1%) \n INV ID GBR-15 / Dr. GBR-15 Doe 1 (25%) 0 0 1 (11.1%) \n INV ID GBR-17 / Dr. GBR-17 Doe 0 1 (33.3%) 0 1 (11.1%) \n INV ID GBR-6 / Dr. GBR-6 Doe 0 1 (33.3%) 0 1 (11.1%) \nCAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2.0%) \n INV ID CAN-1 / Dr. CAN-1 Doe 1 (33.3%) 1 (50%) 0 2 (25%) \n INV ID CAN-11 / Dr. CAN-11 Doe 1 (33.3%) 0 1 (33.3%) 2 (25%) \n INV ID CAN-14 / Dr. CAN-14 Doe 1 (33.3%) 0 0 1 (12.5%) \n INV ID CAN-4 / Dr. CAN-4 Doe 0 1 (50%) 1 (33.3%) 2 (25%) \n INV ID CAN-5 / Dr. CAN-5 Doe 0 0 1 (33.3%) 1 (12.5%) \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\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 analyze_vars are additionally used when row_groups is deselected.\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(forcats)\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n\n adsl_labels <- col_labels(ADSL)\n\n ADSL <- 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\n col_labels(ADSL) <- c(adsl_labels, c(INVID_INVNAM = \"Investigator Number/Name\"))\n})\ndatanames <- \"ADSL\"\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:46:10 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9021 scda_0.1.6.9017 \n[13] forcats_1.0.0 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Safety", @@ -1355,7 +1355,7 @@ "href": "tables/disposition/dst01.html", "title": "DST01", "section": "", - "text": "Data Setup\nStandard Table\nTable with Grouping of Reasons\nTable Adding Optional Rows\nteal App\nReproducibility\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 show_labels = \"hidden\"\n ) %>%\n analyze_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 show_labels = \"hidden\"\n ) %>%\n split_rows_by(\"DCSREASGP\", indent_mod = 1L) %>%\n analyze_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 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\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 ) %>%\n col_relabel(\n EOTSTT = \"End Of Treatment Status\"\n )\n\n date_vars_asl <- names(ADSL)[vapply(ADSL, function(x) inherits(x, c(\"Date\", \"POSIXct\", \"POSIXlt\")), logical(1))]\n demog_vars_asl <- names(ADSL)[!(names(ADSL) %in% c(\"USUBJID\", \"STUDYID\", date_vars_asl))]\n})\ndatanames <- \"ADSL\"\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\ndemog_vars_asl <- data[[\"demog_vars_asl\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:45:42 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nTable with Grouping of Reasons\nTable Adding Optional Rows\nteal App\nReproducibility\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 show_labels = \"hidden\"\n ) %>%\n analyze_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 show_labels = \"hidden\"\n ) %>%\n split_rows_by(\"DCSREASGP\", indent_mod = 1L) %>%\n analyze_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 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\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 ) %>%\n col_relabel(\n EOTSTT = \"End Of Treatment Status\"\n )\n\n date_vars_asl <- names(ADSL)[vapply(ADSL, function(x) inherits(x, c(\"Date\", \"POSIXct\", \"POSIXlt\")), logical(1))]\n demog_vars_asl <- names(ADSL)[!(names(ADSL) %in% c(\"USUBJID\", \"STUDYID\", date_vars_asl))]\n})\ndatanames <- \"ADSL\"\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\ndemog_vars_asl <- data[[\"demog_vars_asl\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:46:32 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Disposition", @@ -1367,7 +1367,7 @@ "href": "tables/disclosures/disclosurest01.html", "title": "DISCLOSUREST01", "section": "", - "text": "Patient Disposition Table (CTgov & EudraCT)\nDemographic Table (CTgov & EudraCT)\nEnrollment by Country Table (EudraCT only)\nNon-Serious Adverse Events Reported in \\(\\geq\\) 5% of Patients in Any Treatment Group (CTgov & EudraCT)\nSerious Adverse Events, Fatal SAEs and SAEs Related to Study Medication, by Treatment Group (CTgov & EudraCT)\nDeath Table (EudraCT only)\nReproducibility\n\n\n\nData Setup\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\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\nset.seed(1, kind = \"Mersenne-Twister\")\n\n# Add additional disposition variables to adsl.\nadsl0 <- adsl %>%\n mutate(\n STSTFL = case_when(\n is.na(RANDDT) ~ \"N\",\n TRUE ~ \"Y\"\n ) %>% as.factor(),\n COMPSTUD = sample(\n c(\"Y\", \"N\"),\n size = nrow(adsl),\n replace = TRUE\n ) %>% as.factor(),\n STUDONS = sample(\n c(\"Alive: On Treatment\", \"Alive: In Follow-up\", NA),\n size = nrow(adsl),\n replace = TRUE\n ) %>% as.factor(),\n STDDRS = sample(\n c(\n \"Death\", \"Lost To Follow-Up\",\n \"Protocol Violation\", \"Withdrawal By Subject\",\n \"Other\"\n ),\n size = nrow(adsl),\n replace = TRUE\n ) %>% as.factor(),\n GOTTRT = ifelse(!is.na(ACTARMCD), \"Y\", \"N\") %>%\n as.factor(),\n DISTRTFL = sample(\n c(\"Y\", \"N\"),\n size = nrow(adsl),\n replace = TRUE\n ) %>% as.factor(),\n TRTDRS = sample(\n c(\n \"ADVERSE EVENT\", \"PROGRESSIVE DISEASE\",\n \"PHYSICIAN DECISION\", \"LACK OF EFFICACY\",\n \"OTHER\"\n ),\n size = nrow(adsl),\n replace = TRUE\n ) %>% as.factor(),\n STUDONS = case_when(COMPSTUD == \"N\" ~ STUDONS),\n STDDRS = case_when(COMPSTUD == \"N\" & is.na(STUDONS) ~ STDDRS),\n DISSTDFL = case_when(!is.na(STDDRS) ~ \"Y\"),\n DISTRTFL = case_when(GOTTRT == \"Y\" ~ DISTRTFL),\n TRTDRS = case_when(DISTRTFL == \"Y\" ~ TRTDRS),\n DRSCAT = case_when(\n TRTDRS %in% c(\"ADVERSE EVENT\", \"PHYSICIAN DECISION\") ~ \"Safety\",\n !is.na(TRTDRS) ~ \"Other\"\n )\n ) %>%\n var_relabel(\n STSTFL = \"Started Study\",\n COMPSTUD = \"Complete Study\",\n STUDONS = \"On-study Status\",\n DISSTDFL = \"Discontinued Study\",\n STDDRS = \"Reason for Study Discontinuation\",\n GOTTRT = \"Received Treatment\",\n DISTRTFL = \"Discontinued Treatment\",\n TRTDRS = \"Reason for Treatment Discontinuation\",\n DRSCAT = \"Subcategory for Treatment Discontinuation\"\n )\n\n\nPatient Disposition Table\n\nCode# Define the split function\nsplit_fun <- keep_split_levels(\"Y\")\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ARM\",\n split_fun = add_overall_level(\"All Patients\", first = FALSE)\n ) %>%\n count_values(\"STSTFL\",\n values = \"Y\",\n .labels = c(count_fraction = \"Started Study\")\n ) %>%\n count_values(\"COMPSTUD\",\n values = \"Y\",\n .labels = c(count_fraction = \"Completed Study\")\n ) %>%\n split_rows_by(\n \"DISSTDFL\",\n split_fun = split_fun\n ) %>%\n summarize_row_groups(label_fstr = \"Discontinued Study\") %>%\n analyze_vars(\n \"STDDRS\",\n .stats = \"count_fraction\"\n ) %>%\n append_topleft(\"Status\")\n\nresult <- build_table(lyt = lyt, df = adsl0)\nresult\n\n A: Drug X B: Placebo C: Combination All Patients \nStatus (N=134) (N=134) (N=132) (N=400) \n————————————————————————————————————————————————————————————————————————————————————————\nStarted Study 134 (100.00%) 134 (100.00%) 132 (100.00%) 400 (100.00%)\nCompleted Study 65 (48.51%) 67 (50.00%) 69 (52.27%) 201 (50.25%) \nDiscontinued Study 15 (11.2%) 28 (20.9%) 24 (18.2%) 67 (16.8%) \n Death 6 (40%) 5 (17.9%) 4 (16.7%) 15 (22.4%) \n Lost To Follow-Up 1 (6.7%) 3 (10.7%) 8 (33.3%) 12 (17.9%) \n Other 2 (13.3%) 6 (21.4%) 5 (20.8%) 13 (19.4%) \n Protocol Violation 4 (26.7%) 4 (14.3%) 4 (16.7%) 12 (17.9%) \n Withdrawal By Subject 2 (13.3%) 10 (35.7%) 3 (12.5%) 15 (22.4%) \n\n\n\n\n\nData Setup\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\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\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 AGEGRP = 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 )\n\n\nDemographic Table\n\nCodevars <- c(\"AGE\", \"AGEGRP\", \"SEX\", \"RACE\", \"ETHNIC\")\nvar_labels <- c(\"Age (yr)\", \"Age group\", \"Sex\", \"Race\", \"Ethnicity\")\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n add_overall_col(\"All Patients\") %>%\n analyze_vars(\n vars = vars,\n var_labels = var_labels\n )\n\nresult <- build_table(lyt = lyt, df = adsl)\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%) \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 \nEthnicity \n n 134 134 132 400 \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 NOT REPORTED 6 (4.5%) 10 (7.5%) 11 (8.3%) 27 (6.8%) \n UNKNOWN 9 (6.7%) 3 (2.2%) 5 (3.8%) 17 (4.2%) \n\n\n\n\n\nData Setup\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadsl_labels <- var_labels(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(COUNTRY = droplevels(COUNTRY)) %>%\n arrange(REGION1, COUNTRY)\n\nvar_labels(adsl) <- c(adsl_labels)\n\n\nEnrollment by Country Table\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n add_overall_col(label = \"All Patients\") %>%\n analyze_vars(\"COUNTRY\") %>%\n append_varlabels(adsl, \"COUNTRY\")\n\nresult <- build_table(lyt, adsl)\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\nCountry (N=134) (N=134) (N=132) (N=400) \n—————————————————————————————————————————————————————————————————\nn 134 134 132 400 \nCHN 74 (55.2%) 81 (60.4%) 64 (48.5%) 219 (54.8%) \nUSA 10 (7.5%) 13 (9.7%) 17 (12.9%) 40 (10%) \nBRA 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \nPAK 12 (9%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \nNGA 8 (6%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \nRUS 5 (3.7%) 8 (6%) 6 (4.5%) 19 (4.8%) \nJPN 5 (3.7%) 4 (3%) 9 (6.8%) 18 (4.5%) \nGBR 4 (3%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \nCAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2%) \n\n\n\n\n\nData Setup\nTrimming function get_adae_trimmed is defined to filter AEs with greater than 5% incidence rate.\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\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_nonser <- adae %>% filter(AESER != \"Y\", SAFFL == \"Y\")\n\nget_adae_trimmed <- function(adsl, adae, cutoff_rate) {\n n_per_arm <- adsl %>%\n dplyr::count(ARM)\n\n anl_terms <- adae %>%\n dplyr::group_by(ARM, 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 = \"ARM\"\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\nadae_trim <- get_adae_trimmed(adsl, adae_nonser, cutoff_rate = 0.05)\n\n\nNon-Serious Adverse Events Report in \\(\\geq\\) 5% of Patients in Any Treatment Group\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table() %>%\n split_cols_by(\"ARM\") %>%\n summarize_patients_events_in_cols(\n custom_label = \"Total number of patients with at least one non-serious adverse event occuring at a relative frequency of >=5%\" \n ) %>%\n split_rows_by(\"AEBODSYS\",\n nested = FALSE,\n split_fun = split_fun,\n indent_mod = -1L,\n label_pos = \"topleft\",\n split_label = obj_label(adae_trim$AEBODSYS)\n ) %>%\n split_rows_by(\"AEDECOD\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adae_trim$AEDECOD)) %>%\n summarize_patients_events_in_cols(\n col_split = FALSE\n )\n\nresult <- build_table(lyt, adae_trim)\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination \n Dictionary-Derived Term Patients (All) Events (All) Patients (All) Events (All) Patients (All) Events (All)\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one non-serious adverse event occuring at a relative frequency of >=5% 106 360 112 367 112 421 \ncl A.1 \n dcd A.1.1.1.1 50 64 45 62 63 88 \ncl B.2 \n dcd B.2.1.2.1 49 65 44 62 52 66 \ncl C.1 \n dcd C.1.1.1.3 43 55 46 63 43 64 \ncl C.2 \n dcd C.2.1.2.1 35 48 48 53 55 65 \ncl D.1 \n dcd D.1.1.4.2 48 66 42 55 50 64 \ncl D.2 \n dcd D.2.1.5.3 47 62 58 72 57 74 \n\n\n\n\n\nFor illustrative purposes, the adae data is filtered by arm “A: Drug X” here.\nData Setup\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadae <- df_explicit_na(adae)\n\nadae_serious <- adae %>% filter(AESER == \"Y\", SAFFL == \"Y\")\nadae_serious_arm <- adae_serious %>% filter(ARM == \"A: Drug X\")\n\nfilters_list <- list(\n related = with_label(c(AEREL = \"Y\"), \"Events (Related)\"),\n fatal = with_label(c(AESDTH = \"Y\"), \"Events (Fatal)\"),\n fatal_related = with_label(c(AEREL = \"Y\", AESDTH = \"Y\"), \"Events (Fatal & Related)\")\n)\n\n\nSerious Adverse Events, Fatal SAEs and SAEs Related to Study Medication, by Treatment Group\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table() %>%\n summarize_patients_events_in_cols(\n filters_list = filters_list,\n empty_stats = c(\"all\", \"related\", \"fatal\", \"fatal_related\"),\n custom_label = \"Total number of patients with at least one serious adverse event\"\n ) %>%\n split_rows_by(\"AEBODSYS\",\n nested = FALSE,\n split_fun = split_fun,\n indent_mod = -1L,\n label_pos = \"topleft\",\n split_label = obj_label(adae_trim$AEBODSYS)\n ) %>%\n split_rows_by(\"AEDECOD\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae_serious_arm$AEDECOD)\n ) %>%\n summarize_patients_events_in_cols(\n filters_list = filters_list,\n col_split = FALSE\n )\n\nresult <- build_table(lyt, adae_serious_arm)\nresult\n\nBody System or Organ Class \n Dictionary-Derived Term Patients (All) Events (All) Events (Related) Events (Fatal) Events (Fatal & Related)\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one serious adverse event 104 \ncl A.1 \n dcd A.1.1.1.2 48 68 0 0 0 \ncl B.1 \n dcd B.1.1.1.1 47 56 56 56 56 \ncl B.2 \n dcd B.2.2.3.1 48 64 0 0 0 \ncl D.1 \n dcd D.1.1.1.1 50 61 61 61 61 \n\n\n\n\n\nData Setup\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n\nDeath Table\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n add_overall_col(\"All Patients\") %>%\n count_patients_with_event(\n \"USUBJID\",\n filters = c(\"AESDTH\" = \"Y\"),\n .labels = c(count_fraction = \"Total Number of Deaths\"),\n .formats = c(count_fraction = \"xx (xx.xx%)\")\n )\nresult <- build_table(lyt, adae, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n——————————————————————————————————————————————————————————————————————————————————\nTotal Number of Deaths 76 (62.30%) 70 (56.91%) 75 (62.50%) 221 (60.55%)\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:46:04 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 scda_0.1.6.9017 tern_0.9.3.9031 \n[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 withr_3.0.0 \n[33] Rdpack_2.6 digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 \n[37] vctrs_0.6.5 evaluate_0.23 glue_1.7.0 codetools_0.2-20 \n[41] survival_3.5-8 fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 \n[45] rmarkdown_2.26 tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Patient Disposition Table (CTgov & EudraCT)\nDemographic Table (CTgov & EudraCT)\nEnrollment by Country Table (EudraCT only)\nNon-Serious Adverse Events Reported in \\(\\geq\\) 5% of Patients in Any Treatment Group (CTgov & EudraCT)\nSerious Adverse Events, Fatal SAEs and SAEs Related to Study Medication, by Treatment Group (CTgov & EudraCT)\nDeath Table (EudraCT only)\nReproducibility\n\n\n\nData Setup\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\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\nset.seed(1, kind = \"Mersenne-Twister\")\n\n# Add additional disposition variables to adsl.\nadsl0 <- adsl %>%\n mutate(\n STSTFL = case_when(\n is.na(RANDDT) ~ \"N\",\n TRUE ~ \"Y\"\n ) %>% as.factor(),\n COMPSTUD = sample(\n c(\"Y\", \"N\"),\n size = nrow(adsl),\n replace = TRUE\n ) %>% as.factor(),\n STUDONS = sample(\n c(\"Alive: On Treatment\", \"Alive: In Follow-up\", NA),\n size = nrow(adsl),\n replace = TRUE\n ) %>% as.factor(),\n STDDRS = sample(\n c(\n \"Death\", \"Lost To Follow-Up\",\n \"Protocol Violation\", \"Withdrawal By Subject\",\n \"Other\"\n ),\n size = nrow(adsl),\n replace = TRUE\n ) %>% as.factor(),\n GOTTRT = ifelse(!is.na(ACTARMCD), \"Y\", \"N\") %>%\n as.factor(),\n DISTRTFL = sample(\n c(\"Y\", \"N\"),\n size = nrow(adsl),\n replace = TRUE\n ) %>% as.factor(),\n TRTDRS = sample(\n c(\n \"ADVERSE EVENT\", \"PROGRESSIVE DISEASE\",\n \"PHYSICIAN DECISION\", \"LACK OF EFFICACY\",\n \"OTHER\"\n ),\n size = nrow(adsl),\n replace = TRUE\n ) %>% as.factor(),\n STUDONS = case_when(COMPSTUD == \"N\" ~ STUDONS),\n STDDRS = case_when(COMPSTUD == \"N\" & is.na(STUDONS) ~ STDDRS),\n DISSTDFL = case_when(!is.na(STDDRS) ~ \"Y\"),\n DISTRTFL = case_when(GOTTRT == \"Y\" ~ DISTRTFL),\n TRTDRS = case_when(DISTRTFL == \"Y\" ~ TRTDRS),\n DRSCAT = case_when(\n TRTDRS %in% c(\"ADVERSE EVENT\", \"PHYSICIAN DECISION\") ~ \"Safety\",\n !is.na(TRTDRS) ~ \"Other\"\n )\n ) %>%\n var_relabel(\n STSTFL = \"Started Study\",\n COMPSTUD = \"Complete Study\",\n STUDONS = \"On-study Status\",\n DISSTDFL = \"Discontinued Study\",\n STDDRS = \"Reason for Study Discontinuation\",\n GOTTRT = \"Received Treatment\",\n DISTRTFL = \"Discontinued Treatment\",\n TRTDRS = \"Reason for Treatment Discontinuation\",\n DRSCAT = \"Subcategory for Treatment Discontinuation\"\n )\n\n\nPatient Disposition Table\n\nCode# Define the split function\nsplit_fun <- keep_split_levels(\"Y\")\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\n \"ARM\",\n split_fun = add_overall_level(\"All Patients\", first = FALSE)\n ) %>%\n count_values(\"STSTFL\",\n values = \"Y\",\n .labels = c(count_fraction = \"Started Study\")\n ) %>%\n count_values(\"COMPSTUD\",\n values = \"Y\",\n .labels = c(count_fraction = \"Completed Study\")\n ) %>%\n split_rows_by(\n \"DISSTDFL\",\n split_fun = split_fun\n ) %>%\n summarize_row_groups(label_fstr = \"Discontinued Study\") %>%\n analyze_vars(\n \"STDDRS\",\n .stats = \"count_fraction\"\n ) %>%\n append_topleft(\"Status\")\n\nresult <- build_table(lyt = lyt, df = adsl0)\nresult\n\n A: Drug X B: Placebo C: Combination All Patients \nStatus (N=134) (N=134) (N=132) (N=400) \n————————————————————————————————————————————————————————————————————————————————————————\nStarted Study 134 (100.00%) 134 (100.00%) 132 (100.00%) 400 (100.00%)\nCompleted Study 65 (48.51%) 67 (50.00%) 69 (52.27%) 201 (50.25%) \nDiscontinued Study 15 (11.2%) 28 (20.9%) 24 (18.2%) 67 (16.8%) \n Death 6 (40%) 5 (17.9%) 4 (16.7%) 15 (22.4%) \n Lost To Follow-Up 1 (6.7%) 3 (10.7%) 8 (33.3%) 12 (17.9%) \n Other 2 (13.3%) 6 (21.4%) 5 (20.8%) 13 (19.4%) \n Protocol Violation 4 (26.7%) 4 (14.3%) 4 (16.7%) 12 (17.9%) \n Withdrawal By Subject 2 (13.3%) 10 (35.7%) 3 (12.5%) 15 (22.4%) \n\n\n\n\n\nData Setup\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\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\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 AGEGRP = 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 )\n\n\nDemographic Table\n\nCodevars <- c(\"AGE\", \"AGEGRP\", \"SEX\", \"RACE\", \"ETHNIC\")\nvar_labels <- c(\"Age (yr)\", \"Age group\", \"Sex\", \"Race\", \"Ethnicity\")\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(var = \"ARM\") %>%\n add_overall_col(\"All Patients\") %>%\n analyze_vars(\n vars = vars,\n var_labels = var_labels\n )\n\nresult <- build_table(lyt = lyt, df = adsl)\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%) \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 \nEthnicity \n n 134 134 132 400 \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 NOT REPORTED 6 (4.5%) 10 (7.5%) 11 (8.3%) 27 (6.8%) \n UNKNOWN 9 (6.7%) 3 (2.2%) 5 (3.8%) 17 (4.2%) \n\n\n\n\n\nData Setup\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadsl_labels <- var_labels(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(COUNTRY = droplevels(COUNTRY)) %>%\n arrange(REGION1, COUNTRY)\n\nvar_labels(adsl) <- c(adsl_labels)\n\n\nEnrollment by Country Table\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n add_overall_col(label = \"All Patients\") %>%\n analyze_vars(\"COUNTRY\") %>%\n append_varlabels(adsl, \"COUNTRY\")\n\nresult <- build_table(lyt, adsl)\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\nCountry (N=134) (N=134) (N=132) (N=400) \n—————————————————————————————————————————————————————————————————\nn 134 134 132 400 \nCHN 74 (55.2%) 81 (60.4%) 64 (48.5%) 219 (54.8%) \nUSA 10 (7.5%) 13 (9.7%) 17 (12.9%) 40 (10%) \nBRA 13 (9.7%) 7 (5.2%) 10 (7.6%) 30 (7.5%) \nPAK 12 (9%) 9 (6.7%) 10 (7.6%) 31 (7.8%) \nNGA 8 (6%) 7 (5.2%) 11 (8.3%) 26 (6.5%) \nRUS 5 (3.7%) 8 (6%) 6 (4.5%) 19 (4.8%) \nJPN 5 (3.7%) 4 (3%) 9 (6.8%) 18 (4.5%) \nGBR 4 (3%) 3 (2.2%) 2 (1.5%) 9 (2.2%) \nCAN 3 (2.2%) 2 (1.5%) 3 (2.3%) 8 (2%) \n\n\n\n\n\nData Setup\nTrimming function get_adae_trimmed is defined to filter AEs with greater than 5% incidence rate.\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\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_nonser <- adae %>% filter(AESER != \"Y\", SAFFL == \"Y\")\n\nget_adae_trimmed <- function(adsl, adae, cutoff_rate) {\n n_per_arm <- adsl %>%\n dplyr::count(ARM)\n\n anl_terms <- adae %>%\n dplyr::group_by(ARM, 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 = \"ARM\"\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\nadae_trim <- get_adae_trimmed(adsl, adae_nonser, cutoff_rate = 0.05)\n\n\nNon-Serious Adverse Events Report in \\(\\geq\\) 5% of Patients in Any Treatment Group\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table() %>%\n split_cols_by(\"ARM\") %>%\n summarize_patients_events_in_cols(\n custom_label = \"Total number of patients with at least one non-serious adverse event occuring at a relative frequency of >=5%\" \n ) %>%\n split_rows_by(\"AEBODSYS\",\n nested = FALSE,\n split_fun = split_fun,\n indent_mod = -1L,\n label_pos = \"topleft\",\n split_label = obj_label(adae_trim$AEBODSYS)\n ) %>%\n split_rows_by(\"AEDECOD\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adae_trim$AEDECOD)) %>%\n summarize_patients_events_in_cols(\n col_split = FALSE\n )\n\nresult <- build_table(lyt, adae_trim)\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination \n Dictionary-Derived Term Patients (All) Events (All) Patients (All) Events (All) Patients (All) Events (All)\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one non-serious adverse event occuring at a relative frequency of >=5% 106 360 112 367 112 421 \ncl A.1 \n dcd A.1.1.1.1 50 64 45 62 63 88 \ncl B.2 \n dcd B.2.1.2.1 49 65 44 62 52 66 \ncl C.1 \n dcd C.1.1.1.3 43 55 46 63 43 64 \ncl C.2 \n dcd C.2.1.2.1 35 48 48 53 55 65 \ncl D.1 \n dcd D.1.1.4.2 48 66 42 55 50 64 \ncl D.2 \n dcd D.2.1.5.3 47 62 58 72 57 74 \n\n\n\n\n\nFor illustrative purposes, the adae data is filtered by arm “A: Drug X” here.\nData Setup\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadae <- df_explicit_na(adae)\n\nadae_serious <- adae %>% filter(AESER == \"Y\", SAFFL == \"Y\")\nadae_serious_arm <- adae_serious %>% filter(ARM == \"A: Drug X\")\n\nfilters_list <- list(\n related = with_label(c(AEREL = \"Y\"), \"Events (Related)\"),\n fatal = with_label(c(AESDTH = \"Y\"), \"Events (Fatal)\"),\n fatal_related = with_label(c(AEREL = \"Y\", AESDTH = \"Y\"), \"Events (Fatal & Related)\")\n)\n\n\nSerious Adverse Events, Fatal SAEs and SAEs Related to Study Medication, by Treatment Group\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table() %>%\n summarize_patients_events_in_cols(\n filters_list = filters_list,\n empty_stats = c(\"all\", \"related\", \"fatal\", \"fatal_related\"),\n custom_label = \"Total number of patients with at least one serious adverse event\"\n ) %>%\n split_rows_by(\"AEBODSYS\",\n nested = FALSE,\n split_fun = split_fun,\n indent_mod = -1L,\n label_pos = \"topleft\",\n split_label = obj_label(adae_trim$AEBODSYS)\n ) %>%\n split_rows_by(\"AEDECOD\",\n split_fun = split_fun,\n label_pos = \"topleft\",\n split_label = obj_label(adae_serious_arm$AEDECOD)\n ) %>%\n summarize_patients_events_in_cols(\n filters_list = filters_list,\n col_split = FALSE\n )\n\nresult <- build_table(lyt, adae_serious_arm)\nresult\n\nBody System or Organ Class \n Dictionary-Derived Term Patients (All) Events (All) Events (Related) Events (Fatal) Events (Fatal & Related)\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one serious adverse event 104 \ncl A.1 \n dcd A.1.1.1.2 48 68 0 0 0 \ncl B.1 \n dcd B.1.1.1.1 47 56 56 56 56 \ncl B.2 \n dcd B.2.2.3.1 48 64 0 0 0 \ncl D.1 \n dcd D.1.1.1.1 50 61 61 61 61 \n\n\n\n\n\nData Setup\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\")\n\n\nDeath Table\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\n add_overall_col(\"All Patients\") %>%\n count_patients_with_event(\n \"USUBJID\",\n filters = c(\"AESDTH\" = \"Y\"),\n .labels = c(count_fraction = \"Total Number of Deaths\"),\n .formats = c(count_fraction = \"xx (xx.xx%)\")\n )\nresult <- build_table(lyt, adae, alt_counts_df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n——————————————————————————————————————————————————————————————————————————————————\nTotal Number of Deaths 76 (62.30%) 70 (56.91%) 75 (62.50%) 221 (60.55%)\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:46:55 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 scda_0.1.6.9017 tern_0.9.3.9031 \n[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 withr_3.0.0 \n[33] Rdpack_2.6 digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 \n[37] vctrs_0.6.5 evaluate_0.23 glue_1.7.0 codetools_0.2-20 \n[41] survival_3.5-8 fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 \n[45] rmarkdown_2.26 tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Disclosures", @@ -1379,7 +1379,7 @@ "href": "tables/disclosures/eudrat01.html", "title": "EUDRAT01", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\nDefine a trimming function get_adae_trimmed to filter for AEs of greater than 5% incidence rate.\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\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_nonser <- adae %>% filter(AESER != \"Y\", SAFFL == \"Y\")\n\nget_adae_trimmed <- function(adsl, adae, cutoff_rate) {\n n_per_arm <- adsl %>%\n dplyr::count(ARM)\n\n anl_terms <- adae %>%\n dplyr::group_by(ARM, 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 = \"ARM\"\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\nadae_trim <- get_adae_trimmed(adsl, adae_nonser, cutoff_rate = 0.05)\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table() %>%\n split_cols_by(\"ARM\") %>%\n summarize_patients_events_in_cols(\n custom_label = \"Total number of patients with at least one non-serious adverse event occuring at a relative frequency of >=5% and number of events\" \n ) %>%\n split_rows_by(\"AEBODSYS\",\n nested = FALSE,\n split_fun = split_fun,\n indent_mod = -1L,\n label_pos = \"topleft\",\n split_label = obj_label(adae_trim$AEBODSYS)\n ) %>%\n split_rows_by(\"AEDECOD\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adae_trim$AEDECOD)) %>%\n summarize_patients_events_in_cols(\n col_split = FALSE\n )\n\nresult <- build_table(lyt, adae_trim)\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination \n Dictionary-Derived Term Patients (All) Events (All) Patients (All) Events (All) Patients (All) Events (All)\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one non-serious adverse event occuring at a relative frequency of >=5% and number of events 106 360 112 367 112 421 \ncl A.1 \n dcd A.1.1.1.1 50 64 45 62 63 88 \ncl B.2 \n dcd B.2.1.2.1 49 65 44 62 52 66 \ncl C.1 \n dcd C.1.1.1.3 43 55 46 63 43 64 \ncl C.2 \n dcd C.2.1.2.1 35 48 48 53 55 65 \ncl D.1 \n dcd D.1.1.4.2 48 66 42 55 50 64 \ncl D.2 \n dcd D.2.1.5.3 47 62 58 72 57 74 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:46:16 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 scda_0.1.6.9017 tern_0.9.3.9031 \n[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 withr_3.0.0 \n[33] Rdpack_2.6 digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 \n[37] vctrs_0.6.5 evaluate_0.23 glue_1.7.0 codetools_0.2-20 \n[41] survival_3.5-8 fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 \n[45] rmarkdown_2.26 tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\nDefine a trimming function get_adae_trimmed to filter for AEs of greater than 5% incidence rate.\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\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_nonser <- adae %>% filter(AESER != \"Y\", SAFFL == \"Y\")\n\nget_adae_trimmed <- function(adsl, adae, cutoff_rate) {\n n_per_arm <- adsl %>%\n dplyr::count(ARM)\n\n anl_terms <- adae %>%\n dplyr::group_by(ARM, 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 = \"ARM\"\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\nadae_trim <- get_adae_trimmed(adsl, adae_nonser, cutoff_rate = 0.05)\n\n\n\n\n\nCode# Define the split function\nsplit_fun <- drop_split_levels\n\nlyt <- basic_table() %>%\n split_cols_by(\"ARM\") %>%\n summarize_patients_events_in_cols(\n custom_label = \"Total number of patients with at least one non-serious adverse event occuring at a relative frequency of >=5% and number of events\" \n ) %>%\n split_rows_by(\"AEBODSYS\",\n nested = FALSE,\n split_fun = split_fun,\n indent_mod = -1L,\n label_pos = \"topleft\",\n split_label = obj_label(adae_trim$AEBODSYS)\n ) %>%\n split_rows_by(\"AEDECOD\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adae_trim$AEDECOD)) %>%\n summarize_patients_events_in_cols(\n col_split = FALSE\n )\n\nresult <- build_table(lyt, adae_trim)\nresult\n\nBody System or Organ Class A: Drug X B: Placebo C: Combination \n Dictionary-Derived Term Patients (All) Events (All) Patients (All) Events (All) Patients (All) Events (All)\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of patients with at least one non-serious adverse event occuring at a relative frequency of >=5% and number of events 106 360 112 367 112 421 \ncl A.1 \n dcd A.1.1.1.1 50 64 45 62 63 88 \ncl B.2 \n dcd B.2.1.2.1 49 65 44 62 52 66 \ncl C.1 \n dcd C.1.1.1.3 43 55 46 63 43 64 \ncl C.2 \n dcd C.2.1.2.1 35 48 48 53 55 65 \ncl D.1 \n dcd D.1.1.4.2 48 66 42 55 50 64 \ncl D.2 \n dcd D.2.1.5.3 47 62 58 72 57 74 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:47:07 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 scda_0.1.6.9017 tern_0.9.3.9031 \n[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 withr_3.0.0 \n[33] Rdpack_2.6 digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 \n[37] vctrs_0.6.5 evaluate_0.23 glue_1.7.0 codetools_0.2-20 \n[41] survival_3.5-8 fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 \n[45] rmarkdown_2.26 tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Disclosures", @@ -1391,7 +1391,7 @@ "href": "tables/pharmacokinetic/pkpt05.html", "title": "PKPT05", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\nadpp <- adpp %>% filter(PPSPEC == \"Urine\", AVISIT == \"CYCLE 1 DAY 1\")\n\n\n\n\n\nCode# lyt creation\nlyt <- basic_table() %>%\n split_rows_by(\n var = \"ARMCD\",\n split_fun = trim_levels_in_group(\"ARMCD\"),\n label_pos = \"topleft\",\n split_label = \"Treatment Arm\"\n ) %>%\n split_rows_by(\n var = \"PKPARAM\",\n label_pos = \"topleft\",\n split_label = \"PK Parameter\",\n child_labels = \"hidden\"\n ) %>%\n analyze_vars_in_cols(\n vars = \"AVAL\",\n .stats = c(\n \"n\", \"mean\", \"sd\", \"cv\",\n \"geom_mean\", \"geom_cv\", \"median\",\n \"min\", \"max\"\n ),\n .labels = c(\n n = \"n\",\n mean = \"Mean\",\n sd = \"SD\",\n cv = \"CV (%)\",\n geom_mean = \"Geometric Mean\",\n geom_cv = \"CV % Geometric Mean\",\n median = \"Median\",\n min = \"Minimum\",\n max = \"Maximum\"\n ),\n .formats = c(\n n = \"xx.\",\n mean = format_sigfig(3),\n sd = format_sigfig(3),\n cv = \"xx.x\",\n median = format_sigfig(3),\n geom_mean = format_sigfig(3),\n geom_cv = \"xx.x\",\n min = format_sigfig(3),\n max = format_sigfig(3)\n )\n )\n\n\nPlasma Drug X\n\n\nCodeadpp0 <- adpp %>%\n filter(PPCAT == \"Plasma Drug X\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp0)\nmain_title(result) <- paste(\"Summary of\", unique(adpp0$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp0$PPCAT), \"\\nVisit:\", unique(adpp0$AVISIT))\nresult\n\nSummary of Urine PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X \nVisit: CYCLE 1 DAY 1\n\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM A \n Ae (mg) 268 1.55 0.338 21.8 1.51 23.0 1.55 0.702 2.46 \n Fe (%) 268 15.7 3.35 21.3 15.3 22.2 15.8 8.15 24.5 \n CLR (L/hr) 134 0.0492 0.00961 19.5 0.0482 21.0 0.0491 0.0249 0.0751 \n RENALCLD (L/hr/mg) 134 0.00487 0.000965 19.8 0.00477 21.2 0.00497 0.00238 0.00726\nARM C \n Ae (mg) 264 1.54 0.298 19.4 1.51 20.3 1.55 0.850 2.21 \n Fe (%) 264 16.1 3.10 19.3 15.8 20.2 16.0 8.50 24.4 \n CLR (L/hr) 132 0.0502 0.0105 20.9 0.0491 21.9 0.0498 0.0251 0.0856 \n RENALCLD (L/hr/mg) 132 0.00511 0.000934 18.3 0.00502 19.7 0.00515 0.00236 0.00741\n\n\nPlasma Drug Y\n\n\nCodeadpp1 <- adpp %>%\n filter(PPCAT == \"Plasma Drug Y\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp1)\nmain_title(result) <- paste(\"Summary of\", unique(adpp1$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp1$PPCAT), \"\\nVisit:\", unique(adpp1$AVISIT))\nresult\n\nSummary of Urine PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug Y \nVisit: CYCLE 1 DAY 1\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM C \n Ae (mg) 264 1.60 0.315 19.7 1.56 21.4 1.60 0.857 2.26 \n Fe (%) 264 15.8 3.08 19.4 15.5 20.2 15.7 8.31 23.8 \n CLR (L/hr) 132 0.0497 0.0101 20.3 0.0486 22.0 0.0491 0.0184 0.0776 \n RENALCLD (L/hr/mg) 132 0.00509 0.00103 20.3 0.00499 21.4 0.00502 0.00236 0.00794\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:46:27 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 codetools_0.2-20 survival_3.5-8 fansi_1.0.6 \n[41] colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 tools_4.3.3 \n[45] pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\nadpp <- adpp %>% filter(PPSPEC == \"Urine\", AVISIT == \"CYCLE 1 DAY 1\")\n\n\n\n\n\nCode# lyt creation\nlyt <- basic_table() %>%\n split_rows_by(\n var = \"ARMCD\",\n split_fun = trim_levels_in_group(\"ARMCD\"),\n label_pos = \"topleft\",\n split_label = \"Treatment Arm\"\n ) %>%\n split_rows_by(\n var = \"PKPARAM\",\n label_pos = \"topleft\",\n split_label = \"PK Parameter\",\n child_labels = \"hidden\"\n ) %>%\n analyze_vars_in_cols(\n vars = \"AVAL\",\n .stats = c(\n \"n\", \"mean\", \"sd\", \"cv\",\n \"geom_mean\", \"geom_cv\", \"median\",\n \"min\", \"max\"\n ),\n .labels = c(\n n = \"n\",\n mean = \"Mean\",\n sd = \"SD\",\n cv = \"CV (%)\",\n geom_mean = \"Geometric Mean\",\n geom_cv = \"CV % Geometric Mean\",\n median = \"Median\",\n min = \"Minimum\",\n max = \"Maximum\"\n ),\n .formats = c(\n n = \"xx.\",\n mean = format_sigfig(3),\n sd = format_sigfig(3),\n cv = \"xx.x\",\n median = format_sigfig(3),\n geom_mean = format_sigfig(3),\n geom_cv = \"xx.x\",\n min = format_sigfig(3),\n max = format_sigfig(3)\n )\n )\n\n\nPlasma Drug X\n\n\nCodeadpp0 <- adpp %>%\n filter(PPCAT == \"Plasma Drug X\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp0)\nmain_title(result) <- paste(\"Summary of\", unique(adpp0$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp0$PPCAT), \"\\nVisit:\", unique(adpp0$AVISIT))\nresult\n\nSummary of Urine PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X \nVisit: CYCLE 1 DAY 1\n\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM A \n Ae (mg) 268 1.55 0.338 21.8 1.51 23.0 1.55 0.702 2.46 \n Fe (%) 268 15.7 3.35 21.3 15.3 22.2 15.8 8.15 24.5 \n CLR (L/hr) 134 0.0492 0.00961 19.5 0.0482 21.0 0.0491 0.0249 0.0751 \n RENALCLD (L/hr/mg) 134 0.00487 0.000965 19.8 0.00477 21.2 0.00497 0.00238 0.00726\nARM C \n Ae (mg) 264 1.54 0.298 19.4 1.51 20.3 1.55 0.850 2.21 \n Fe (%) 264 16.1 3.10 19.3 15.8 20.2 16.0 8.50 24.4 \n CLR (L/hr) 132 0.0502 0.0105 20.9 0.0491 21.9 0.0498 0.0251 0.0856 \n RENALCLD (L/hr/mg) 132 0.00511 0.000934 18.3 0.00502 19.7 0.00515 0.00236 0.00741\n\n\nPlasma Drug Y\n\n\nCodeadpp1 <- adpp %>%\n filter(PPCAT == \"Plasma Drug Y\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp1)\nmain_title(result) <- paste(\"Summary of\", unique(adpp1$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp1$PPCAT), \"\\nVisit:\", unique(adpp1$AVISIT))\nresult\n\nSummary of Urine PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug Y \nVisit: CYCLE 1 DAY 1\n\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Arm \n PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum\n————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nARM C \n Ae (mg) 264 1.60 0.315 19.7 1.56 21.4 1.60 0.857 2.26 \n Fe (%) 264 15.8 3.08 19.4 15.5 20.2 15.7 8.31 23.8 \n CLR (L/hr) 132 0.0497 0.0101 20.3 0.0486 22.0 0.0491 0.0184 0.0776 \n RENALCLD (L/hr/mg) 132 0.00509 0.00103 20.3 0.00499 21.4 0.00502 0.00236 0.00794\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:47:20 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 codetools_0.2-20 survival_3.5-8 fansi_1.0.6 \n[41] colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 tools_4.3.3 \n[45] pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Pharmacokinetic", @@ -1403,7 +1403,7 @@ "href": "tables/pharmacokinetic/pkpt02.html", "title": "PKPT02", "section": "", - "text": "Data Setup\nStandard Table – Plasma\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\nadpp <- adpp %>% filter(PPSPEC == \"Plasma\", AVISIT == \"CYCLE 1 DAY 1\")\n\n\n\n\n\nCode# lyt creation\nlyt <- basic_table() %>%\n split_cols_by(\n var = \"ARMCD\",\n split_fun = trim_levels_in_group(\"ARMCD\"),\n split_label = \"Treatment Arm\"\n ) %>%\n split_rows_by(\n var = \"PKPARAM\",\n label_pos = \"topleft\",\n split_label = \"PK Parameter\"\n ) %>%\n tern::analyze_vars(\n vars = \"AVAL\",\n .stats = c(\"n\", \"mean_sd\", \"cv\", \"geom_mean\", \"geom_cv\", \"median\", \"range\"),\n .formats = c(\n n = \"xx.\",\n mean_sd = format_sigfig(3, \"xx (xx)\"),\n cv = \"xx.x\",\n geom_mean = format_sigfig(3),\n geom_cv = \"xx.x\",\n median = format_sigfig(3),\n range = format_sigfig(3, \"xx - xx\")\n )\n )\n\n\nPlasma Drug X\n\n\nCodeadpp0 <- adpp %>%\n filter(PPCAT == \"Plasma Drug X\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp0)\nmain_title(result) <- paste(\"Summary of\", unique(adpp0$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp0$PPCAT), \"\\nVisit:\", unique(adpp0$AVISIT))\nresult\n\nSummary of Plasma PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X \nVisit: CYCLE 1 DAY 1\n\n———————————————————————————————————————————————————\nPK Parameter ARM A ARM C \n———————————————————————————————————————————————————\nCmax (ug/mL) \n n 134 132 \n Mean (SD) 30.2 (6.24) 30.0 (5.46) \n CV (%) 20.6 18.2 \n Geometric Mean 29.6 29.5 \n CV % Geometric Mean 21.0 18.9 \n Median 29.9 29.8 \n Min - Max 17.5 - 48.7 15.9 - 47.6 \nAUCinf obs (day*ug/mL) \n n 134 132 \n Mean (SD) 203 (37.7) 195 (37.8) \n CV (%) 18.6 19.4 \n Geometric Mean 199 192 \n CV % Geometric Mean 18.7 20.1 \n Median 197 196 \n Min - Max 125 - 311 103 - 315 \nCL obs (ml/day/kg) \n n 134 132 \n Mean (SD) 5.04 (1.04) 5.01 (0.985)\n CV (%) 20.6 19.7 \n Geometric Mean 4.93 4.91 \n CV % Geometric Mean 22.4 21.1 \n Median 5.08 4.97 \n Min - Max 2.25 - 7.39 2.10 - 7.49 \n\n\nPlasma Drug Y\n\n\nCodeadpp1 <- adpp %>%\n filter(PPCAT == \"Plasma Drug Y\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp1)\nmain_title(result) <- paste(\"Summary of\", unique(adpp1$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp1$PPCAT), \"\\nVisit:\", unique(adpp1$AVISIT))\nresult\n\nSummary of Plasma PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug Y \nVisit: CYCLE 1 DAY 1\n\n—————————————————————————————————————\nPK Parameter ARM C \n—————————————————————————————————————\nCmax (ug/mL) \n n 132 \n Mean (SD) 29.9 (5.55) \n CV (%) 18.6 \n Geometric Mean 29.4 \n CV % Geometric Mean 20.1 \n Median 29.7 \n Min - Max 14.1 - 43.4 \nAUCinf obs (day*ug/mL) \n n 132 \n Mean (SD) 199 (37.9) \n CV (%) 19.1 \n Geometric Mean 195 \n CV % Geometric Mean 18.9 \n Median 195 \n Min - Max 126 - 318 \nCL obs (ml/day/kg) \n n 132 \n Mean (SD) 4.96 (0.895)\n CV (%) 18.1 \n Geometric Mean 4.87 \n CV % Geometric Mean 18.7 \n Median 4.94 \n Min - Max 2.99 - 7.21 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:46:46 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 codetools_0.2-20 survival_3.5-8 fansi_1.0.6 \n[41] colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 tools_4.3.3 \n[45] pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table – Plasma\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\nadpp <- adpp %>% filter(PPSPEC == \"Plasma\", AVISIT == \"CYCLE 1 DAY 1\")\n\n\n\n\n\nCode# lyt creation\nlyt <- basic_table() %>%\n split_cols_by(\n var = \"ARMCD\",\n split_fun = trim_levels_in_group(\"ARMCD\"),\n split_label = \"Treatment Arm\"\n ) %>%\n split_rows_by(\n var = \"PKPARAM\",\n label_pos = \"topleft\",\n split_label = \"PK Parameter\"\n ) %>%\n tern::analyze_vars(\n vars = \"AVAL\",\n .stats = c(\"n\", \"mean_sd\", \"cv\", \"geom_mean\", \"geom_cv\", \"median\", \"range\"),\n .formats = c(\n n = \"xx.\",\n mean_sd = format_sigfig(3, \"xx (xx)\"),\n cv = \"xx.x\",\n geom_mean = format_sigfig(3),\n geom_cv = \"xx.x\",\n median = format_sigfig(3),\n range = format_sigfig(3, \"xx - xx\")\n )\n )\n\n\nPlasma Drug X\n\n\nCodeadpp0 <- adpp %>%\n filter(PPCAT == \"Plasma Drug X\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp0)\nmain_title(result) <- paste(\"Summary of\", unique(adpp0$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp0$PPCAT), \"\\nVisit:\", unique(adpp0$AVISIT))\nresult\n\nSummary of Plasma PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug X \nVisit: CYCLE 1 DAY 1\n\n———————————————————————————————————————————————————\nPK Parameter ARM A ARM C \n———————————————————————————————————————————————————\nCmax (ug/mL) \n n 134 132 \n Mean (SD) 30.2 (6.24) 30.0 (5.46) \n CV (%) 20.6 18.2 \n Geometric Mean 29.6 29.5 \n CV % Geometric Mean 21.0 18.9 \n Median 29.9 29.8 \n Min - Max 17.5 - 48.7 15.9 - 47.6 \nAUCinf obs (day*ug/mL) \n n 134 132 \n Mean (SD) 203 (37.7) 195 (37.8) \n CV (%) 18.6 19.4 \n Geometric Mean 199 192 \n CV % Geometric Mean 18.7 20.1 \n Median 197 196 \n Min - Max 125 - 311 103 - 315 \nCL obs (ml/day/kg) \n n 134 132 \n Mean (SD) 5.04 (1.04) 5.01 (0.985)\n CV (%) 20.6 19.7 \n Geometric Mean 4.93 4.91 \n CV % Geometric Mean 22.4 21.1 \n Median 5.08 4.97 \n Min - Max 2.25 - 7.39 2.10 - 7.49 \n\n\nPlasma Drug Y\n\n\nCodeadpp1 <- adpp %>%\n filter(PPCAT == \"Plasma Drug Y\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))\n\nresult <- build_table(lyt, df = adpp1)\nmain_title(result) <- paste(\"Summary of\", unique(adpp1$PPSPEC), \"PK Parameter by Treatment Arm, PK Population\")\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp1$PPCAT), \"\\nVisit:\", unique(adpp1$AVISIT))\nresult\n\nSummary of Plasma PK Parameter by Treatment Arm, PK Population\nAnalyte: Plasma Drug Y \nVisit: CYCLE 1 DAY 1\n\n—————————————————————————————————————\nPK Parameter ARM C \n—————————————————————————————————————\nCmax (ug/mL) \n n 132 \n Mean (SD) 29.9 (5.55) \n CV (%) 18.6 \n Geometric Mean 29.4 \n CV % Geometric Mean 20.1 \n Median 29.7 \n Min - Max 14.1 - 43.4 \nAUCinf obs (day*ug/mL) \n n 132 \n Mean (SD) 199 (37.9) \n CV (%) 19.1 \n Geometric Mean 195 \n CV % Geometric Mean 18.9 \n Median 195 \n Min - Max 126 - 318 \nCL obs (ml/day/kg) \n n 132 \n Mean (SD) 4.96 (0.895)\n CV (%) 18.1 \n Geometric Mean 4.87 \n CV % Geometric Mean 18.7 \n Median 4.94 \n Min - Max 2.99 - 7.21 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:47:39 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 codetools_0.2-20 survival_3.5-8 fansi_1.0.6 \n[41] colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 tools_4.3.3 \n[45] pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Pharmacokinetic", @@ -1415,7 +1415,7 @@ "href": "tables/pharmacokinetic/pkct01.html", "title": "PKCT01", "section": "", - "text": "Data Setup\nStandard Table (Stats in Columns)\nTable Implementing 1/3 Imputation Rule\nTable Implementing 1/2 Imputation Rule\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n filter(ACTARM == \"A: Drug X\")\nadpc <- synthetic_cdisc_dataset(\"latest\", \"adpc\") %>%\n filter(ACTARM == \"A: Drug X\", PARAM == \"Plasma Drug X\")\n\n# Setting up the data\nadpc_1 <- adpc %>%\n mutate(\n NFRLT = as.factor(NFRLT),\n AVALCAT1 = as.factor(AVALCAT1),\n NOMTPT = as.factor(paste(NFRLT, \"/\", PCTPT))\n ) %>%\n select(NOMTPT, ACTARM, VISIT, AVAL, PARAM, AVALCAT1)\n\nadpc_1$NOMTPT <- factor(\n adpc_1$NOMTPT,\n levels = levels(adpc_1$NOMTPT)[order(as.numeric(gsub(\".*?([0-9\\\\.]+).*\", \"\\\\1\", levels(adpc_1$NOMTPT))))]\n)\n\n# Row structure\nlyt_rows <- basic_table() %>%\n split_rows_by(\n var = \"ACTARM\",\n split_fun = drop_split_levels,\n split_label = \"Treatment Group\",\n label_pos = \"topleft\"\n ) %>%\n add_rowcounts(alt_counts = TRUE) %>%\n split_rows_by(\n var = \"VISIT\",\n split_fun = drop_split_levels,\n split_label = \"Visit\",\n label_pos = \"topleft\"\n ) %>%\n split_rows_by(\n var = \"NOMTPT\",\n split_fun = drop_split_levels,\n split_label = \"Nominal Time (hr) / Timepoint\",\n label_pos = \"topleft\",\n child_labels = \"hidden\"\n )\n\n\n\n\n\nCodelyt <- lyt_rows %>%\n analyze_vars_in_cols(\n vars = c(\"AVAL\", \"AVALCAT1\", rep(\"AVAL\", 8)),\n .stats = c(\"n\", \"n_blq\", \"mean\", \"sd\", \"cv\", \"geom_mean\", \"geom_cv\", \"median\", \"min\", \"max\"),\n .formats = c(\n n = \"xx.\", n_blq = \"xx.\", mean = format_sigfig(3), sd = format_sigfig(3), cv = \"xx.x\", median = format_sigfig(3),\n geom_mean = format_sigfig(3), geom_cv = \"xx.x\", min = format_sigfig(3), max = format_sigfig(3)\n ),\n .labels = c(\n n = \"n\", n_blq = \"Number\\nof\\nLTRs/BLQs\", mean = \"Mean\", sd = \"SD\", cv = \"CV (%) Mean\",\n geom_mean = \"Geometric Mean\", geom_cv = \"CV % Geometric Mean\", median = \"Median\", min = \"Minimum\", max = \"Maximum\"\n ),\n na_str = \"NE\",\n .aligns = \"decimal\"\n )\n\nresult <- build_table(lyt, df = adpc_1, alt_counts_df = adsl) %>% prune_table()\n\n# Decorating\nmain_title(result) <- \"Summary of PK Concentrations by Nominal Time and Treatment: PK Evaluable\"\nsubtitles(result) <- c(\n \"Protocol: xxxxx\",\n paste(\"Analyte: \", unique(adpc_1$PARAM)),\n paste(\"Treatment:\", unique(adpc_1$ACTARM))\n)\nmain_footer(result) <- \"NE: Not Estimable\"\n\nresult\n\nSummary of PK Concentrations by Nominal Time and Treatment: PK Evaluable\nProtocol: xxxxx\nAnalyte: Plasma Drug X\nTreatment: A: Drug X\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Group Number \n Visit of \n Nominal Time (hr) / Timepoint n LTRs/BLQs Mean SD CV (%) Mean Geometric Mean CV % Geometric Mean Median Minimum Maximum\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X (N=134) \n Day 1 \n 0 / Predose 134 134 0 0 NE NE NE 0 0 0 \n 0.5 / 0.5H 134 0 12.6 1.51 12.0 12.5 12.2 12.6 9.72 15.6 \n 1 / 1H 134 0 16.2 1.63 10.0 16.1 10.1 16.2 12.6 19.9 \n 1.5 / 1.5H 134 0 15.6 1.46 9.3 15.6 9.3 15.5 12.3 19.0 \n 2 / 2H 134 0 13.4 1.35 10.1 13.4 10.0 13.3 10.8 16.5 \n 3 / 3H 134 0 8.47 1.25 14.7 8.38 15.0 8.40 5.88 10.9 \n 4 / 4H 134 0 4.79 1.02 21.2 4.69 22.0 4.79 2.70 7.09 \n 8 / 8H 134 0 0.348 0.180 51.7 0.303 58.4 0.318 0.0760 0.866 \n 12 / 12H 134 0 0.0224 0.0189 84.6 0.0156 111.6 0.0170 0.00200 0.0830\n Day 2 \n 24 / 24H 134 134 0 0 NE NE NE 0 0 0 \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nNE: Not Estimable\n\n\n\n\n\nCodelyt <- lyt_rows %>%\n analyze_vars_in_cols(\n vars = c(\"AVAL\", \"AVALCAT1\", rep(\"AVAL\", 8)),\n .stats = c(\"n\", \"n_blq\", \"mean\", \"sd\", \"cv\", \"geom_mean\", \"geom_cv\", \"median\", \"min\", \"max\"),\n .formats = c(\n n = \"xx.\", n_blq = \"xx.\", mean = format_sigfig(3), sd = format_sigfig(3), cv = \"xx.x\", median = format_sigfig(3),\n geom_mean = format_sigfig(3), geom_cv = \"xx.x\", min = format_sigfig(3), max = format_sigfig(3)\n ),\n .labels = c(\n n = \"n\", n_blq = \"Number\\nof\\nLTRs/BLQs\", mean = \"Mean\", sd = \"SD\", cv = \"CV (%) Mean\",\n geom_mean = \"Geometric Mean\", geom_cv = \"CV % Geometric Mean\", median = \"Median\", min = \"Minimum\", max = \"Maximum\"\n ),\n imp_rule = \"1/3\",\n .aligns = \"decimal\"\n )\n\nresult <- build_table(lyt, df = adpc_1, alt_counts_df = adsl) %>% prune_table()\n\n# Decorating\nmain_title(result) <- \"Summary of PK Concentrations by Nominal Time and Treatment: PK Evaluable\"\nsubtitles(result) <- c(\n \"Protocol: xxxxx\",\n paste(\"Analyte: \", unique(adpc_1$PARAM)),\n paste(\"Treatment:\", unique(adpc_1$ACTARM))\n)\nmain_footer(result) <- c(\"NE: Not Estimable\", \"ND: Not Derived\")\n\nresult\n\nSummary of PK Concentrations by Nominal Time and Treatment: PK Evaluable\nProtocol: xxxxx\nAnalyte: Plasma Drug X\nTreatment: A: Drug X\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Group Number \n Visit of \n Nominal Time (hr) / Timepoint n LTRs/BLQs Mean SD CV (%) Mean Geometric Mean CV % Geometric Mean Median Minimum Maximum\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X (N=134) \n Day 1 \n 0 / Predose 134 134 ND ND ND NE ND 0 ND 0 \n 0.5 / 0.5H 134 0 12.6 1.51 12.0 12.5 12.2 12.6 9.72 15.6 \n 1 / 1H 134 0 16.2 1.63 10.0 16.1 10.1 16.2 12.6 19.9 \n 1.5 / 1.5H 134 0 15.6 1.46 9.3 15.6 9.3 15.5 12.3 19.0 \n 2 / 2H 134 0 13.4 1.35 10.1 13.4 10.0 13.3 10.8 16.5 \n 3 / 3H 134 0 8.47 1.25 14.7 8.38 15.0 8.40 5.88 10.9 \n 4 / 4H 134 0 4.79 1.02 21.2 4.69 22.0 4.79 2.70 7.09 \n 8 / 8H 134 0 0.348 0.180 51.7 0.303 58.4 0.318 0.0760 0.866 \n 12 / 12H 134 0 0.0224 0.0189 84.6 0.0156 111.6 0.0170 0.00200 0.0830\n Day 2 \n 24 / 24H 134 134 ND ND ND NE ND 0 ND 0 \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nNE: Not Estimable\nND: Not Derived\n\n\n\n\n\nCodelyt <- lyt_rows %>%\n analyze_vars_in_cols(\n vars = c(\"AVAL\", \"AVALCAT1\", rep(\"AVAL\", 8)),\n .stats = c(\"n\", \"n_blq\", \"mean\", \"sd\", \"cv\", \"geom_mean\", \"geom_cv\", \"median\", \"min\", \"max\"),\n .formats = c(\n n = \"xx.\", n_blq = \"xx.\", mean = format_sigfig(3), sd = format_sigfig(3), cv = \"xx.x\", median = format_sigfig(3),\n geom_mean = format_sigfig(3), geom_cv = \"xx.x\", min = format_sigfig(3), max = format_sigfig(3)\n ),\n .labels = c(\n n = \"n\", n_blq = \"Number\\nof\\nLTRs/BLQs\", mean = \"Mean\", sd = \"SD\", cv = \"CV (%) Mean\",\n geom_mean = \"Geometric Mean\", geom_cv = \"CV % Geometric Mean\", median = \"Median\", min = \"Minimum\", max = \"Maximum\"\n ),\n imp_rule = \"1/2\",\n .aligns = \"decimal\"\n )\n\nresult <- build_table(lyt, df = adpc_1, alt_counts_df = adsl) %>% prune_table()\n\n# Decorate table\nmain_title(result) <- \"Summary of PK Concentrations by Nominal Time and Treatment: PK Evaluable\"\nsubtitles(result) <- c(\n \"Protocol: xxxxx\",\n paste(\"Analyte: \", unique(adpc_1$PARAM)),\n paste(\"Treatment:\", unique(adpc_1$ACTARM))\n)\nmain_footer(result) <- \"ND: Not Derived\"\n\nresult\n\nSummary of PK Concentrations by Nominal Time and Treatment: PK Evaluable\nProtocol: xxxxx\nAnalyte: Plasma Drug X\nTreatment: A: Drug X\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Group Number \n Visit of \n Nominal Time (hr) / Timepoint n LTRs/BLQs Mean SD CV (%) Mean Geometric Mean CV % Geometric Mean Median Minimum Maximum\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X (N=134) \n Day 1 \n 0 / Predose 134 134 ND ND ND ND ND ND ND 0 \n 0.5 / 0.5H 134 0 12.6 1.51 12.0 12.5 12.2 12.6 9.72 15.6 \n 1 / 1H 134 0 16.2 1.63 10.0 16.1 10.1 16.2 12.6 19.9 \n 1.5 / 1.5H 134 0 15.6 1.46 9.3 15.6 9.3 15.5 12.3 19.0 \n 2 / 2H 134 0 13.4 1.35 10.1 13.4 10.0 13.3 10.8 16.5 \n 3 / 3H 134 0 8.47 1.25 14.7 8.38 15.0 8.40 5.88 10.9 \n 4 / 4H 134 0 4.79 1.02 21.2 4.69 22.0 4.79 2.70 7.09 \n 8 / 8H 134 0 0.348 0.180 51.7 0.303 58.4 0.318 0.0760 0.866 \n 12 / 12H 134 0 0.0224 0.0189 84.6 0.0156 111.6 0.0170 0.00200 0.0830\n Day 2 \n 24 / 24H 134 134 ND ND ND ND ND ND ND 0 \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nND: Not Derived\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:47:00 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 withr_3.0.0 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table (Stats in Columns)\nTable Implementing 1/3 Imputation Rule\nTable Implementing 1/2 Imputation Rule\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\") %>%\n filter(ACTARM == \"A: Drug X\")\nadpc <- synthetic_cdisc_dataset(\"latest\", \"adpc\") %>%\n filter(ACTARM == \"A: Drug X\", PARAM == \"Plasma Drug X\")\n\n# Setting up the data\nadpc_1 <- adpc %>%\n mutate(\n NFRLT = as.factor(NFRLT),\n AVALCAT1 = as.factor(AVALCAT1),\n NOMTPT = as.factor(paste(NFRLT, \"/\", PCTPT))\n ) %>%\n select(NOMTPT, ACTARM, VISIT, AVAL, PARAM, AVALCAT1)\n\nadpc_1$NOMTPT <- factor(\n adpc_1$NOMTPT,\n levels = levels(adpc_1$NOMTPT)[order(as.numeric(gsub(\".*?([0-9\\\\.]+).*\", \"\\\\1\", levels(adpc_1$NOMTPT))))]\n)\n\n# Row structure\nlyt_rows <- basic_table() %>%\n split_rows_by(\n var = \"ACTARM\",\n split_fun = drop_split_levels,\n split_label = \"Treatment Group\",\n label_pos = \"topleft\"\n ) %>%\n add_rowcounts(alt_counts = TRUE) %>%\n split_rows_by(\n var = \"VISIT\",\n split_fun = drop_split_levels,\n split_label = \"Visit\",\n label_pos = \"topleft\"\n ) %>%\n split_rows_by(\n var = \"NOMTPT\",\n split_fun = drop_split_levels,\n split_label = \"Nominal Time (hr) / Timepoint\",\n label_pos = \"topleft\",\n child_labels = \"hidden\"\n )\n\n\n\n\n\nCodelyt <- lyt_rows %>%\n analyze_vars_in_cols(\n vars = c(\"AVAL\", \"AVALCAT1\", rep(\"AVAL\", 8)),\n .stats = c(\"n\", \"n_blq\", \"mean\", \"sd\", \"cv\", \"geom_mean\", \"geom_cv\", \"median\", \"min\", \"max\"),\n .formats = c(\n n = \"xx.\", n_blq = \"xx.\", mean = format_sigfig(3), sd = format_sigfig(3), cv = \"xx.x\", median = format_sigfig(3),\n geom_mean = format_sigfig(3), geom_cv = \"xx.x\", min = format_sigfig(3), max = format_sigfig(3)\n ),\n .labels = c(\n n = \"n\", n_blq = \"Number\\nof\\nLTRs/BLQs\", mean = \"Mean\", sd = \"SD\", cv = \"CV (%) Mean\",\n geom_mean = \"Geometric Mean\", geom_cv = \"CV % Geometric Mean\", median = \"Median\", min = \"Minimum\", max = \"Maximum\"\n ),\n na_str = \"NE\",\n .aligns = \"decimal\"\n )\n\nresult <- build_table(lyt, df = adpc_1, alt_counts_df = adsl) %>% prune_table()\n\n# Decorating\nmain_title(result) <- \"Summary of PK Concentrations by Nominal Time and Treatment: PK Evaluable\"\nsubtitles(result) <- c(\n \"Protocol: xxxxx\",\n paste(\"Analyte: \", unique(adpc_1$PARAM)),\n paste(\"Treatment:\", unique(adpc_1$ACTARM))\n)\nmain_footer(result) <- \"NE: Not Estimable\"\n\nresult\n\nSummary of PK Concentrations by Nominal Time and Treatment: PK Evaluable\nProtocol: xxxxx\nAnalyte: Plasma Drug X\nTreatment: A: Drug X\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Group Number \n Visit of \n Nominal Time (hr) / Timepoint n LTRs/BLQs Mean SD CV (%) Mean Geometric Mean CV % Geometric Mean Median Minimum Maximum\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X (N=134) \n Day 1 \n 0 / Predose 134 134 0 0 NE NE NE 0 0 0 \n 0.5 / 0.5H 134 0 12.6 1.51 12.0 12.5 12.2 12.6 9.72 15.6 \n 1 / 1H 134 0 16.2 1.63 10.0 16.1 10.1 16.2 12.6 19.9 \n 1.5 / 1.5H 134 0 15.6 1.46 9.3 15.6 9.3 15.5 12.3 19.0 \n 2 / 2H 134 0 13.4 1.35 10.1 13.4 10.0 13.3 10.8 16.5 \n 3 / 3H 134 0 8.47 1.25 14.7 8.38 15.0 8.40 5.88 10.9 \n 4 / 4H 134 0 4.79 1.02 21.2 4.69 22.0 4.79 2.70 7.09 \n 8 / 8H 134 0 0.348 0.180 51.7 0.303 58.4 0.318 0.0760 0.866 \n 12 / 12H 134 0 0.0224 0.0189 84.6 0.0156 111.6 0.0170 0.00200 0.0830\n Day 2 \n 24 / 24H 134 134 0 0 NE NE NE 0 0 0 \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nNE: Not Estimable\n\n\n\n\n\nCodelyt <- lyt_rows %>%\n analyze_vars_in_cols(\n vars = c(\"AVAL\", \"AVALCAT1\", rep(\"AVAL\", 8)),\n .stats = c(\"n\", \"n_blq\", \"mean\", \"sd\", \"cv\", \"geom_mean\", \"geom_cv\", \"median\", \"min\", \"max\"),\n .formats = c(\n n = \"xx.\", n_blq = \"xx.\", mean = format_sigfig(3), sd = format_sigfig(3), cv = \"xx.x\", median = format_sigfig(3),\n geom_mean = format_sigfig(3), geom_cv = \"xx.x\", min = format_sigfig(3), max = format_sigfig(3)\n ),\n .labels = c(\n n = \"n\", n_blq = \"Number\\nof\\nLTRs/BLQs\", mean = \"Mean\", sd = \"SD\", cv = \"CV (%) Mean\",\n geom_mean = \"Geometric Mean\", geom_cv = \"CV % Geometric Mean\", median = \"Median\", min = \"Minimum\", max = \"Maximum\"\n ),\n imp_rule = \"1/3\",\n .aligns = \"decimal\"\n )\n\nresult <- build_table(lyt, df = adpc_1, alt_counts_df = adsl) %>% prune_table()\n\n# Decorating\nmain_title(result) <- \"Summary of PK Concentrations by Nominal Time and Treatment: PK Evaluable\"\nsubtitles(result) <- c(\n \"Protocol: xxxxx\",\n paste(\"Analyte: \", unique(adpc_1$PARAM)),\n paste(\"Treatment:\", unique(adpc_1$ACTARM))\n)\nmain_footer(result) <- c(\"NE: Not Estimable\", \"ND: Not Derived\")\n\nresult\n\nSummary of PK Concentrations by Nominal Time and Treatment: PK Evaluable\nProtocol: xxxxx\nAnalyte: Plasma Drug X\nTreatment: A: Drug X\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Group Number \n Visit of \n Nominal Time (hr) / Timepoint n LTRs/BLQs Mean SD CV (%) Mean Geometric Mean CV % Geometric Mean Median Minimum Maximum\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X (N=134) \n Day 1 \n 0 / Predose 134 134 ND ND ND NE ND 0 ND 0 \n 0.5 / 0.5H 134 0 12.6 1.51 12.0 12.5 12.2 12.6 9.72 15.6 \n 1 / 1H 134 0 16.2 1.63 10.0 16.1 10.1 16.2 12.6 19.9 \n 1.5 / 1.5H 134 0 15.6 1.46 9.3 15.6 9.3 15.5 12.3 19.0 \n 2 / 2H 134 0 13.4 1.35 10.1 13.4 10.0 13.3 10.8 16.5 \n 3 / 3H 134 0 8.47 1.25 14.7 8.38 15.0 8.40 5.88 10.9 \n 4 / 4H 134 0 4.79 1.02 21.2 4.69 22.0 4.79 2.70 7.09 \n 8 / 8H 134 0 0.348 0.180 51.7 0.303 58.4 0.318 0.0760 0.866 \n 12 / 12H 134 0 0.0224 0.0189 84.6 0.0156 111.6 0.0170 0.00200 0.0830\n Day 2 \n 24 / 24H 134 134 ND ND ND NE ND 0 ND 0 \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nNE: Not Estimable\nND: Not Derived\n\n\n\n\n\nCodelyt <- lyt_rows %>%\n analyze_vars_in_cols(\n vars = c(\"AVAL\", \"AVALCAT1\", rep(\"AVAL\", 8)),\n .stats = c(\"n\", \"n_blq\", \"mean\", \"sd\", \"cv\", \"geom_mean\", \"geom_cv\", \"median\", \"min\", \"max\"),\n .formats = c(\n n = \"xx.\", n_blq = \"xx.\", mean = format_sigfig(3), sd = format_sigfig(3), cv = \"xx.x\", median = format_sigfig(3),\n geom_mean = format_sigfig(3), geom_cv = \"xx.x\", min = format_sigfig(3), max = format_sigfig(3)\n ),\n .labels = c(\n n = \"n\", n_blq = \"Number\\nof\\nLTRs/BLQs\", mean = \"Mean\", sd = \"SD\", cv = \"CV (%) Mean\",\n geom_mean = \"Geometric Mean\", geom_cv = \"CV % Geometric Mean\", median = \"Median\", min = \"Minimum\", max = \"Maximum\"\n ),\n imp_rule = \"1/2\",\n .aligns = \"decimal\"\n )\n\nresult <- build_table(lyt, df = adpc_1, alt_counts_df = adsl) %>% prune_table()\n\n# Decorate table\nmain_title(result) <- \"Summary of PK Concentrations by Nominal Time and Treatment: PK Evaluable\"\nsubtitles(result) <- c(\n \"Protocol: xxxxx\",\n paste(\"Analyte: \", unique(adpc_1$PARAM)),\n paste(\"Treatment:\", unique(adpc_1$ACTARM))\n)\nmain_footer(result) <- \"ND: Not Derived\"\n\nresult\n\nSummary of PK Concentrations by Nominal Time and Treatment: PK Evaluable\nProtocol: xxxxx\nAnalyte: Plasma Drug X\nTreatment: A: Drug X\n\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTreatment Group Number \n Visit of \n Nominal Time (hr) / Timepoint n LTRs/BLQs Mean SD CV (%) Mean Geometric Mean CV % Geometric Mean Median Minimum Maximum\n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nA: Drug X (N=134) \n Day 1 \n 0 / Predose 134 134 ND ND ND ND ND ND ND 0 \n 0.5 / 0.5H 134 0 12.6 1.51 12.0 12.5 12.2 12.6 9.72 15.6 \n 1 / 1H 134 0 16.2 1.63 10.0 16.1 10.1 16.2 12.6 19.9 \n 1.5 / 1.5H 134 0 15.6 1.46 9.3 15.6 9.3 15.5 12.3 19.0 \n 2 / 2H 134 0 13.4 1.35 10.1 13.4 10.0 13.3 10.8 16.5 \n 3 / 3H 134 0 8.47 1.25 14.7 8.38 15.0 8.40 5.88 10.9 \n 4 / 4H 134 0 4.79 1.02 21.2 4.69 22.0 4.79 2.70 7.09 \n 8 / 8H 134 0 0.348 0.180 51.7 0.303 58.4 0.318 0.0760 0.866 \n 12 / 12H 134 0 0.0224 0.0189 84.6 0.0156 111.6 0.0170 0.00200 0.0830\n Day 2 \n 24 / 24H 134 134 ND ND ND ND ND ND ND 0 \n——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\n\nND: Not Derived\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:47:54 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 withr_3.0.0 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Pharmacokinetic", @@ -1427,7 +1427,7 @@ "href": "tables/pharmacokinetic/pkpt11.html", "title": "PKPT11", "section": "", - "text": "Data Setup\nStandard Table – Plasma\nteal App\nReproducibility\n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\n\n# Comparator Dose - A: Drug X\narm_var <- \"TRT01A\"\ncomp_dose <- \"A: Drug X\"\nother_doses <- as.character(unique(adpp[[arm_var]])[unique(adpp[[arm_var]]) != comp_dose])\n\nadpp <- adpp %>%\n filter(AVISIT == \"CYCLE 1 DAY 1\") %>%\n mutate(\n COMP = paste0(TRT01A, \"/\", comp_dose),\n COMP_AVAL = ifelse(TRT01A == comp_dose, paste0(AVAL, comp_dose), AVAL)\n )\n\nfor (dose in other_doses) {\n temp_df <- adpp[adpp[[arm_var]] == comp_dose, ]\n temp_df$COMP <- paste0(dose, \"/\", comp_dose)\n adpp <- rbind(adpp, temp_df)\n}\n\n# Plasma Drug X\nadpp0 <- adpp %>%\n filter(PPCAT == \"Plasma Drug X\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n var_relabel(COMP = \"Comparison\")\n\n# statistics function\ns_gmr <- function(df,\n compare_dose = comp_dose, # comparator, defaults to comp_dose defined above (string)\n denom = TRUE, # whether to use comparator as denominator, defaults to TRUE (logical)\n arm_var = arm_var) { # arm variable, defaults to arm_var defined above (string)\n which_num <- !grepl(compare_dose, df[[arm_var]])\n\n x_num <- as.numeric(df[which_num, ][[\"AVAL\"]])\n x_num <- x_num[!is.na(x_num)]\n x_num_no_negative_vals <- x_num\n x_num_no_negative_vals[x_num_no_negative_vals <= 0] <- NA\n\n x_denom <- as.numeric(gsub(compare_dose, \"\", df[!which_num, ][[\"AVAL\"]]))\n x_denom <- x_denom[!is.na(x_denom)]\n x_denom_no_negative_vals <- x_denom\n x_denom_no_negative_vals[x_denom_no_negative_vals <= 0] <- NA\n\n x_num_log <- log(x_num_no_negative_vals)\n x_denom_log <- log(x_denom_no_negative_vals)\n\n if (denom) {\n geom_mean_ratio <- exp(mean(x_num_log, na.rm = FALSE)) / exp(mean(x_denom_log, na.rm = FALSE))\n geom_mean_ci <- t.test(x_num_log, x_denom_log, conf.level = 0.90)$conf.int\n } else {\n geom_mean_ratio <- exp(mean(x_denom_log, na.rm = FALSE)) / exp(mean(x_num_log, na.rm = FALSE))\n geom_mean_ci <- t.test(x_denom_log, x_num_log, conf.level = 0.90)$conf.int\n }\n\n list(\n n = nrow(df),\n geom_mean_ratio = geom_mean_ratio,\n gmr_ci_lwr = exp(geom_mean_ci[1]),\n gmr_ci_upr = exp(geom_mean_ci[2])\n )\n}\n\nafun_pk_gmr <- function(\n .formats = list(\n n = \"xx.\",\n geom_mean_ratio = format_sigfig(3),\n gmr_ci_lwr = format_sigfig(3),\n gmr_ci_upr = format_sigfig(3)\n ),\n compare_dose = comp_dose,\n denom = TRUE) {\n checkmate::assert_list(.formats)\n checkmate::assert_subset(names(.formats), c(\"n\", \"geom_mean_ratio\", \"gmr_ci_lwr\", \"gmr_ci_upr\"))\n\n afun_lst <- Map(\n function(stat, fmt, compare_dose, denom, arm_var) {\n function(df, .spl_context) {\n x_stat <- s_gmr(df, compare_dose = compare_dose, denom = denom, arm_var = arm_var)[[stat]]\n rcell(x_stat, format = fmt, label = tail(.spl_context$value, 1))\n }\n },\n stat = names(.formats),\n fmt = .formats,\n compare_dose = compare_dose,\n denom = denom,\n arm_var = arm_var\n )\n\n afun_lst\n}\n\n\n\n\n\nCode# create layout\nlyt <- basic_table() %>%\n split_rows_by(\n var = \"PKPARAM\",\n label_pos = \"topleft\",\n split_fun = keep_split_levels(c(\"AUCinf obs (day*ug/mL)\", \"Cmax (ug/mL)\")),\n split_label = \"PK Parameter\"\n ) %>%\n split_rows_by(\n var = \"COMP\",\n split_fun = remove_split_levels(paste0(comp_dose, \"/\", comp_dose)),\n indent_mod = 11L,\n child_labels = \"hidden\"\n ) %>%\n split_cols_by_multivar(\n vars = rep(\"AVAL\", 4),\n varlabels = c(\n \"n\",\n \"Geometric Mean Ratio\",\n \"90% CI Lower Bound\",\n \"90% CI Upper Bound\"\n )\n ) %>%\n analyze_colvars(\n afun = afun_pk_gmr(),\n extra_args = list(\n compare_dose = comp_dose,\n denom = TRUE,\n arm_var = arm_var\n )\n ) %>%\n append_varlabels(adpp0, \"COMP\", 12L)\n\nresult <- build_table(lyt, df = adpp0)\n\nmain_title(result) <- paste0(\n \"Estimated Ratios of Geometric Means and 90% Confidence Intervals for AUC and CMAX Following \",\n unique(adpp0$REGIMEN), \"\\nof \", comp_dose, \" in Comparison with \",\n paste(other_doses, collapse = \" & \"), \", PK Population\"\n)\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp0$PPCAT))\n\nresult\n\nEstimated Ratios of Geometric Means and 90% Confidence Intervals for AUC and CMAX Following BID\nof A: Drug X in Comparison with C: Combination, PK Population\nAnalyte: Plasma Drug X\n\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nPK Parameter \n Comparison n Geometric Mean Ratio 90% CI Lower Bound 90% CI Upper Bound\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAUCinf obs (day*ug/mL) \n C: Combination/A: Drug X 266 0.962 0.925 1.00 \nCmax (ug/mL) \n C: Combination/A: Drug X 266 0.997 0.958 1.04 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:47:11 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 codetools_0.2-20 survival_3.5-8 fansi_1.0.6 \n[41] colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 tools_4.3.3 \n[45] pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table – Plasma\nteal App\nReproducibility\n\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\n\n# Comparator Dose - A: Drug X\narm_var <- \"TRT01A\"\ncomp_dose <- \"A: Drug X\"\nother_doses <- as.character(unique(adpp[[arm_var]])[unique(adpp[[arm_var]]) != comp_dose])\n\nadpp <- adpp %>%\n filter(AVISIT == \"CYCLE 1 DAY 1\") %>%\n mutate(\n COMP = paste0(TRT01A, \"/\", comp_dose),\n COMP_AVAL = ifelse(TRT01A == comp_dose, paste0(AVAL, comp_dose), AVAL)\n )\n\nfor (dose in other_doses) {\n temp_df <- adpp[adpp[[arm_var]] == comp_dose, ]\n temp_df$COMP <- paste0(dose, \"/\", comp_dose)\n adpp <- rbind(adpp, temp_df)\n}\n\n# Plasma Drug X\nadpp0 <- adpp %>%\n filter(PPCAT == \"Plasma Drug X\") %>%\n h_pkparam_sort() %>%\n mutate(PKPARAM = factor(paste0(TLG_DISPLAY, \" (\", AVALU, \")\"))) %>%\n var_relabel(COMP = \"Comparison\")\n\n# statistics function\ns_gmr <- function(df,\n compare_dose = comp_dose, # comparator, defaults to comp_dose defined above (string)\n denom = TRUE, # whether to use comparator as denominator, defaults to TRUE (logical)\n arm_var = arm_var) { # arm variable, defaults to arm_var defined above (string)\n which_num <- !grepl(compare_dose, df[[arm_var]])\n\n x_num <- as.numeric(df[which_num, ][[\"AVAL\"]])\n x_num <- x_num[!is.na(x_num)]\n x_num_no_negative_vals <- x_num\n x_num_no_negative_vals[x_num_no_negative_vals <= 0] <- NA\n\n x_denom <- as.numeric(gsub(compare_dose, \"\", df[!which_num, ][[\"AVAL\"]]))\n x_denom <- x_denom[!is.na(x_denom)]\n x_denom_no_negative_vals <- x_denom\n x_denom_no_negative_vals[x_denom_no_negative_vals <= 0] <- NA\n\n x_num_log <- log(x_num_no_negative_vals)\n x_denom_log <- log(x_denom_no_negative_vals)\n\n if (denom) {\n geom_mean_ratio <- exp(mean(x_num_log, na.rm = FALSE)) / exp(mean(x_denom_log, na.rm = FALSE))\n geom_mean_ci <- t.test(x_num_log, x_denom_log, conf.level = 0.90)$conf.int\n } else {\n geom_mean_ratio <- exp(mean(x_denom_log, na.rm = FALSE)) / exp(mean(x_num_log, na.rm = FALSE))\n geom_mean_ci <- t.test(x_denom_log, x_num_log, conf.level = 0.90)$conf.int\n }\n\n list(\n n = nrow(df),\n geom_mean_ratio = geom_mean_ratio,\n gmr_ci_lwr = exp(geom_mean_ci[1]),\n gmr_ci_upr = exp(geom_mean_ci[2])\n )\n}\n\nafun_pk_gmr <- function(\n .formats = list(\n n = \"xx.\",\n geom_mean_ratio = format_sigfig(3),\n gmr_ci_lwr = format_sigfig(3),\n gmr_ci_upr = format_sigfig(3)\n ),\n compare_dose = comp_dose,\n denom = TRUE) {\n checkmate::assert_list(.formats)\n checkmate::assert_subset(names(.formats), c(\"n\", \"geom_mean_ratio\", \"gmr_ci_lwr\", \"gmr_ci_upr\"))\n\n afun_lst <- Map(\n function(stat, fmt, compare_dose, denom, arm_var) {\n function(df, .spl_context) {\n x_stat <- s_gmr(df, compare_dose = compare_dose, denom = denom, arm_var = arm_var)[[stat]]\n rcell(x_stat, format = fmt, label = tail(.spl_context$value, 1))\n }\n },\n stat = names(.formats),\n fmt = .formats,\n compare_dose = compare_dose,\n denom = denom,\n arm_var = arm_var\n )\n\n afun_lst\n}\n\n\n\n\n\nCode# create layout\nlyt <- basic_table() %>%\n split_rows_by(\n var = \"PKPARAM\",\n label_pos = \"topleft\",\n split_fun = keep_split_levels(c(\"AUCinf obs (day*ug/mL)\", \"Cmax (ug/mL)\")),\n split_label = \"PK Parameter\"\n ) %>%\n split_rows_by(\n var = \"COMP\",\n split_fun = remove_split_levels(paste0(comp_dose, \"/\", comp_dose)),\n indent_mod = 11L,\n child_labels = \"hidden\"\n ) %>%\n split_cols_by_multivar(\n vars = rep(\"AVAL\", 4),\n varlabels = c(\n \"n\",\n \"Geometric Mean Ratio\",\n \"90% CI Lower Bound\",\n \"90% CI Upper Bound\"\n )\n ) %>%\n analyze_colvars(\n afun = afun_pk_gmr(),\n extra_args = list(\n compare_dose = comp_dose,\n denom = TRUE,\n arm_var = arm_var\n )\n ) %>%\n append_varlabels(adpp0, \"COMP\", 12L)\n\nresult <- build_table(lyt, df = adpp0)\n\nmain_title(result) <- paste0(\n \"Estimated Ratios of Geometric Means and 90% Confidence Intervals for AUC and CMAX Following \",\n unique(adpp0$REGIMEN), \"\\nof \", comp_dose, \" in Comparison with \",\n paste(other_doses, collapse = \" & \"), \", PK Population\"\n)\nsubtitles(result) <- paste(\"Analyte:\", unique(adpp0$PPCAT))\n\nresult\n\nEstimated Ratios of Geometric Means and 90% Confidence Intervals for AUC and CMAX Following BID\nof A: Drug X in Comparison with C: Combination, PK Population\nAnalyte: Plasma Drug X\n\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nPK Parameter \n Comparison n Geometric Mean Ratio 90% CI Lower Bound 90% CI Upper Bound\n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nAUCinf obs (day*ug/mL) \n C: Combination/A: Drug X 266 0.962 0.925 1.00 \nCmax (ug/mL) \n C: Combination/A: Drug X 266 0.997 0.958 1.04 \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:48:06 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 broom_1.0.5 \n[29] xfun_0.43 cli_3.6.2 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 codetools_0.2-20 survival_3.5-8 fansi_1.0.6 \n[41] colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 tools_4.3.3 \n[45] pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Pharmacokinetic", @@ -1439,7 +1439,7 @@ "href": "tables/ECG/egt05_qtcat.html", "title": "EGT05_QTCAT", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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 analyze_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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEG <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADEG <- df_explicit_na(ADEG)\n adeg_labels <- col_labels(ADEG)\n\n ADEG <- 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 )\n col_labels(ADEG) <- c(\n adeg_labels,\n \"AVALCAT1\" = \"Value at Visit\",\n \"CHGCAT1\" = \"Change from Baseline\"\n )\n})\ndatanames <- c(\"ADSL\", \"ADEG\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADEG <- data[[\"ADEG\"]]\n\n## Setup App\napp <- init(\n data = data,\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, c(\"PARAM\", \"AVISIT\")),\n selected = c(\"AVISIT\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(ADEG, c(\"AVALCAT1\", \"CHGCAT1\")),\n selected = c(\"AVALCAT1\", \"CHGCAT1\")\n ),\n useNA = \"ifany\",\n paramcd = choices_selected(\n choices = value_choices(ADEG, \"PARAMCD\", \"PARAM\"),\n selected = \"QT\"\n )\n )\n )\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:47:31 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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 analyze_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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEG <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADEG <- df_explicit_na(ADEG)\n adeg_labels <- col_labels(ADEG)\n\n ADEG <- 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 )\n col_labels(ADEG) <- c(\n adeg_labels,\n \"AVALCAT1\" = \"Value at Visit\",\n \"CHGCAT1\" = \"Change from Baseline\"\n )\n})\ndatanames <- c(\"ADSL\", \"ADEG\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADEG <- data[[\"ADEG\"]]\n\n## Setup App\napp <- init(\n data = data,\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, c(\"PARAM\", \"AVISIT\")),\n selected = c(\"AVISIT\")\n ),\n summarize_vars = choices_selected(\n choices = variable_choices(ADEG, c(\"AVALCAT1\", \"CHGCAT1\")),\n selected = c(\"AVALCAT1\", \"CHGCAT1\")\n ),\n useNA = \"ifany\",\n paramcd = choices_selected(\n choices = value_choices(ADEG, \"PARAMCD\", \"PARAM\"),\n selected = \"QT\"\n )\n )\n )\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:48:28 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "ECG", @@ -1451,7 +1451,7 @@ "href": "tables/ECG/egt01.html", "title": "EGT01", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\n A: Drug X B: Placebo C: Combination \n Change from Change from Change from \nParameter Value at Visit Baseline Value at Visit Baseline Value at Visit Baseline \n Analysis Visit (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEG <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADEG <- df_explicit_na(ADEG)\n})\ndatanames <- c(\"ADSL\", \"ADEG\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADEG <- data[[\"ADEG\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(teal_slice(\"ADEG\", \"AVAL\", selected = NULL))\n)\n\nshinyApp(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\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:47:53 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 \n[13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 \n[16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 \n[19] ps_1.7.6 purrr_1.0.2 xfun_0.43 \n[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002\n[25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[34] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[37] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[40] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[43] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[46] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[49] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[52] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[55] checkmate_2.3.1 shinyjs_2.1.0 plotly_4.10.4 \n[58] generics_0.1.3 chromote_0.2.0 ggplot2_3.5.0 \n[61] munsell_0.5.1 scales_1.3.0 xtable_1.8-4 \n[64] glue_1.7.0 emmeans_1.10.0 lazyeval_0.2.2 \n[67] tools_4.3.3 webshot2_0.1.1 data.table_1.15.4 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-4 \n[73] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[76] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[79] fansi_1.0.6 viridisLite_0.4.2 geepack_1.3.10 \n[82] gtable_0.3.4 sass_0.4.9 digest_0.6.35 \n[85] TH.data_1.1-2 htmlwidgets_1.6.4 memoise_2.0.1 \n[88] htmltools_0.5.8.1 lifecycle_1.0.4 httr_1.4.7 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\n A: Drug X B: Placebo C: Combination \n Change from Change from Change from \nParameter Value at Visit Baseline Value at Visit Baseline Value at Visit Baseline \n Analysis Visit (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEG <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADEG <- df_explicit_na(ADEG)\n})\ndatanames <- c(\"ADSL\", \"ADEG\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADEG <- data[[\"ADEG\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(teal_slice(\"ADEG\", \"AVAL\", selected = NULL))\n)\n\nshinyApp(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\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:48:51 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 \n[13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 \n[16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 \n[19] ps_1.7.6 purrr_1.0.2 xfun_0.43 \n[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003\n[25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[34] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[37] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[40] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[43] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[46] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[49] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[52] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[55] checkmate_2.3.1 shinyjs_2.1.0 plotly_4.10.4 \n[58] generics_0.1.3 chromote_0.2.0 ggplot2_3.5.0 \n[61] munsell_0.5.1 scales_1.3.0 xtable_1.8-4 \n[64] glue_1.7.0 emmeans_1.10.0 lazyeval_0.2.2 \n[67] tools_4.3.3 webshot2_0.1.1 data.table_1.15.4 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-4 \n[73] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[76] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[79] fansi_1.0.6 viridisLite_0.4.2 geepack_1.3.10 \n[82] gtable_0.3.4 sass_0.4.9 digest_0.6.35 \n[85] TH.data_1.1-2 htmlwidgets_1.6.4 memoise_2.0.1 \n[88] htmltools_0.5.8.1 lifecycle_1.0.4 httr_1.4.7 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "ECG", @@ -1463,7 +1463,7 @@ "href": "tables/ECG/egt02.html", "title": "EGT02", "section": "", - "text": "Data Setup\nECG Abnormalities Regardless of Abnormality at Baseline\nECG Abnormalities Among Subjects Without Abnormality at Baseline\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEG <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n})\ndatanames <- c(\"ADSL\", \"ADEG\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADEG <- data[[\"ADEG\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:48:29 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9020 scda_0.1.6.9017 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nECG Abnormalities Regardless of Abnormality at Baseline\nECG Abnormalities Among Subjects Without Abnormality at Baseline\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEG <- synthetic_cdisc_dataset(\"latest\", \"adeg\")\n})\ndatanames <- c(\"ADSL\", \"ADEG\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADEG <- data[[\"ADEG\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:49:27 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9021 scda_0.1.6.9017 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "ECG", @@ -1475,7 +1475,7 @@ "href": "tables/risk-management-plan/rmpt04.html", "title": "RMPT04", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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——————————————————————————————————————————————————\nHISPANIC OR LATINO 28 (7.0%) 2423 \nNOT HISPANIC OR LATINO 165 (41.2%) 15570 \nNOT REPORTED 18 (4.5%) 2085 \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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n labels <- col_labels(ADEX)\n set.seed(1, kind = \"Mersenne-Twister\")\n\n labels <- col_labels(ADEX)\n ADEX <- 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\n col_labels(ADEX) <- labels\n})\ndatanames <- c(\"ADSL\", \"ADEX\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADEX <- data[[\"ADEX\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = \"ARM\"\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 = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"))\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:48:51 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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——————————————————————————————————————————————————\nHISPANIC OR LATINO 28 (7.0%) 2423 \nNOT HISPANIC OR LATINO 165 (41.2%) 15570 \nNOT REPORTED 18 (4.5%) 2085 \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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n labels <- col_labels(ADEX)\n set.seed(1, kind = \"Mersenne-Twister\")\n\n labels <- col_labels(ADEX)\n ADEX <- 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\n col_labels(ADEX) <- labels\n})\ndatanames <- c(\"ADSL\", \"ADEX\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADEX <- data[[\"ADEX\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = \"ARM\"\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 = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"))\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:49:50 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Risk Management Plan", @@ -1487,7 +1487,7 @@ "href": "tables/risk-management-plan/rmpt05.html", "title": "RMPT05", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n labels <- col_labels(ADEX)\n set.seed(1, kind = \"Mersenne-Twister\")\n\n labels <- col_labels(ADEX)\n ADEX <- 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\n col_labels(ADEX) <- labels\n})\ndatanames <- c(\"ADSL\", \"ADEX\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADEX <- data[[\"ADEX\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = \"ARM\"\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 = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"))\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:49:20 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADEX <- synthetic_cdisc_dataset(\"latest\", \"adex\")\n\n labels <- col_labels(ADEX)\n set.seed(1, kind = \"Mersenne-Twister\")\n\n labels <- col_labels(ADEX)\n ADEX <- 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\n col_labels(ADEX) <- labels\n})\ndatanames <- c(\"ADSL\", \"ADEX\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADEX <- data[[\"ADEX\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = \"ARM\"\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 = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"))\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:50:22 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 dplyr_1.1.4 \n [9] scda_0.1.6.9017 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Risk Management Plan", @@ -1499,7 +1499,7 @@ "href": "tables/concomitant-medications/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 App\nReproducibility\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.\n# 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 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, 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nHere, adcm is processed to keep only one path per treatment.\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADCM <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADCM <- df_explicit_na(ADCM)\n\n ADCM <- ADCM %>%\n group_by(STUDYID, USUBJID, CMDECOD) %>%\n slice(1) %>%\n ungroup()\n})\ndatanames <- c(\"ADSL\", \"ADCM\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADCM <- data[[\"ADCM\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:49:50 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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.\n# 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 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, 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nHere, adcm is processed to keep only one path per treatment.\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADCM <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADCM <- df_explicit_na(ADCM)\n\n ADCM <- ADCM %>%\n group_by(STUDYID, USUBJID, CMDECOD) %>%\n slice(1) %>%\n ungroup()\n})\ndatanames <- c(\"ADSL\", \"ADCM\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADCM <- data[[\"ADCM\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:50:53 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Concomitant Medications", @@ -1511,7 +1511,7 @@ "href": "tables/concomitant-medications/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 App\nReproducibility\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\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\nadcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADCM <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n ADCM$CMSEQ <- as.integer(ADCM$CMSEQ)\n\n ADSL <- df_explicit_na(ADSL)\n ADCM <- df_explicit_na(ADCM)\n})\ndatanames <- c(\"ADSL\", \"ADCM\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\njoin_keys(data)[\"ADCM\", \"ADCM\"] <- adcm_keys\n\n## Reusable Configuration For Modules\nADCM <- data[[\"ADCM\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(\n teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"),\n teal_slice(\"ADCM\", \"ATIREL\", selected = \"CONCOMITANT\")\n )\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:50:23 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\nadcm_keys <- c(\"STUDYID\", \"USUBJID\", \"ASTDTM\", \"CMSEQ\", \"ATC1\", \"ATC2\", \"ATC3\", \"ATC4\")\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(dplyr)\n library(scda)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADCM <- synthetic_cdisc_dataset(\"latest\", \"adcm\")\n ADCM$CMSEQ <- as.integer(ADCM$CMSEQ)\n\n ADSL <- df_explicit_na(ADSL)\n ADCM <- df_explicit_na(ADCM)\n})\ndatanames <- c(\"ADSL\", \"ADCM\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\njoin_keys(data)[\"ADCM\", \"ADCM\"] <- adcm_keys\n\n## Reusable Configuration For Modules\nADCM <- data[[\"ADCM\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(\n teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"),\n teal_slice(\"ADCM\", \"ATIREL\", selected = \"CONCOMITANT\")\n )\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:51:27 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 scda_0.1.6.9017 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Concomitant Medications", @@ -1523,7 +1523,7 @@ "href": "tables/vital-signs/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 App\nReproducibility\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\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADVS <- synthetic_cdisc_dataset(\"latest\", \"advs\") %>%\n mutate(ONTRTFL = ifelse(AVISIT %in% c(\"SCREENING\", \"BASELINE\"), \"\", \"Y\")) %>%\n col_relabel(ONTRTFL = \"On Treatment Record Flag\")\n})\ndatanames <- c(\"ADSL\", \"ADVS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADVS <- data[[\"ADVS\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:50:57 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9020 dplyr_1.1.4 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADVS <- synthetic_cdisc_dataset(\"latest\", \"advs\") %>%\n mutate(ONTRTFL = ifelse(AVISIT %in% c(\"SCREENING\", \"BASELINE\"), \"\", \"Y\")) %>%\n col_relabel(ONTRTFL = \"On Treatment Record Flag\")\n})\ndatanames <- c(\"ADSL\", \"ADVS\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADVS <- data[[\"ADVS\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:52:02 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9021 dplyr_1.1.4 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] multcomp_1.4-25 websocket_1.4.1 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Vital Signs", @@ -1535,7 +1535,7 @@ "href": "tables/deaths/dtht01.html", "title": "DTHT01", "section": "", - "text": "Data Setup\nStandard Table\nTable Selecting Sections to Display\nTable for Studies Collecting Death Information from Public Records\nTable Adding Details for “All other causes” Category for Studies Collecting Death Information from Public Records\nteal App\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\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) %>% filter(SAFFL == \"Y\")\n\n# Reorder the levels in \"DTHCAT\" to put Other category at the end.\nadsl$DTHCAT <- factor(adsl$DTHCAT, levels = c(\"ADVERSE EVENT\", \"PROGRESSIVE DISEASE\", \"OTHER\", \"<Missing>\"))\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\", split_fun = add_overall_level(\"All Patients\", first = FALSE)) %>%\n count_values(\n \"DTHFL\",\n values = \"Y\",\n .labels = c(count_fraction = \"Total number of deaths\"),\n .formats = c(count_fraction = \"xx (xx.x%)\")\n ) %>%\n analyze_vars(vars = c(\"DTHCAT\"), var_labels = c(\"Primary Cause of Death\"))\n\nresult <- build_table(lyt, df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n————————————————————————————————————————————————————————————————————————————————\nTotal number of deaths 25 (18.7%) 23 (17.2%) 22 (16.7%) 70 (17.5%) \nPrimary Cause of Death \n n 25 23 22 70 \n ADVERSE EVENT 9 (36%) 7 (30.4%) 10 (45.5%) 26 (37.1%) \n PROGRESSIVE DISEASE 8 (32%) 6 (26.1%) 6 (27.3%) 20 (28.6%) \n OTHER 8 (32%) 10 (43.5%) 6 (27.3%) 24 (34.3%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\", split_fun = add_overall_level(\"All Patients\", first = FALSE)) %>%\n count_values(\n \"DTHFL\",\n values = \"Y\",\n .labels = c(count_fraction = \"Total number of deaths\"),\n .formats = c(count_fraction = \"xx (xx.x%)\")\n ) %>%\n analyze_vars(vars = c(\"DTHCAT\"), var_labels = c(\"Primary Cause of Death\")) %>%\n split_rows_by(\"DTHCAT\", split_fun = keep_split_levels(\"OTHER\"), child_labels = \"hidden\") %>%\n analyze_vars(\n \"DTHCAUS\",\n .stats = \"count_fraction\",\n .indent_mods = c(\"count_fraction\" = 2L),\n show_labels = \"hidden\"\n ) %>%\n analyze_vars(\n vars = \"LDDTHGR1\",\n nested = FALSE,\n var_labels = \"Days from last drug administration\",\n show_labels = \"visible\"\n ) %>%\n split_rows_by(\n \"LDDTHGR1\",\n split_fun = remove_split_levels(\"<Missing>\"),\n split_label = \"Primary cause by days from last study drug administration\",\n label_pos = \"visible\"\n ) %>%\n analyze_vars(\"DTHCAT\")\n\nresult <- build_table(lyt, df = adsl) %>% prune_table()\n\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of deaths 25 (18.7%) 23 (17.2%) 22 (16.7%) 70 (17.5%) \nPrimary Cause of Death \n n 25 23 22 70 \n ADVERSE EVENT 9 (36%) 7 (30.4%) 10 (45.5%) 26 (37.1%) \n PROGRESSIVE DISEASE 8 (32%) 6 (26.1%) 6 (27.3%) 20 (28.6%) \n OTHER 8 (32%) 10 (43.5%) 6 (27.3%) 24 (34.3%) \n LOST TO FOLLOW UP 2 (25%) 2 (20%) 2 (33.3%) 6 (25%) \n MISSING 2 (25%) 3 (30%) 2 (33.3%) 7 (29.2%) \n Post-study reporting of death 1 (12.5%) 2 (20%) 1 (16.7%) 4 (16.7%) \n SUICIDE 2 (25%) 2 (20%) 1 (16.7%) 5 (20.8%) \n UNKNOWN 1 (12.5%) 1 (10%) 0 2 (8.3%) \nDays from last drug administration \n n 25 23 22 70 \n <=30 14 (56%) 11 (47.8%) 14 (63.6%) 39 (55.7%) \n >30 11 (44%) 12 (52.2%) 8 (36.4%) 31 (44.3%) \nPrimary cause by days from last study drug administration \n <=30 \n n 14 11 14 39 \n ADVERSE EVENT 4 (28.6%) 2 (18.2%) 6 (42.9%) 12 (30.8%) \n PROGRESSIVE DISEASE 6 (42.9%) 3 (27.3%) 4 (28.6%) 13 (33.3%) \n OTHER 4 (28.6%) 6 (54.5%) 4 (28.6%) 14 (35.9%) \n >30 \n n 11 12 8 31 \n ADVERSE EVENT 5 (45.5%) 5 (41.7%) 4 (50%) 14 (45.2%) \n PROGRESSIVE DISEASE 2 (18.2%) 3 (25%) 2 (25%) 7 (22.6%) \n OTHER 4 (36.4%) 4 (33.3%) 2 (25%) 10 (32.3%) \n\n\n\n\n\nCodedthcaus_levels <- levels(adsl[adsl$DTHCAT == \"OTHER\", ]$DTHCAUS)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\", split_fun = add_overall_level(\"All Patients\", first = FALSE)) %>%\n count_values(\n \"DTHFL\",\n values = \"Y\",\n .labels = c(count_fraction = \"Total number of deaths\"),\n .formats = c(count_fraction = \"xx (xx.x%)\")\n ) %>%\n analyze_vars(\n vars = c(\"DTHCAT\"),\n var_labels = c(\"Primary Cause of Death\"),\n table_names = \"primary_cause\"\n ) %>%\n split_rows_by(\n \"DTHCAT\",\n split_fun = keep_split_levels(\"OTHER\"),\n child_labels = \"hidden\"\n ) %>%\n count_values(\n \"DTHCAUS\",\n values = dthcaus_levels[5],\n .labels = c(count_fraction = \"Post-study reportings of death\"),\n .formats = c(count_fraction = \"xx (xx.x%)\"),\n .indent_mods = c(count_fraction = 2L),\n table_names = \"post_study_deaths\"\n ) %>%\n count_values(\n \"DTHCAUS\",\n values = dthcaus_levels[-5],\n .labels = c(count_fraction = \"All other causes\"),\n .formats = c(count_fraction = \"xx (xx.x%)\"),\n .indent_mods = c(count_fraction = 2L),\n table_names = \"all_other_causes\"\n )\n\nresult <- build_table(lyt, df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of deaths 25 (18.7%) 23 (17.2%) 22 (16.7%) 70 (17.5%) \nPrimary Cause of Death \n n 25 23 22 70 \n ADVERSE EVENT 9 (36%) 7 (30.4%) 10 (45.5%) 26 (37.1%) \n PROGRESSIVE DISEASE 8 (32%) 6 (26.1%) 6 (27.3%) 20 (28.6%) \n OTHER 8 (32%) 10 (43.5%) 6 (27.3%) 24 (34.3%) \n Post-study reportings of death 1 (12.5%) 2 (20.0%) 1 (16.7%) 4 (16.7%) \n All other causes 7 (87.5%) 8 (80.0%) 5 (83.3%) 20 (83.3%) \n\n\n\n\n\nCodedthcaus_levels <- levels(adsl[adsl$DTHCAT == \"OTHER\", ]$DTHCAUS)\n\n# create a helper variable DTHCAUS_other\nadsl <- adsl %>%\n mutate(\n DTHCAUS_other = factor(ifelse(\n DTHCAT == \"OTHER\" & DTHCAUS != \"Post-study reporting of death\", as.character(DTHCAUS), NA\n ), levels = c(\"LOST TO FOLLOW UP\", \"SUICIDE\", \"UNKNOWN\", \"MISSING\")) %>% explicit_na()\n )\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\", split_fun = add_overall_level(\"All Patients\", first = FALSE)) %>%\n count_values(\n \"DTHFL\",\n values = \"Y\",\n .labels = c(count_fraction = \"Total number of deaths\"),\n .formats = c(count_fraction = \"xx (xx.x%)\")\n ) %>%\n analyze_vars(\n vars = c(\"DTHCAT\"),\n var_labels = c(\"Primary Cause of Death\"),\n table_names = \"primary_cause\"\n ) %>%\n split_rows_by(\"DTHCAT\", split_fun = keep_split_levels(\"OTHER\"), child_labels = \"hidden\") %>%\n count_values(\n \"DTHCAUS\",\n values = dthcaus_levels[5],\n .labels = c(count_fraction = \"Post-study reportings of death\"),\n .formats = c(count_fraction = \"xx (xx.x%)\"),\n .indent_mods = c(count_fraction = 2L),\n table_names = \"post_study_deaths\"\n ) %>%\n count_values(\n \"DTHCAUS\",\n values = dthcaus_levels[-5],\n .labels = c(count_fraction = \"All other causes\"),\n .formats = c(count_fraction = \"xx (xx.x%)\"),\n .indent_mods = c(count_fraction = 2L),\n table_names = \"all_other_causes\"\n ) %>%\n analyze_vars(\n \"DTHCAUS_other\",\n .stats = \"count_fraction\",\n .indent_mods = c(\"count_fraction\" = 3L),\n show_labels = \"hidden\"\n )\n\nresult <- build_table(lyt, df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of deaths 25 (18.7%) 23 (17.2%) 22 (16.7%) 70 (17.5%) \nPrimary Cause of Death \n n 25 23 22 70 \n ADVERSE EVENT 9 (36%) 7 (30.4%) 10 (45.5%) 26 (37.1%) \n PROGRESSIVE DISEASE 8 (32%) 6 (26.1%) 6 (27.3%) 20 (28.6%) \n OTHER 8 (32%) 10 (43.5%) 6 (27.3%) 24 (34.3%) \n Post-study reportings of death 1 (12.5%) 2 (20.0%) 1 (16.7%) 4 (16.7%) \n All other causes 7 (87.5%) 8 (80.0%) 5 (83.3%) 20 (83.3%) \n LOST TO FOLLOW UP 2 (28.6%) 2 (25%) 2 (40%) 6 (30%) \n SUICIDE 2 (28.6%) 2 (25%) 1 (20%) 5 (25%) \n UNKNOWN 1 (14.3%) 1 (12.5%) 0 2 (10%) \n MISSING 2 (28.6%) 3 (37.5%) 2 (40%) 7 (35%) \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:51:22 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 scda_0.1.6.9017 tern_0.9.3.9031 \n[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nTable Selecting Sections to Display\nTable for Studies Collecting Death Information from Public Records\nTable Adding Details for “All other causes” Category for Studies Collecting Death Information from Public Records\nteal App\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\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) %>% filter(SAFFL == \"Y\")\n\n# Reorder the levels in \"DTHCAT\" to put Other category at the end.\nadsl$DTHCAT <- factor(adsl$DTHCAT, levels = c(\"ADVERSE EVENT\", \"PROGRESSIVE DISEASE\", \"OTHER\", \"<Missing>\"))\n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\", split_fun = add_overall_level(\"All Patients\", first = FALSE)) %>%\n count_values(\n \"DTHFL\",\n values = \"Y\",\n .labels = c(count_fraction = \"Total number of deaths\"),\n .formats = c(count_fraction = \"xx (xx.x%)\")\n ) %>%\n analyze_vars(vars = c(\"DTHCAT\"), var_labels = c(\"Primary Cause of Death\"))\n\nresult <- build_table(lyt, df = adsl)\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n————————————————————————————————————————————————————————————————————————————————\nTotal number of deaths 25 (18.7%) 23 (17.2%) 22 (16.7%) 70 (17.5%) \nPrimary Cause of Death \n n 25 23 22 70 \n ADVERSE EVENT 9 (36%) 7 (30.4%) 10 (45.5%) 26 (37.1%) \n PROGRESSIVE DISEASE 8 (32%) 6 (26.1%) 6 (27.3%) 20 (28.6%) \n OTHER 8 (32%) 10 (43.5%) 6 (27.3%) 24 (34.3%) \n\n\n\n\n\nCodelyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\", split_fun = add_overall_level(\"All Patients\", first = FALSE)) %>%\n count_values(\n \"DTHFL\",\n values = \"Y\",\n .labels = c(count_fraction = \"Total number of deaths\"),\n .formats = c(count_fraction = \"xx (xx.x%)\")\n ) %>%\n analyze_vars(vars = c(\"DTHCAT\"), var_labels = c(\"Primary Cause of Death\")) %>%\n split_rows_by(\"DTHCAT\", split_fun = keep_split_levels(\"OTHER\"), child_labels = \"hidden\") %>%\n analyze_vars(\n \"DTHCAUS\",\n .stats = \"count_fraction\",\n .indent_mods = c(\"count_fraction\" = 2L),\n show_labels = \"hidden\"\n ) %>%\n analyze_vars(\n vars = \"LDDTHGR1\",\n nested = FALSE,\n var_labels = \"Days from last drug administration\",\n show_labels = \"visible\"\n ) %>%\n split_rows_by(\n \"LDDTHGR1\",\n split_fun = remove_split_levels(\"<Missing>\"),\n split_label = \"Primary cause by days from last study drug administration\",\n label_pos = \"visible\"\n ) %>%\n analyze_vars(\"DTHCAT\")\n\nresult <- build_table(lyt, df = adsl) %>% prune_table()\n\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of deaths 25 (18.7%) 23 (17.2%) 22 (16.7%) 70 (17.5%) \nPrimary Cause of Death \n n 25 23 22 70 \n ADVERSE EVENT 9 (36%) 7 (30.4%) 10 (45.5%) 26 (37.1%) \n PROGRESSIVE DISEASE 8 (32%) 6 (26.1%) 6 (27.3%) 20 (28.6%) \n OTHER 8 (32%) 10 (43.5%) 6 (27.3%) 24 (34.3%) \n LOST TO FOLLOW UP 2 (25%) 2 (20%) 2 (33.3%) 6 (25%) \n MISSING 2 (25%) 3 (30%) 2 (33.3%) 7 (29.2%) \n Post-study reporting of death 1 (12.5%) 2 (20%) 1 (16.7%) 4 (16.7%) \n SUICIDE 2 (25%) 2 (20%) 1 (16.7%) 5 (20.8%) \n UNKNOWN 1 (12.5%) 1 (10%) 0 2 (8.3%) \nDays from last drug administration \n n 25 23 22 70 \n <=30 14 (56%) 11 (47.8%) 14 (63.6%) 39 (55.7%) \n >30 11 (44%) 12 (52.2%) 8 (36.4%) 31 (44.3%) \nPrimary cause by days from last study drug administration \n <=30 \n n 14 11 14 39 \n ADVERSE EVENT 4 (28.6%) 2 (18.2%) 6 (42.9%) 12 (30.8%) \n PROGRESSIVE DISEASE 6 (42.9%) 3 (27.3%) 4 (28.6%) 13 (33.3%) \n OTHER 4 (28.6%) 6 (54.5%) 4 (28.6%) 14 (35.9%) \n >30 \n n 11 12 8 31 \n ADVERSE EVENT 5 (45.5%) 5 (41.7%) 4 (50%) 14 (45.2%) \n PROGRESSIVE DISEASE 2 (18.2%) 3 (25%) 2 (25%) 7 (22.6%) \n OTHER 4 (36.4%) 4 (33.3%) 2 (25%) 10 (32.3%) \n\n\n\n\n\nCodedthcaus_levels <- levels(adsl[adsl$DTHCAT == \"OTHER\", ]$DTHCAUS)\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\", split_fun = add_overall_level(\"All Patients\", first = FALSE)) %>%\n count_values(\n \"DTHFL\",\n values = \"Y\",\n .labels = c(count_fraction = \"Total number of deaths\"),\n .formats = c(count_fraction = \"xx (xx.x%)\")\n ) %>%\n analyze_vars(\n vars = c(\"DTHCAT\"),\n var_labels = c(\"Primary Cause of Death\"),\n table_names = \"primary_cause\"\n ) %>%\n split_rows_by(\n \"DTHCAT\",\n split_fun = keep_split_levels(\"OTHER\"),\n child_labels = \"hidden\"\n ) %>%\n count_values(\n \"DTHCAUS\",\n values = dthcaus_levels[5],\n .labels = c(count_fraction = \"Post-study reportings of death\"),\n .formats = c(count_fraction = \"xx (xx.x%)\"),\n .indent_mods = c(count_fraction = 2L),\n table_names = \"post_study_deaths\"\n ) %>%\n count_values(\n \"DTHCAUS\",\n values = dthcaus_levels[-5],\n .labels = c(count_fraction = \"All other causes\"),\n .formats = c(count_fraction = \"xx (xx.x%)\"),\n .indent_mods = c(count_fraction = 2L),\n table_names = \"all_other_causes\"\n )\n\nresult <- build_table(lyt, df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of deaths 25 (18.7%) 23 (17.2%) 22 (16.7%) 70 (17.5%) \nPrimary Cause of Death \n n 25 23 22 70 \n ADVERSE EVENT 9 (36%) 7 (30.4%) 10 (45.5%) 26 (37.1%) \n PROGRESSIVE DISEASE 8 (32%) 6 (26.1%) 6 (27.3%) 20 (28.6%) \n OTHER 8 (32%) 10 (43.5%) 6 (27.3%) 24 (34.3%) \n Post-study reportings of death 1 (12.5%) 2 (20.0%) 1 (16.7%) 4 (16.7%) \n All other causes 7 (87.5%) 8 (80.0%) 5 (83.3%) 20 (83.3%) \n\n\n\n\n\nCodedthcaus_levels <- levels(adsl[adsl$DTHCAT == \"OTHER\", ]$DTHCAUS)\n\n# create a helper variable DTHCAUS_other\nadsl <- adsl %>%\n mutate(\n DTHCAUS_other = factor(ifelse(\n DTHCAT == \"OTHER\" & DTHCAUS != \"Post-study reporting of death\", as.character(DTHCAUS), NA\n ), levels = c(\"LOST TO FOLLOW UP\", \"SUICIDE\", \"UNKNOWN\", \"MISSING\")) %>% explicit_na()\n )\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARM\", split_fun = add_overall_level(\"All Patients\", first = FALSE)) %>%\n count_values(\n \"DTHFL\",\n values = \"Y\",\n .labels = c(count_fraction = \"Total number of deaths\"),\n .formats = c(count_fraction = \"xx (xx.x%)\")\n ) %>%\n analyze_vars(\n vars = c(\"DTHCAT\"),\n var_labels = c(\"Primary Cause of Death\"),\n table_names = \"primary_cause\"\n ) %>%\n split_rows_by(\"DTHCAT\", split_fun = keep_split_levels(\"OTHER\"), child_labels = \"hidden\") %>%\n count_values(\n \"DTHCAUS\",\n values = dthcaus_levels[5],\n .labels = c(count_fraction = \"Post-study reportings of death\"),\n .formats = c(count_fraction = \"xx (xx.x%)\"),\n .indent_mods = c(count_fraction = 2L),\n table_names = \"post_study_deaths\"\n ) %>%\n count_values(\n \"DTHCAUS\",\n values = dthcaus_levels[-5],\n .labels = c(count_fraction = \"All other causes\"),\n .formats = c(count_fraction = \"xx (xx.x%)\"),\n .indent_mods = c(count_fraction = 2L),\n table_names = \"all_other_causes\"\n ) %>%\n analyze_vars(\n \"DTHCAUS_other\",\n .stats = \"count_fraction\",\n .indent_mods = c(\"count_fraction\" = 3L),\n show_labels = \"hidden\"\n )\n\nresult <- build_table(lyt, df = adsl)\n\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\n (N=134) (N=134) (N=132) (N=400) \n————————————————————————————————————————————————————————————————————————————————————————————\nTotal number of deaths 25 (18.7%) 23 (17.2%) 22 (16.7%) 70 (17.5%) \nPrimary Cause of Death \n n 25 23 22 70 \n ADVERSE EVENT 9 (36%) 7 (30.4%) 10 (45.5%) 26 (37.1%) \n PROGRESSIVE DISEASE 8 (32%) 6 (26.1%) 6 (27.3%) 20 (28.6%) \n OTHER 8 (32%) 10 (43.5%) 6 (27.3%) 24 (34.3%) \n Post-study reportings of death 1 (12.5%) 2 (20.0%) 1 (16.7%) 4 (16.7%) \n All other causes 7 (87.5%) 8 (80.0%) 5 (83.3%) 20 (83.3%) \n LOST TO FOLLOW UP 2 (28.6%) 2 (25%) 2 (40%) 6 (30%) \n SUICIDE 2 (28.6%) 2 (25%) 1 (20%) 5 (25%) \n UNKNOWN 1 (14.3%) 1 (12.5%) 0 2 (10%) \n MISSING 2 (28.6%) 3 (37.5%) 2 (40%) 7 (35%) \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:52:27 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 scda_0.1.6.9017 tern_0.9.3.9031 \n[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Deaths", @@ -1547,7 +1547,7 @@ "href": "tables/lab-results/lbt07.html", "title": "LBT07", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n filter(!AVISIT %in% c(\"SCREENING\", \"BASELINE\"))\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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 teal_slices(\n teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"),\n teal_slice(\"ADLB\", \"ONTRTFL\", selected = \"Y\")\n )\n )\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:51:53 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 forcats_1.0.0 \n [9] dplyr_1.1.4 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9020 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n filter(!AVISIT %in% c(\"SCREENING\", \"BASELINE\"))\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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 teal_slices(\n teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"),\n teal_slice(\"ADLB\", \"ONTRTFL\", selected = \"Y\")\n )\n )\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:53:00 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 forcats_1.0.0 \n [9] dplyr_1.1.4 tern_0.9.3.9031 \n[11] rtables_0.6.6.9011 magrittr_2.0.3 \n[13] formatters_0.5.5.9021 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -1559,7 +1559,7 @@ "href": "tables/lab-results/lbt12.html", "title": "LBT12", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadhy <- synthetic_cdisc_dataset(\"latest\", \"adhy\")\n\nanl <- adhy\nanl$APERIODC <- as.factor(anl$APERIODC) # to ensure the table is built even if there is no patients after filtering\nanl$ACTARM <- as.factor(anl$ACTARM) # to ensure the table is built even if there is no patients after filtering\n\nanl <- anl %>%\n filter(\n SAFFL == \"Y\",\n PARAMCD %in% c(\"ASTPULN\", \"ALTPULN\", \"ALTASTPU\") & AVISIT == \"POST-BASELINE\"\n ) %>%\n mutate(\n ARM_AVALC = factor(\n case_when(\n AVALC == \"Y\" ~ as.character(ACTARM),\n TRUE ~ \"Criteria not met\"\n ),\n levels = c(levels(anl$ACTARM), \"Criteria not met\")\n ),\n PARAM = factor(\n case_when(\n PARAMCD == \"ASTPULN\" ~ \"AST >3x ULN\",\n PARAMCD == \"ALTPULN\" ~ \"ALT >3x ULN\",\n PARAMCD == \"ALTASTPU\" ~ \"AST >3x ULN or ALT >x3 ULN\"\n ),\n levels = c(\"AST >3x ULN\", \"ALT >3x ULN\", \"AST >3x ULN or ALT >x3 ULN\")\n ),\n TITLE = factor(\"First Elevated Result Occurring During\")\n )\n\nanl <- df_explicit_na(anl)\n\n\n\n\n\nCoderesult <- basic_table() %>%\n split_cols_by(\"TITLE\") %>%\n split_cols_by(\"APERIODC\") %>%\n split_rows_by(\"PARAM\") %>%\n split_rows_by(\"ACTARM\", split_fun = drop_split_levels, child_labels = \"hidden\") %>%\n count_occurrences(\"ARM_AVALC\", .stats = \"fraction\", denom = \"n\", drop = TRUE) %>%\n build_table(anl)\n\ncriteria_fun <- function(tr) {\n row_label <- obj_label(tr)\n dplyr::if_else(row_label == \"Criteria not met\", TRUE, FALSE)\n}\n\nresult <- result %>% trim_rows(criteria = criteria_fun)\nresult\n\n First Elevated Result Occurring During \n PERIOD 1 PERIOD 2 \n——————————————————————————————————————————————————————————————————————\nAST >3x ULN \n A: Drug X 11/134 (8.2%) 21/134 (15.7%) \n B: Placebo 17/134 (12.7%) 16/134 (11.9%) \n C: Combination 10/132 (7.6%) 8/132 (6.1%) \nALT >3x ULN \n A: Drug X 14/134 (10.4%) 8/134 (6.0%) \n B: Placebo 24/134 (17.9%) 18/134 (13.4%) \n C: Combination 16/132 (12.1%) 10/132 (7.6%) \nAST >3x ULN or ALT >x3 ULN \n A: Drug X 14/134 (10.4%) 15/134 (11.2%) \n B: Placebo 8/134 (6.0%) 13/134 (9.7%) \n C: Combination 11/132 (8.3%) 12/132 (9.1%) \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:52:05 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadhy <- synthetic_cdisc_dataset(\"latest\", \"adhy\")\n\nanl <- adhy\nanl$APERIODC <- as.factor(anl$APERIODC) # to ensure the table is built even if there is no patients after filtering\nanl$ACTARM <- as.factor(anl$ACTARM) # to ensure the table is built even if there is no patients after filtering\n\nanl <- anl %>%\n filter(\n SAFFL == \"Y\",\n PARAMCD %in% c(\"ASTPULN\", \"ALTPULN\", \"ALTASTPU\") & AVISIT == \"POST-BASELINE\"\n ) %>%\n mutate(\n ARM_AVALC = factor(\n case_when(\n AVALC == \"Y\" ~ as.character(ACTARM),\n TRUE ~ \"Criteria not met\"\n ),\n levels = c(levels(anl$ACTARM), \"Criteria not met\")\n ),\n PARAM = factor(\n case_when(\n PARAMCD == \"ASTPULN\" ~ \"AST >3x ULN\",\n PARAMCD == \"ALTPULN\" ~ \"ALT >3x ULN\",\n PARAMCD == \"ALTASTPU\" ~ \"AST >3x ULN or ALT >x3 ULN\"\n ),\n levels = c(\"AST >3x ULN\", \"ALT >3x ULN\", \"AST >3x ULN or ALT >x3 ULN\")\n ),\n TITLE = factor(\"First Elevated Result Occurring During\")\n )\n\nanl <- df_explicit_na(anl)\n\n\n\n\n\nCoderesult <- basic_table() %>%\n split_cols_by(\"TITLE\") %>%\n split_cols_by(\"APERIODC\") %>%\n split_rows_by(\"PARAM\") %>%\n split_rows_by(\"ACTARM\", split_fun = drop_split_levels, child_labels = \"hidden\") %>%\n count_occurrences(\"ARM_AVALC\", .stats = \"fraction\", denom = \"n\", drop = TRUE) %>%\n build_table(anl)\n\ncriteria_fun <- function(tr) {\n row_label <- obj_label(tr)\n dplyr::if_else(row_label == \"Criteria not met\", TRUE, FALSE)\n}\n\nresult <- result %>% trim_rows(criteria = criteria_fun)\nresult\n\n First Elevated Result Occurring During \n PERIOD 1 PERIOD 2 \n——————————————————————————————————————————————————————————————————————\nAST >3x ULN \n A: Drug X 11/134 (8.2%) 21/134 (15.7%) \n B: Placebo 17/134 (12.7%) 16/134 (11.9%) \n C: Combination 10/132 (7.6%) 8/132 (6.1%) \nALT >3x ULN \n A: Drug X 14/134 (10.4%) 8/134 (6.0%) \n B: Placebo 24/134 (17.9%) 18/134 (13.4%) \n C: Combination 16/132 (12.1%) 10/132 (7.6%) \nAST >3x ULN or ALT >x3 ULN \n A: Drug X 14/134 (10.4%) 15/134 (11.2%) \n B: Placebo 8/134 (6.0%) 13/134 (9.7%) \n C: Combination 11/132 (8.3%) 12/132 (9.1%) \n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:53:13 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -1571,7 +1571,7 @@ "href": "tables/lab-results/lbt08.html", "title": "LBT08", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb <- adlb %>%\n mutate(\n GRADDR = case_when(\n PARAMCD == \"ALT\" ~ \"L\",\n PARAMCD == \"CRP\" ~ \"B\",\n PARAMCD == \"IGA\" ~ \"H\"\n )\n ) %>%\n filter(SAFFL == \"Y\" & ONTRTFL == \"Y\" & GRADDR != \"\")\n\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\ndf <- h_adlb_worsen(\n adlb,\n worst_flag_low = c(\"WGRLOFL\" = \"Y\"),\n worst_flag_high = c(\"WGRHIFL\" = \"Y\"),\n direction_var = \"GRADDR\"\n)\n\nattributes(df$GRADDR) <- list(\"label\" = \"Direction of Abnormality\")\n\n\n\n\nNote: The direction of the shift table for each lab test is based on metadata and NCI CTCAE specifications. In addition, the worst laboratory flags must be selected appropriately to match the direction of abnormality. For example, if any lab requires a shift table for both directions, then both worst_flag_low and worst_flag_high must be specified in h_adlb_worsen. If all labs requires a shift table for only one direction, then the matching worst lab flag variable must be selected in h_adlb_worsen.\n\nCoderesult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARMCD\") %>%\n split_rows_by(\"PARAMCD\", label_pos = \"topleft\", split_label = obj_label(df$PARAMCD)) %>%\n split_rows_by(\"GRADDR\", label_pos = \"topleft\", split_label = obj_label(df$GRADDR)) %>%\n count_abnormal_lab_worsen_by_baseline(\n var = \"ATOXGR\",\n variables = list(\n id = \"USUBJID\",\n baseline_var = \"BTOXGR\",\n direction_var = \"GRADDR\"\n )\n ) %>%\n append_topleft(\" Highest NCI CTCAE Grade\") %>%\n build_table(df = df, alt_counts_df = adsl)\n\nresult\n\nParameter Code \n Direction of Abnormality ARM A ARM B ARM C \n Highest NCI CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————\nALT \n Low \n 1 11/113 (9.7%) 9/117 (7.7%) 15/123 (12.2%)\n 2 15/119 (12.6%) 23/123 (18.7%) 16/127 (12.6%)\n 3 15/127 (11.8%) 22/128 (17.2%) 14/128 (10.9%)\n 4 17/130 (13.1%) 10/131 (7.6%) 18/130 (13.8%)\n Any 58/130 (44.6%) 64/131 (48.9%) 63/130 (48.5%)\nCRP \n High \n 1 18/114 (15.8%) 18/112 (16.1%) 19/115 (16.5%)\n 2 20/122 (16.4%) 13/122 (10.7%) 14/122 (11.5%)\n 3 23/124 (18.5%) 14/128 (10.9%) 20/129 (15.5%)\n 4 12/131 (9.2%) 20/132 (15.2%) 11/132 (8.3%) \n Any 73/131 (55.7%) 65/132 (49.2%) 64/132 (48.5%)\n Low \n 1 20/119 (16.8%) 18/113 (15.9%) 11/112 (9.8%) \n 2 24/122 (19.7%) 21/118 (17.8%) 17/121 (14%) \n 3 26/127 (20.5%) 20/127 (15.7%) 22/123 (17.9%)\n 4 10/131 (7.6%) 16/132 (12.1%) 21/130 (16.2%)\n Any 80/131 (61.1%) 75/132 (56.8%) 71/130 (54.6%)\nIGA \n High \n 1 18/119 (15.1%) 11/116 (9.5%) 15/113 (13.3%)\n 2 15/124 (12.1%) 23/120 (19.2%) 19/115 (16.5%)\n 3 21/128 (16.4%) 21/124 (16.9%) 20/120 (16.7%)\n 4 12/132 (9.1%) 12/129 (9.3%) 9/131 (6.9%) \n Any 66/132 (50%) 67/129 (51.9%) 63/131 (48.1%)\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:52:27 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb <- adlb %>%\n mutate(\n GRADDR = case_when(\n PARAMCD == \"ALT\" ~ \"L\",\n PARAMCD == \"CRP\" ~ \"B\",\n PARAMCD == \"IGA\" ~ \"H\"\n )\n ) %>%\n filter(SAFFL == \"Y\" & ONTRTFL == \"Y\" & GRADDR != \"\")\n\nadsl <- df_explicit_na(adsl)\nadlb <- df_explicit_na(adlb)\n\ndf <- h_adlb_worsen(\n adlb,\n worst_flag_low = c(\"WGRLOFL\" = \"Y\"),\n worst_flag_high = c(\"WGRHIFL\" = \"Y\"),\n direction_var = \"GRADDR\"\n)\n\nattributes(df$GRADDR) <- list(\"label\" = \"Direction of Abnormality\")\n\n\n\n\nNote: The direction of the shift table for each lab test is based on metadata and NCI CTCAE specifications. In addition, the worst laboratory flags must be selected appropriately to match the direction of abnormality. For example, if any lab requires a shift table for both directions, then both worst_flag_low and worst_flag_high must be specified in h_adlb_worsen. If all labs requires a shift table for only one direction, then the matching worst lab flag variable must be selected in h_adlb_worsen.\n\nCoderesult <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARMCD\") %>%\n split_rows_by(\"PARAMCD\", label_pos = \"topleft\", split_label = obj_label(df$PARAMCD)) %>%\n split_rows_by(\"GRADDR\", label_pos = \"topleft\", split_label = obj_label(df$GRADDR)) %>%\n count_abnormal_lab_worsen_by_baseline(\n var = \"ATOXGR\",\n variables = list(\n id = \"USUBJID\",\n baseline_var = \"BTOXGR\",\n direction_var = \"GRADDR\"\n )\n ) %>%\n append_topleft(\" Highest NCI CTCAE Grade\") %>%\n build_table(df = df, alt_counts_df = adsl)\n\nresult\n\nParameter Code \n Direction of Abnormality ARM A ARM B ARM C \n Highest NCI CTCAE Grade (N=134) (N=134) (N=132) \n——————————————————————————————————————————————————————————————————————————————\nALT \n Low \n 1 11/113 (9.7%) 9/117 (7.7%) 15/123 (12.2%)\n 2 15/119 (12.6%) 23/123 (18.7%) 16/127 (12.6%)\n 3 15/127 (11.8%) 22/128 (17.2%) 14/128 (10.9%)\n 4 17/130 (13.1%) 10/131 (7.6%) 18/130 (13.8%)\n Any 58/130 (44.6%) 64/131 (48.9%) 63/130 (48.5%)\nCRP \n High \n 1 18/114 (15.8%) 18/112 (16.1%) 19/115 (16.5%)\n 2 20/122 (16.4%) 13/122 (10.7%) 14/122 (11.5%)\n 3 23/124 (18.5%) 14/128 (10.9%) 20/129 (15.5%)\n 4 12/131 (9.2%) 20/132 (15.2%) 11/132 (8.3%) \n Any 73/131 (55.7%) 65/132 (49.2%) 64/132 (48.5%)\n Low \n 1 20/119 (16.8%) 18/113 (15.9%) 11/112 (9.8%) \n 2 24/122 (19.7%) 21/118 (17.8%) 17/121 (14%) \n 3 26/127 (20.5%) 20/127 (15.7%) 22/123 (17.9%)\n 4 10/131 (7.6%) 16/132 (12.1%) 21/130 (16.2%)\n Any 80/131 (61.1%) 75/132 (56.8%) 71/130 (54.6%)\nIGA \n High \n 1 18/119 (15.1%) 11/116 (9.5%) 15/113 (13.3%)\n 2 15/124 (12.1%) 23/120 (19.2%) 19/115 (16.5%)\n 3 21/128 (16.4%) 21/124 (16.9%) 20/120 (16.7%)\n 4 12/132 (9.1%) 12/129 (9.3%) 9/131 (6.9%) \n Any 66/132 (50%) 67/129 (51.9%) 63/131 (48.1%)\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:53:35 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -1583,7 +1583,7 @@ "href": "tables/lab-results/lbt09.html", "title": "LBT09", "section": "", - "text": "Data Setup\nStandard Table\nTable Selecting Sections\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadhy <- synthetic_cdisc_dataset(\"latest\", \"adhy\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadhy_liver <- df_explicit_na(adhy)\n\n# Define values of interest in PARAMCD variable.\nparamcd_tbili_alt <- c(\"BLAL\", \"BGAL\", \"BA2AL\", \"BA5AL\")\nparamcd_tbili_ast <- c(\"BLAS\", \"BGAS\", \"BA2AS\", \"BA5AS\")\n\n# Select LBT09 parameters.\nadhy_liver <- adhy_liver %>%\n filter(\n SAFFL == \"Y\",\n AVISIT %in% c(\"BASELINE\", \"POST-BASELINE\"),\n PARAMCD %in% c(paramcd_tbili_alt, paramcd_tbili_ast)\n )\n\n# Let's be explicit about factor levels for AVISIT and PARAMCD.\nadhy_liver <- adhy_liver %>%\n mutate(\n AVISIT = factor(AVISIT, levels = c(\"BASELINE\", \"POST-BASELINE\")),\n PARAMCD = factor(PARAMCD, levels = c(paramcd_tbili_alt, paramcd_tbili_ast))\n )\n\n# Create indicator and category variables.\nadhy_liver <- adhy_liver %>%\n mutate(\n # Create TBILI_CAT categories variable - this is needed so we get the right nesting in the table.\n TBILI_CAT = factor(\n case_when(\n PARAMCD %in% c(paramcd_tbili_alt[1], paramcd_tbili_ast[1]) ~ \"Total Bilirubin <= 2xULN\",\n PARAMCD %in% c(paramcd_tbili_alt[2], paramcd_tbili_ast[2]) ~ \"Total Bilirubin > 2xULN\",\n PARAMCD %in% c(paramcd_tbili_alt[3], paramcd_tbili_ast[3]) ~\n \"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 2xULN\",\n PARAMCD %in% c(paramcd_tbili_alt[4], paramcd_tbili_ast[4]) ~\n \"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 5xULN\"\n ),\n levels = c(\n \"Total Bilirubin <= 2xULN\",\n \"Total Bilirubin > 2xULN\",\n \"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 2xULN\",\n \"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 5xULN\"\n )\n ),\n # Create ALTAST_CAT categories variable\n # this will be the labels for different ALT/AST categories displayed in the table.\n ALTAST_CAT = factor(\n case_when(\n PARAMCD %in% paramcd_tbili_alt & AVALC == \">3-5ULN\" ~ \"ALT >3 - <= 5xULN\",\n PARAMCD %in% paramcd_tbili_alt & AVALC == \">5-10ULN\" ~ \"ALT >5 - <= 10xULN\",\n PARAMCD %in% paramcd_tbili_alt & AVALC == \">10-20ULN\" ~ \"ALT >10 - <= 20xULN\",\n PARAMCD %in% paramcd_tbili_alt & AVALC == \">20ULN\" ~ \"ALT > 20xULN\",\n PARAMCD %in% paramcd_tbili_ast & AVALC == \">3-5ULN\" ~ \"AST >3 - <= 5xULN\",\n PARAMCD %in% paramcd_tbili_ast & AVALC == \">5-10ULN\" ~ \"AST >5 - <= 10xULN\",\n PARAMCD %in% paramcd_tbili_ast & AVALC == \">10-20ULN\" ~ \"AST >10 - <= 20xULN\",\n PARAMCD %in% paramcd_tbili_ast & AVALC == \">20ULN\" ~ \"AST > 20xULN\",\n TRUE ~ \"Criteria not met\"\n ),\n levels = c(\n \"ALT >3 - <= 5xULN\", \"ALT >5 - <= 10xULN\", \"ALT >10 - <= 20xULN\",\n \"20\" = \"ALT > 20xULN\",\n \"AST >3 - <= 5xULN\", \"AST >5 - <= 10xULN\", \"AST >10 - <= 20xULN\", \"AST > 20xULN\",\n \"Criteria not met\"\n )\n ),\n ALTAST_ind = factor(\n case_when(\n PARAMCD %in% paramcd_tbili_alt ~ \"ALT\",\n PARAMCD %in% paramcd_tbili_ast ~ \"AST\"\n ),\n levels = c(\"ALT\", \"AST\")\n )\n )\n\nmap <- data.frame(\n ALTAST_ind = c(rep(\"ALT\", 5), rep(\"AST\", 5)),\n ALTAST_CAT = c(\n \"ALT >3 - <= 5xULN\", \"ALT >5 - <= 10xULN\", \"ALT >10 - <= 20xULN\",\n \"20\" = \"ALT > 20xULN\", \"Criteria not met\",\n \"AST >3 - <= 5xULN\", \"AST >5 - <= 10xULN\", \"AST >10 - <= 20xULN\", \"AST > 20xULN\", \"Criteria not met\"\n ),\n stringsAsFactors = FALSE\n)\n\n\n\n\n\nCoderesult <- basic_table() %>%\n split_cols_by(\"ARM\") %>%\n split_cols_by(\"AVISIT\") %>%\n split_rows_by(\"TBILI_CAT\") %>%\n # below split helps us get the right denominator between ALT/AST but it can be hidden\n split_rows_by(\"ALTAST_ind\", split_fun = trim_levels_to_map(map), child_labels = \"hidden\") %>%\n count_occurrences(\n vars = \"ALTAST_CAT\",\n .stats = \"fraction\",\n denom = \"n\",\n drop = FALSE\n ) %>%\n append_topleft(\"Liver Laboratory Test Criterion\") %>%\n build_table(df = adhy_liver)\n\n# trim away rows with criteria not met\ncriteria_fun <- function(tr) {\n row_label <- obj_label(tr)\n ifelse(row_label == \"Criteria not met\", TRUE, FALSE)\n}\n\nresult <- result %>% trim_rows(criteria = criteria_fun)\nresult\n\n A: Drug X B: Placebo C: Combination \nLiver Laboratory Test Criterion BASELINE POST-BASELINE BASELINE POST-BASELINE BASELINE POST-BASELINE \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal Bilirubin <= 2xULN \n ALT >3 - <= 5xULN 23/134 (17.2%) 15/134 (11.2%) 25/134 (18.7%) 27/134 (20.1%) 27/132 (20.5%) 30/132 (22.7%)\n ALT >5 - <= 10xULN 28/134 (20.9%) 29/134 (21.6%) 29/134 (21.6%) 19/134 (14.2%) 36/132 (27.3%) 29/132 (22.0%)\n ALT >10 - <= 20xULN 24/134 (17.9%) 30/134 (22.4%) 32/134 (23.9%) 33/134 (24.6%) 28/132 (21.2%) 24/132 (18.2%)\n ALT > 20xULN 32/134 (23.9%) 35/134 (26.1%) 24/134 (17.9%) 23/134 (17.2%) 20/132 (15.2%) 26/132 (19.7%)\n AST >3 - <= 5xULN 31/134 (23.1%) 34/134 (25.4%) 30/134 (22.4%) 26/134 (19.4%) 34/132 (25.8%) 24/132 (18.2%)\n AST >5 - <= 10xULN 25/134 (18.7%) 25/134 (18.7%) 26/134 (19.4%) 26/134 (19.4%) 22/132 (16.7%) 27/132 (20.5%)\n AST >10 - <= 20xULN 22/134 (16.4%) 29/134 (21.6%) 16/134 (11.9%) 22/134 (16.4%) 34/132 (25.8%) 19/132 (14.4%)\n AST > 20xULN 20/134 (14.9%) 16/134 (11.9%) 28/134 (20.9%) 31/134 (23.1%) 21/132 (15.9%) 39/132 (29.5%)\nTotal Bilirubin > 2xULN \n ALT >3 - <= 5xULN 40/134 (29.9%) 28/134 (20.9%) 31/134 (23.1%) 28/134 (20.9%) 18/132 (13.6%) 32/132 (24.2%)\n ALT >5 - <= 10xULN 24/134 (17.9%) 29/134 (21.6%) 30/134 (22.4%) 37/134 (27.6%) 33/132 (25.0%) 24/132 (18.2%)\n ALT >10 - <= 20xULN 24/134 (17.9%) 22/134 (16.4%) 26/134 (19.4%) 18/134 (13.4%) 21/132 (15.9%) 30/132 (22.7%)\n ALT > 20xULN 19/134 (14.2%) 33/134 (24.6%) 23/134 (17.2%) 19/134 (14.2%) 30/132 (22.7%) 22/132 (16.7%)\n AST >3 - <= 5xULN 17/134 (12.7%) 27/134 (20.1%) 36/134 (26.9%) 25/134 (18.7%) 26/132 (19.7%) 34/132 (25.8%)\n AST >5 - <= 10xULN 25/134 (18.7%) 28/134 (20.9%) 24/134 (17.9%) 28/134 (20.9%) 20/132 (15.2%) 23/132 (17.4%)\n AST >10 - <= 20xULN 36/134 (26.9%) 28/134 (20.9%) 16/134 (11.9%) 26/134 (19.4%) 33/132 (25.0%) 26/132 (19.7%)\n AST > 20xULN 30/134 (22.4%) 21/134 (15.7%) 30/134 (22.4%) 24/134 (17.9%) 24/132 (18.2%) 25/132 (18.9%)\nTotal Bilirubin > 2xULN and Alkaline Phosphatase <= 2xULN \n ALT >3 - <= 5xULN 24/134 (17.9%) 22/134 (16.4%) 28/134 (20.9%) 23/134 (17.2%) 38/132 (28.8%) 23/132 (17.4%)\n ALT >5 - <= 10xULN 26/134 (19.4%) 25/134 (18.7%) 19/134 (14.2%) 22/134 (16.4%) 32/132 (24.2%) 32/132 (24.2%)\n ALT >10 - <= 20xULN 26/134 (19.4%) 30/134 (22.4%) 31/134 (23.1%) 30/134 (22.4%) 21/132 (15.9%) 27/132 (20.5%)\n ALT > 20xULN 30/134 (22.4%) 28/134 (20.9%) 24/134 (17.9%) 36/134 (26.9%) 20/132 (15.2%) 23/132 (17.4%)\n AST >3 - <= 5xULN 37/134 (27.6%) 25/134 (18.7%) 31/134 (23.1%) 26/134 (19.4%) 24/132 (18.2%) 36/132 (27.3%)\n AST >5 - <= 10xULN 25/134 (18.7%) 32/134 (23.9%) 29/134 (21.6%) 30/134 (22.4%) 26/132 (19.7%) 24/132 (18.2%)\n AST >10 - <= 20xULN 25/134 (18.7%) 31/134 (23.1%) 28/134 (20.9%) 22/134 (16.4%) 29/132 (22.0%) 23/132 (17.4%)\n AST > 20xULN 26/134 (19.4%) 25/134 (18.7%) 23/134 (17.2%) 30/134 (22.4%) 23/132 (17.4%) 24/132 (18.2%)\nTotal Bilirubin > 2xULN and Alkaline Phosphatase <= 5xULN \n ALT >3 - <= 5xULN 24/134 (17.9%) 21/134 (15.7%) 30/134 (22.4%) 17/134 (12.7%) 28/132 (21.2%) 31/132 (23.5%)\n ALT >5 - <= 10xULN 36/134 (26.9%) 28/134 (20.9%) 25/134 (18.7%) 27/134 (20.1%) 26/132 (19.7%) 29/132 (22.0%)\n ALT >10 - <= 20xULN 30/134 (22.4%) 21/134 (15.7%) 28/134 (20.9%) 36/134 (26.9%) 25/132 (18.9%) 24/132 (18.2%)\n ALT > 20xULN 14/134 (10.4%) 28/134 (20.9%) 25/134 (18.7%) 27/134 (20.1%) 31/132 (23.5%) 23/132 (17.4%)\n AST >3 - <= 5xULN 21/134 (15.7%) 26/134 (19.4%) 29/134 (21.6%) 31/134 (23.1%) 33/132 (25.0%) 19/132 (14.4%)\n AST >5 - <= 10xULN 29/134 (21.6%) 26/134 (19.4%) 24/134 (17.9%) 26/134 (19.4%) 23/132 (17.4%) 32/132 (24.2%)\n AST >10 - <= 20xULN 29/134 (21.6%) 31/134 (23.1%) 28/134 (20.9%) 22/134 (16.4%) 22/132 (16.7%) 21/132 (15.9%)\n AST > 20xULN 34/134 (25.4%) 21/134 (15.7%) 19/134 (14.2%) 28/134 (20.9%) 21/132 (15.9%) 33/132 (25.0%)\n\n\n\n\n\nCoderesult <- basic_table() %>%\n split_cols_by(\"ARM\") %>%\n split_cols_by(\"AVISIT\") %>%\n split_rows_by(\n \"TBILI_CAT\",\n split_fun = remove_split_levels(\"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 2xULN\")\n ) %>%\n # below split helps us get the right denominator between ALT/AST but it can be hidden\n split_rows_by(\n \"ALTAST_ind\",\n split_fun = trim_levels_to_map(map), child_labels = \"hidden\"\n ) %>%\n count_occurrences(\n vars = \"ALTAST_CAT\",\n .stats = \"fraction\",\n denom = \"n\",\n drop = FALSE\n ) %>%\n append_topleft(\"Liver Laboratory Test Criterion\") %>%\n build_table(df = adhy_liver)\n\n# trim away rows with criteria not met\ncriteria_fun <- function(tr) {\n row_label <- obj_label(tr)\n ifelse(row_label == \"Criteria not met\", TRUE, FALSE)\n}\n\nresult <- result %>% trim_rows(criteria = criteria_fun)\nresult\n\n A: Drug X B: Placebo C: Combination \nLiver Laboratory Test Criterion BASELINE POST-BASELINE BASELINE POST-BASELINE BASELINE POST-BASELINE \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal Bilirubin <= 2xULN \n ALT >3 - <= 5xULN 23/134 (17.2%) 15/134 (11.2%) 25/134 (18.7%) 27/134 (20.1%) 27/132 (20.5%) 30/132 (22.7%)\n ALT >5 - <= 10xULN 28/134 (20.9%) 29/134 (21.6%) 29/134 (21.6%) 19/134 (14.2%) 36/132 (27.3%) 29/132 (22.0%)\n ALT >10 - <= 20xULN 24/134 (17.9%) 30/134 (22.4%) 32/134 (23.9%) 33/134 (24.6%) 28/132 (21.2%) 24/132 (18.2%)\n ALT > 20xULN 32/134 (23.9%) 35/134 (26.1%) 24/134 (17.9%) 23/134 (17.2%) 20/132 (15.2%) 26/132 (19.7%)\n AST >3 - <= 5xULN 31/134 (23.1%) 34/134 (25.4%) 30/134 (22.4%) 26/134 (19.4%) 34/132 (25.8%) 24/132 (18.2%)\n AST >5 - <= 10xULN 25/134 (18.7%) 25/134 (18.7%) 26/134 (19.4%) 26/134 (19.4%) 22/132 (16.7%) 27/132 (20.5%)\n AST >10 - <= 20xULN 22/134 (16.4%) 29/134 (21.6%) 16/134 (11.9%) 22/134 (16.4%) 34/132 (25.8%) 19/132 (14.4%)\n AST > 20xULN 20/134 (14.9%) 16/134 (11.9%) 28/134 (20.9%) 31/134 (23.1%) 21/132 (15.9%) 39/132 (29.5%)\nTotal Bilirubin > 2xULN \n ALT >3 - <= 5xULN 40/134 (29.9%) 28/134 (20.9%) 31/134 (23.1%) 28/134 (20.9%) 18/132 (13.6%) 32/132 (24.2%)\n ALT >5 - <= 10xULN 24/134 (17.9%) 29/134 (21.6%) 30/134 (22.4%) 37/134 (27.6%) 33/132 (25.0%) 24/132 (18.2%)\n ALT >10 - <= 20xULN 24/134 (17.9%) 22/134 (16.4%) 26/134 (19.4%) 18/134 (13.4%) 21/132 (15.9%) 30/132 (22.7%)\n ALT > 20xULN 19/134 (14.2%) 33/134 (24.6%) 23/134 (17.2%) 19/134 (14.2%) 30/132 (22.7%) 22/132 (16.7%)\n AST >3 - <= 5xULN 17/134 (12.7%) 27/134 (20.1%) 36/134 (26.9%) 25/134 (18.7%) 26/132 (19.7%) 34/132 (25.8%)\n AST >5 - <= 10xULN 25/134 (18.7%) 28/134 (20.9%) 24/134 (17.9%) 28/134 (20.9%) 20/132 (15.2%) 23/132 (17.4%)\n AST >10 - <= 20xULN 36/134 (26.9%) 28/134 (20.9%) 16/134 (11.9%) 26/134 (19.4%) 33/132 (25.0%) 26/132 (19.7%)\n AST > 20xULN 30/134 (22.4%) 21/134 (15.7%) 30/134 (22.4%) 24/134 (17.9%) 24/132 (18.2%) 25/132 (18.9%)\nTotal Bilirubin > 2xULN and Alkaline Phosphatase <= 5xULN \n ALT >3 - <= 5xULN 24/134 (17.9%) 21/134 (15.7%) 30/134 (22.4%) 17/134 (12.7%) 28/132 (21.2%) 31/132 (23.5%)\n ALT >5 - <= 10xULN 36/134 (26.9%) 28/134 (20.9%) 25/134 (18.7%) 27/134 (20.1%) 26/132 (19.7%) 29/132 (22.0%)\n ALT >10 - <= 20xULN 30/134 (22.4%) 21/134 (15.7%) 28/134 (20.9%) 36/134 (26.9%) 25/132 (18.9%) 24/132 (18.2%)\n ALT > 20xULN 14/134 (10.4%) 28/134 (20.9%) 25/134 (18.7%) 27/134 (20.1%) 31/132 (23.5%) 23/132 (17.4%)\n AST >3 - <= 5xULN 21/134 (15.7%) 26/134 (19.4%) 29/134 (21.6%) 31/134 (23.1%) 33/132 (25.0%) 19/132 (14.4%)\n AST >5 - <= 10xULN 29/134 (21.6%) 26/134 (19.4%) 24/134 (17.9%) 26/134 (19.4%) 23/132 (17.4%) 32/132 (24.2%)\n AST >10 - <= 20xULN 29/134 (21.6%) 31/134 (23.1%) 28/134 (20.9%) 22/134 (16.4%) 22/132 (16.7%) 21/132 (15.9%)\n AST > 20xULN 34/134 (25.4%) 21/134 (15.7%) 19/134 (14.2%) 28/134 (20.9%) 21/132 (15.9%) 33/132 (25.0%)\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:52:50 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nTable Selecting Sections\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadhy <- synthetic_cdisc_dataset(\"latest\", \"adhy\")\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadhy_liver <- df_explicit_na(adhy)\n\n# Define values of interest in PARAMCD variable.\nparamcd_tbili_alt <- c(\"BLAL\", \"BGAL\", \"BA2AL\", \"BA5AL\")\nparamcd_tbili_ast <- c(\"BLAS\", \"BGAS\", \"BA2AS\", \"BA5AS\")\n\n# Select LBT09 parameters.\nadhy_liver <- adhy_liver %>%\n filter(\n SAFFL == \"Y\",\n AVISIT %in% c(\"BASELINE\", \"POST-BASELINE\"),\n PARAMCD %in% c(paramcd_tbili_alt, paramcd_tbili_ast)\n )\n\n# Let's be explicit about factor levels for AVISIT and PARAMCD.\nadhy_liver <- adhy_liver %>%\n mutate(\n AVISIT = factor(AVISIT, levels = c(\"BASELINE\", \"POST-BASELINE\")),\n PARAMCD = factor(PARAMCD, levels = c(paramcd_tbili_alt, paramcd_tbili_ast))\n )\n\n# Create indicator and category variables.\nadhy_liver <- adhy_liver %>%\n mutate(\n # Create TBILI_CAT categories variable - this is needed so we get the right nesting in the table.\n TBILI_CAT = factor(\n case_when(\n PARAMCD %in% c(paramcd_tbili_alt[1], paramcd_tbili_ast[1]) ~ \"Total Bilirubin <= 2xULN\",\n PARAMCD %in% c(paramcd_tbili_alt[2], paramcd_tbili_ast[2]) ~ \"Total Bilirubin > 2xULN\",\n PARAMCD %in% c(paramcd_tbili_alt[3], paramcd_tbili_ast[3]) ~\n \"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 2xULN\",\n PARAMCD %in% c(paramcd_tbili_alt[4], paramcd_tbili_ast[4]) ~\n \"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 5xULN\"\n ),\n levels = c(\n \"Total Bilirubin <= 2xULN\",\n \"Total Bilirubin > 2xULN\",\n \"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 2xULN\",\n \"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 5xULN\"\n )\n ),\n # Create ALTAST_CAT categories variable\n # this will be the labels for different ALT/AST categories displayed in the table.\n ALTAST_CAT = factor(\n case_when(\n PARAMCD %in% paramcd_tbili_alt & AVALC == \">3-5ULN\" ~ \"ALT >3 - <= 5xULN\",\n PARAMCD %in% paramcd_tbili_alt & AVALC == \">5-10ULN\" ~ \"ALT >5 - <= 10xULN\",\n PARAMCD %in% paramcd_tbili_alt & AVALC == \">10-20ULN\" ~ \"ALT >10 - <= 20xULN\",\n PARAMCD %in% paramcd_tbili_alt & AVALC == \">20ULN\" ~ \"ALT > 20xULN\",\n PARAMCD %in% paramcd_tbili_ast & AVALC == \">3-5ULN\" ~ \"AST >3 - <= 5xULN\",\n PARAMCD %in% paramcd_tbili_ast & AVALC == \">5-10ULN\" ~ \"AST >5 - <= 10xULN\",\n PARAMCD %in% paramcd_tbili_ast & AVALC == \">10-20ULN\" ~ \"AST >10 - <= 20xULN\",\n PARAMCD %in% paramcd_tbili_ast & AVALC == \">20ULN\" ~ \"AST > 20xULN\",\n TRUE ~ \"Criteria not met\"\n ),\n levels = c(\n \"ALT >3 - <= 5xULN\", \"ALT >5 - <= 10xULN\", \"ALT >10 - <= 20xULN\",\n \"20\" = \"ALT > 20xULN\",\n \"AST >3 - <= 5xULN\", \"AST >5 - <= 10xULN\", \"AST >10 - <= 20xULN\", \"AST > 20xULN\",\n \"Criteria not met\"\n )\n ),\n ALTAST_ind = factor(\n case_when(\n PARAMCD %in% paramcd_tbili_alt ~ \"ALT\",\n PARAMCD %in% paramcd_tbili_ast ~ \"AST\"\n ),\n levels = c(\"ALT\", \"AST\")\n )\n )\n\nmap <- data.frame(\n ALTAST_ind = c(rep(\"ALT\", 5), rep(\"AST\", 5)),\n ALTAST_CAT = c(\n \"ALT >3 - <= 5xULN\", \"ALT >5 - <= 10xULN\", \"ALT >10 - <= 20xULN\",\n \"20\" = \"ALT > 20xULN\", \"Criteria not met\",\n \"AST >3 - <= 5xULN\", \"AST >5 - <= 10xULN\", \"AST >10 - <= 20xULN\", \"AST > 20xULN\", \"Criteria not met\"\n ),\n stringsAsFactors = FALSE\n)\n\n\n\n\n\nCoderesult <- basic_table() %>%\n split_cols_by(\"ARM\") %>%\n split_cols_by(\"AVISIT\") %>%\n split_rows_by(\"TBILI_CAT\") %>%\n # below split helps us get the right denominator between ALT/AST but it can be hidden\n split_rows_by(\"ALTAST_ind\", split_fun = trim_levels_to_map(map), child_labels = \"hidden\") %>%\n count_occurrences(\n vars = \"ALTAST_CAT\",\n .stats = \"fraction\",\n denom = \"n\",\n drop = FALSE\n ) %>%\n append_topleft(\"Liver Laboratory Test Criterion\") %>%\n build_table(df = adhy_liver)\n\n# trim away rows with criteria not met\ncriteria_fun <- function(tr) {\n row_label <- obj_label(tr)\n ifelse(row_label == \"Criteria not met\", TRUE, FALSE)\n}\n\nresult <- result %>% trim_rows(criteria = criteria_fun)\nresult\n\n A: Drug X B: Placebo C: Combination \nLiver Laboratory Test Criterion BASELINE POST-BASELINE BASELINE POST-BASELINE BASELINE POST-BASELINE \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal Bilirubin <= 2xULN \n ALT >3 - <= 5xULN 23/134 (17.2%) 15/134 (11.2%) 25/134 (18.7%) 27/134 (20.1%) 27/132 (20.5%) 30/132 (22.7%)\n ALT >5 - <= 10xULN 28/134 (20.9%) 29/134 (21.6%) 29/134 (21.6%) 19/134 (14.2%) 36/132 (27.3%) 29/132 (22.0%)\n ALT >10 - <= 20xULN 24/134 (17.9%) 30/134 (22.4%) 32/134 (23.9%) 33/134 (24.6%) 28/132 (21.2%) 24/132 (18.2%)\n ALT > 20xULN 32/134 (23.9%) 35/134 (26.1%) 24/134 (17.9%) 23/134 (17.2%) 20/132 (15.2%) 26/132 (19.7%)\n AST >3 - <= 5xULN 31/134 (23.1%) 34/134 (25.4%) 30/134 (22.4%) 26/134 (19.4%) 34/132 (25.8%) 24/132 (18.2%)\n AST >5 - <= 10xULN 25/134 (18.7%) 25/134 (18.7%) 26/134 (19.4%) 26/134 (19.4%) 22/132 (16.7%) 27/132 (20.5%)\n AST >10 - <= 20xULN 22/134 (16.4%) 29/134 (21.6%) 16/134 (11.9%) 22/134 (16.4%) 34/132 (25.8%) 19/132 (14.4%)\n AST > 20xULN 20/134 (14.9%) 16/134 (11.9%) 28/134 (20.9%) 31/134 (23.1%) 21/132 (15.9%) 39/132 (29.5%)\nTotal Bilirubin > 2xULN \n ALT >3 - <= 5xULN 40/134 (29.9%) 28/134 (20.9%) 31/134 (23.1%) 28/134 (20.9%) 18/132 (13.6%) 32/132 (24.2%)\n ALT >5 - <= 10xULN 24/134 (17.9%) 29/134 (21.6%) 30/134 (22.4%) 37/134 (27.6%) 33/132 (25.0%) 24/132 (18.2%)\n ALT >10 - <= 20xULN 24/134 (17.9%) 22/134 (16.4%) 26/134 (19.4%) 18/134 (13.4%) 21/132 (15.9%) 30/132 (22.7%)\n ALT > 20xULN 19/134 (14.2%) 33/134 (24.6%) 23/134 (17.2%) 19/134 (14.2%) 30/132 (22.7%) 22/132 (16.7%)\n AST >3 - <= 5xULN 17/134 (12.7%) 27/134 (20.1%) 36/134 (26.9%) 25/134 (18.7%) 26/132 (19.7%) 34/132 (25.8%)\n AST >5 - <= 10xULN 25/134 (18.7%) 28/134 (20.9%) 24/134 (17.9%) 28/134 (20.9%) 20/132 (15.2%) 23/132 (17.4%)\n AST >10 - <= 20xULN 36/134 (26.9%) 28/134 (20.9%) 16/134 (11.9%) 26/134 (19.4%) 33/132 (25.0%) 26/132 (19.7%)\n AST > 20xULN 30/134 (22.4%) 21/134 (15.7%) 30/134 (22.4%) 24/134 (17.9%) 24/132 (18.2%) 25/132 (18.9%)\nTotal Bilirubin > 2xULN and Alkaline Phosphatase <= 2xULN \n ALT >3 - <= 5xULN 24/134 (17.9%) 22/134 (16.4%) 28/134 (20.9%) 23/134 (17.2%) 38/132 (28.8%) 23/132 (17.4%)\n ALT >5 - <= 10xULN 26/134 (19.4%) 25/134 (18.7%) 19/134 (14.2%) 22/134 (16.4%) 32/132 (24.2%) 32/132 (24.2%)\n ALT >10 - <= 20xULN 26/134 (19.4%) 30/134 (22.4%) 31/134 (23.1%) 30/134 (22.4%) 21/132 (15.9%) 27/132 (20.5%)\n ALT > 20xULN 30/134 (22.4%) 28/134 (20.9%) 24/134 (17.9%) 36/134 (26.9%) 20/132 (15.2%) 23/132 (17.4%)\n AST >3 - <= 5xULN 37/134 (27.6%) 25/134 (18.7%) 31/134 (23.1%) 26/134 (19.4%) 24/132 (18.2%) 36/132 (27.3%)\n AST >5 - <= 10xULN 25/134 (18.7%) 32/134 (23.9%) 29/134 (21.6%) 30/134 (22.4%) 26/132 (19.7%) 24/132 (18.2%)\n AST >10 - <= 20xULN 25/134 (18.7%) 31/134 (23.1%) 28/134 (20.9%) 22/134 (16.4%) 29/132 (22.0%) 23/132 (17.4%)\n AST > 20xULN 26/134 (19.4%) 25/134 (18.7%) 23/134 (17.2%) 30/134 (22.4%) 23/132 (17.4%) 24/132 (18.2%)\nTotal Bilirubin > 2xULN and Alkaline Phosphatase <= 5xULN \n ALT >3 - <= 5xULN 24/134 (17.9%) 21/134 (15.7%) 30/134 (22.4%) 17/134 (12.7%) 28/132 (21.2%) 31/132 (23.5%)\n ALT >5 - <= 10xULN 36/134 (26.9%) 28/134 (20.9%) 25/134 (18.7%) 27/134 (20.1%) 26/132 (19.7%) 29/132 (22.0%)\n ALT >10 - <= 20xULN 30/134 (22.4%) 21/134 (15.7%) 28/134 (20.9%) 36/134 (26.9%) 25/132 (18.9%) 24/132 (18.2%)\n ALT > 20xULN 14/134 (10.4%) 28/134 (20.9%) 25/134 (18.7%) 27/134 (20.1%) 31/132 (23.5%) 23/132 (17.4%)\n AST >3 - <= 5xULN 21/134 (15.7%) 26/134 (19.4%) 29/134 (21.6%) 31/134 (23.1%) 33/132 (25.0%) 19/132 (14.4%)\n AST >5 - <= 10xULN 29/134 (21.6%) 26/134 (19.4%) 24/134 (17.9%) 26/134 (19.4%) 23/132 (17.4%) 32/132 (24.2%)\n AST >10 - <= 20xULN 29/134 (21.6%) 31/134 (23.1%) 28/134 (20.9%) 22/134 (16.4%) 22/132 (16.7%) 21/132 (15.9%)\n AST > 20xULN 34/134 (25.4%) 21/134 (15.7%) 19/134 (14.2%) 28/134 (20.9%) 21/132 (15.9%) 33/132 (25.0%)\n\n\n\n\n\nCoderesult <- basic_table() %>%\n split_cols_by(\"ARM\") %>%\n split_cols_by(\"AVISIT\") %>%\n split_rows_by(\n \"TBILI_CAT\",\n split_fun = remove_split_levels(\"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 2xULN\")\n ) %>%\n # below split helps us get the right denominator between ALT/AST but it can be hidden\n split_rows_by(\n \"ALTAST_ind\",\n split_fun = trim_levels_to_map(map), child_labels = \"hidden\"\n ) %>%\n count_occurrences(\n vars = \"ALTAST_CAT\",\n .stats = \"fraction\",\n denom = \"n\",\n drop = FALSE\n ) %>%\n append_topleft(\"Liver Laboratory Test Criterion\") %>%\n build_table(df = adhy_liver)\n\n# trim away rows with criteria not met\ncriteria_fun <- function(tr) {\n row_label <- obj_label(tr)\n ifelse(row_label == \"Criteria not met\", TRUE, FALSE)\n}\n\nresult <- result %>% trim_rows(criteria = criteria_fun)\nresult\n\n A: Drug X B: Placebo C: Combination \nLiver Laboratory Test Criterion BASELINE POST-BASELINE BASELINE POST-BASELINE BASELINE POST-BASELINE \n———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————\nTotal Bilirubin <= 2xULN \n ALT >3 - <= 5xULN 23/134 (17.2%) 15/134 (11.2%) 25/134 (18.7%) 27/134 (20.1%) 27/132 (20.5%) 30/132 (22.7%)\n ALT >5 - <= 10xULN 28/134 (20.9%) 29/134 (21.6%) 29/134 (21.6%) 19/134 (14.2%) 36/132 (27.3%) 29/132 (22.0%)\n ALT >10 - <= 20xULN 24/134 (17.9%) 30/134 (22.4%) 32/134 (23.9%) 33/134 (24.6%) 28/132 (21.2%) 24/132 (18.2%)\n ALT > 20xULN 32/134 (23.9%) 35/134 (26.1%) 24/134 (17.9%) 23/134 (17.2%) 20/132 (15.2%) 26/132 (19.7%)\n AST >3 - <= 5xULN 31/134 (23.1%) 34/134 (25.4%) 30/134 (22.4%) 26/134 (19.4%) 34/132 (25.8%) 24/132 (18.2%)\n AST >5 - <= 10xULN 25/134 (18.7%) 25/134 (18.7%) 26/134 (19.4%) 26/134 (19.4%) 22/132 (16.7%) 27/132 (20.5%)\n AST >10 - <= 20xULN 22/134 (16.4%) 29/134 (21.6%) 16/134 (11.9%) 22/134 (16.4%) 34/132 (25.8%) 19/132 (14.4%)\n AST > 20xULN 20/134 (14.9%) 16/134 (11.9%) 28/134 (20.9%) 31/134 (23.1%) 21/132 (15.9%) 39/132 (29.5%)\nTotal Bilirubin > 2xULN \n ALT >3 - <= 5xULN 40/134 (29.9%) 28/134 (20.9%) 31/134 (23.1%) 28/134 (20.9%) 18/132 (13.6%) 32/132 (24.2%)\n ALT >5 - <= 10xULN 24/134 (17.9%) 29/134 (21.6%) 30/134 (22.4%) 37/134 (27.6%) 33/132 (25.0%) 24/132 (18.2%)\n ALT >10 - <= 20xULN 24/134 (17.9%) 22/134 (16.4%) 26/134 (19.4%) 18/134 (13.4%) 21/132 (15.9%) 30/132 (22.7%)\n ALT > 20xULN 19/134 (14.2%) 33/134 (24.6%) 23/134 (17.2%) 19/134 (14.2%) 30/132 (22.7%) 22/132 (16.7%)\n AST >3 - <= 5xULN 17/134 (12.7%) 27/134 (20.1%) 36/134 (26.9%) 25/134 (18.7%) 26/132 (19.7%) 34/132 (25.8%)\n AST >5 - <= 10xULN 25/134 (18.7%) 28/134 (20.9%) 24/134 (17.9%) 28/134 (20.9%) 20/132 (15.2%) 23/132 (17.4%)\n AST >10 - <= 20xULN 36/134 (26.9%) 28/134 (20.9%) 16/134 (11.9%) 26/134 (19.4%) 33/132 (25.0%) 26/132 (19.7%)\n AST > 20xULN 30/134 (22.4%) 21/134 (15.7%) 30/134 (22.4%) 24/134 (17.9%) 24/132 (18.2%) 25/132 (18.9%)\nTotal Bilirubin > 2xULN and Alkaline Phosphatase <= 5xULN \n ALT >3 - <= 5xULN 24/134 (17.9%) 21/134 (15.7%) 30/134 (22.4%) 17/134 (12.7%) 28/132 (21.2%) 31/132 (23.5%)\n ALT >5 - <= 10xULN 36/134 (26.9%) 28/134 (20.9%) 25/134 (18.7%) 27/134 (20.1%) 26/132 (19.7%) 29/132 (22.0%)\n ALT >10 - <= 20xULN 30/134 (22.4%) 21/134 (15.7%) 28/134 (20.9%) 36/134 (26.9%) 25/132 (18.9%) 24/132 (18.2%)\n ALT > 20xULN 14/134 (10.4%) 28/134 (20.9%) 25/134 (18.7%) 27/134 (20.1%) 31/132 (23.5%) 23/132 (17.4%)\n AST >3 - <= 5xULN 21/134 (15.7%) 26/134 (19.4%) 29/134 (21.6%) 31/134 (23.1%) 33/132 (25.0%) 19/132 (14.4%)\n AST >5 - <= 10xULN 29/134 (21.6%) 26/134 (19.4%) 24/134 (17.9%) 26/134 (19.4%) 23/132 (17.4%) 32/132 (24.2%)\n AST >10 - <= 20xULN 29/134 (21.6%) 31/134 (23.1%) 28/134 (20.9%) 22/134 (16.4%) 22/132 (16.7%) 21/132 (15.9%)\n AST > 20xULN 34/134 (25.4%) 21/134 (15.7%) 19/134 (14.2%) 28/134 (20.9%) 21/132 (15.9%) 33/132 (25.0%)\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:53:59 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -1595,7 +1595,7 @@ "href": "tables/lab-results/lbt06.html", "title": "LBT06", "section": "", - "text": "Data Setup\nStandard Table for Single Lab Test\nStandard Table for Multiple Lab Tests\nteal App\nReproducibility\n\n\n\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# Please note that df_explict_na has a na_level argument defaulting to \"<Missing>\",\n# Please don't change the na_level to anything other than NA, empty string or the default \"<Missing>\".\n\nadlb_f <- adlb %>%\n dplyr::filter(ABLFL != \"Y\") %>%\n dplyr::filter(!(AVISIT %in% c(\"SCREENING\", \"BASELINE\"))) %>%\n dplyr::mutate(AVISIT = droplevels(AVISIT)) %>%\n var_relabel(AVISIT = \"Visit\")\n\nadlb_f_crp <- adlb_f %>% dplyr::filter(PARAMCD == \"CRP\")\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 split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adlb_f_crp$AVISIT)) %>%\n count_abnormal_by_baseline(\n \"ANRIND\",\n abnormal = c(Low = \"LOW\", High = \"HIGH\"),\n .indent_mods = 4L\n ) %>%\n append_varlabels(adlb_f_crp, \"ANRIND\", indent = 1L) %>%\n append_topleft(\" Baseline Status\")\n\nresult <- build_table(\n lyt = lyt,\n df = adlb_f_crp,\n alt_counts_df = adsl\n) %>%\n trim_rows()\n\nresult\n\nVisit \n Analysis Reference Range Indicator A: Drug X B: Placebo C: Combination\n Baseline Status (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————\nWEEK 1 DAY 8 \n Low \n Not low 16/119 (13.4%) 22/113 (19.5%) 24/112 (21.4%)\n Low 2/15 (13.3%) 2/21 (9.5%) 7/20 (35%) \n Total 18/134 (13.4%) 24/134 (17.9%) 31/132 (23.5%)\n High \n Not high 21/114 (18.4%) 20/112 (17.9%) 17/115 (14.8%)\n High 2/20 (10%) 4/22 (18.2%) 3/17 (17.6%) \n Total 23/134 (17.2%) 24/134 (17.9%) 20/132 (15.2%)\nWEEK 2 DAY 15 \n Low \n Not low 26/119 (21.8%) 20/113 (17.7%) 12/112 (10.7%)\n Low 2/15 (13.3%) 3/21 (14.3%) 4/20 (20%) \n Total 28/134 (20.9%) 23/134 (17.2%) 16/132 (12.1%)\n High \n Not high 15/114 (13.2%) 17/112 (15.2%) 15/115 (13%) \n High 2/20 (10%) 4/22 (18.2%) 4/17 (23.5%) \n Total 17/134 (12.7%) 21/134 (15.7%) 19/132 (14.4%)\nWEEK 3 DAY 22 \n Low \n Not low 15/119 (12.6%) 21/113 (18.6%) 18/112 (16.1%)\n Low 0/15 3/21 (14.3%) 0/20 \n Total 15/134 (11.2%) 24/134 (17.9%) 18/132 (13.6%)\n High \n Not high 22/114 (19.3%) 18/112 (16.1%) 17/115 (14.8%)\n High 2/20 (10%) 5/22 (22.7%) 1/17 (5.9%) \n Total 24/134 (17.9%) 23/134 (17.2%) 18/132 (13.6%)\nWEEK 4 DAY 29 \n Low \n Not low 30/119 (25.2%) 13/113 (11.5%) 16/112 (14.3%)\n Low 3/15 (20%) 2/21 (9.5%) 5/20 (25%) \n Total 33/134 (24.6%) 15/134 (11.2%) 21/132 (15.9%)\n High \n Not high 17/114 (14.9%) 11/112 (9.8%) 16/115 (13.9%)\n High 2/20 (10%) 6/22 (27.3%) 3/17 (17.6%) \n Total 19/134 (14.2%) 17/134 (12.7%) 19/132 (14.4%)\nWEEK 5 DAY 36 \n Low \n Not low 17/119 (14.3%) 19/113 (16.8%) 16/112 (14.3%)\n Low 2/15 (13.3%) 3/21 (14.3%) 5/20 (25%) \n Total 19/134 (14.2%) 22/134 (16.4%) 21/132 (15.9%)\n High \n Not high 19/114 (16.7%) 17/112 (15.2%) 11/115 (9.6%) \n High 4/20 (20%) 6/22 (27.3%) 2/17 (11.8%) \n Total 23/134 (17.2%) 23/134 (17.2%) 13/132 (9.8%) \n\n\n\n\n\nCode# The following code generates one large table for multiple lab tests.\n# If separate tables are needed for each lab test per GDSR standard, use the code for \"single lab test\".\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\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 count_abnormal_by_baseline(\n \"ANRIND\",\n abnormal = c(Low = \"LOW\", High = \"HIGH\"),\n .indent_mods = 4L\n ) %>%\n append_varlabels(adlb_f, \"ANRIND\", indent = 2L) %>%\n append_topleft(\" Baseline Status\")\n\nresult <- build_table(\n lyt = lyt,\n df = adlb_f,\n alt_counts_df = adsl\n) %>%\n trim_rows()\n\nresult\n\nParameter \n Visit \n Analysis Reference Range Indicator A: Drug X B: Placebo C: Combination\n Baseline Status (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement \n WEEK 1 DAY 8 \n Low \n Not low 19/113 (16.8%) 13/117 (11.1%) 14/123 (11.4%)\n Low 2/21 (9.5%) 1/17 (5.9%) 1/9 (11.1%) \n Total 21/134 (15.7%) 14/134 (10.4%) 15/132 (11.4%)\n High \n Not high 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n WEEK 2 DAY 15 \n Low \n Not low 17/113 (15%) 13/117 (11.1%) 13/123 (10.6%)\n Low 2/21 (9.5%) 2/17 (11.8%) 4/9 (44.4%) \n Total 19/134 (14.2%) 15/134 (11.2%) 17/132 (12.9%)\n High \n Not high 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n WEEK 3 DAY 22 \n Low \n Not low 10/113 (8.8%) 20/117 (17.1%) 21/123 (17.1%)\n Low 4/21 (19%) 4/17 (23.5%) 2/9 (22.2%) \n Total 14/134 (10.4%) 24/134 (17.9%) 23/132 (17.4%)\n High \n Not high 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n WEEK 4 DAY 29 \n Low \n Not low 15/113 (13.3%) 19/117 (16.2%) 18/123 (14.6%)\n Low 2/21 (9.5%) 3/17 (17.6%) 1/9 (11.1%) \n Total 17/134 (12.7%) 22/134 (16.4%) 19/132 (14.4%)\n High \n Not high 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n WEEK 5 DAY 36 \n Low \n Not low 17/113 (15%) 23/117 (19.7%) 18/123 (14.6%)\n Low 0/21 1/17 (5.9%) 1/9 (11.1%) \n Total 17/134 (12.7%) 24/134 (17.9%) 19/132 (14.4%)\n High \n Not high 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \nC-Reactive Protein Measurement \n WEEK 1 DAY 8 \n Low \n Not low 16/119 (13.4%) 22/113 (19.5%) 24/112 (21.4%)\n Low 2/15 (13.3%) 2/21 (9.5%) 7/20 (35%) \n Total 18/134 (13.4%) 24/134 (17.9%) 31/132 (23.5%)\n High \n Not high 21/114 (18.4%) 20/112 (17.9%) 17/115 (14.8%)\n High 2/20 (10%) 4/22 (18.2%) 3/17 (17.6%) \n Total 23/134 (17.2%) 24/134 (17.9%) 20/132 (15.2%)\n WEEK 2 DAY 15 \n Low \n Not low 26/119 (21.8%) 20/113 (17.7%) 12/112 (10.7%)\n Low 2/15 (13.3%) 3/21 (14.3%) 4/20 (20%) \n Total 28/134 (20.9%) 23/134 (17.2%) 16/132 (12.1%)\n High \n Not high 15/114 (13.2%) 17/112 (15.2%) 15/115 (13%) \n High 2/20 (10%) 4/22 (18.2%) 4/17 (23.5%) \n Total 17/134 (12.7%) 21/134 (15.7%) 19/132 (14.4%)\n WEEK 3 DAY 22 \n Low \n Not low 15/119 (12.6%) 21/113 (18.6%) 18/112 (16.1%)\n Low 0/15 3/21 (14.3%) 0/20 \n Total 15/134 (11.2%) 24/134 (17.9%) 18/132 (13.6%)\n High \n Not high 22/114 (19.3%) 18/112 (16.1%) 17/115 (14.8%)\n High 2/20 (10%) 5/22 (22.7%) 1/17 (5.9%) \n Total 24/134 (17.9%) 23/134 (17.2%) 18/132 (13.6%)\n WEEK 4 DAY 29 \n Low \n Not low 30/119 (25.2%) 13/113 (11.5%) 16/112 (14.3%)\n Low 3/15 (20%) 2/21 (9.5%) 5/20 (25%) \n Total 33/134 (24.6%) 15/134 (11.2%) 21/132 (15.9%)\n High \n Not high 17/114 (14.9%) 11/112 (9.8%) 16/115 (13.9%)\n High 2/20 (10%) 6/22 (27.3%) 3/17 (17.6%) \n Total 19/134 (14.2%) 17/134 (12.7%) 19/132 (14.4%)\n WEEK 5 DAY 36 \n Low \n Not low 17/119 (14.3%) 19/113 (16.8%) 16/112 (14.3%)\n Low 2/15 (13.3%) 3/21 (14.3%) 5/20 (25%) \n Total 19/134 (14.2%) 22/134 (16.4%) 21/132 (15.9%)\n High \n Not high 19/114 (16.7%) 17/112 (15.2%) 11/115 (9.6%) \n High 4/20 (20%) 6/22 (27.3%) 2/17 (11.8%) \n Total 23/134 (17.2%) 23/134 (17.2%) 13/132 (9.8%) \nImmunoglobulin A Measurement \n WEEK 1 DAY 8 \n Low \n Not low 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n High \n Not high 18/119 (15.1%) 20/116 (17.2%) 14/113 (12.4%)\n High 1/15 (6.7%) 5/18 (27.8%) 4/19 (21.1%) \n Total 19/134 (14.2%) 25/134 (18.7%) 18/132 (13.6%)\n WEEK 2 DAY 15 \n Low \n Not low 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n High \n Not high 16/119 (13.4%) 13/116 (11.2%) 12/113 (10.6%)\n High 1/15 (6.7%) 1/18 (5.6%) 2/19 (10.5%) \n Total 17/134 (12.7%) 14/134 (10.4%) 14/132 (10.6%)\n WEEK 3 DAY 22 \n Low \n Not low 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n High \n Not high 17/119 (14.3%) 15/116 (12.9%) 21/113 (18.6%)\n High 0/15 1/18 (5.6%) 1/19 (5.3%) \n Total 17/134 (12.7%) 16/134 (11.9%) 22/132 (16.7%)\n WEEK 4 DAY 29 \n Low \n Not low 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n High \n Not high 19/119 (16%) 16/116 (13.8%) 19/113 (16.8%)\n High 4/15 (26.7%) 5/18 (27.8%) 3/19 (15.8%) \n Total 23/134 (17.2%) 21/134 (15.7%) 22/132 (16.7%)\n WEEK 5 DAY 36 \n Low \n Not low 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n High \n Not high 16/119 (13.4%) 21/116 (18.1%) 20/113 (17.7%)\n High 1/15 (6.7%) 3/18 (16.7%) 0/19 \n Total 17/134 (12.7%) 24/134 (17.9%) 20/132 (15.2%)\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:53:04 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 tern_0.9.3.9031 rtables_0.6.6.9011 \n[4] magrittr_2.0.3 formatters_0.5.5.9020 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table for Single Lab Test\nStandard Table for Multiple Lab Tests\nteal App\nReproducibility\n\n\n\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# Please note that df_explict_na has a na_level argument defaulting to \"<Missing>\",\n# Please don't change the na_level to anything other than NA, empty string or the default \"<Missing>\".\n\nadlb_f <- adlb %>%\n dplyr::filter(ABLFL != \"Y\") %>%\n dplyr::filter(!(AVISIT %in% c(\"SCREENING\", \"BASELINE\"))) %>%\n dplyr::mutate(AVISIT = droplevels(AVISIT)) %>%\n var_relabel(AVISIT = \"Visit\")\n\nadlb_f_crp <- adlb_f %>% dplyr::filter(PARAMCD == \"CRP\")\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 split_rows_by(\"AVISIT\", split_fun = split_fun, label_pos = \"topleft\", split_label = obj_label(adlb_f_crp$AVISIT)) %>%\n count_abnormal_by_baseline(\n \"ANRIND\",\n abnormal = c(Low = \"LOW\", High = \"HIGH\"),\n .indent_mods = 4L\n ) %>%\n append_varlabels(adlb_f_crp, \"ANRIND\", indent = 1L) %>%\n append_topleft(\" Baseline Status\")\n\nresult <- build_table(\n lyt = lyt,\n df = adlb_f_crp,\n alt_counts_df = adsl\n) %>%\n trim_rows()\n\nresult\n\nVisit \n Analysis Reference Range Indicator A: Drug X B: Placebo C: Combination\n Baseline Status (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————————————————\nWEEK 1 DAY 8 \n Low \n Not low 16/119 (13.4%) 22/113 (19.5%) 24/112 (21.4%)\n Low 2/15 (13.3%) 2/21 (9.5%) 7/20 (35%) \n Total 18/134 (13.4%) 24/134 (17.9%) 31/132 (23.5%)\n High \n Not high 21/114 (18.4%) 20/112 (17.9%) 17/115 (14.8%)\n High 2/20 (10%) 4/22 (18.2%) 3/17 (17.6%) \n Total 23/134 (17.2%) 24/134 (17.9%) 20/132 (15.2%)\nWEEK 2 DAY 15 \n Low \n Not low 26/119 (21.8%) 20/113 (17.7%) 12/112 (10.7%)\n Low 2/15 (13.3%) 3/21 (14.3%) 4/20 (20%) \n Total 28/134 (20.9%) 23/134 (17.2%) 16/132 (12.1%)\n High \n Not high 15/114 (13.2%) 17/112 (15.2%) 15/115 (13%) \n High 2/20 (10%) 4/22 (18.2%) 4/17 (23.5%) \n Total 17/134 (12.7%) 21/134 (15.7%) 19/132 (14.4%)\nWEEK 3 DAY 22 \n Low \n Not low 15/119 (12.6%) 21/113 (18.6%) 18/112 (16.1%)\n Low 0/15 3/21 (14.3%) 0/20 \n Total 15/134 (11.2%) 24/134 (17.9%) 18/132 (13.6%)\n High \n Not high 22/114 (19.3%) 18/112 (16.1%) 17/115 (14.8%)\n High 2/20 (10%) 5/22 (22.7%) 1/17 (5.9%) \n Total 24/134 (17.9%) 23/134 (17.2%) 18/132 (13.6%)\nWEEK 4 DAY 29 \n Low \n Not low 30/119 (25.2%) 13/113 (11.5%) 16/112 (14.3%)\n Low 3/15 (20%) 2/21 (9.5%) 5/20 (25%) \n Total 33/134 (24.6%) 15/134 (11.2%) 21/132 (15.9%)\n High \n Not high 17/114 (14.9%) 11/112 (9.8%) 16/115 (13.9%)\n High 2/20 (10%) 6/22 (27.3%) 3/17 (17.6%) \n Total 19/134 (14.2%) 17/134 (12.7%) 19/132 (14.4%)\nWEEK 5 DAY 36 \n Low \n Not low 17/119 (14.3%) 19/113 (16.8%) 16/112 (14.3%)\n Low 2/15 (13.3%) 3/21 (14.3%) 5/20 (25%) \n Total 19/134 (14.2%) 22/134 (16.4%) 21/132 (15.9%)\n High \n Not high 19/114 (16.7%) 17/112 (15.2%) 11/115 (9.6%) \n High 4/20 (20%) 6/22 (27.3%) 2/17 (11.8%) \n Total 23/134 (17.2%) 23/134 (17.2%) 13/132 (9.8%) \n\n\n\n\n\nCode# The following code generates one large table for multiple lab tests.\n# If separate tables are needed for each lab test per GDSR standard, use the code for \"single lab test\".\n\nlyt <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ARM\") %>%\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 count_abnormal_by_baseline(\n \"ANRIND\",\n abnormal = c(Low = \"LOW\", High = \"HIGH\"),\n .indent_mods = 4L\n ) %>%\n append_varlabels(adlb_f, \"ANRIND\", indent = 2L) %>%\n append_topleft(\" Baseline Status\")\n\nresult <- build_table(\n lyt = lyt,\n df = adlb_f,\n alt_counts_df = adsl\n) %>%\n trim_rows()\n\nresult\n\nParameter \n Visit \n Analysis Reference Range Indicator A: Drug X B: Placebo C: Combination\n Baseline Status (N=134) (N=134) (N=132) \n—————————————————————————————————————————————————————————————————————————————————————————\nAlanine Aminotransferase Measurement \n WEEK 1 DAY 8 \n Low \n Not low 19/113 (16.8%) 13/117 (11.1%) 14/123 (11.4%)\n Low 2/21 (9.5%) 1/17 (5.9%) 1/9 (11.1%) \n Total 21/134 (15.7%) 14/134 (10.4%) 15/132 (11.4%)\n High \n Not high 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n WEEK 2 DAY 15 \n Low \n Not low 17/113 (15%) 13/117 (11.1%) 13/123 (10.6%)\n Low 2/21 (9.5%) 2/17 (11.8%) 4/9 (44.4%) \n Total 19/134 (14.2%) 15/134 (11.2%) 17/132 (12.9%)\n High \n Not high 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n WEEK 3 DAY 22 \n Low \n Not low 10/113 (8.8%) 20/117 (17.1%) 21/123 (17.1%)\n Low 4/21 (19%) 4/17 (23.5%) 2/9 (22.2%) \n Total 14/134 (10.4%) 24/134 (17.9%) 23/132 (17.4%)\n High \n Not high 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n WEEK 4 DAY 29 \n Low \n Not low 15/113 (13.3%) 19/117 (16.2%) 18/123 (14.6%)\n Low 2/21 (9.5%) 3/17 (17.6%) 1/9 (11.1%) \n Total 17/134 (12.7%) 22/134 (16.4%) 19/132 (14.4%)\n High \n Not high 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n WEEK 5 DAY 36 \n Low \n Not low 17/113 (15%) 23/117 (19.7%) 18/123 (14.6%)\n Low 0/21 1/17 (5.9%) 1/9 (11.1%) \n Total 17/134 (12.7%) 24/134 (17.9%) 19/132 (14.4%)\n High \n Not high 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \nC-Reactive Protein Measurement \n WEEK 1 DAY 8 \n Low \n Not low 16/119 (13.4%) 22/113 (19.5%) 24/112 (21.4%)\n Low 2/15 (13.3%) 2/21 (9.5%) 7/20 (35%) \n Total 18/134 (13.4%) 24/134 (17.9%) 31/132 (23.5%)\n High \n Not high 21/114 (18.4%) 20/112 (17.9%) 17/115 (14.8%)\n High 2/20 (10%) 4/22 (18.2%) 3/17 (17.6%) \n Total 23/134 (17.2%) 24/134 (17.9%) 20/132 (15.2%)\n WEEK 2 DAY 15 \n Low \n Not low 26/119 (21.8%) 20/113 (17.7%) 12/112 (10.7%)\n Low 2/15 (13.3%) 3/21 (14.3%) 4/20 (20%) \n Total 28/134 (20.9%) 23/134 (17.2%) 16/132 (12.1%)\n High \n Not high 15/114 (13.2%) 17/112 (15.2%) 15/115 (13%) \n High 2/20 (10%) 4/22 (18.2%) 4/17 (23.5%) \n Total 17/134 (12.7%) 21/134 (15.7%) 19/132 (14.4%)\n WEEK 3 DAY 22 \n Low \n Not low 15/119 (12.6%) 21/113 (18.6%) 18/112 (16.1%)\n Low 0/15 3/21 (14.3%) 0/20 \n Total 15/134 (11.2%) 24/134 (17.9%) 18/132 (13.6%)\n High \n Not high 22/114 (19.3%) 18/112 (16.1%) 17/115 (14.8%)\n High 2/20 (10%) 5/22 (22.7%) 1/17 (5.9%) \n Total 24/134 (17.9%) 23/134 (17.2%) 18/132 (13.6%)\n WEEK 4 DAY 29 \n Low \n Not low 30/119 (25.2%) 13/113 (11.5%) 16/112 (14.3%)\n Low 3/15 (20%) 2/21 (9.5%) 5/20 (25%) \n Total 33/134 (24.6%) 15/134 (11.2%) 21/132 (15.9%)\n High \n Not high 17/114 (14.9%) 11/112 (9.8%) 16/115 (13.9%)\n High 2/20 (10%) 6/22 (27.3%) 3/17 (17.6%) \n Total 19/134 (14.2%) 17/134 (12.7%) 19/132 (14.4%)\n WEEK 5 DAY 36 \n Low \n Not low 17/119 (14.3%) 19/113 (16.8%) 16/112 (14.3%)\n Low 2/15 (13.3%) 3/21 (14.3%) 5/20 (25%) \n Total 19/134 (14.2%) 22/134 (16.4%) 21/132 (15.9%)\n High \n Not high 19/114 (16.7%) 17/112 (15.2%) 11/115 (9.6%) \n High 4/20 (20%) 6/22 (27.3%) 2/17 (11.8%) \n Total 23/134 (17.2%) 23/134 (17.2%) 13/132 (9.8%) \nImmunoglobulin A Measurement \n WEEK 1 DAY 8 \n Low \n Not low 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n High \n Not high 18/119 (15.1%) 20/116 (17.2%) 14/113 (12.4%)\n High 1/15 (6.7%) 5/18 (27.8%) 4/19 (21.1%) \n Total 19/134 (14.2%) 25/134 (18.7%) 18/132 (13.6%)\n WEEK 2 DAY 15 \n Low \n Not low 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n High \n Not high 16/119 (13.4%) 13/116 (11.2%) 12/113 (10.6%)\n High 1/15 (6.7%) 1/18 (5.6%) 2/19 (10.5%) \n Total 17/134 (12.7%) 14/134 (10.4%) 14/132 (10.6%)\n WEEK 3 DAY 22 \n Low \n Not low 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n High \n Not high 17/119 (14.3%) 15/116 (12.9%) 21/113 (18.6%)\n High 0/15 1/18 (5.6%) 1/19 (5.3%) \n Total 17/134 (12.7%) 16/134 (11.9%) 22/132 (16.7%)\n WEEK 4 DAY 29 \n Low \n Not low 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n High \n Not high 19/119 (16%) 16/116 (13.8%) 19/113 (16.8%)\n High 4/15 (26.7%) 5/18 (27.8%) 3/19 (15.8%) \n Total 23/134 (17.2%) 21/134 (15.7%) 22/132 (16.7%)\n WEEK 5 DAY 36 \n Low \n Not low 0/134 0/134 0/132 \n Total 0/134 0/134 0/132 \n High \n Not high 16/119 (13.4%) 21/116 (18.1%) 20/113 (17.7%)\n High 1/15 (6.7%) 3/18 (16.7%) 0/19 \n Total 17/134 (12.7%) 24/134 (17.9%) 20/132 (15.2%)\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:54:13 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 tern_0.9.3.9031 rtables_0.6.6.9011 \n[4] magrittr_2.0.3 formatters_0.5.5.9021 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -1607,7 +1607,7 @@ "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 App\nReproducibility\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 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 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 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 Missing 0 0 0 \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 Missing 0 0 0 \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 3 0 0 0 \n 4 0 0 1 (0.8%) \n Missing 0 0 0 \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 Missing 0 0 0 \n 4 3 2 0 \n Not High 1 (0.7%) 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 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 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 Missing 0 0 0 \n 1 5 4 2 \n Not High 4 (3.0%) 1 (0.7%) 2 (1.5%) \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 Missing 0 0 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 2 0 0 0 \n 3 1 (0.7%) 0 0 \n 4 0 1 (0.7%) 0 \n Missing 0 0 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 Missing 0 0 0 \n 4 2 5 1 \n Not High 0 3 (2.2%) 1 (0.8%) \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 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"))\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:53:41 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9020 dplyr_1.1.4 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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 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 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 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 Missing 0 0 0 \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 Missing 0 0 0 \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 3 0 0 0 \n 4 0 0 1 (0.8%) \n Missing 0 0 0 \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 Missing 0 0 0 \n 4 3 2 0 \n Not High 1 (0.7%) 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 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 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 Missing 0 0 0 \n 1 5 4 2 \n Not High 4 (3.0%) 1 (0.7%) 2 (1.5%) \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 Missing 0 0 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 2 0 0 0 \n 3 1 (0.7%) 0 0 \n 4 0 1 (0.7%) 0 \n Missing 0 0 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 Missing 0 0 0 \n 4 2 5 1 \n Not High 0 3 (2.2%) 1 (0.8%) \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 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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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 = teal_slices(teal_slice(\"ADSL\", \"SAFFL\", selected = \"Y\"))\n)\n\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:54:52 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 tern_0.9.3.9031 \n [9] rtables_0.6.6.9011 magrittr_2.0.3 \n[11] formatters_0.5.5.9021 dplyr_1.1.4 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 \n [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 \n [7] digest_0.6.35 estimability_1.5 mime_0.12 \n[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 \n[13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 \n[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 \n[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 \n[22] websocket_1.4.1 multcomp_1.4-25 withr_3.0.0 \n[25] purrr_1.0.2 shinyWidgets_0.8.4 geepack_1.3.10 \n[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 \n[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 \n[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 \n[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 \n[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[43] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[49] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[52] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[55] tidyr_1.3.1 glue_1.7.0 codetools_0.2-20 \n[58] ps_1.7.6 stringi_1.8.3 gtable_0.3.4 \n[61] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[64] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 \n[79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 \n[88] pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -1619,7 +1619,7 @@ "href": "tables/lab-results/lbt10.html", "title": "LBT10", "section": "", - "text": "Data Setup\nStandard Table\nTable Selecting Sections\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadhy <- synthetic_cdisc_dataset(\"latest\", \"adhy\")\n\nadhy_liver <- adhy %>%\n filter(PARAMCD %in% c(\n \"BL2AL2CU\", \"BL2AS2CU\", \"BG2AL2CU\", \"BG2AS2CU\", \"B2A2L2CU\", \"B2A2S2CU\", \"B2A5L2CU\", \"B2A5S2CU\"\n )) %>%\n mutate(PARAMCAT = case_when(\n PARAMCD %in% c(\"BL2AL2CU\", \"BL2AS2CU\") ~ \"Total Bilirubin <= 2xULN\",\n PARAMCD %in% c(\"BG2AL2CU\", \"BG2AS2CU\") ~ \"Total Bilirubin > 2xULN\",\n PARAMCD %in% c(\"B2A2L2CU\", \"B2A2S2CU\") ~ \"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 2xULN\",\n PARAMCD %in% c(\"B2A5L2CU\", \"B2A5S2CU\") ~ \"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 5xULN\"\n )) %>%\n mutate(AVALC_FORMAT = case_when(\n PARAMCD %in% c(\"BL2AL2CU\", \"BG2AL2CU\", \"B2A2L2CU\", \"B2A5L2CU\") & AVALC == \"Y\" ~ \"ALT >3xULN at 2 Visits\",\n PARAMCD %in% c(\"BL2AS2CU\", \"BG2AS2CU\", \"B2A2S2CU\", \"B2A5S2CU\") & AVALC == \"Y\" ~ \"AST >3xULN at 2 Visits\",\n TRUE ~ \"Criteria not met\"\n ))\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nanl <- df_explicit_na(adhy_liver)\n\n\n\n\n\nCodetbl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n split_rows_by(\"PARAMCAT\") %>%\n split_rows_by(\"PARAM\", split_fun = drop_split_levels, child_labels = \"hidden\") %>%\n count_occurrences(\n vars = \"AVALC_FORMAT\",\n .stats = c(\"fraction\"),\n denom = \"n\",\n drop = TRUE\n ) %>%\n build_table(anl, alt_counts_df = adsl)\n\ncriteria_fun <- function(tr) {\n row_label <- obj_label(tr)\n ifelse(row_label == \"Criteria not met\", TRUE, FALSE)\n}\n\nresult <- tbl %>% trim_rows(criteria = criteria_fun)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————\nTotal Bilirubin <= 2xULN \n ALT >3xULN at 2 Visits 20/134 (14.9%) 21/134 (15.7%) 20/132 (15.2%)\n AST >3xULN at 2 Visits 30/134 (22.4%) 25/134 (18.7%) 27/132 (20.5%)\nTotal Bilirubin > 2xULN \n ALT >3xULN at 2 Visits 24/134 (17.9%) 32/134 (23.9%) 24/132 (18.2%)\n AST >3xULN at 2 Visits 33/134 (24.6%) 29/134 (21.6%) 25/132 (18.9%)\n\n\n\n\n\nCodetbl2 <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n split_rows_by(\"PARAMCAT\", split_fun = remove_split_levels(\"Total Bilirubin > 2xULN\")) %>%\n split_rows_by(\"PARAM\", split_fun = drop_split_levels, child_labels = \"hidden\") %>%\n count_occurrences(\n vars = \"AVALC_FORMAT\",\n .stats = c(\"fraction\"),\n denom = \"n\",\n drop = TRUE\n ) %>%\n build_table(anl, alt_counts_df = adsl)\n\ncriteria_fun <- function(tr) {\n row_label <- obj_label(tr)\n ifelse(row_label == \"Criteria not met\", TRUE, FALSE)\n}\n\nresult <- tbl2 %>% trim_rows(criteria = criteria_fun)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————\nTotal Bilirubin <= 2xULN \n ALT >3xULN at 2 Visits 20/134 (14.9%) 21/134 (15.7%) 20/132 (15.2%)\n AST >3xULN at 2 Visits 30/134 (22.4%) 25/134 (18.7%) 27/132 (20.5%)\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:54:04 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nTable Selecting Sections\nteal App\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadhy <- synthetic_cdisc_dataset(\"latest\", \"adhy\")\n\nadhy_liver <- adhy %>%\n filter(PARAMCD %in% c(\n \"BL2AL2CU\", \"BL2AS2CU\", \"BG2AL2CU\", \"BG2AS2CU\", \"B2A2L2CU\", \"B2A2S2CU\", \"B2A5L2CU\", \"B2A5S2CU\"\n )) %>%\n mutate(PARAMCAT = case_when(\n PARAMCD %in% c(\"BL2AL2CU\", \"BL2AS2CU\") ~ \"Total Bilirubin <= 2xULN\",\n PARAMCD %in% c(\"BG2AL2CU\", \"BG2AS2CU\") ~ \"Total Bilirubin > 2xULN\",\n PARAMCD %in% c(\"B2A2L2CU\", \"B2A2S2CU\") ~ \"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 2xULN\",\n PARAMCD %in% c(\"B2A5L2CU\", \"B2A5S2CU\") ~ \"Total Bilirubin > 2xULN and Alkaline Phosphatase <= 5xULN\"\n )) %>%\n mutate(AVALC_FORMAT = case_when(\n PARAMCD %in% c(\"BL2AL2CU\", \"BG2AL2CU\", \"B2A2L2CU\", \"B2A5L2CU\") & AVALC == \"Y\" ~ \"ALT >3xULN at 2 Visits\",\n PARAMCD %in% c(\"BL2AS2CU\", \"BG2AS2CU\", \"B2A2S2CU\", \"B2A5S2CU\") & AVALC == \"Y\" ~ \"AST >3xULN at 2 Visits\",\n TRUE ~ \"Criteria not met\"\n ))\n\n# Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\nadsl <- df_explicit_na(adsl)\nanl <- df_explicit_na(adhy_liver)\n\n\n\n\n\nCodetbl <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n split_rows_by(\"PARAMCAT\") %>%\n split_rows_by(\"PARAM\", split_fun = drop_split_levels, child_labels = \"hidden\") %>%\n count_occurrences(\n vars = \"AVALC_FORMAT\",\n .stats = c(\"fraction\"),\n denom = \"n\",\n drop = TRUE\n ) %>%\n build_table(anl, alt_counts_df = adsl)\n\ncriteria_fun <- function(tr) {\n row_label <- obj_label(tr)\n ifelse(row_label == \"Criteria not met\", TRUE, FALSE)\n}\n\nresult <- tbl %>% trim_rows(criteria = criteria_fun)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————\nTotal Bilirubin <= 2xULN \n ALT >3xULN at 2 Visits 20/134 (14.9%) 21/134 (15.7%) 20/132 (15.2%)\n AST >3xULN at 2 Visits 30/134 (22.4%) 25/134 (18.7%) 27/132 (20.5%)\nTotal Bilirubin > 2xULN \n ALT >3xULN at 2 Visits 24/134 (17.9%) 32/134 (23.9%) 24/132 (18.2%)\n AST >3xULN at 2 Visits 33/134 (24.6%) 29/134 (21.6%) 25/132 (18.9%)\n\n\n\n\n\nCodetbl2 <- basic_table(show_colcounts = TRUE) %>%\n split_cols_by(\"ACTARMCD\") %>%\n split_rows_by(\"PARAMCAT\", split_fun = remove_split_levels(\"Total Bilirubin > 2xULN\")) %>%\n split_rows_by(\"PARAM\", split_fun = drop_split_levels, child_labels = \"hidden\") %>%\n count_occurrences(\n vars = \"AVALC_FORMAT\",\n .stats = c(\"fraction\"),\n denom = \"n\",\n drop = TRUE\n ) %>%\n build_table(anl, alt_counts_df = adsl)\n\ncriteria_fun <- function(tr) {\n row_label <- obj_label(tr)\n ifelse(row_label == \"Criteria not met\", TRUE, FALSE)\n}\n\nresult <- tbl2 %>% trim_rows(criteria = criteria_fun)\nresult\n\n ARM A ARM B ARM C \n (N=134) (N=134) (N=132) \n———————————————————————————————————————————————————————————————————————————\nTotal Bilirubin <= 2xULN \n ALT >3xULN at 2 Visits 20/134 (14.9%) 21/134 (15.7%) 20/132 (15.2%)\n AST >3xULN at 2 Visits 30/134 (22.4%) 25/134 (18.7%) 27/132 (20.5%)\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:55:15 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 Rdpack_2.6 \n[33] digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 \n[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -1631,7 +1631,7 @@ "href": "tables/lab-results/lbt02.html", "title": "LBT02", "section": "", - "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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 analyze_vars(vars = \"AVAL\")\n\nresult <- build_table(l,\n df = adlb,\n alt_counts_df = adsl\n)\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\nAnalysis Visit (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADLB <- df_explicit_na(ADLB)\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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 # note: order matters here. If `PARAM` is first, the split will be first by `PARAM`and then by `AVISIT`\n choices = variable_choices(ADLB, c(\"PARAM\", \"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 = teal_slices(teal_slice(\"ADLB\", \"AVAL\", selected = NULL))\n)\nshinyApp(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\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:54:45 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 teal.modules.clinical_0.9.0.9014\n [3] teal.transform_0.5.0.9004 teal_0.15.2.9020 \n [5] teal.slice_0.5.0.9009 teal.data_0.5.0.9006 \n [7] teal.code_0.5.0.9004 shiny_1.8.1.1 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9020 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 \n[13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 \n[16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 \n[19] ps_1.7.6 purrr_1.0.2 xfun_0.43 \n[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002\n[25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[34] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[37] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[40] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[43] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[46] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[49] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[52] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[55] checkmate_2.3.1 shinyjs_2.1.0 plotly_4.10.4 \n[58] generics_0.1.3 chromote_0.2.0 ggplot2_3.5.0 \n[61] munsell_0.5.1 scales_1.3.0 xtable_1.8-4 \n[64] glue_1.7.0 emmeans_1.10.0 lazyeval_0.2.2 \n[67] tools_4.3.3 webshot2_0.1.1 data.table_1.15.4 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-4 \n[73] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[76] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[79] fansi_1.0.6 viridisLite_0.4.2 geepack_1.3.10 \n[82] gtable_0.3.4 sass_0.4.9 digest_0.6.35 \n[85] TH.data_1.1-2 htmlwidgets_1.6.4 memoise_2.0.1 \n[88] htmltools_0.5.8.1 lifecycle_1.0.4 httr_1.4.7 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nteal App\nReproducibility\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 analyze_vars(vars = \"AVAL\")\n\nresult <- build_table(l,\n df = adlb,\n alt_counts_df = adsl\n)\nresult\n\n A: Drug X B: Placebo C: Combination All Patients\nAnalysis Visit (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\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\n # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels.\n ADSL <- df_explicit_na(ADSL)\n ADLB <- df_explicit_na(ADLB)\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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 # note: order matters here. If `PARAM` is first, the split will be first by `PARAM`and then by `AVISIT`\n choices = variable_choices(ADLB, c(\"PARAM\", \"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 = teal_slices(teal_slice(\"ADLB\", \"AVAL\", selected = NULL))\n)\nshinyApp(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\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:55:58 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.4 teal.modules.clinical_0.9.0.9016\n [3] teal.transform_0.5.0.9004 teal_0.15.2.9022 \n [5] teal.slice_0.5.0.9010 teal.data_0.5.0.9007 \n [7] teal.code_0.5.0.9004 shiny_1.8.1.1 \n [9] tern_0.9.3.9031 rtables_0.6.6.9011 \n[11] magrittr_2.0.3 formatters_0.5.5.9021 \n[13] scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 \n[13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 \n[16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 \n[19] ps_1.7.6 purrr_1.0.2 xfun_0.43 \n[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003\n[25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 \n[31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 \n[34] Rcpp_1.0.12 knitr_1.45 zoo_1.8-12 \n[37] teal.logger_0.2.0.9001 httpuv_1.6.15 Matrix_1.6-5 \n[40] splines_4.3.3 tidyselect_1.2.1 yaml_2.3.8 \n[43] codetools_0.2-20 websocket_1.4.1 processx_3.8.4 \n[46] teal.widgets_0.4.2.9009 lattice_0.22-6 tibble_3.2.1 \n[49] withr_3.0.0 coda_0.19-4.1 evaluate_0.23 \n[52] survival_3.5-8 pillar_1.9.0 shinycssloaders_1.0.0 \n[55] checkmate_2.3.1 shinyjs_2.1.0 plotly_4.10.4 \n[58] generics_0.1.3 chromote_0.2.0 ggplot2_3.5.0 \n[61] munsell_0.5.1 scales_1.3.0 xtable_1.8-4 \n[64] glue_1.7.0 emmeans_1.10.0 lazyeval_0.2.2 \n[67] tools_4.3.3 webshot2_0.1.1 data.table_1.15.4 \n[70] webshot_0.5.5 forcats_1.0.0 mvtnorm_1.2-4 \n[73] grid_4.3.3 tidyr_1.3.1 rbibutils_2.2.16 \n[76] colorspace_2.1-0 nlme_3.1-164 cli_3.6.2 \n[79] fansi_1.0.6 viridisLite_0.4.2 geepack_1.3.10 \n[82] gtable_0.3.4 sass_0.4.9 digest_0.6.35 \n[85] TH.data_1.1-2 htmlwidgets_1.6.4 memoise_2.0.1 \n[88] htmltools_0.5.8.1 lifecycle_1.0.4 httr_1.4.7 \n[91] shinyWidgets_0.8.4 mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -1643,7 +1643,7 @@ "href": "tables/lab-results/lbt05.html", "title": "LBT05", "section": "", - "text": "Data Setup\nStandard Table\nTable Showing All Categories\nTable with Study-Specific MLAs\nTable of Lab Abnormalities Showing All Categories But Only for Parameter Codes with At Least One Abnormality\nReproducibility\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\nqntls <- adlb %>%\n group_by(PARAMCD) %>%\n summarise(as_tibble(t(quantile(AVAL, probs = c(0.1, 0.9)))), .groups = \"drop_last\") %>%\n rename(q1 = 2, q2 = 3)\n\nadlb <- adlb %>%\n left_join(qntls, by = \"PARAMCD\")\n\nset.seed(1)\n\n# Modify ANRIND and create AVALCAT1/PARCAT2\n# PARCAT2 is just used for filtering, but in order to be the\n# filtering as realistic as possible, will create the variable.\nadlb <- adlb %>%\n mutate(\n ANRIND = factor(\n case_when(\n ANRIND == \"LOW\" & AVAL <= q1 ~ \"LOW LOW\",\n ANRIND == \"HIGH\" & AVAL >= q2 ~ \"HIGH HIGH\",\n TRUE ~ as.character(ANRIND)\n ),\n levels = c(\"\", \"HIGH\", \"HIGH HIGH\", \"LOW\", \"LOW LOW\", \"NORMAL\")\n ),\n AVALCAT1 = factor(\n case_when(\n ANRIND %in% c(\"HIGH HIGH\", \"LOW LOW\") ~\n sample(x = c(\"LAST\", \"REPLICATED\", \"SINGLE\"), size = n(), replace = TRUE, prob = c(0.3, 0.6, 0.1)),\n TRUE ~ \"\"\n ),\n levels = c(\"\", c(\"LAST\", \"REPLICATED\", \"SINGLE\"))\n ),\n PARCAT2 = factor(ifelse(ANRIND %in% c(\"HIGH HIGH\", \"LOW LOW\"), \"LS\",\n sample(c(\"SI\", \"CV\", \"LS\"), size = n(), replace = TRUE)\n ))\n ) %>%\n select(-q1, -q2)\n\n# Pre-processing steps\nadlb_f <- adlb %>%\n filter(ONTRTFL == \"Y\" & PARCAT2 == \"LS\" & SAFFL == \"Y\" & !is.na(AVAL)) %>%\n mutate(abn_dir = factor(case_when(\n ANRIND == \"LOW LOW\" ~ \"Low\",\n ANRIND == \"HIGH HIGH\" ~ \"High\",\n TRUE ~ \"\"\n ), levels = c(\"Low\", \"High\", \"\"))) %>%\n df_explicit_na()\n\n# Construct analysis map\nmap <- expand.grid(\n PARAM = levels(adlb$PARAM),\n abn_dir = c(\"Low\", \"High\"),\n stringsAsFactors = FALSE\n) %>%\n arrange(PARAM, desc(abn_dir))\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 = \"Laboratory Test\"\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = \"unique_count\") %>%\n split_rows_by(\"abn_dir\", split_fun = trim_levels_to_map(map)) %>%\n count_abnormal_by_marked(\n var = \"AVALCAT1\",\n variables = list(id = \"USUBJID\", param = \"PARAM\", direction = \"abn_dir\")\n ) %>%\n append_topleft(\" Direction of Abnormality\")\n\nresult <- build_table(lyt, df = adlb_f, alt_counts_df = adsl)\n\nhas_lbl <- function(lbl) CombinationFunction(function(tr) obj_label(tr) == lbl || sum(unlist(row_values(tr))) != 0)\nresult <- prune_table(result, keep_rows(has_lbl(\"Any Abnormality\")))\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) 125 120 125 \n Low \n Single, not last 3 (2.4%) 5 (4.2%) 5 (4%) \n Last or replicated 52 (41.6%) 59 (49.2%) 44 (35.2%) \n Any Abnormality 55 (44%) 64 (53.3%) 49 (39.2%) \n High \n Any Abnormality 0 0 0 \nC-Reactive Protein Measurement (n) 129 130 121 \n Low \n Single, not last 3 (2.3%) 7 (5.4%) 6 (5%) \n Last or replicated 59 (45.7%) 50 (38.5%) 49 (40.5%) \n Any Abnormality 62 (48.1%) 57 (43.8%) 55 (45.5%) \n High \n Single, not last 5 (3.9%) 4 (3.1%) 2 (1.7%) \n Last or replicated 49 (38%) 54 (41.5%) 45 (37.2%) \n Any Abnormality 54 (41.9%) 58 (44.6%) 47 (38.8%) \nImmunoglobulin A Measurement (n) 129 122 121 \n Low \n Any Abnormality 0 0 0 \n High \n Single, not last 4 (3.1%) 6 (4.9%) 3 (2.5%) \n Last or replicated 48 (37.2%) 47 (38.5%) 55 (45.5%) \n Any Abnormality 52 (40.3%) 53 (43.4%) 58 (47.9%) \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 = \"Laboratory Test\"\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = \"unique_count\") %>%\n split_rows_by(\"abn_dir\", split_fun = trim_levels_to_map(map)) %>%\n count_abnormal_by_marked(\n var = \"AVALCAT1\",\n variables = list(id = \"USUBJID\", param = \"PARAM\", direction = \"abn_dir\")\n ) %>%\n append_topleft(\" Direction of Abnormality\")\n\nresult <- build_table(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) 125 120 125 \n Low \n Single, not last 3 (2.4%) 5 (4.2%) 5 (4%) \n Last or replicated 52 (41.6%) 59 (49.2%) 44 (35.2%) \n Any Abnormality 55 (44%) 64 (53.3%) 49 (39.2%) \n High \n Single, not last 0 0 0 \n Last or replicated 0 0 0 \n Any Abnormality 0 0 0 \nC-Reactive Protein Measurement (n) 129 130 121 \n Low \n Single, not last 3 (2.3%) 7 (5.4%) 6 (5%) \n Last or replicated 59 (45.7%) 50 (38.5%) 49 (40.5%) \n Any Abnormality 62 (48.1%) 57 (43.8%) 55 (45.5%) \n High \n Single, not last 5 (3.9%) 4 (3.1%) 2 (1.7%) \n Last or replicated 49 (38%) 54 (41.5%) 45 (37.2%) \n Any Abnormality 54 (41.9%) 58 (44.6%) 47 (38.8%) \nImmunoglobulin A Measurement (n) 129 122 121 \n Low \n Single, not last 0 0 0 \n Last or replicated 0 0 0 \n Any Abnormality 0 0 0 \n High \n Single, not last 4 (3.1%) 6 (4.9%) 3 (2.5%) \n Last or replicated 48 (37.2%) 47 (38.5%) 55 (45.5%) \n Any Abnormality 52 (40.3%) 53 (43.4%) 58 (47.9%) \n\n\n\n\n\nCode# This variant reflects user modifications made to the laboratory analysis data set related to\n# Safety Lab Standardization metadata.\n# There is no unique layout level variation.\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 = \"Laboratory Test\",\n split_fun = trim_levels_in_group(\"abn_dir\", drop_outlevs = TRUE)\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = \"unique_count\") %>%\n split_rows_by(\"abn_dir\") %>%\n count_abnormal_by_marked(\n var = \"AVALCAT1\",\n variables = list(id = \"USUBJID\", param = \"PARAM\", direction = \"abn_dir\")\n ) %>%\n append_topleft(\" Direction of Abnormality\")\n\nresult <- build_table(lyt, df = adlb_f, alt_counts_df = adsl)\n\nresult <- result %>% prune_table()\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) 125 120 125 \n Low \n Single, not last 3 (2.4%) 5 (4.2%) 5 (4%) \n Last or replicated 52 (41.6%) 59 (49.2%) 44 (35.2%) \n Any Abnormality 55 (44%) 64 (53.3%) 49 (39.2%) \nC-Reactive Protein Measurement (n) 129 130 121 \n Low \n Single, not last 3 (2.3%) 7 (5.4%) 6 (5%) \n Last or replicated 59 (45.7%) 50 (38.5%) 49 (40.5%) \n Any Abnormality 62 (48.1%) 57 (43.8%) 55 (45.5%) \n High \n Single, not last 5 (3.9%) 4 (3.1%) 2 (1.7%) \n Last or replicated 49 (38%) 54 (41.5%) 45 (37.2%) \n Any Abnormality 54 (41.9%) 58 (44.6%) 47 (38.8%) \nImmunoglobulin A Measurement (n) 129 122 121 \n High \n Single, not last 4 (3.1%) 6 (4.9%) 3 (2.5%) \n Last or replicated 48 (37.2%) 47 (38.5%) 55 (45.5%) \n Any Abnormality 52 (40.3%) 53 (43.4%) 58 (47.9%) \n\nCode# Another approach would be to create an empirical map by removing the ALT records\n# and use it in `trim_levels_to_map`.\n# this is an a posteriori approach, though.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:55:08 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 withr_3.0.0 \n[33] Rdpack_2.6 digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 \n[37] vctrs_0.6.5 evaluate_0.23 glue_1.7.0 codetools_0.2-20 \n[41] survival_3.5-8 fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 \n[45] rmarkdown_2.26 tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nStandard Table\nTable Showing All Categories\nTable with Study-Specific MLAs\nTable of Lab Abnormalities Showing All Categories But Only for Parameter Codes with At Least One Abnormality\nReproducibility\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\nqntls <- adlb %>%\n group_by(PARAMCD) %>%\n summarise(as_tibble(t(quantile(AVAL, probs = c(0.1, 0.9)))), .groups = \"drop_last\") %>%\n rename(q1 = 2, q2 = 3)\n\nadlb <- adlb %>%\n left_join(qntls, by = \"PARAMCD\")\n\nset.seed(1)\n\n# Modify ANRIND and create AVALCAT1/PARCAT2\n# PARCAT2 is just used for filtering, but in order to be the\n# filtering as realistic as possible, will create the variable.\nadlb <- adlb %>%\n mutate(\n ANRIND = factor(\n case_when(\n ANRIND == \"LOW\" & AVAL <= q1 ~ \"LOW LOW\",\n ANRIND == \"HIGH\" & AVAL >= q2 ~ \"HIGH HIGH\",\n TRUE ~ as.character(ANRIND)\n ),\n levels = c(\"\", \"HIGH\", \"HIGH HIGH\", \"LOW\", \"LOW LOW\", \"NORMAL\")\n ),\n AVALCAT1 = factor(\n case_when(\n ANRIND %in% c(\"HIGH HIGH\", \"LOW LOW\") ~\n sample(x = c(\"LAST\", \"REPLICATED\", \"SINGLE\"), size = n(), replace = TRUE, prob = c(0.3, 0.6, 0.1)),\n TRUE ~ \"\"\n ),\n levels = c(\"\", c(\"LAST\", \"REPLICATED\", \"SINGLE\"))\n ),\n PARCAT2 = factor(ifelse(ANRIND %in% c(\"HIGH HIGH\", \"LOW LOW\"), \"LS\",\n sample(c(\"SI\", \"CV\", \"LS\"), size = n(), replace = TRUE)\n ))\n ) %>%\n select(-q1, -q2)\n\n# Pre-processing steps\nadlb_f <- adlb %>%\n filter(ONTRTFL == \"Y\" & PARCAT2 == \"LS\" & SAFFL == \"Y\" & !is.na(AVAL)) %>%\n mutate(abn_dir = factor(case_when(\n ANRIND == \"LOW LOW\" ~ \"Low\",\n ANRIND == \"HIGH HIGH\" ~ \"High\",\n TRUE ~ \"\"\n ), levels = c(\"Low\", \"High\", \"\"))) %>%\n df_explicit_na()\n\n# Construct analysis map\nmap <- expand.grid(\n PARAM = levels(adlb$PARAM),\n abn_dir = c(\"Low\", \"High\"),\n stringsAsFactors = FALSE\n) %>%\n arrange(PARAM, desc(abn_dir))\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 = \"Laboratory Test\"\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = \"unique_count\") %>%\n split_rows_by(\"abn_dir\", split_fun = trim_levels_to_map(map)) %>%\n count_abnormal_by_marked(\n var = \"AVALCAT1\",\n variables = list(id = \"USUBJID\", param = \"PARAM\", direction = \"abn_dir\")\n ) %>%\n append_topleft(\" Direction of Abnormality\")\n\nresult <- build_table(lyt, df = adlb_f, alt_counts_df = adsl)\n\nhas_lbl <- function(lbl) CombinationFunction(function(tr) obj_label(tr) == lbl || sum(unlist(row_values(tr))) != 0)\nresult <- prune_table(result, keep_rows(has_lbl(\"Any Abnormality\")))\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) 125 120 125 \n Low \n Single, not last 3 (2.4%) 5 (4.2%) 5 (4%) \n Last or replicated 52 (41.6%) 59 (49.2%) 44 (35.2%) \n Any Abnormality 55 (44%) 64 (53.3%) 49 (39.2%) \n High \n Any Abnormality 0 0 0 \nC-Reactive Protein Measurement (n) 129 130 121 \n Low \n Single, not last 3 (2.3%) 7 (5.4%) 6 (5%) \n Last or replicated 59 (45.7%) 50 (38.5%) 49 (40.5%) \n Any Abnormality 62 (48.1%) 57 (43.8%) 55 (45.5%) \n High \n Single, not last 5 (3.9%) 4 (3.1%) 2 (1.7%) \n Last or replicated 49 (38%) 54 (41.5%) 45 (37.2%) \n Any Abnormality 54 (41.9%) 58 (44.6%) 47 (38.8%) \nImmunoglobulin A Measurement (n) 129 122 121 \n Low \n Any Abnormality 0 0 0 \n High \n Single, not last 4 (3.1%) 6 (4.9%) 3 (2.5%) \n Last or replicated 48 (37.2%) 47 (38.5%) 55 (45.5%) \n Any Abnormality 52 (40.3%) 53 (43.4%) 58 (47.9%) \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 = \"Laboratory Test\"\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = \"unique_count\") %>%\n split_rows_by(\"abn_dir\", split_fun = trim_levels_to_map(map)) %>%\n count_abnormal_by_marked(\n var = \"AVALCAT1\",\n variables = list(id = \"USUBJID\", param = \"PARAM\", direction = \"abn_dir\")\n ) %>%\n append_topleft(\" Direction of Abnormality\")\n\nresult <- build_table(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) 125 120 125 \n Low \n Single, not last 3 (2.4%) 5 (4.2%) 5 (4%) \n Last or replicated 52 (41.6%) 59 (49.2%) 44 (35.2%) \n Any Abnormality 55 (44%) 64 (53.3%) 49 (39.2%) \n High \n Single, not last 0 0 0 \n Last or replicated 0 0 0 \n Any Abnormality 0 0 0 \nC-Reactive Protein Measurement (n) 129 130 121 \n Low \n Single, not last 3 (2.3%) 7 (5.4%) 6 (5%) \n Last or replicated 59 (45.7%) 50 (38.5%) 49 (40.5%) \n Any Abnormality 62 (48.1%) 57 (43.8%) 55 (45.5%) \n High \n Single, not last 5 (3.9%) 4 (3.1%) 2 (1.7%) \n Last or replicated 49 (38%) 54 (41.5%) 45 (37.2%) \n Any Abnormality 54 (41.9%) 58 (44.6%) 47 (38.8%) \nImmunoglobulin A Measurement (n) 129 122 121 \n Low \n Single, not last 0 0 0 \n Last or replicated 0 0 0 \n Any Abnormality 0 0 0 \n High \n Single, not last 4 (3.1%) 6 (4.9%) 3 (2.5%) \n Last or replicated 48 (37.2%) 47 (38.5%) 55 (45.5%) \n Any Abnormality 52 (40.3%) 53 (43.4%) 58 (47.9%) \n\n\n\n\n\nCode# This variant reflects user modifications made to the laboratory analysis data set related to\n# Safety Lab Standardization metadata.\n# There is no unique layout level variation.\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 = \"Laboratory Test\",\n split_fun = trim_levels_in_group(\"abn_dir\", drop_outlevs = TRUE)\n ) %>%\n summarize_num_patients(var = \"USUBJID\", .stats = \"unique_count\") %>%\n split_rows_by(\"abn_dir\") %>%\n count_abnormal_by_marked(\n var = \"AVALCAT1\",\n variables = list(id = \"USUBJID\", param = \"PARAM\", direction = \"abn_dir\")\n ) %>%\n append_topleft(\" Direction of Abnormality\")\n\nresult <- build_table(lyt, df = adlb_f, alt_counts_df = adsl)\n\nresult <- result %>% prune_table()\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) 125 120 125 \n Low \n Single, not last 3 (2.4%) 5 (4.2%) 5 (4%) \n Last or replicated 52 (41.6%) 59 (49.2%) 44 (35.2%) \n Any Abnormality 55 (44%) 64 (53.3%) 49 (39.2%) \nC-Reactive Protein Measurement (n) 129 130 121 \n Low \n Single, not last 3 (2.3%) 7 (5.4%) 6 (5%) \n Last or replicated 59 (45.7%) 50 (38.5%) 49 (40.5%) \n Any Abnormality 62 (48.1%) 57 (43.8%) 55 (45.5%) \n High \n Single, not last 5 (3.9%) 4 (3.1%) 2 (1.7%) \n Last or replicated 49 (38%) 54 (41.5%) 45 (37.2%) \n Any Abnormality 54 (41.9%) 58 (44.6%) 47 (38.8%) \nImmunoglobulin A Measurement (n) 129 122 121 \n High \n Single, not last 4 (3.1%) 6 (4.9%) 3 (2.5%) \n Last or replicated 48 (37.2%) 47 (38.5%) 55 (45.5%) \n Any Abnormality 52 (40.3%) 53 (43.4%) 58 (47.9%) \n\nCode# Another approach would be to create an empirical map by removing the ALT records\n# and use it in `trim_levels_to_map`.\n# this is an a posteriori approach, though.\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:56:21 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 \n[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] ggplot2_3.5.0 R6_2.5.1 generics_0.1.3 knitr_1.45 \n[17] forcats_1.0.0 rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 \n[21] checkmate_2.3.1 tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 \n[25] rlang_1.1.3 utf8_1.2.4 testthat_3.2.1 stringi_1.8.3 \n[29] broom_1.0.5 xfun_0.43 cli_3.6.2 withr_3.0.0 \n[33] Rdpack_2.6 digest_0.6.35 grid_4.3.3 lifecycle_1.0.4 \n[37] vctrs_0.6.5 evaluate_0.23 glue_1.7.0 codetools_0.2-20 \n[41] survival_3.5-8 fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 \n[45] rmarkdown_2.26 tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Tables", "Lab Results", @@ -1714,7 +1714,7 @@ "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 App\nReproducibility\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 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 ), linewidth = .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 ), linewidth = .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 ), linewidth = .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 ), linewidth = .5, color = color) +\n geom_segment(data = bp_mdat, aes(\n x = xmin, xend = xmax,\n y = middle, yend = middle\n ), colour = color, linewidth = .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)\nplot\n\n\n\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\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\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\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\n\n\n\n\nCodeadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb_v <- adlb %>%\n filter(PARAMCD == \"ALT\" & 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(\n geom = \"boxplot\",\n fun.data = five_num,\n position = position_dodge2(.5),\n aes(fill = ARMCD, color = ARMCD)\n ) +\n stat_summary(\n geom = \"point\",\n fun = mean,\n aes(group = ARMCD),\n size = 3,\n shape = 8,\n position = position_dodge2(1)\n ) +\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\n\n\n\n\nCodebp_8 <- ggplot(adlb_v, aes(x = ARMCD, y = AVAL)) +\n stat_summary(\n geom = \"boxplot\",\n fun.data = five_num,\n position = position_dodge2(width = .5),\n aes(fill = AVISIT, color = AVISIT)\n ) +\n stat_summary(\n geom = \"point\",\n fun = mean,\n aes(group = AVISIT),\n size = 3,\n shape = 8,\n position = position_dodge2(1)\n ) +\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\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\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\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.general)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(tern)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- 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>\"\n ADLB <- ADLB %>%\n 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'\n stopifnot(nrow(ADLB) == nrow(unique(ADLB[, c(\"STUDYID\", \"USUBJID\", \"PARAMCD\", \"AVISIT\")])))\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\nWarning: Removed 8000 rows containing non-finite outside the scale range\n(`stat_boxplot()`).\n\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:56:03 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 \n [3] magrittr_2.0.3 formatters_0.5.5.9020 \n [5] teal.modules.general_0.3.0.9006 teal.transform_0.5.0.9004 \n [7] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [9] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n[11] shiny_1.8.1.1 ggmosaic_0.3.3 \n[13] nestcolor_0.1.2.9009 ggplot2_3.5.0 \n[15] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] rstudioapi_0.16.0 jsonlite_1.8.8 farver_2.1.1 \n [4] rmarkdown_2.26 ragg_1.3.0 vctrs_0.6.5 \n [7] memoise_2.0.1 rstatix_0.7.2 webshot_0.5.5 \n [10] htmltools_0.5.8.1 forcats_1.0.0 broom_1.0.5 \n [13] cellranger_1.1.0 sass_0.4.9 bslib_0.7.0 \n [16] htmlwidgets_1.6.4 fontawesome_0.5.2 testthat_3.2.1 \n [19] rootSolve_1.8.2.4 plotly_4.10.4 cachem_1.0.8 \n [22] mime_0.12 lifecycle_1.0.4 teal.widgets_0.4.2.9009 \n [25] pkgconfig_2.0.3 webshot2_0.1.1 Matrix_1.6-5 \n [28] R6_2.5.1 fastmap_1.1.1 rbibutils_2.2.16 \n [31] digest_0.6.35 Exact_3.2 colorspace_2.1-0 \n [34] shinycssloaders_1.0.0 ps_1.7.6 textshaping_0.3.7 \n [37] ggpubr_0.6.0 labeling_0.4.3 fansi_1.0.6 \n [40] httr_1.4.7 abind_1.4-5 compiler_4.3.3 \n [43] proxy_0.4-27 withr_3.0.0 backports_1.4.1 \n [46] carData_3.0-5 logger_0.3.0 ggsignif_0.6.4 \n [49] MASS_7.3-60.0.1 gld_2.6.6 tools_4.3.3 \n [52] chromote_0.2.0 httpuv_1.6.15 shinyvalidate_0.1.3 \n [55] glue_1.7.0 callr_3.7.6 promises_1.3.0 \n [58] grid_4.3.3 checkmate_2.3.1 generics_0.1.3 \n [61] gtable_0.3.4 class_7.3-22 tidyr_1.3.1 \n [64] websocket_1.4.1 data.table_1.15.4 lmom_3.0 \n [67] car_3.1-2 utf8_1.2.4 ggrepel_0.9.5 \n [70] pillar_1.9.0 stringr_1.5.1 later_1.3.2 \n [73] splines_4.3.3 lattice_0.22-6 survival_3.5-8 \n [76] tidyselect_1.2.1 knitr_1.45 teal.logger_0.2.0.9001 \n [79] xfun_0.43 expm_0.999-9 brio_1.1.4 \n [82] stringi_1.8.3 lazyeval_0.2.2 yaml_2.3.8 \n [85] boot_1.3-30 shinyWidgets_0.8.4 evaluate_0.23 \n [88] codetools_0.2-20 tibble_3.2.1 cli_3.6.2 \n [91] xtable_1.8-4 DescTools_0.99.54 systemfonts_1.0.6 \n [94] Rdpack_2.6 munsell_0.5.1 processx_3.8.4 \n [97] jquerylib_0.1.4 Rcpp_1.0.12 teal.reporter_0.3.1.9002\n[100] readxl_1.4.3 viridisLite_0.4.2 mvtnorm_1.2-4 \n[103] scales_1.3.0 e1071_1.7-14 purrr_1.0.2 \n[106] rlang_1.1.3 cowplot_1.1.3 formatR_1.14 \n[109] shinyjs_2.1.0 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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 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 ), linewidth = .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 ), linewidth = .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 ), linewidth = .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 ), linewidth = .5, color = color) +\n geom_segment(data = bp_mdat, aes(\n x = xmin, xend = xmax,\n y = middle, yend = middle\n ), colour = color, linewidth = .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)\nplot\n\n\n\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\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\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\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\n\n\n\n\nCodeadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\n\nadlb_v <- adlb %>%\n filter(PARAMCD == \"ALT\" & 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(\n geom = \"boxplot\",\n fun.data = five_num,\n position = position_dodge2(.5),\n aes(fill = ARMCD, color = ARMCD)\n ) +\n stat_summary(\n geom = \"point\",\n fun = mean,\n aes(group = ARMCD),\n size = 3,\n shape = 8,\n position = position_dodge2(1)\n ) +\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\n\n\n\n\nCodebp_8 <- ggplot(adlb_v, aes(x = ARMCD, y = AVAL)) +\n stat_summary(\n geom = \"boxplot\",\n fun.data = five_num,\n position = position_dodge2(width = .5),\n aes(fill = AVISIT, color = AVISIT)\n ) +\n stat_summary(\n geom = \"point\",\n fun = mean,\n aes(group = AVISIT),\n size = 3,\n shape = 8,\n position = position_dodge2(1)\n ) +\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\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\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\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.general)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(tern)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- 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>\"\n ADLB <- ADLB %>%\n 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'\n stopifnot(nrow(ADLB) == nrow(unique(ADLB[, c(\"STUDYID\", \"USUBJID\", \"PARAMCD\", \"AVISIT\")])))\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\nWarning: Removed 8000 rows containing non-finite outside the scale range\n(`stat_boxplot()`).\n\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:57:18 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] tern_0.9.3.9031 rtables_0.6.6.9011 \n [3] magrittr_2.0.3 formatters_0.5.5.9021 \n [5] teal.modules.general_0.3.0.9007 teal.transform_0.5.0.9004 \n [7] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [9] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n[11] shiny_1.8.1.1 ggmosaic_0.3.3 \n[13] nestcolor_0.1.2.9009 ggplot2_3.5.0 \n[15] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] rstudioapi_0.16.0 jsonlite_1.8.8 farver_2.1.1 \n [4] rmarkdown_2.26 ragg_1.3.0 vctrs_0.6.5 \n [7] memoise_2.0.1 rstatix_0.7.2 webshot_0.5.5 \n [10] htmltools_0.5.8.1 forcats_1.0.0 broom_1.0.5 \n [13] cellranger_1.1.0 sass_0.4.9 bslib_0.7.0 \n [16] htmlwidgets_1.6.4 fontawesome_0.5.2 testthat_3.2.1 \n [19] rootSolve_1.8.2.4 plotly_4.10.4 cachem_1.0.8 \n [22] mime_0.12 lifecycle_1.0.4 teal.widgets_0.4.2.9009 \n [25] pkgconfig_2.0.3 webshot2_0.1.1 Matrix_1.6-5 \n [28] R6_2.5.1 fastmap_1.1.1 rbibutils_2.2.16 \n [31] digest_0.6.35 Exact_3.2 colorspace_2.1-0 \n [34] shinycssloaders_1.0.0 ps_1.7.6 textshaping_0.3.7 \n [37] ggpubr_0.6.0 labeling_0.4.3 fansi_1.0.6 \n [40] httr_1.4.7 abind_1.4-5 compiler_4.3.3 \n [43] proxy_0.4-27 withr_3.0.0 backports_1.4.1 \n [46] carData_3.0-5 logger_0.3.0 ggsignif_0.6.4 \n [49] MASS_7.3-60.0.1 gld_2.6.6 tools_4.3.3 \n [52] chromote_0.2.0 httpuv_1.6.15 shinyvalidate_0.1.3 \n [55] glue_1.7.0 callr_3.7.6 promises_1.3.0 \n [58] grid_4.3.3 checkmate_2.3.1 generics_0.1.3 \n [61] gtable_0.3.4 class_7.3-22 tidyr_1.3.1 \n [64] websocket_1.4.1 data.table_1.15.4 lmom_3.0 \n [67] car_3.1-2 utf8_1.2.4 ggrepel_0.9.5 \n [70] pillar_1.9.0 stringr_1.5.1 later_1.3.2 \n [73] splines_4.3.3 lattice_0.22-6 survival_3.5-8 \n [76] tidyselect_1.2.1 knitr_1.45 teal.logger_0.2.0.9001 \n [79] xfun_0.43 expm_0.999-9 brio_1.1.4 \n [82] stringi_1.8.3 lazyeval_0.2.2 yaml_2.3.8 \n [85] boot_1.3-30 shinyWidgets_0.8.4 evaluate_0.23 \n [88] codetools_0.2-20 tibble_3.2.1 cli_3.6.2 \n [91] xtable_1.8-4 DescTools_0.99.54 systemfonts_1.0.6 \n [94] Rdpack_2.6 munsell_0.5.1 processx_3.8.4 \n [97] jquerylib_0.1.4 Rcpp_1.0.12 teal.reporter_0.3.1.9003\n[100] readxl_1.4.3 viridisLite_0.4.2 mvtnorm_1.2-4 \n[103] scales_1.3.0 e1071_1.7-14 purrr_1.0.2 \n[106] rlang_1.1.3 cowplot_1.1.3 formatR_1.14 \n[109] shinyjs_2.1.0 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Other", @@ -1726,7 +1726,7 @@ "href": "graphs/other/brg01.html", "title": "BRG01", "section": "", - "text": "Data Setup\nPlot of Frequency\nPlot of Percentage\nPlot of Frequency with Total Number of Subjects\nPlot of Frequency with Horizontal Bars\nPlot of Percentage and Confidence Intervals\nPlot of Percentage by Treatment and Covariate\nPlot of Percentage by Covariate and Treatment\nPlot of Percentage with Mean and Median\nPlot of Categorical Variable\nteal App\nReproducibility\n\n\n\n\nCodelibrary(binom)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(scda)\nlibrary(tidyr)\nlibrary(tern)\nlibrary(nestcolor)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\n# filtered population\npatpop_df <- adsl %>%\n group_by(STUDYID) %>%\n summarise(patpop = n())\npatpop <- setNames(patpop_df$patpop, patpop_df$STUDYID)\ndenom <- patpop_df$patpop\n\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\") %>%\n mutate(AETOXGRC = as.character(AETOXGR))\nattributes(adae$AETOXGRC)$label <- \"Analysis Toxicity Grade (C)\"\nvl_ae <- var_labels(adae)\n\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\nvl_lb <- var_labels(adlb)\n\n\n\n\n\nCodeanl <- adae %>%\n filter(AESER == \"Y\")\nanl <- anl[!duplicated(anl$USUBJID), ]\n\nplot <- ggplot(anl, aes(x = .data[[\"ACTARM\"]])) +\n geom_bar(fill = getOption(\"ggplot2.discrete.fill\")[1]) +\n geom_text(stat = \"count\", aes(label = ggplot2::after_stat(count)), vjust = -.5) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Frequency of Subjects With Serious AEs: Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_ae, \"ACTARM\"), \" (N = \", denom, \")\")) +\n ylab(\"Frequency\")\nplot\n\n\n\n\n\n\n\n\n\n\nCodeanl <- adae %>%\n filter(AESOC == \"cl A\")\n\nanl <- anl[!duplicated(anl$USUBJID), ] %>%\n group_by(ACTARM) %>%\n summarise(n = n()) %>%\n mutate(N = patpop) %>%\n mutate(N = as.numeric(N)) %>%\n mutate(pct = round((n / N) * 100, 2))\n\nplot <- ggplot(anl, aes(x = .data[[\"ACTARM\"]])) +\n geom_col(aes(x = ACTARM, y = pct), fill = getOption(\"ggplot2.discrete.fill\")[1]) +\n scale_y_continuous(labels = scales::comma) +\n geom_text(aes(y = pct, label = pct), stat = \"identity\", vjust = -0.5) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Percent of Subjects With cl A Disorders: Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_ae, \"ACTARM\"), \" (N = \", denom, \")\")) +\n ylab(\"Percent\")\nplot\n\n\n\n\n\n\n\n\n\n\nCodeanl <- adae %>%\n filter(AESOC == \"cl A\")\nanl <- anl[!duplicated(anl$USUBJID), ]\n\nanl <- anl %>%\n group_by(ACTARM) %>%\n mutate(n = n()) %>%\n mutate(xvarlabel = paste0(ACTARM, \"\\n\\nN = \", n))\n\nplot <- ggplot(anl, aes(x = .data[[\"xvarlabel\"]])) +\n geom_bar(fill = getOption(\"ggplot2.discrete.fill\")[1]) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Frequency of Subjects With Serious AEs: Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_ae, \"ACTARM\"), \" (N = \", denom, \")\")) +\n ylab(\"Frequency\")\nplot\n\n\n\n\n\n\n\n\n\n\nCodeanl <- adae %>%\n filter(AESER == \"Y\")\nanl <- anl[!duplicated(anl$USUBJID), ]\n\nplot <- ggplot(anl, aes(x = .data[[\"ACTARM\"]])) +\n geom_bar(fill = getOption(\"ggplot2.discrete.fill\")[1]) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Frequency of Subjects With Serious AEs: Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_ae, \"ACTARM\"), \" (N = \", denom, \")\")) +\n ylab(\"Frequency\") +\n coord_flip()\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeanl <- adlb %>%\n filter(PARAMCD == \"ALT\" & ANRIND == \"HIGH\")\nanl <- anl[!duplicated(anl$USUBJID), ]\n\npatpop5 <- as.data.frame(table(adsl$ACTARM)) %>%\n mutate(ACTARM = as.vector(Var1)) %>%\n mutate(TRTPOP = Freq) %>%\n select(ACTARM, TRTPOP)\n\nanlpop <- as.data.frame(table(anl$ANRIND, anl$ACTARM)) %>%\n filter(Var1 == \"HIGH\") %>%\n mutate(ACTARM = as.vector(Var2)) %>%\n mutate(EVENTCOUNT = Freq) %>%\n select(ACTARM, EVENTCOUNT)\n\nanl <- left_join(patpop5, anlpop, by = \"ACTARM\")\nCIs <- binom.confint(x = anl$EVENTCOUNT, n = anl$TRTPOP, methods = \"exact\") \nanl <- cbind(anl, CIs[, 4:6])\n\nplot <- ggplot(anl) +\n geom_bar(\n aes(x = ACTARM, y = mean * 100),\n stat = \"identity\",\n fill = getOption(\"ggplot2.discrete.fill\")[1],\n alpha = 0.7\n ) +\n geom_errorbar(\n aes(x = ACTARM, ymin = lower * 100, ymax = upper * 100),\n width = 0.5,\n colour = \"#20b4ff\",\n alpha = 0.9,\n linewidth = 1.0\n ) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Percent of Subjects with Abnormaly High ALT: Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_ae, \"ACTARM\"), \" (N = \", denom, \")\")) +\n ylab(\"Percentage\")\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeanl <- adae %>%\n filter(AESER == \"Y\")\n\npatpop6 <- dplyr::count(adsl, ACTARM, SEX, name = \"N_arm_sex\")\n\nanl <- anl[!duplicated(anl$USUBJID), ] %>%\n group_by(ACTARM, SEX) %>%\n summarise(n = n(), .groups = \"drop\") %>%\n left_join(patpop6, by = c(\"ACTARM\", \"SEX\")) %>%\n mutate(pct = round((n / N_arm_sex) * 100, 2))\n\nplot <- ggplot(anl, aes(x = .data[[\"ACTARM\"]], fill = .data[[\"SEX\"]])) +\n geom_col(aes(y = pct), position = position_dodge()) +\n guides(fill = guide_legend(title = getElement(vl_ae, \"SEX\"))) +\n scale_y_continuous(labels = scales::comma) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Percent of Subjects With Serious AEs: Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_ae, \"ACTARM\"), \" (N = \", denom, \")\")) +\n ylab(\"Percent\")\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeanl <- adae %>%\n filter(AESER == \"Y\")\n\nanl <- anl[!duplicated(anl$USUBJID), ] %>%\n group_by(SEX, ACTARM) %>%\n summarise(n = n(), .groups = \"drop_last\") %>%\n mutate(N = patpop) %>%\n mutate(N = as.numeric(N)) %>%\n mutate(pct = round((n / N) * 100, 2))\n\nplot <- ggplot(anl, aes(x = .data[[\"SEX\"]], fill = .data[[\"ACTARM\"]])) +\n geom_col(aes(y = pct), position = position_dodge()) +\n guides(fill = guide_legend(title = getElement(vl_ae, \"ACTARM\"))) +\n scale_y_continuous(labels = scales::comma) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Percent of Subjects With Serious AEs: Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_ae, \"SEX\"), \" (N = \", denom, \")\")) +\n ylab(\"Percent\")\nplot\n\n\n\n\n\n\n\n\n\n\nCodeanl1 <- adlb %>%\n filter(AVISIT == \"BASELINE\", PARAMCD == \"CRP\" & ANRIND == \"HIGH\")\n\nanl <- anl1[!duplicated(anl1$USUBJID), ] %>%\n group_by(ACTARM) %>%\n summarise(n = n()) %>%\n mutate(N = patpop) %>%\n mutate(N = as.numeric(N)) %>%\n mutate(pct = round((n / N) * 100, 2))\n\ngraph <- ggplot(anl, aes(x = .data[[\"ACTARM\"]])) +\n geom_col(aes(x = ACTARM, y = pct), fill = getOption(\"ggplot2.discrete.fill\")[1]) +\n scale_y_continuous(labels = scales::comma, expand = expansion(c(0, .25))) +\n geom_text(aes(y = pct, label = pct), stat = \"identity\", vjust = -0.5) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Percent of Subjects with Abnormaly High CRP at Baseline \\n Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_lb, \"ACTARM\"), \" (N = \", denom, \")\")) +\n ylab(\"Percent\")\n\nsd_w <- anl1 %>%\n group_by(ACTARM) %>%\n summarise(\n mean = round(mean(AVAL, na.rm = TRUE), 2),\n median = round(median(AVAL, na.rm = TRUE), 2)\n ) %>%\n arrange(ACTARM)\n\nsd_l <- gather(sd_w, key = stat, value = value, mean:median)\nsd_l <- sd_l %>% mutate(\n stat_lbl = case_when(\n stat == \"mean\" ~ \"Mean\",\n stat == \"median\" ~ \"Median\"\n )\n)\n\nsd_l$stat_lbl <- factor(sd_l$stat_lbl, levels = c(\"Median\", \"Mean\"))\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 <- ggplot(sd_l, aes(x = ACTARM, y = stat_lbl, label = value)) +\n geom_text(size = 3) +\n scale_y_discrete(labels = levels(sd_l$stat_lbl)) +\n theme_bw() +\n tbl_theme\n\nplot <- ggpubr::ggarrange(graph, tbl,\n heights = c(4, 1),\n ncol = 1, nrow = 2, align = \"v\"\n)\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeanl <- adae\n\nanl <- anl %>%\n arrange(USUBJID, AETOXGRC) %>%\n group_by(USUBJID) %>%\n slice(n()) %>%\n ungroup()\n\nanl <- anl[!duplicated(anl$USUBJID), ] %>%\n group_by(ACTARM, AETOXGRC) %>%\n summarise(n = n(), .groups = \"drop_last\") %>%\n mutate(N = patpop) %>%\n mutate(N = as.numeric(N)) %>%\n mutate(pct = round((n / N) * 100, 2))\n\nplot <- ggplot(anl, aes(x = .data[[\"ACTARM\"]], fill = .data[[\"AETOXGRC\"]])) +\n geom_col(aes(y = pct)) +\n guides(fill = guide_legend(title = getElement(vl_ae, \"AETOXGRC\"))) +\n scale_y_continuous(labels = scales::comma) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Percent of Subjects With AE by Highest \\n NCI CTCAE Grade: Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_ae, \"ACTARM\"), \" (N = \", denom, \")\")) +\n ylab(\"Percent\")\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:56:28 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 tern_0.9.3.9031 rtables_0.6.6.9011 \n [4] magrittr_2.0.3 formatters_0.5.5.9020 tidyr_1.3.1 \n [7] scda_0.1.6.9017 ggplot2_3.5.0 dplyr_1.1.4 \n[10] binom_1.1-1.1 \n\nloaded via a namespace (and not attached):\n [1] utf8_1.2.4 generics_0.1.3 rstatix_0.7.2 lattice_0.22-6 \n [5] digest_0.6.35 evaluate_0.23 grid_4.3.3 fastmap_1.1.1 \n [9] jsonlite_1.8.8 Matrix_1.6-5 backports_1.4.1 brio_1.1.4 \n[13] survival_3.5-8 purrr_1.0.2 fansi_1.0.6 scales_1.3.0 \n[17] codetools_0.2-20 abind_1.4-5 Rdpack_2.6 cli_3.6.2 \n[21] rlang_1.1.3 rbibutils_2.2.16 cowplot_1.1.3 munsell_0.5.1 \n[25] splines_4.3.3 withr_3.0.0 yaml_2.3.8 tools_4.3.3 \n[29] ggsignif_0.6.4 checkmate_2.3.1 colorspace_2.1-0 ggpubr_0.6.0 \n[33] broom_1.0.5 vctrs_0.6.5 R6_2.5.1 lifecycle_1.0.4 \n[37] car_3.1-2 htmlwidgets_1.6.4 pkgconfig_2.0.3 pillar_1.9.0 \n[41] gtable_0.3.4 glue_1.7.0 xfun_0.43 tibble_3.2.1 \n[45] tidyselect_1.2.1 knitr_1.45 farver_2.1.1 htmltools_0.5.8.1\n[49] carData_3.0-5 rmarkdown_2.26 labeling_0.4.3 testthat_3.2.1 \n[53] compiler_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nPlot of Frequency\nPlot of Percentage\nPlot of Frequency with Total Number of Subjects\nPlot of Frequency with Horizontal Bars\nPlot of Percentage and Confidence Intervals\nPlot of Percentage by Treatment and Covariate\nPlot of Percentage by Covariate and Treatment\nPlot of Percentage with Mean and Median\nPlot of Categorical Variable\nteal App\nReproducibility\n\n\n\n\nCodelibrary(binom)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(scda)\nlibrary(tidyr)\nlibrary(tern)\nlibrary(nestcolor)\n\nadsl <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n\n# filtered population\npatpop_df <- adsl %>%\n group_by(STUDYID) %>%\n summarise(patpop = n())\npatpop <- setNames(patpop_df$patpop, patpop_df$STUDYID)\ndenom <- patpop_df$patpop\n\nadae <- synthetic_cdisc_dataset(\"latest\", \"adae\") %>%\n mutate(AETOXGRC = as.character(AETOXGR))\nattributes(adae$AETOXGRC)$label <- \"Analysis Toxicity Grade (C)\"\nvl_ae <- var_labels(adae)\n\nadlb <- synthetic_cdisc_dataset(\"latest\", \"adlb\")\nvl_lb <- var_labels(adlb)\n\n\n\n\n\nCodeanl <- adae %>%\n filter(AESER == \"Y\")\nanl <- anl[!duplicated(anl$USUBJID), ]\n\nplot <- ggplot(anl, aes(x = .data[[\"ACTARM\"]])) +\n geom_bar(fill = getOption(\"ggplot2.discrete.fill\")[1]) +\n geom_text(stat = \"count\", aes(label = ggplot2::after_stat(count)), vjust = -.5) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Frequency of Subjects With Serious AEs: Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_ae, \"ACTARM\"), \" (N = \", denom, \")\")) +\n ylab(\"Frequency\")\nplot\n\n\n\n\n\n\n\n\n\n\nCodeanl <- adae %>%\n filter(AESOC == \"cl A\")\n\nanl <- anl[!duplicated(anl$USUBJID), ] %>%\n group_by(ACTARM) %>%\n summarise(n = n()) %>%\n mutate(N = patpop) %>%\n mutate(N = as.numeric(N)) %>%\n mutate(pct = round((n / N) * 100, 2))\n\nplot <- ggplot(anl, aes(x = .data[[\"ACTARM\"]])) +\n geom_col(aes(x = ACTARM, y = pct), fill = getOption(\"ggplot2.discrete.fill\")[1]) +\n scale_y_continuous(labels = scales::comma) +\n geom_text(aes(y = pct, label = pct), stat = \"identity\", vjust = -0.5) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Percent of Subjects With cl A Disorders: Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_ae, \"ACTARM\"), \" (N = \", denom, \")\")) +\n ylab(\"Percent\")\nplot\n\n\n\n\n\n\n\n\n\n\nCodeanl <- adae %>%\n filter(AESOC == \"cl A\")\nanl <- anl[!duplicated(anl$USUBJID), ]\n\nanl <- anl %>%\n group_by(ACTARM) %>%\n mutate(n = n()) %>%\n mutate(xvarlabel = paste0(ACTARM, \"\\n\\nN = \", n))\n\nplot <- ggplot(anl, aes(x = .data[[\"xvarlabel\"]])) +\n geom_bar(fill = getOption(\"ggplot2.discrete.fill\")[1]) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Frequency of Subjects With Serious AEs: Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_ae, \"ACTARM\"), \" (N = \", denom, \")\")) +\n ylab(\"Frequency\")\nplot\n\n\n\n\n\n\n\n\n\n\nCodeanl <- adae %>%\n filter(AESER == \"Y\")\nanl <- anl[!duplicated(anl$USUBJID), ]\n\nplot <- ggplot(anl, aes(x = .data[[\"ACTARM\"]])) +\n geom_bar(fill = getOption(\"ggplot2.discrete.fill\")[1]) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Frequency of Subjects With Serious AEs: Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_ae, \"ACTARM\"), \" (N = \", denom, \")\")) +\n ylab(\"Frequency\") +\n coord_flip()\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeanl <- adlb %>%\n filter(PARAMCD == \"ALT\" & ANRIND == \"HIGH\")\nanl <- anl[!duplicated(anl$USUBJID), ]\n\npatpop5 <- as.data.frame(table(adsl$ACTARM)) %>%\n mutate(ACTARM = as.vector(Var1)) %>%\n mutate(TRTPOP = Freq) %>%\n select(ACTARM, TRTPOP)\n\nanlpop <- as.data.frame(table(anl$ANRIND, anl$ACTARM)) %>%\n filter(Var1 == \"HIGH\") %>%\n mutate(ACTARM = as.vector(Var2)) %>%\n mutate(EVENTCOUNT = Freq) %>%\n select(ACTARM, EVENTCOUNT)\n\nanl <- left_join(patpop5, anlpop, by = \"ACTARM\")\nCIs <- binom.confint(x = anl$EVENTCOUNT, n = anl$TRTPOP, methods = \"exact\") \nanl <- cbind(anl, CIs[, 4:6])\n\nplot <- ggplot(anl) +\n geom_bar(\n aes(x = ACTARM, y = mean * 100),\n stat = \"identity\",\n fill = getOption(\"ggplot2.discrete.fill\")[1],\n alpha = 0.7\n ) +\n geom_errorbar(\n aes(x = ACTARM, ymin = lower * 100, ymax = upper * 100),\n width = 0.5,\n colour = \"#20b4ff\",\n alpha = 0.9,\n linewidth = 1.0\n ) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Percent of Subjects with Abnormaly High ALT: Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_ae, \"ACTARM\"), \" (N = \", denom, \")\")) +\n ylab(\"Percentage\")\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeanl <- adae %>%\n filter(AESER == \"Y\")\n\npatpop6 <- dplyr::count(adsl, ACTARM, SEX, name = \"N_arm_sex\")\n\nanl <- anl[!duplicated(anl$USUBJID), ] %>%\n group_by(ACTARM, SEX) %>%\n summarise(n = n(), .groups = \"drop\") %>%\n left_join(patpop6, by = c(\"ACTARM\", \"SEX\")) %>%\n mutate(pct = round((n / N_arm_sex) * 100, 2))\n\nplot <- ggplot(anl, aes(x = .data[[\"ACTARM\"]], fill = .data[[\"SEX\"]])) +\n geom_col(aes(y = pct), position = position_dodge()) +\n guides(fill = guide_legend(title = getElement(vl_ae, \"SEX\"))) +\n scale_y_continuous(labels = scales::comma) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Percent of Subjects With Serious AEs: Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_ae, \"ACTARM\"), \" (N = \", denom, \")\")) +\n ylab(\"Percent\")\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeanl <- adae %>%\n filter(AESER == \"Y\")\n\nanl <- anl[!duplicated(anl$USUBJID), ] %>%\n group_by(SEX, ACTARM) %>%\n summarise(n = n(), .groups = \"drop_last\") %>%\n mutate(N = patpop) %>%\n mutate(N = as.numeric(N)) %>%\n mutate(pct = round((n / N) * 100, 2))\n\nplot <- ggplot(anl, aes(x = .data[[\"SEX\"]], fill = .data[[\"ACTARM\"]])) +\n geom_col(aes(y = pct), position = position_dodge()) +\n guides(fill = guide_legend(title = getElement(vl_ae, \"ACTARM\"))) +\n scale_y_continuous(labels = scales::comma) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Percent of Subjects With Serious AEs: Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_ae, \"SEX\"), \" (N = \", denom, \")\")) +\n ylab(\"Percent\")\nplot\n\n\n\n\n\n\n\n\n\n\nCodeanl1 <- adlb %>%\n filter(AVISIT == \"BASELINE\", PARAMCD == \"CRP\" & ANRIND == \"HIGH\")\n\nanl <- anl1[!duplicated(anl1$USUBJID), ] %>%\n group_by(ACTARM) %>%\n summarise(n = n()) %>%\n mutate(N = patpop) %>%\n mutate(N = as.numeric(N)) %>%\n mutate(pct = round((n / N) * 100, 2))\n\ngraph <- ggplot(anl, aes(x = .data[[\"ACTARM\"]])) +\n geom_col(aes(x = ACTARM, y = pct), fill = getOption(\"ggplot2.discrete.fill\")[1]) +\n scale_y_continuous(labels = scales::comma, expand = expansion(c(0, .25))) +\n geom_text(aes(y = pct, label = pct), stat = \"identity\", vjust = -0.5) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Percent of Subjects with Abnormaly High CRP at Baseline \\n Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_lb, \"ACTARM\"), \" (N = \", denom, \")\")) +\n ylab(\"Percent\")\n\nsd_w <- anl1 %>%\n group_by(ACTARM) %>%\n summarise(\n mean = round(mean(AVAL, na.rm = TRUE), 2),\n median = round(median(AVAL, na.rm = TRUE), 2)\n ) %>%\n arrange(ACTARM)\n\nsd_l <- gather(sd_w, key = stat, value = value, mean:median)\nsd_l <- sd_l %>% mutate(\n stat_lbl = case_when(\n stat == \"mean\" ~ \"Mean\",\n stat == \"median\" ~ \"Median\"\n )\n)\n\nsd_l$stat_lbl <- factor(sd_l$stat_lbl, levels = c(\"Median\", \"Mean\"))\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 <- ggplot(sd_l, aes(x = ACTARM, y = stat_lbl, label = value)) +\n geom_text(size = 3) +\n scale_y_discrete(labels = levels(sd_l$stat_lbl)) +\n theme_bw() +\n tbl_theme\n\nplot <- ggpubr::ggarrange(graph, tbl,\n heights = c(4, 1),\n ncol = 1, nrow = 2, align = \"v\"\n)\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeanl <- adae\n\nanl <- anl %>%\n arrange(USUBJID, AETOXGRC) %>%\n group_by(USUBJID) %>%\n slice(n()) %>%\n ungroup()\n\nanl <- anl[!duplicated(anl$USUBJID), ] %>%\n group_by(ACTARM, AETOXGRC) %>%\n summarise(n = n(), .groups = \"drop_last\") %>%\n mutate(N = patpop) %>%\n mutate(N = as.numeric(N)) %>%\n mutate(pct = round((n / N) * 100, 2))\n\nplot <- ggplot(anl, aes(x = .data[[\"ACTARM\"]], fill = .data[[\"AETOXGRC\"]])) +\n geom_col(aes(y = pct)) +\n guides(fill = guide_legend(title = getElement(vl_ae, \"AETOXGRC\"))) +\n scale_y_continuous(labels = scales::comma) +\n theme(plot.title = element_text(hjust = 0.5)) +\n ggtitle(\"Percent of Subjects With AE by Highest \\n NCI CTCAE Grade: Safety-Evaluable Subjects\") +\n xlab(paste0(getElement(vl_ae, \"ACTARM\"), \" (N = \", denom, \")\")) +\n ylab(\"Percent\")\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:57:45 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 tern_0.9.3.9031 rtables_0.6.6.9011 \n [4] magrittr_2.0.3 formatters_0.5.5.9021 tidyr_1.3.1 \n [7] scda_0.1.6.9017 ggplot2_3.5.0 dplyr_1.1.4 \n[10] binom_1.1-1.1 \n\nloaded via a namespace (and not attached):\n [1] utf8_1.2.4 generics_0.1.3 rstatix_0.7.2 lattice_0.22-6 \n [5] digest_0.6.35 evaluate_0.23 grid_4.3.3 fastmap_1.1.1 \n [9] jsonlite_1.8.8 Matrix_1.6-5 backports_1.4.1 brio_1.1.4 \n[13] survival_3.5-8 purrr_1.0.2 fansi_1.0.6 scales_1.3.0 \n[17] codetools_0.2-20 abind_1.4-5 Rdpack_2.6 cli_3.6.2 \n[21] rlang_1.1.3 rbibutils_2.2.16 cowplot_1.1.3 munsell_0.5.1 \n[25] splines_4.3.3 withr_3.0.0 yaml_2.3.8 tools_4.3.3 \n[29] ggsignif_0.6.4 checkmate_2.3.1 colorspace_2.1-0 ggpubr_0.6.0 \n[33] broom_1.0.5 vctrs_0.6.5 R6_2.5.1 lifecycle_1.0.4 \n[37] car_3.1-2 htmlwidgets_1.6.4 pkgconfig_2.0.3 pillar_1.9.0 \n[41] gtable_0.3.4 glue_1.7.0 xfun_0.43 tibble_3.2.1 \n[45] tidyselect_1.2.1 knitr_1.45 farver_2.1.1 htmltools_0.5.8.1\n[49] carData_3.0-5 rmarkdown_2.26 labeling_0.4.3 testthat_3.2.1 \n[53] compiler_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Other", @@ -1738,7 +1738,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 App\nReproducibility\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\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\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\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\n\n\n\n\nCodeplot <- g_lineplot(\n df = adlb_f,\n alt_counts_df = adsl_f,\n control = control_analyze_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\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\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\n\n\n\nThis option is not supported.\n\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\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n library(forcats)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n mutate(AVISIT = fct_reorder(AVISIT, AVISITN, min))\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\nWarning: Error in : could not find function \"control_summarize_vars\" \n when evaluating qenv code:\nplot <- g_lineplot(df = anl, variables = variables, interval = \"mean_ci\", mid = \"mean\", whiskers = c(\"mean_ci_lwr\", \"mean_ci_upr\"), table = c(\"n\", \"mean_sd\", \"median\", \"range\"), mid_type = \"pl\", mid_point_size = 2, table_font_size = 4, newpage = FALSE, title = \"Plot of Mean and 95% Mean Confidence Interval of AVAL by Visit\", subtitle = \"\", caption = NULL, y_lab = \"AVAL Mean Values for\", legend_title = NULL, ggtheme = ggplot2::theme_minimal(), control = control_summarize_vars(conf_level = 0.95), subtitle_add_paramcd = FALSE, subtitle_add_unit = FALSE)\n\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:57:03 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014\n [3] teal.transform_0.5.0.9004 teal_0.15.2.9020 \n [5] teal.slice_0.5.0.9009 teal.data_0.5.0.9006 \n [7] teal.code_0.5.0.9004 shiny_1.8.1.1 \n [9] nestcolor_0.1.2.9009 scda_0.1.6.9017 \n[11] tern_0.9.3.9031 rtables_0.6.6.9011 \n[13] magrittr_2.0.3 formatters_0.5.5.9020 \n[15] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 farver_2.1.1 fastmap_1.1.1 \n [4] TH.data_1.1-2 webshot2_0.1.1 shinyjs_2.1.0 \n [7] promises_1.3.0 digest_0.6.35 estimability_1.5 \n[10] mime_0.12 tern.gee_0.1.3.9004 lifecycle_1.0.4 \n[13] survival_3.5-8 processx_3.8.4 compiler_4.3.3 \n[16] sass_0.4.9 rlang_1.1.3 tools_4.3.3 \n[19] utf8_1.2.4 yaml_2.3.8 knitr_1.45 \n[22] labeling_0.4.3 htmlwidgets_1.6.4 websocket_1.4.1 \n[25] multcomp_1.4-25 withr_3.0.0 purrr_1.0.2 \n[28] shinyWidgets_0.8.4 geepack_1.3.10 grid_4.3.3 \n[31] fansi_1.0.6 teal.logger_0.2.0.9001 xtable_1.8-4 \n[34] colorspace_2.1-0 ggplot2_3.5.0 emmeans_1.10.0 \n[37] scales_1.3.0 MASS_7.3-60.0.1 cli_3.6.2 \n[40] mvtnorm_1.2-4 crayon_1.5.2 rmarkdown_2.26 \n[43] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[46] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[49] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[52] jsonlite_1.8.8 callr_3.7.6 teal.widgets_0.4.2.9009 \n[55] testthat_3.2.1 fontawesome_0.5.2 jquerylib_0.1.4 \n[58] tidyr_1.3.1 glue_1.7.0 ps_1.7.6 \n[61] codetools_0.2-20 cowplot_1.1.3 gtable_0.3.4 \n[64] later_1.3.2 shinycssloaders_1.0.0 munsell_0.5.1 \n[67] tibble_3.2.1 logger_0.3.0 pillar_1.9.0 \n[70] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 \n[73] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 \n[76] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 \n[79] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 \n[82] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 \n[85] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 \n[88] xfun_0.43 zoo_1.8-12 pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\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\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\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\n\n\n\n\nCodeplot <- g_lineplot(\n df = adlb_f,\n alt_counts_df = adsl_f,\n control = control_analyze_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\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\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\n\n\n\nThis option is not supported.\n\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\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n library(dplyr)\n library(forcats)\n\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADLB <- synthetic_cdisc_dataset(\"latest\", \"adlb\") %>%\n mutate(AVISIT = fct_reorder(AVISIT, AVISITN, min))\n})\ndatanames <- c(\"ADSL\", \"ADLB\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\n\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADLB <- data[[\"ADLB\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:58:20 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016\n [3] teal.transform_0.5.0.9004 teal_0.15.2.9022 \n [5] teal.slice_0.5.0.9010 teal.data_0.5.0.9007 \n [7] teal.code_0.5.0.9004 shiny_1.8.1.1 \n [9] nestcolor_0.1.2.9009 scda_0.1.6.9017 \n[11] tern_0.9.3.9031 rtables_0.6.6.9011 \n[13] magrittr_2.0.3 formatters_0.5.5.9021 \n[15] dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 \n [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 \n [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 \n[10] systemfonts_1.0.6 callr_3.7.6 vctrs_0.6.5 \n[13] pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 \n[16] fontawesome_0.5.2 labeling_0.4.3 utf8_1.2.4 \n[19] promises_1.3.0 rmarkdown_2.26 ps_1.7.6 \n[22] ragg_1.3.0 purrr_1.0.2 xfun_0.43 \n[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003\n[28] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 \n[31] R6_2.5.1 bslib_0.7.0 brio_1.1.4 \n[34] jquerylib_0.1.4 estimability_1.5 Rcpp_1.0.12 \n[37] knitr_1.45 zoo_1.8-12 teal.logger_0.2.0.9001 \n[40] httpuv_1.6.15 Matrix_1.6-5 splines_4.3.3 \n[43] tidyselect_1.2.1 yaml_2.3.8 codetools_0.2-20 \n[46] websocket_1.4.1 processx_3.8.4 teal.widgets_0.4.2.9009 \n[49] lattice_0.22-6 tibble_3.2.1 withr_3.0.0 \n[52] coda_0.19-4.1 evaluate_0.23 survival_3.5-8 \n[55] pillar_1.9.0 shinycssloaders_1.0.0 checkmate_2.3.1 \n[58] shinyjs_2.1.0 generics_0.1.3 chromote_0.2.0 \n[61] ggplot2_3.5.0 munsell_0.5.1 scales_1.3.0 \n[64] xtable_1.8-4 glue_1.7.0 emmeans_1.10.0 \n[67] tools_4.3.3 webshot2_0.1.1 webshot_0.5.5 \n[70] mvtnorm_1.2-4 cowplot_1.1.3 grid_4.3.3 \n[73] tidyr_1.3.1 rbibutils_2.2.16 colorspace_2.1-0 \n[76] nlme_3.1-164 cli_3.6.2 textshaping_0.3.7 \n[79] fansi_1.0.6 geepack_1.3.10 gtable_0.3.4 \n[82] sass_0.4.9 digest_0.6.35 TH.data_1.1-2 \n[85] htmlwidgets_1.6.4 farver_2.1.1 memoise_2.0.1 \n[88] htmltools_0.5.8.1 lifecycle_1.0.4 shinyWidgets_0.8.4 \n[91] mime_0.12 MASS_7.3-60.0.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Other", @@ -1750,7 +1750,7 @@ "href": "graphs/efficacy/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 App\nReproducibility\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\n\nCodeplot <- g_km(\n df = anl,\n variables = variables,\n xlab = \"Time (Days)\",\n ylim = c(0, 1),\n annot_coxph = TRUE\n)\nplot\n\n\n\n\n\n\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 font_size = 8,\n annot_coxph = TRUE\n)\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeplot <- g_km(\n df = anl,\n variables = variables,\n xlab = \"Time (Days)\",\n ylim = c(0, 1)\n)\nplot\n\n\n\n\n\n\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)\nplot\n\n\n\n\n\n\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)\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodevariables$strata <- 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)\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n})\ndatanames <- c(\"ADSL\", \"ADTTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\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\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADTTE <- data[[\"ADTTE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:57:56 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9014 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 \n [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 nestcolor_0.1.2.9009 \n [9] dplyr_1.1.4 scda_0.1.6.9017 \n[11] tern_0.9.3.9031 rtables_0.6.6.9011 \n[13] magrittr_2.0.3 formatters_0.5.5.9020 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 farver_2.1.1 fastmap_1.1.1 \n [4] TH.data_1.1-2 webshot2_0.1.1 shinyjs_2.1.0 \n [7] promises_1.3.0 digest_0.6.35 estimability_1.5 \n[10] mime_0.12 tern.gee_0.1.3.9004 lifecycle_1.0.4 \n[13] survival_3.5-8 processx_3.8.4 compiler_4.3.3 \n[16] sass_0.4.9 rlang_1.1.3 tools_4.3.3 \n[19] utf8_1.2.4 yaml_2.3.8 knitr_1.45 \n[22] labeling_0.4.3 htmlwidgets_1.6.4 websocket_1.4.1 \n[25] multcomp_1.4-25 withr_3.0.0 purrr_1.0.2 \n[28] shinyWidgets_0.8.4 geepack_1.3.10 grid_4.3.3 \n[31] fansi_1.0.6 teal.logger_0.2.0.9001 xtable_1.8-4 \n[34] colorspace_2.1-0 ggplot2_3.5.0 emmeans_1.10.0 \n[37] scales_1.3.0 MASS_7.3-60.0.1 cli_3.6.2 \n[40] mvtnorm_1.2-4 rmarkdown_2.26 ragg_1.3.0 \n[43] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[46] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[49] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[52] jsonlite_1.8.8 callr_3.7.6 systemfonts_1.0.6 \n[55] teal.widgets_0.4.2.9009 testthat_3.2.1 fontawesome_0.5.2 \n[58] jquerylib_0.1.4 tidyr_1.3.1 glue_1.7.0 \n[61] codetools_0.2-20 ps_1.7.6 cowplot_1.1.3 \n[64] gtable_0.3.4 later_1.3.2 shinycssloaders_1.0.0 \n[67] munsell_0.5.1 tibble_3.2.1 logger_0.3.0 \n[70] pillar_1.9.0 htmltools_0.5.8.1 brio_1.1.4 \n[73] R6_2.5.1 textshaping_0.3.7 Rdpack_2.6 \n[76] evaluate_0.23 lattice_0.22-6 rbibutils_2.2.16 \n[79] backports_1.4.1 memoise_2.0.1 broom_1.0.5 \n[82] teal.reporter_0.3.1.9002 bslib_0.7.0 httpuv_1.6.15 \n[85] Rcpp_1.0.12 shinyvalidate_0.1.3 coda_0.19-4.1 \n[88] nlme_3.1-164 checkmate_2.3.1 xfun_0.43 \n[91] zoo_1.8-12 pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\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 App\nReproducibility\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\n\nCodeplot <- g_km(\n df = anl,\n variables = variables,\n xlab = \"Time (Days)\",\n ylim = c(0, 1),\n annot_coxph = TRUE\n)\nplot\n\n\n\n\n\n\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 font_size = 8,\n annot_coxph = TRUE\n)\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeplot <- g_km(\n df = anl,\n variables = variables,\n xlab = \"Time (Days)\",\n ylim = c(0, 1)\n)\nplot\n\n\n\n\n\n\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)\nplot\n\n\n\n\n\n\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)\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodevariables$strata <- 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)\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCodelibrary(teal.modules.clinical)\n\n## Data reproducible code\ndata <- teal_data()\ndata <- within(data, {\n library(scda)\n ADSL <- synthetic_cdisc_dataset(\"latest\", \"adsl\")\n ADTTE <- synthetic_cdisc_dataset(\"latest\", \"adtte\")\n})\ndatanames <- c(\"ADSL\", \"ADTTE\")\ndatanames(data) <- datanames\njoin_keys(data) <- default_cdisc_join_keys[datanames]\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\n## Reusable Configuration For Modules\nADSL <- data[[\"ADSL\"]]\nADTTE <- data[[\"ADTTE\"]]\n\n## Setup App\napp <- init(\n data = data,\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\nshinyApp(app$ui, app$server)\n\n\n\n\n\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 17:59:15 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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.9.0.9016 teal.transform_0.5.0.9004 \n [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 \n [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 \n [7] shiny_1.8.1.1 nestcolor_0.1.2.9009 \n [9] dplyr_1.1.4 scda_0.1.6.9017 \n[11] tern_0.9.3.9031 rtables_0.6.6.9011 \n[13] magrittr_2.0.3 formatters_0.5.5.9021 \n\nloaded via a namespace (and not attached):\n [1] tidyselect_1.2.1 farver_2.1.1 fastmap_1.1.1 \n [4] TH.data_1.1-2 webshot2_0.1.1 shinyjs_2.1.0 \n [7] promises_1.3.0 digest_0.6.35 estimability_1.5 \n[10] mime_0.12 tern.gee_0.1.3.9005 lifecycle_1.0.4 \n[13] survival_3.5-8 processx_3.8.4 compiler_4.3.3 \n[16] sass_0.4.9 rlang_1.1.3 tools_4.3.3 \n[19] utf8_1.2.4 yaml_2.3.8 knitr_1.45 \n[22] labeling_0.4.3 htmlwidgets_1.6.4 websocket_1.4.1 \n[25] multcomp_1.4-25 withr_3.0.0 purrr_1.0.2 \n[28] shinyWidgets_0.8.4 geepack_1.3.10 grid_4.3.3 \n[31] fansi_1.0.6 teal.logger_0.2.0.9001 xtable_1.8-4 \n[34] colorspace_2.1-0 ggplot2_3.5.0 emmeans_1.10.0 \n[37] scales_1.3.0 MASS_7.3-60.0.1 cli_3.6.2 \n[40] mvtnorm_1.2-4 rmarkdown_2.26 ragg_1.3.0 \n[43] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 \n[46] splines_4.3.3 formatR_1.14 vctrs_0.6.5 \n[49] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 \n[52] jsonlite_1.8.8 callr_3.7.6 systemfonts_1.0.6 \n[55] teal.widgets_0.4.2.9009 testthat_3.2.1 fontawesome_0.5.2 \n[58] jquerylib_0.1.4 tidyr_1.3.1 glue_1.7.0 \n[61] codetools_0.2-20 ps_1.7.6 cowplot_1.1.3 \n[64] gtable_0.3.4 later_1.3.2 shinycssloaders_1.0.0 \n[67] munsell_0.5.1 tibble_3.2.1 logger_0.3.0 \n[70] pillar_1.9.0 htmltools_0.5.8.1 brio_1.1.4 \n[73] R6_2.5.1 textshaping_0.3.7 Rdpack_2.6 \n[76] evaluate_0.23 lattice_0.22-6 rbibutils_2.2.16 \n[79] backports_1.4.1 memoise_2.0.1 broom_1.0.5 \n[82] teal.reporter_0.3.1.9003 bslib_0.7.0 httpuv_1.6.15 \n[85] Rcpp_1.0.12 shinyvalidate_0.1.3 coda_0.19-4.1 \n[88] nlme_3.1-164 checkmate_2.3.1 xfun_0.43 \n[91] zoo_1.8-12 pkgconfig_2.0.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Efficacy", @@ -1762,7 +1762,7 @@ "href": "graphs/efficacy/mmrmg02.html", "title": "MMRMG02", "section": "", - "text": "Data Setup\nComparing Multiple Populations\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern.mmrm)\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(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 )\n\n# Simulation of groups.\nset.seed(2)\nadqs_f_with_groups <- rbind(\n within(\n adqs_f[sample(seq_len(nrow(adqs_f)), size = 1 / 2 * nrow(adqs_f)), ],\n group <- \"subpopulation 1\"\n ),\n within(\n adqs_f,\n {\n group <- \"subpopulation 2\"\n AVAL <- AVAL + rnorm(length(AVAL), mean = 10, sd = 2)\n USUBJID <- paste0(USUBJID, \"-S2\")\n }\n )\n)\nadqs_f_with_groups$group <- factor(adqs_f_with_groups$group)\n\n\n\n\nFor the following part, an MMRM model is fitted for the dataset and from this result forest plots are constructed for each set of subgroups, treatment arm, and visit that is of interest.\nFirst an MMRM model is fitted for the whole dataset.\n\nCodemmrm_results <- fit_mmrm(\n data = adqs_f_with_groups,\n vars = list(\n response = \"AVAL\",\n covariates = c(),\n id = \"USUBJID\",\n arm = \"ARMCD\",\n visit = \"AVISIT\"\n ),\n cor_struct = \"unstructured\",\n weights_emmeans = \"equal\",\n parallel = TRUE\n)\n\nmmrm() registered as emmeans extension\n\n\nApplying the tern.mmrm::extract_mmrm_subgroups function prepares the obtained mmrm_results for a specific visit - in this case we use the SCREENING visit - and treatment arm relative to the reference arm. From these results a table is obtained using the tern.mmrm::tabulate_mmrm_subgroups function from which the graphic can be directly obtained with tern::g_forest.\nHere we compare ARM A with the reference arm, ARM B.\n\nCodedf_a <- extract_mmrm_subgroups(\n fit = mmrm_results,\n visit = \"SCREENING\",\n subgroups = c(\"group\", \"SEX\"),\n treatment_arm = \"ARM A\"\n)\n\ntab_a <- basic_table() %>%\n tabulate_mmrm_subgroups(\n df = df_a,\n vars = c(\"n_tot\", \"diff\", \"ci\", \"pval\")\n )\n\nplot <- g_forest(\n tab_a,\n logx = FALSE,\n xlim = c(-5, 2.5),\n x_at = c(-5, -2.5, 0, 2.5),\n vline = 0\n)\nplot\n\n\n\n\n\n\n\nThen we compare ARM C with ARM B.\n\nCodedf_c <- extract_mmrm_subgroups(\n fit = mmrm_results,\n visit = \"SCREENING\",\n subgroups = c(\"group\", \"SEX\"),\n treatment_arm = \"ARM C\"\n)\n\ntab_c <- basic_table() %>%\n tabulate_mmrm_subgroups(\n df = df_c,\n vars = c(\"n_tot\", \"diff\", \"ci\", \"pval\")\n )\n\nplot <- g_forest(\n tab_c,\n logx = FALSE,\n xlim = c(-5, 2.5),\n x_at = c(-5, -2.5, 0, 2.5),\n vline = 0\n)\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:58:52 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 tern.mmrm_0.3.0.9005 tern_0.9.3.9031 \n[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9020\n[7] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] gtable_0.3.4 TMB_1.9.11 xfun_0.43 ggplot2_3.5.0 \n [5] htmlwidgets_1.6.4 lattice_0.22-6 vctrs_0.6.5 tools_4.3.3 \n [9] Rdpack_2.6 generics_0.1.3 parallel_4.3.3 sandwich_3.1-0 \n[13] tibble_3.2.1 mmrm_0.3.11 fansi_1.0.6 pkgconfig_2.0.3 \n[17] Matrix_1.6-5 checkmate_2.3.1 lifecycle_1.0.4 farver_2.1.1 \n[21] compiler_4.3.3 stringr_1.5.1 brio_1.1.4 munsell_0.5.1 \n[25] codetools_0.2-20 htmltools_0.5.8.1 yaml_2.3.8 pillar_1.9.0 \n[29] tidyr_1.3.1 MASS_7.3-60.0.1 multcomp_1.4-25 nlme_3.1-164 \n[33] parallelly_1.37.1 tidyselect_1.2.1 digest_0.6.35 mvtnorm_1.2-4 \n[37] stringi_1.8.3 purrr_1.0.2 labeling_0.4.3 splines_4.3.3 \n[41] cowplot_1.1.3 fastmap_1.1.1 grid_4.3.3 colorspace_2.1-0 \n[45] cli_3.6.2 survival_3.5-8 utf8_1.2.4 broom_1.0.5 \n[49] TH.data_1.1-2 withr_3.0.0 scales_1.3.0 backports_1.4.1 \n[53] estimability_1.5 rmarkdown_2.26 emmeans_1.10.0 zoo_1.8-12 \n[57] coda_0.19-4.1 evaluate_0.23 knitr_1.45 rbibutils_2.2.16 \n[61] testthat_3.2.1 rlang_1.1.3 Rcpp_1.0.12 xtable_1.8-4 \n[65] glue_1.7.0 jsonlite_1.8.8 R6_2.5.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nComparing Multiple Populations\nReproducibility\n\n\n\n\nCodelibrary(scda)\nlibrary(dplyr)\nlibrary(tern.mmrm)\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(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 )\n\n# Simulation of groups.\nset.seed(2)\nadqs_f_with_groups <- rbind(\n within(\n adqs_f[sample(seq_len(nrow(adqs_f)), size = 1 / 2 * nrow(adqs_f)), ],\n group <- \"subpopulation 1\"\n ),\n within(\n adqs_f,\n {\n group <- \"subpopulation 2\"\n AVAL <- AVAL + rnorm(length(AVAL), mean = 10, sd = 2)\n USUBJID <- paste0(USUBJID, \"-S2\")\n }\n )\n)\nadqs_f_with_groups$group <- factor(adqs_f_with_groups$group)\n\n\n\n\nFor the following part, an MMRM model is fitted for the dataset and from this result forest plots are constructed for each set of subgroups, treatment arm, and visit that is of interest.\nFirst an MMRM model is fitted for the whole dataset.\n\nCodemmrm_results <- fit_mmrm(\n data = adqs_f_with_groups,\n vars = list(\n response = \"AVAL\",\n covariates = c(),\n id = \"USUBJID\",\n arm = \"ARMCD\",\n visit = \"AVISIT\"\n ),\n cor_struct = \"unstructured\",\n weights_emmeans = \"equal\",\n parallel = TRUE\n)\n\nmmrm() registered as emmeans extension\n\n\nApplying the tern.mmrm::extract_mmrm_subgroups function prepares the obtained mmrm_results for a specific visit - in this case we use the SCREENING visit - and treatment arm relative to the reference arm. From these results a table is obtained using the tern.mmrm::tabulate_mmrm_subgroups function from which the graphic can be directly obtained with tern::g_forest.\nHere we compare ARM A with the reference arm, ARM B.\n\nCodedf_a <- extract_mmrm_subgroups(\n fit = mmrm_results,\n visit = \"SCREENING\",\n subgroups = c(\"group\", \"SEX\"),\n treatment_arm = \"ARM A\"\n)\n\ntab_a <- basic_table() %>%\n tabulate_mmrm_subgroups(\n df = df_a,\n vars = c(\"n_tot\", \"diff\", \"ci\", \"pval\")\n )\n\nplot <- g_forest(\n tab_a,\n logx = FALSE,\n xlim = c(-5, 2.5),\n x_at = c(-5, -2.5, 0, 2.5),\n vline = 0\n)\nplot\n\n\n\n\n\n\n\nThen we compare ARM C with ARM B.\n\nCodedf_c <- extract_mmrm_subgroups(\n fit = mmrm_results,\n visit = \"SCREENING\",\n subgroups = c(\"group\", \"SEX\"),\n treatment_arm = \"ARM C\"\n)\n\ntab_c <- basic_table() %>%\n tabulate_mmrm_subgroups(\n df = df_c,\n vars = c(\"n_tot\", \"diff\", \"ci\", \"pval\")\n )\n\nplot <- g_forest(\n tab_c,\n logx = FALSE,\n xlim = c(-5, 2.5),\n x_at = c(-5, -2.5, 0, 2.5),\n vline = 0\n)\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 18:00:12 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 tern.mmrm_0.3.0.9005 tern_0.9.3.9031 \n[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9021\n[7] dplyr_1.1.4 scda_0.1.6.9017 \n\nloaded via a namespace (and not attached):\n [1] gtable_0.3.4 TMB_1.9.11 xfun_0.43 ggplot2_3.5.0 \n [5] htmlwidgets_1.6.4 lattice_0.22-6 vctrs_0.6.5 tools_4.3.3 \n [9] Rdpack_2.6 generics_0.1.3 parallel_4.3.3 sandwich_3.1-0 \n[13] tibble_3.2.1 mmrm_0.3.11 fansi_1.0.6 pkgconfig_2.0.3 \n[17] Matrix_1.6-5 checkmate_2.3.1 lifecycle_1.0.4 farver_2.1.1 \n[21] compiler_4.3.3 stringr_1.5.1 brio_1.1.4 munsell_0.5.1 \n[25] codetools_0.2-20 htmltools_0.5.8.1 yaml_2.3.8 pillar_1.9.0 \n[29] tidyr_1.3.1 MASS_7.3-60.0.1 multcomp_1.4-25 nlme_3.1-164 \n[33] parallelly_1.37.1 tidyselect_1.2.1 digest_0.6.35 mvtnorm_1.2-4 \n[37] stringi_1.8.3 purrr_1.0.2 labeling_0.4.3 splines_4.3.3 \n[41] cowplot_1.1.3 fastmap_1.1.1 grid_4.3.3 colorspace_2.1-0 \n[45] cli_3.6.2 survival_3.5-8 utf8_1.2.4 broom_1.0.5 \n[49] TH.data_1.1-2 withr_3.0.0 scales_1.3.0 backports_1.4.1 \n[53] estimability_1.5 rmarkdown_2.26 emmeans_1.10.0 zoo_1.8-12 \n[57] coda_0.19-4.1 evaluate_0.23 knitr_1.45 rbibutils_2.2.16 \n[61] testthat_3.2.1 rlang_1.1.3 Rcpp_1.0.12 xtable_1.8-4 \n[65] glue_1.7.0 jsonlite_1.8.8 R6_2.5.1 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Efficacy", @@ -1774,7 +1774,7 @@ "href": "graphs/pharmacokinetic/pkcg02.html", "title": "PKCG02", "section": "", - "text": "Data Setup\nPlot in Linear Scale\nPlot in Log Scale\nteal App\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(nestcolor)\n\nadpc <- synthetic_cdisc_dataset(\"latest\", \"adpc\")\n\n\n\n\n\n\nCodeadpc_a <- adpc %>%\n filter(\n PARAM == \"Plasma Drug X\",\n ARMCD == \"ARM A\"\n ) %>%\n mutate(Patient_ID = sub(\".*id-\", \"\", USUBJID)) %>%\n filter(Patient_ID %in% unique(Patient_ID)[1:10])\n\nuse_title1 <- \"Plot of X Concentration (ug/mL) Over Time by Treatment: \\nPK Evaluable Patients\"\nuse_subtitle1 <- \"Analyte: Plasma X (ug/mL) \\nTreatment Group: ARM A\"\nuse_footnote1 <- \"Program: \\nOutput:\"\n\nplot <- g_ipp(\n df = adpc_a,\n xvar = \"NFRLT\",\n yvar = \"AVAL\",\n xlab = \"Norminal Time from First Dose (hr)\",\n ylab = \"Concentration (ug/mL)\",\n id_var = \"Patient_ID\",\n add_baseline_hline = FALSE,\n yvar_baseline = \"AVAL\", # yvar_baseline cannot be NA or ignore\n title = use_title1,\n subtitle = use_subtitle1,\n caption = use_footnote1,\n plotting_choices = \"all_in_one\"\n)\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeadpc_a <- adpc %>%\n filter(\n PARAM == \"Plasma Drug X\",\n ARMCD == \"ARM A\"\n ) %>%\n mutate(Patient_ID = sub(\".*id-\", \"\", USUBJID)) %>%\n mutate(avalog = ifelse(AVAL != 0, AVAL, 0.001)) %>%\n filter(Patient_ID %in% unique(Patient_ID)[1:10])\n\nuse_title3 <- \"Log-scale Plot of X Concentration (ug/mL) Over Time by Treatment: \\nPK Evaluable Patients\"\nuse_subtitle3 <- \"Analyte: Plasma X (ug/mL) \\nTreatment Group: ARM A\"\nuse_footnote3 <- \"Program: \\nOutput:\"\n\nresult <- g_ipp(\n df = adpc_a,\n xvar = \"NFRLT\",\n yvar = \"avalog\",\n xlab = \"Norminal Time from First Dose (hr)\",\n ylab = \"Concentration (ug/mL)\",\n id_var = \"Patient_ID\",\n add_baseline_hline = FALSE,\n yvar_baseline = \"AVAL\", # yvar_baseline cannot be NA or ignore\n title = use_title3,\n caption = use_footnote3,\n subtitle = use_subtitle3,\n plotting_choices = \"all_in_one\"\n)\nplot <- result + ggplot2::scale_y_log10(breaks = c(0.001, 0.01, 0.1, 1, 10), labels = c(0.001, 0.01, 0.1, 1, 10))\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:59:23 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 \n[4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 \n[7] magrittr_2.0.3 formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] R6_2.5.1 labeling_0.4.3 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 broom_1.0.5 xfun_0.43 \n[29] cli_3.6.2 withr_3.0.0 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 farver_2.1.1 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nPlot in Linear Scale\nPlot in Log Scale\nteal App\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(nestcolor)\n\nadpc <- synthetic_cdisc_dataset(\"latest\", \"adpc\")\n\n\n\n\n\n\nCodeadpc_a <- adpc %>%\n filter(\n PARAM == \"Plasma Drug X\",\n ARMCD == \"ARM A\"\n ) %>%\n mutate(Patient_ID = sub(\".*id-\", \"\", USUBJID)) %>%\n filter(Patient_ID %in% unique(Patient_ID)[1:10])\n\nuse_title1 <- \"Plot of X Concentration (ug/mL) Over Time by Treatment: \\nPK Evaluable Patients\"\nuse_subtitle1 <- \"Analyte: Plasma X (ug/mL) \\nTreatment Group: ARM A\"\nuse_footnote1 <- \"Program: \\nOutput:\"\n\nplot <- g_ipp(\n df = adpc_a,\n xvar = \"NFRLT\",\n yvar = \"AVAL\",\n xlab = \"Norminal Time from First Dose (hr)\",\n ylab = \"Concentration (ug/mL)\",\n id_var = \"Patient_ID\",\n add_baseline_hline = FALSE,\n yvar_baseline = \"AVAL\", # yvar_baseline cannot be NA or ignore\n title = use_title1,\n subtitle = use_subtitle1,\n caption = use_footnote1,\n plotting_choices = \"all_in_one\"\n)\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeadpc_a <- adpc %>%\n filter(\n PARAM == \"Plasma Drug X\",\n ARMCD == \"ARM A\"\n ) %>%\n mutate(Patient_ID = sub(\".*id-\", \"\", USUBJID)) %>%\n mutate(avalog = ifelse(AVAL != 0, AVAL, 0.001)) %>%\n filter(Patient_ID %in% unique(Patient_ID)[1:10])\n\nuse_title3 <- \"Log-scale Plot of X Concentration (ug/mL) Over Time by Treatment: \\nPK Evaluable Patients\"\nuse_subtitle3 <- \"Analyte: Plasma X (ug/mL) \\nTreatment Group: ARM A\"\nuse_footnote3 <- \"Program: \\nOutput:\"\n\nresult <- g_ipp(\n df = adpc_a,\n xvar = \"NFRLT\",\n yvar = \"avalog\",\n xlab = \"Norminal Time from First Dose (hr)\",\n ylab = \"Concentration (ug/mL)\",\n id_var = \"Patient_ID\",\n add_baseline_hline = FALSE,\n yvar_baseline = \"AVAL\", # yvar_baseline cannot be NA or ignore\n title = use_title3,\n caption = use_footnote3,\n subtitle = use_subtitle3,\n plotting_choices = \"all_in_one\"\n)\nplot <- result + ggplot2::scale_y_log10(breaks = c(0.001, 0.01, 0.1, 1, 10), labels = c(0.001, 0.01, 0.1, 1, 10))\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 18:00:45 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 \n[4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 \n[7] magrittr_2.0.3 formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] R6_2.5.1 labeling_0.4.3 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 broom_1.0.5 xfun_0.43 \n[29] cli_3.6.2 withr_3.0.0 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 farver_2.1.1 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Pharmacokinetic", @@ -1786,7 +1786,7 @@ "href": "graphs/pharmacokinetic/pkpg06.html", "title": "PKPG06", "section": "", - "text": "Data Setup\nPlot with Whiskers at ±1.5 Times Inter-Quartile Range\nPlot with Whiskers at Minimum and Maximum Values\nPlot with Whiskers at 5th and 95th Percentiles\nteal App\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(ggplot2)\nlibrary(tidyr)\nlibrary(tern)\nlibrary(nestcolor)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\n\n# Filter NAs\nadpp <- adpp %>%\n filter(PPSPEC != \"NA\" & PARAM != \"NA\" & PPCAT != \"NA\") %>%\n filter(PARAMCD == \"CMAX\" | PARAMCD == \"AUCIFO\", AVISITN == 1)\n\n# filter data by PPCAT and calculate ratio\nanl_x <- adpp %>%\n filter(PPCAT %in% c(\"Metabolite Drug X\", \"Plasma Drug X\")) %>%\n pivot_wider(\n id_cols = c(USUBJID, ACTARM, PARAMCD, AVISIT),\n names_from = PPCAT,\n values_from = AVAL\n ) %>%\n dplyr::mutate(ratio = `Metabolite Drug X` / `Plasma Drug X`) %>%\n filter(!is.na(ratio), ratio != Inf)\n\nanl_y <- adpp %>%\n filter(PPCAT %in% c(\"Metabolite Drug Y\", \"Plasma Drug Y\")) %>%\n pivot_wider(\n id_cols = c(USUBJID, ACTARM, PARAMCD, AVISIT),\n names_from = PPCAT,\n values_from = AVAL\n ) %>%\n dplyr::mutate(ratio = `Metabolite Drug Y` / `Plasma Drug Y`) %>%\n filter(!is.na(ratio), ratio != Inf)\n\n# functions to calculate custom quantiles and outliers\nquantiles <- function(x) {\n quant <- quantile(x, probs = c(0.05, 0.25, 0.5, 0.75, 0.95))\n names(quant) <- c(\"ymin\", \"lower\", \"middle\", \"upper\", \"ymax\")\n quant\n}\n\noutliers <- function(x) {\n return(x < quantile(x, 0.05) | x > quantile(x, 0.95))\n}\n\n\n\n\nDrug X Boxplot\n\n\nCodeplot <- ggplot(anl_x, aes(x = PARAMCD, y = ratio, fill = ACTARM)) +\n geom_boxplot(outlier.size = 2) +\n stat_boxplot(geom = \"errorbar\") +\n stat_summary(\n geom = \"point\",\n fun = \"mean\",\n col = \"black\",\n size = 5,\n shape = 8,\n position = position_dodge(0.75)\n ) +\n geom_text(\n data = . %>% dplyr::group_by(PARAMCD, ACTARM) %>% dplyr::filter(ratio %in% boxplot.stats(ratio)$out),\n aes(x = PARAMCD, y = ratio, label = USUBJID, col = ACTARM),\n size = 3,\n hjust = -0.2,\n position = position_dodge(0.75),\n show.legend = FALSE\n ) +\n labs(\n title = \"Boxplot of Metabolite to Parent Ratios by Treatment\",\n subtitle = paste0(\n \"Analyte: Plasma Drug X, Metabolite Drug X \",\n \"\\nPK Parameter: \",\n as.character(paste(unique(anl_x$PARAMCD), collapse = \", \")),\n \"\\nVisit: \",\n as.character((unique(anl_x$AVISIT)))\n ),\n caption = \"Program: \\nOutput:\",\n x = \"Parameter\",\n y = \"Metabolite to Parent Ratio\"\n ) +\n theme(plot.caption = element_text(hjust = 0)) +\n theme_nest()\n\n# PKPG06\nplot\n\n\n\n\n\n\n\nDrug Y Boxplot\n\n\nCodeplot <- ggplot(anl_y, aes(x = PARAMCD, y = ratio, fill = ACTARM)) +\n geom_boxplot(outlier.size = 2) +\n stat_boxplot(geom = \"errorbar\") +\n stat_summary(\n geom = \"point\",\n fun = \"mean\",\n col = \"black\",\n size = 5,\n shape = 8,\n position = position_dodge(0.75)\n ) +\n geom_text(\n data = . %>% dplyr::group_by(PARAMCD, ACTARM) %>% dplyr::filter(ratio %in% boxplot.stats(ratio)$out),\n aes(x = PARAMCD, y = ratio, label = USUBJID, color = ACTARM),\n size = 3,\n hjust = -0.2,\n position = position_dodge(0.75),\n show.legend = FALSE\n ) +\n labs(\n title = \"Boxplot of Metabolite to Parent Ratios by Treatment\",\n subtitle = paste0(\n \"Analyte: Plasma Drug Y, Metabolite Drug Y \",\n \"\\nPK Parameter: \",\n as.character(paste(unique(anl_y$PARAMCD), collapse = \", \")),\n \"\\nVisit: \",\n as.character((unique(anl_y$AVISIT)))\n ),\n caption = \"Program: \\nOutput:\",\n x = \"Parameter\",\n y = \"Metabolite to Parent Ratio\"\n ) +\n theme(plot.caption = element_text(hjust = 0)) +\n theme_nest()\n\n# result\nplot\n\n\n\n\n\n\n\n\n\n\n\n\nCode# whiskers are formed with the minimum and maximum values\nplot <- ggplot(anl_x, aes(x = PARAMCD, y = ratio, fill = ACTARM)) +\n geom_boxplot(outlier.size = 0) +\n stat_boxplot(geom = \"errorbar\", coef = NULL) +\n stat_summary(geom = \"point\", fun = \"mean\", col = \"black\", size = 5, shape = 8, position = position_dodge(0.75)) +\n labs(\n title = \"Boxplot of Metabolite to Parent Ratios by Treatment\",\n subtitle = paste0(\n \"Analyte: Plasma Drug X, Metabolite Drug X \",\n \"\\nPK Parameter: \",\n as.character(paste(unique(anl_x$PARAMCD), collapse = \", \")),\n \"\\nVisit: \",\n as.character((unique(anl_x$AVISIT)))\n ),\n caption = \"Program:\\nOutput:\",\n x = \"Parameter\",\n y = \"Metabolite to Parent Ratio\"\n ) +\n theme(plot.caption = element_text(hjust = 0)) +\n theme_nest()\n\n# result\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeanl_x_without_outliers <- anl_x %>%\n dplyr::group_by(PARAMCD, ACTARM) %>%\n dplyr::mutate(outlier = ifelse(outliers(ratio), ratio, as.numeric(NA)))\nplot <- ggplot(anl_x, aes(PARAMCD, ratio, fill = ACTARM, label = USUBJID)) +\n stat_summary(\n fun.data = quantiles, geom = \"boxplot\",\n position = position_dodge(1)\n ) +\n stat_summary(\n geom = \"point\",\n fun = \"mean\",\n col = \"black\",\n size = 5,\n shape = 8,\n position = position_dodge(1)\n ) +\n stat_summary(\n fun.data = quantiles, geom = \"errorbar\",\n position = position_dodge(1)\n ) +\n geom_point(\n data = anl_x_without_outliers,\n aes(x = PARAMCD, y = outlier),\n na.rm = TRUE,\n size = 2,\n position = position_dodge(1),\n show.legend = FALSE\n ) +\n geom_text(\n data = anl_x_without_outliers,\n aes(x = PARAMCD, y = outlier, label = USUBJID, color = ACTARM),\n na.rm = TRUE,\n size = 3,\n hjust = -0.2,\n vjust = 1,\n position = position_dodge(1),\n show.legend = FALSE\n ) +\n labs(\n title = \"Boxplot of Metabolite to Parent Ratios by Treatment\",\n subtitle = paste0(\n \"Analyte: Plasma Drug X, Metabolite Drug X \",\n \"\\nPK Parameter: \",\n as.character(paste(unique(anl_x$PARAMCD), collapse = \", \")),\n \"\\nVisit: \",\n as.character((unique(anl_x$AVISIT)))\n ),\n caption = \"Program: \\nOutput:\",\n x = \"Parameter\",\n y = \"Metabolite to Parent Ratio\"\n ) +\n theme(plot.caption = element_text(hjust = 0)) +\n theme_nest()\n\n# result\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:59:36 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 tern_0.9.3.9031 rtables_0.6.6.9011 \n[4] magrittr_2.0.3 formatters_0.5.5.9020 tidyr_1.3.1 \n[7] ggplot2_3.5.0 scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 splines_4.3.3 scales_1.3.0 \n [9] yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 R6_2.5.1 \n[13] labeling_0.4.3 generics_0.1.3 knitr_1.45 rbibutils_2.2.16 \n[17] htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 tibble_3.2.1 \n[21] munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 utf8_1.2.4 \n[25] testthat_3.2.1 broom_1.0.5 xfun_0.43 cli_3.6.2 \n[29] withr_3.0.0 Rdpack_2.6 digest_0.6.35 grid_4.3.3 \n[33] lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 glue_1.7.0 \n[37] farver_2.1.1 codetools_0.2-20 survival_3.5-8 fansi_1.0.6 \n[41] colorspace_2.1-0 rmarkdown_2.26 purrr_1.0.2 tools_4.3.3 \n[45] pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nPlot with Whiskers at ±1.5 Times Inter-Quartile Range\nPlot with Whiskers at Minimum and Maximum Values\nPlot with Whiskers at 5th and 95th Percentiles\nteal App\nReproducibility\n\n\n\n\nCodelibrary(dplyr)\nlibrary(scda)\nlibrary(ggplot2)\nlibrary(tidyr)\nlibrary(tern)\nlibrary(nestcolor)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\n\n# Filter NAs\nadpp <- adpp %>%\n filter(PPSPEC != \"NA\" & PARAM != \"NA\" & PPCAT != \"NA\") %>%\n filter(PARAMCD == \"CMAX\" | PARAMCD == \"AUCIFO\", AVISITN == 1)\n\n# filter data by PPCAT and calculate ratio\nanl_x <- adpp %>%\n filter(PPCAT %in% c(\"Metabolite Drug X\", \"Plasma Drug X\")) %>%\n pivot_wider(\n id_cols = c(USUBJID, ACTARM, PARAMCD, AVISIT),\n names_from = PPCAT,\n values_from = AVAL\n ) %>%\n dplyr::mutate(ratio = `Metabolite Drug X` / `Plasma Drug X`) %>%\n filter(!is.na(ratio), ratio != Inf)\n\nanl_y <- adpp %>%\n filter(PPCAT %in% c(\"Metabolite Drug Y\", \"Plasma Drug Y\")) %>%\n pivot_wider(\n id_cols = c(USUBJID, ACTARM, PARAMCD, AVISIT),\n names_from = PPCAT,\n values_from = AVAL\n ) %>%\n dplyr::mutate(ratio = `Metabolite Drug Y` / `Plasma Drug Y`) %>%\n filter(!is.na(ratio), ratio != Inf)\n\n# functions to calculate custom quantiles and outliers\nquantiles <- function(x) {\n quant <- quantile(x, probs = c(0.05, 0.25, 0.5, 0.75, 0.95))\n names(quant) <- c(\"ymin\", \"lower\", \"middle\", \"upper\", \"ymax\")\n quant\n}\n\noutliers <- function(x) {\n return(x < quantile(x, 0.05) | x > quantile(x, 0.95))\n}\n\n\n\n\nDrug X Boxplot\n\n\nCodeplot <- ggplot(anl_x, aes(x = PARAMCD, y = ratio, fill = ACTARM)) +\n geom_boxplot(outlier.size = 2) +\n stat_boxplot(geom = \"errorbar\") +\n stat_summary(\n geom = \"point\",\n fun = \"mean\",\n col = \"black\",\n size = 5,\n shape = 8,\n position = position_dodge(0.75)\n ) +\n geom_text(\n data = . %>% dplyr::group_by(PARAMCD, ACTARM) %>% dplyr::filter(ratio %in% boxplot.stats(ratio)$out),\n aes(x = PARAMCD, y = ratio, label = USUBJID, col = ACTARM),\n size = 3,\n hjust = -0.2,\n position = position_dodge(0.75),\n show.legend = FALSE\n ) +\n labs(\n title = \"Boxplot of Metabolite to Parent Ratios by Treatment\",\n subtitle = paste0(\n \"Analyte: Plasma Drug X, Metabolite Drug X \",\n \"\\nPK Parameter: \",\n as.character(paste(unique(anl_x$PARAMCD), collapse = \", \")),\n \"\\nVisit: \",\n as.character((unique(anl_x$AVISIT)))\n ),\n caption = \"Program: \\nOutput:\",\n x = \"Parameter\",\n y = \"Metabolite to Parent Ratio\"\n ) +\n theme(plot.caption = element_text(hjust = 0)) +\n theme_nest()\n\n# PKPG06\nplot\n\n\n\n\n\n\n\nDrug Y Boxplot\n\n\nCodeplot <- ggplot(anl_y, aes(x = PARAMCD, y = ratio, fill = ACTARM)) +\n geom_boxplot(outlier.size = 2) +\n stat_boxplot(geom = \"errorbar\") +\n stat_summary(\n geom = \"point\",\n fun = \"mean\",\n col = \"black\",\n size = 5,\n shape = 8,\n position = position_dodge(0.75)\n ) +\n geom_text(\n data = . %>% dplyr::group_by(PARAMCD, ACTARM) %>% dplyr::filter(ratio %in% boxplot.stats(ratio)$out),\n aes(x = PARAMCD, y = ratio, label = USUBJID, color = ACTARM),\n size = 3,\n hjust = -0.2,\n position = position_dodge(0.75),\n show.legend = FALSE\n ) +\n labs(\n title = \"Boxplot of Metabolite to Parent Ratios by Treatment\",\n subtitle = paste0(\n \"Analyte: Plasma Drug Y, Metabolite Drug Y \",\n \"\\nPK Parameter: \",\n as.character(paste(unique(anl_y$PARAMCD), collapse = \", \")),\n \"\\nVisit: \",\n as.character((unique(anl_y$AVISIT)))\n ),\n caption = \"Program: \\nOutput:\",\n x = \"Parameter\",\n y = \"Metabolite to Parent Ratio\"\n ) +\n theme(plot.caption = element_text(hjust = 0)) +\n theme_nest()\n\n# result\nplot\n\n\n\n\n\n\n\n\n\n\n\n\nCode# whiskers are formed with the minimum and maximum values\nplot <- ggplot(anl_x, aes(x = PARAMCD, y = ratio, fill = ACTARM)) +\n geom_boxplot(outlier.size = 0) +\n stat_boxplot(geom = \"errorbar\", coef = NULL) +\n stat_summary(geom = \"point\", fun = \"mean\", col = \"black\", size = 5, shape = 8, position = position_dodge(0.75)) +\n labs(\n title = \"Boxplot of Metabolite to Parent Ratios by Treatment\",\n subtitle = paste0(\n \"Analyte: Plasma Drug X, Metabolite Drug X \",\n \"\\nPK Parameter: \",\n as.character(paste(unique(anl_x$PARAMCD), collapse = \", \")),\n \"\\nVisit: \",\n as.character((unique(anl_x$AVISIT)))\n ),\n caption = \"Program:\\nOutput:\",\n x = \"Parameter\",\n y = \"Metabolite to Parent Ratio\"\n ) +\n theme(plot.caption = element_text(hjust = 0)) +\n theme_nest()\n\n# result\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeanl_x_without_outliers <- anl_x %>%\n dplyr::group_by(PARAMCD, ACTARM) %>%\n dplyr::mutate(outlier = ifelse(outliers(ratio), ratio, as.numeric(NA)))\nplot <- ggplot(anl_x, aes(PARAMCD, ratio, fill = ACTARM, label = USUBJID)) +\n stat_summary(\n fun.data = quantiles, geom = \"boxplot\",\n position = position_dodge(1)\n ) +\n stat_summary(\n geom = \"point\",\n fun = \"mean\",\n col = \"black\",\n size = 5,\n shape = 8,\n position = position_dodge(1)\n ) +\n stat_summary(\n fun.data = quantiles, geom = \"errorbar\",\n position = position_dodge(1)\n ) +\n geom_point(\n data = anl_x_without_outliers,\n aes(x = PARAMCD, y = outlier),\n na.rm = TRUE,\n size = 2,\n position = position_dodge(1),\n show.legend = FALSE\n ) +\n geom_text(\n data = anl_x_without_outliers,\n aes(x = PARAMCD, y = outlier, label = USUBJID, color = ACTARM),\n na.rm = TRUE,\n size = 3,\n hjust = -0.2,\n vjust = 1,\n position = position_dodge(1),\n show.legend = FALSE\n ) +\n labs(\n title = \"Boxplot of Metabolite to Parent Ratios by Treatment\",\n subtitle = paste0(\n \"Analyte: Plasma Drug X, Metabolite Drug X \",\n \"\\nPK Parameter: \",\n as.character(paste(unique(anl_x$PARAMCD), collapse = \", \")),\n \"\\nVisit: \",\n as.character((unique(anl_x$AVISIT)))\n ),\n caption = \"Program: \\nOutput:\",\n x = \"Parameter\",\n y = \"Metabolite to Parent Ratio\"\n ) +\n theme(plot.caption = element_text(hjust = 0)) +\n theme_nest()\n\n# result\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 18:00:58 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 tern_0.9.3.9031 rtables_0.6.6.9011 \n[4] magrittr_2.0.3 formatters_0.5.5.9021 tidyr_1.3.1 \n[7] ggplot2_3.5.0 scda_0.1.6.9017 dplyr_1.1.4 \n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 splines_4.3.3 scales_1.3.0 \n [9] yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 R6_2.5.1 \n[13] labeling_0.4.3 generics_0.1.3 knitr_1.45 rbibutils_2.2.16 \n[17] htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 tibble_3.2.1 \n[21] munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 utf8_1.2.4 \n[25] testthat_3.2.1 broom_1.0.5 xfun_0.43 cli_3.6.2 \n[29] withr_3.0.0 Rdpack_2.6 digest_0.6.35 grid_4.3.3 \n[33] lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 glue_1.7.0 \n[37] farver_2.1.1 codetools_0.2-20 survival_3.5-8 fansi_1.0.6 \n[41] colorspace_2.1-0 rmarkdown_2.26 purrr_1.0.2 tools_4.3.3 \n[45] pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Pharmacokinetic", @@ -1798,7 +1798,7 @@ "href": "graphs/pharmacokinetic/pkpg04.html", "title": "PKPG04", "section": "", - "text": "Data Setup\nPlot of CMAX by Visit\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(ggrepel)\nlibrary(nestcolor)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\n\n\n\n\n\n\nCode# filtered parameter\nadpp <- adpp %>% filter(toupper(PARAMCD) == \"CMAX\" & toupper(PPSPEC) == \"PLASMA\")\n\nuse_title <- paste0(\"Boxplot of \", as.character(unique(adpp$PARAM)), \" by Visit\")\nuse_subtitle <- paste0(\n \"Analyte:\\nPK Parameter: \",\n as.character(unique(adpp$PARAM)),\n \" (\",\n as.character(unique(adpp$AVALU)),\n \")\"\n)\nuse_footnote <- \"Program: \\nOutput:\"\n\np <- ggplot(adpp, aes(x = AVISIT, y = AVAL, fill = ACTARM)) +\n geom_boxplot(outlier.size = 2) +\n stat_boxplot(geom = \"errorbar\") +\n stat_summary(geom = \"point\", fun = \"mean\", col = \"black\", size = 5, shape = 8, position = position_dodge(0.75)) +\n geom_text_repel(\n data = . %>% dplyr::group_by(AVISIT, ACTARM) %>% dplyr::filter(AVAL %in% boxplot.stats(AVAL)$out),\n aes(x = AVISIT, y = AVAL, label = SUBJID, color = ACTARM),\n size = 3, hjust = -0.2, position = position_dodge(0.75)\n ) +\n labs(\n title = use_title,\n subtitle = use_subtitle,\n caption = use_footnote,\n x = \"Visit\",\n y = paste0(as.character(unique(adpp$PARAM)), \" (\", as.character(unique(adpp$AVALU)), \")\")\n ) +\n theme(plot.caption = element_text(hjust = 0)) +\n theme_nest()\n\nplot <- p + geom_point(aes(fill = ACTARM), size = 2, shape = 21, position = position_dodge(0.75))\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 17:59:49 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 ggrepel_0.9.5 ggplot2_3.5.0 \n[4] dplyr_1.1.4 scda_0.1.6.9017 tern_0.9.3.9031 \n[7] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] utf8_1.2.4 generics_0.1.3 tidyr_1.3.1 lattice_0.22-6 \n [5] digest_0.6.35 evaluate_0.23 grid_4.3.3 fastmap_1.1.1 \n [9] jsonlite_1.8.8 Matrix_1.6-5 backports_1.4.1 brio_1.1.4 \n[13] survival_3.5-8 purrr_1.0.2 fansi_1.0.6 scales_1.3.0 \n[17] codetools_0.2-20 Rdpack_2.6 cli_3.6.2 rlang_1.1.3 \n[21] rbibutils_2.2.16 munsell_0.5.1 splines_4.3.3 withr_3.0.0 \n[25] yaml_2.3.8 tools_4.3.3 checkmate_2.3.1 colorspace_2.1-0 \n[29] broom_1.0.5 vctrs_0.6.5 R6_2.5.1 lifecycle_1.0.4 \n[33] htmlwidgets_1.6.4 pkgconfig_2.0.3 pillar_1.9.0 gtable_0.3.4 \n[37] glue_1.7.0 Rcpp_1.0.12 xfun_0.43 tibble_3.2.1 \n[41] tidyselect_1.2.1 knitr_1.45 farver_2.1.1 htmltools_0.5.8.1\n[45] rmarkdown_2.26 labeling_0.4.3 testthat_3.2.1 compiler_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nPlot of CMAX by Visit\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(ggrepel)\nlibrary(nestcolor)\n\nadpp <- synthetic_cdisc_dataset(\"latest\", \"adpp\")\n\n\n\n\n\n\nCode# filtered parameter\nadpp <- adpp %>% filter(toupper(PARAMCD) == \"CMAX\" & toupper(PPSPEC) == \"PLASMA\")\n\nuse_title <- paste0(\"Boxplot of \", as.character(unique(adpp$PARAM)), \" by Visit\")\nuse_subtitle <- paste0(\n \"Analyte:\\nPK Parameter: \",\n as.character(unique(adpp$PARAM)),\n \" (\",\n as.character(unique(adpp$AVALU)),\n \")\"\n)\nuse_footnote <- \"Program: \\nOutput:\"\n\np <- ggplot(adpp, aes(x = AVISIT, y = AVAL, fill = ACTARM)) +\n geom_boxplot(outlier.size = 2) +\n stat_boxplot(geom = \"errorbar\") +\n stat_summary(geom = \"point\", fun = \"mean\", col = \"black\", size = 5, shape = 8, position = position_dodge(0.75)) +\n geom_text_repel(\n data = . %>% dplyr::group_by(AVISIT, ACTARM) %>% dplyr::filter(AVAL %in% boxplot.stats(AVAL)$out),\n aes(x = AVISIT, y = AVAL, label = SUBJID, color = ACTARM),\n size = 3, hjust = -0.2, position = position_dodge(0.75)\n ) +\n labs(\n title = use_title,\n subtitle = use_subtitle,\n caption = use_footnote,\n x = \"Visit\",\n y = paste0(as.character(unique(adpp$PARAM)), \" (\", as.character(unique(adpp$AVALU)), \")\")\n ) +\n theme(plot.caption = element_text(hjust = 0)) +\n theme_nest()\n\nplot <- p + geom_point(aes(fill = ACTARM), size = 2, shape = 21, position = position_dodge(0.75))\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 18:01:12 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 ggrepel_0.9.5 ggplot2_3.5.0 \n[4] dplyr_1.1.4 scda_0.1.6.9017 tern_0.9.3.9031 \n[7] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] utf8_1.2.4 generics_0.1.3 tidyr_1.3.1 lattice_0.22-6 \n [5] digest_0.6.35 evaluate_0.23 grid_4.3.3 fastmap_1.1.1 \n [9] jsonlite_1.8.8 Matrix_1.6-5 backports_1.4.1 brio_1.1.4 \n[13] survival_3.5-8 purrr_1.0.2 fansi_1.0.6 scales_1.3.0 \n[17] codetools_0.2-20 Rdpack_2.6 cli_3.6.2 rlang_1.1.3 \n[21] rbibutils_2.2.16 munsell_0.5.1 splines_4.3.3 withr_3.0.0 \n[25] yaml_2.3.8 tools_4.3.3 checkmate_2.3.1 colorspace_2.1-0 \n[29] broom_1.0.5 vctrs_0.6.5 R6_2.5.1 lifecycle_1.0.4 \n[33] htmlwidgets_1.6.4 pkgconfig_2.0.3 pillar_1.9.0 gtable_0.3.4 \n[37] glue_1.7.0 Rcpp_1.0.12 xfun_0.43 tibble_3.2.1 \n[41] tidyselect_1.2.1 knitr_1.45 farver_2.1.1 htmltools_0.5.8.1\n[45] rmarkdown_2.26 labeling_0.4.3 testthat_3.2.1 compiler_4.3.3 \n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Pharmacokinetic", @@ -1810,7 +1810,7 @@ "href": "graphs/pharmacokinetic/pkcg01.html", "title": "PKCG01", "section": "", - "text": "Data Setup\nPlot in Linear Scale\nPlot in Log Scale\nteal App\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(nestcolor)\n\nadpc <- synthetic_cdisc_dataset(\"latest\", \"adpc\")\n\n\n\n\n\n\nCodeadpc_a <- adpc %>%\n filter(\n PARAM == \"Plasma Drug X\",\n ARMCD == \"ARM A\"\n ) %>%\n mutate(Patient_ID = sub(\".*id-\", \"\", USUBJID))\n\nuse_title <- \"Plot of Plasma Drug X (ug/mL) Concentrations Over Time by\\nPatient: PK Evaluable Patients\"\nuse_subtitle <- \"Analyte: Plasma Drug X (ug/mL) \\nTreatment Group: ARM A\"\nuse_footnote <- \"Program: \\nOutput:\"\n\nresult <- g_ipp(\n df = adpc_a,\n xvar = \"NFRLT\",\n yvar = \"AVAL\",\n xlab = \"Norminal Time from First Dose (hr)\",\n ylab = \"Concentration (ug/mL)\",\n id_var = \"Patient_ID\",\n add_baseline_hline = FALSE,\n yvar_baseline = \"AVAL\", # yvar_baseline cannot be NA or ignore\n title = use_title,\n subtitle = use_subtitle,\n caption = use_footnote,\n plotting_choices = \"separate_by_obs\"\n)\nplot <- result[[1]] # only show the first subject\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeadpc_a <- adpc %>%\n filter(\n PARAM == \"Plasma Drug X\",\n ARMCD == \"ARM A\"\n ) %>%\n mutate(avalog = ifelse(AVAL != 0, AVAL, 0.001)) %>%\n mutate(Patient_ID = sub(\".*id-\", \"\", USUBJID))\n\nuse_title2 <- \"Plot of Plasma Drug X (ug/mL) Concentrations Over Time by\\nPatient: PK Evaluable Patients\"\nuse_subtitle2 <- \"Analyte: Plasma Drug X (ug/mL) \\nTreatment Group: ARM A\"\nuse_footnote2 <- \"Program: \\nOutput:\"\n\nresult <- g_ipp(\n df = adpc_a,\n xvar = \"NFRLT\",\n yvar = \"avalog\",\n xlab = \"Norminal Time from First Dose (hr)\",\n ylab = \"Concentration (ug/mL)\",\n id_var = \"Patient_ID\",\n add_baseline_hline = FALSE,\n yvar_baseline = \"AVAL\", # yvar_baseline cannot be NA or ignore\n title = use_title2,\n subtitle = use_subtitle2,\n caption = use_footnote2,\n plotting_choices = \"separate_by_obs\"\n)\nplot <- result[[1]] + ggplot2::scale_y_log10(breaks = c(0.001, 0.01, 0.1, 1, 10), labels = c(0.001, 0.01, 0.1, 1, 10))\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-06 18:00:04 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 \n[4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 \n[7] magrittr_2.0.3 formatters_0.5.5.9020\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] R6_2.5.1 labeling_0.4.3 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 broom_1.0.5 xfun_0.43 \n[29] cli_3.6.2 withr_3.0.0 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 farver_2.1.1 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", + "text": "Data Setup\nPlot in Linear Scale\nPlot in Log Scale\nteal App\nReproducibility\n\n\n\n\nCodelibrary(tern)\nlibrary(scda)\nlibrary(dplyr)\nlibrary(ggplot2)\nlibrary(nestcolor)\n\nadpc <- synthetic_cdisc_dataset(\"latest\", \"adpc\")\n\n\n\n\n\n\nCodeadpc_a <- adpc %>%\n filter(\n PARAM == \"Plasma Drug X\",\n ARMCD == \"ARM A\"\n ) %>%\n mutate(Patient_ID = sub(\".*id-\", \"\", USUBJID))\n\nuse_title <- \"Plot of Plasma Drug X (ug/mL) Concentrations Over Time by\\nPatient: PK Evaluable Patients\"\nuse_subtitle <- \"Analyte: Plasma Drug X (ug/mL) \\nTreatment Group: ARM A\"\nuse_footnote <- \"Program: \\nOutput:\"\n\nresult <- g_ipp(\n df = adpc_a,\n xvar = \"NFRLT\",\n yvar = \"AVAL\",\n xlab = \"Norminal Time from First Dose (hr)\",\n ylab = \"Concentration (ug/mL)\",\n id_var = \"Patient_ID\",\n add_baseline_hline = FALSE,\n yvar_baseline = \"AVAL\", # yvar_baseline cannot be NA or ignore\n title = use_title,\n subtitle = use_subtitle,\n caption = use_footnote,\n plotting_choices = \"separate_by_obs\"\n)\nplot <- result[[1]] # only show the first subject\nplot\n\n\n\n\n\n\n\n\n\n\n\nCodeadpc_a <- adpc %>%\n filter(\n PARAM == \"Plasma Drug X\",\n ARMCD == \"ARM A\"\n ) %>%\n mutate(avalog = ifelse(AVAL != 0, AVAL, 0.001)) %>%\n mutate(Patient_ID = sub(\".*id-\", \"\", USUBJID))\n\nuse_title2 <- \"Plot of Plasma Drug X (ug/mL) Concentrations Over Time by\\nPatient: PK Evaluable Patients\"\nuse_subtitle2 <- \"Analyte: Plasma Drug X (ug/mL) \\nTreatment Group: ARM A\"\nuse_footnote2 <- \"Program: \\nOutput:\"\n\nresult <- g_ipp(\n df = adpc_a,\n xvar = \"NFRLT\",\n yvar = \"avalog\",\n xlab = \"Norminal Time from First Dose (hr)\",\n ylab = \"Concentration (ug/mL)\",\n id_var = \"Patient_ID\",\n add_baseline_hline = FALSE,\n yvar_baseline = \"AVAL\", # yvar_baseline cannot be NA or ignore\n title = use_title2,\n subtitle = use_subtitle2,\n caption = use_footnote2,\n plotting_choices = \"separate_by_obs\"\n)\nplot <- result[[1]] + ggplot2::scale_y_log10(breaks = c(0.001, 0.01, 0.1, 1, 10), labels = c(0.001, 0.01, 0.1, 1, 10))\nplot\n\n\n\n\n\n\n\n\nCodeif (exists(\"tenv\")) {\n filename <- paste0(gsub(\"\\\\.rmarkdown$\", \"\", knitr::current_input(dir = TRUE)), \".rds\")\n filepath <- gsub(normalizePath(Sys.getenv(\"QUARTO_PROJECT_DIR\")), file.path(Sys.getenv(\"QUARTO_TESTTHAT_DATA_PATH\"), Sys.getenv(\"QUARTO_PROFILE\")), filename)\n if (!dir.exists(dirname(filepath))) {\n dir.create(dirname(filepath), recursive = TRUE)\n }\n saveRDS(tenv, filepath)\n}\n\n\n\n\n\nCode# In progress\n\n\n\n\nTimestamp\n\nCodeSys.time()\n\n[1] \"2024-04-10 18:01:28 UTC\"\n\n\nSession Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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] nestcolor_0.1.2.9009 ggplot2_3.5.0 dplyr_1.1.4 \n[4] scda_0.1.6.9017 tern_0.9.3.9031 rtables_0.6.6.9011 \n[7] magrittr_2.0.3 formatters_0.5.5.9021\n\nloaded via a namespace (and not attached):\n [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 \n [5] brio_1.1.4 tidyselect_1.2.1 tidyr_1.3.1 splines_4.3.3 \n [9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6 \n[13] R6_2.5.1 labeling_0.4.3 generics_0.1.3 knitr_1.45 \n[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1 \n[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3 \n[25] utf8_1.2.4 testthat_3.2.1 broom_1.0.5 xfun_0.43 \n[29] cli_3.6.2 withr_3.0.0 Rdpack_2.6 digest_0.6.35 \n[33] grid_4.3.3 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23 \n[37] glue_1.7.0 farver_2.1.1 codetools_0.2-20 survival_3.5-8 \n[41] fansi_1.0.6 colorspace_2.1-0 purrr_1.0.2 rmarkdown_2.26 \n[45] tools_4.3.3 pkgconfig_2.0.3 htmltools_0.5.8.1\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\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(\n \"../../assets/www/lock\",\n paste0(\n gsub(\n file.path(book_root_dir, \"\"),\n \"\",\n gsub(\n \"\\\\.rmarkdown$\",\n \"\",\n knitr::current_input(dir = TRUE)\n )\n ),\n \".lock\"\n )\n)\n\nwithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)\n)\n\n\nDownload", "crumbs": [ "Graphs", "Pharmacokinetic", @@ -1822,7 +1822,7 @@ "href": "appendix/reproducibility.html#session-info", "title": "Reproducibility", "section": "Session Info", - "text": "Session Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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\nloaded via a namespace (and not attached):\n [1] digest_0.6.35 R6_2.5.1 codetools_0.2-20 fastmap_1.1.1 \n [5] xfun_0.43 magrittr_2.0.3 knitr_1.45 htmltools_0.5.8.1\n [9] rmarkdown_2.26 cli_3.6.2 testthat_3.2.1 compiler_4.3.3 \n[13] tools_4.3.3 brio_1.1.4 evaluate_0.23 yaml_2.3.8 \n[17] rlang_1.1.3 jsonlite_1.8.8 htmlwidgets_1.6.4\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\n\nCodewithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(\"..\", lockfile = \"../assets/www/renv.lock\", prompt = FALSE, force = TRUE)\n)\n\n\nNOTE: Dependency discovery took 11 seconds during snapshot.\nConsider using .renvignore to ignore files, or switching to explicit snapshots.\nSee `?renv::dependencies` for more information.\n\n\nDownload", + "text": "Session Info\n\nCodesessionInfo()\n\nR version 4.3.3 (2024-02-29)\nPlatform: x86_64-pc-linux-gnu (64-bit)\nRunning under: Ubuntu 22.04.4 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\nloaded via a namespace (and not attached):\n [1] digest_0.6.35 R6_2.5.1 codetools_0.2-20 fastmap_1.1.1 \n [5] xfun_0.43 magrittr_2.0.3 knitr_1.45 htmltools_0.5.8.1\n [9] rmarkdown_2.26 cli_3.6.2 testthat_3.2.1 compiler_4.3.3 \n[13] tools_4.3.3 brio_1.1.4 evaluate_0.23 yaml_2.3.8 \n[17] rlang_1.1.3 jsonlite_1.8.8 htmlwidgets_1.6.4\n\n\n\n.lock file\nDownload the .lock file and use renv::restore() on it to recreate environment used to generate this website.\n\nCodewithr::with_options(\n list(renv.verbose = FALSE),\n renv::snapshot(\"..\", lockfile = \"../assets/www/renv.lock\", prompt = FALSE, force = TRUE)\n)\n\n\nNOTE: Dependency discovery took 12 seconds during snapshot.\nConsider using .renvignore to ignore files, or switching to explicit snapshots.\nSee `?renv::dependencies` for more information.\n\n\nDownload", "crumbs": [ "Appendix", "Reproducibility" diff --git a/development/sitemap.xml b/development/sitemap.xml index 16552993dc..bd96529f93 100644 --- a/development/sitemap.xml +++ b/development/sitemap.xml @@ -2,578 +2,578 @@ https://insightsengineering.github.io/tlg-catalog/CONTRIBUTING.html - 2024-04-06T17:24:54.577Z + 2024-04-10T17:24:57.435Z https://insightsengineering.github.io/tlg-catalog/graphs/pharmacokinetic/pkpg01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/pharmacokinetic/pkcg03.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/pharmacokinetic/pkpg02.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/pharmacokinetic/pkpg03.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/efficacy/fstg01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/efficacy/mmrmg01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/efficacy/fstg02.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/other/ltg01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/other/ippg01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/other/cig01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/repro.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/exposure/ext01.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt04.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt13.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt15.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt03.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt12_bl.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt11.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt01.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt10_bl.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt11_bl.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/vital-signs/vst01.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/concomitant-medications/cmt01b.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/concomitant-medications/cmt02_pt.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/risk-management-plan/rmpt01.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/risk-management-plan/rmpt03.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/risk-management-plan/rmpt06.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/ECG/egt03.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/ECG/egt04.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkpt06.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkpt04.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkpt07.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkpt03.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkpt08.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/disclosures/eudrat02.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/disposition/pdt01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/disposition/pdt02.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet09.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet10.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet07.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet06_smq.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet05_all.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet06.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet01_aesi.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/ratet01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/aovt01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/aovt02.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/mmrmt01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/rbmit01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/onct05.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/coxt01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/ttet01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/ADA/adat04a.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/ADA/adat01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/ADA/adat04b.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/lab-results/lbl02a.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/lab-results/lbl02b.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/lab-results/lbl02a_rls.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/concomitant-medications/cml02b_gl.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/concomitant-medications/cml01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/pharmacokinetic/pkpl02.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/pharmacokinetic/pkpl04.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/pharmacokinetic/pkcl02.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/disposition/dsl02.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/adverse-events/ael02_ed.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/adverse-events/ael01_nollt.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/adverse-events/ael04.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/development-safety-update-report/dsur4.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/ADA/adal02.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/test-utils/save_results.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/test-utils/envir_hook.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/index.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/listings/efficacy/oncl01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/medical-history/mhl01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/adverse-events/ael03.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/adverse-events/ael02.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/adverse-events/ael01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/disposition/dsl01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/pharmacokinetic/pkpl01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/pharmacokinetic/pkcl01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/ECG/egl01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/concomitant-medications/cml02a_gl.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/vital-signs/vsl01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/lab-results/lbl01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/lab-results/lbl01_rls.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/listings/exposure/exl01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/ADA/adat03.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/ADA/adat02.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/demography/dmt01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/cmht01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/dort01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/cfbt01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/rspt01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/coxt02.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/aovt03.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/efficacy/lgrt02.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/medical-history/mht01.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet05.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet04.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet02.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet02_smq.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet04_pi.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet09_smq.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/adverse-events/aet03.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/safety/enrollment01.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/disposition/dst01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/disclosures/disclosurest01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/disclosures/eudrat01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkpt05.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkpt02.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkct01.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/pharmacokinetic/pkpt11.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/ECG/egt05_qtcat.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/ECG/egt01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/ECG/egt02.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/risk-management-plan/rmpt04.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/risk-management-plan/rmpt05.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/concomitant-medications/cmt01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/concomitant-medications/cmt01a.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/vital-signs/vst02.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/deaths/dtht01.html - 2024-04-06T17:24:54.593Z + 2024-04-10T17:24:57.451Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt07.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt12.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt08.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt09.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt06.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt14.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt10.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt02.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/tables/lab-results/lbt05.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/CODE_OF_CONDUCT.html - 2024-04-06T17:24:54.577Z + 2024-04-10T17:24:57.435Z https://insightsengineering.github.io/tlg-catalog/tlg-index.html - 2024-04-06T17:24:54.597Z + 2024-04-10T17:24:57.455Z https://insightsengineering.github.io/tlg-catalog/graphs/other/bwg01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/other/brg01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/other/mng01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/efficacy/kmg01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/efficacy/mmrmg02.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/pharmacokinetic/pkcg02.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/pharmacokinetic/pkpg06.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/pharmacokinetic/pkpg04.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/graphs/pharmacokinetic/pkcg01.html - 2024-04-06T17:24:54.589Z + 2024-04-10T17:24:57.447Z https://insightsengineering.github.io/tlg-catalog/appendix/reproducibility.html - 2024-04-06T17:24:54.577Z + 2024-04-10T17:24:57.435Z diff --git a/development/tables/ADA/adat01.html b/development/tables/ADA/adat01.html index ae56d14f17..837707695e 100644 --- a/development/tables/ADA/adat01.html +++ b/development/tables/ADA/adat01.html @@ -1720,7 +1720,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:35:30 UTC"
+
[1] "2024-04-10 17:35:59 UTC"

Session Info

@@ -1752,7 +1752,7 @@ other attached packages: [1] tibble_3.2.1 scda_0.1.6.9017 dplyr_1.1.4 [4] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[7] formatters_0.5.5.9020 +[7] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/ADA/adat02.html b/development/tables/ADA/adat02.html index 19de06b86f..b82139cb7a 100644 --- a/development/tables/ADA/adat02.html +++ b/development/tables/ADA/adat02.html @@ -1622,7 +1622,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:35:36 UTC"
+
[1] "2024-04-10 17:36:05 UTC"

Session Info

@@ -1653,7 +1653,7 @@ other attached packages: [1] scda_0.1.6.9017 dplyr_1.1.4 tern_0.9.3.9031 -[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9020 +[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/ADA/adat03.html b/development/tables/ADA/adat03.html index 8712320fe7..4fbb2c07dd 100644 --- a/development/tables/ADA/adat03.html +++ b/development/tables/ADA/adat03.html @@ -1595,7 +1595,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:35:24 UTC"
+
[1] "2024-04-10 17:35:53 UTC"

Session Info

@@ -1626,7 +1626,7 @@ other attached packages: [1] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[4] formatters_0.5.5.9020 scda_0.1.6.9017 dplyr_1.1.4 +[4] formatters_0.5.5.9021 scda_0.1.6.9017 dplyr_1.1.4 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/ADA/adat04a.html b/development/tables/ADA/adat04a.html index 3287ac9bbe..308a1b5f58 100644 --- a/development/tables/ADA/adat04a.html +++ b/development/tables/ADA/adat04a.html @@ -1751,7 +1751,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:35:42 UTC"
+
[1] "2024-04-10 17:36:11 UTC"

Session Info

@@ -1783,7 +1783,7 @@ other attached packages: [1] tibble_3.2.1 scda_0.1.6.9017 dplyr_1.1.4 [4] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[7] formatters_0.5.5.9020 +[7] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/ADA/adat04b.html b/development/tables/ADA/adat04b.html index 982ed9381f..88aca262b4 100644 --- a/development/tables/ADA/adat04b.html +++ b/development/tables/ADA/adat04b.html @@ -1700,7 +1700,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:35:18 UTC"
+
[1] "2024-04-10 17:35:46 UTC"

Session Info

@@ -1732,7 +1732,7 @@ other attached packages: [1] tibble_3.2.1 scda_0.1.6.9017 dplyr_1.1.4 [4] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[7] formatters_0.5.5.9020 +[7] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/ECG/egt01.html b/development/tables/ECG/egt01.html index fe91d9c1f2..ba06f7d2a1 100644 --- a/development/tables/ECG/egt01.html +++ b/development/tables/ECG/egt01.html @@ -1699,7 +1699,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:47:53 UTC"
+
[1] "2024-04-10 17:48:51 UTC"

Session Info

@@ -1729,23 +1729,23 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] dplyr_1.1.4 loaded via a namespace (and not attached): - [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 + [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 [10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 [13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 [16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 [19] ps_1.7.6 purrr_1.0.2 xfun_0.43 -[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002 +[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003 [25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 [28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 [31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 diff --git a/development/tables/ECG/egt01_files/figure-html/teal-1.png b/development/tables/ECG/egt01_files/figure-html/teal-1.png index fe12e9e8c6..d011f633d6 100644 Binary files a/development/tables/ECG/egt01_files/figure-html/teal-1.png and b/development/tables/ECG/egt01_files/figure-html/teal-1.png differ diff --git a/development/tables/ECG/egt02.html b/development/tables/ECG/egt02.html index 318fcaad7b..b94b0c8b19 100644 --- a/development/tables/ECG/egt02.html +++ b/development/tables/ECG/egt02.html @@ -1607,7 +1607,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:48:29 UTC"
+
[1] "2024-04-10 17:49:27 UTC"

Session Info

@@ -1637,19 +1637,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 tern_0.9.3.9031 [9] rtables_0.6.6.9011 magrittr_2.0.3 -[11] formatters_0.5.5.9020 scda_0.1.6.9017 +[11] formatters_0.5.5.9021 scda_0.1.6.9017 [13] dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1671,7 +1671,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/ECG/egt02_files/figure-html/teal-1.png b/development/tables/ECG/egt02_files/figure-html/teal-1.png index f89a509b3c..1751402071 100644 Binary files a/development/tables/ECG/egt02_files/figure-html/teal-1.png and b/development/tables/ECG/egt02_files/figure-html/teal-1.png differ diff --git a/development/tables/ECG/egt03.html b/development/tables/ECG/egt03.html index 0d79b84416..8ee198bc6b 100644 --- a/development/tables/ECG/egt03.html +++ b/development/tables/ECG/egt03.html @@ -1693,7 +1693,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:48:13 UTC"
+
[1] "2024-04-10 17:49:11 UTC"

Session Info

@@ -1723,19 +1723,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] scda_0.1.6.9017 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1757,7 +1757,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/ECG/egt03_files/figure-html/teal-1.png b/development/tables/ECG/egt03_files/figure-html/teal-1.png index d04753b309..0ad157c425 100644 Binary files a/development/tables/ECG/egt03_files/figure-html/teal-1.png and b/development/tables/ECG/egt03_files/figure-html/teal-1.png differ diff --git a/development/tables/ECG/egt04.html b/development/tables/ECG/egt04.html index 3b719348da..d1bdc5a112 100644 --- a/development/tables/ECG/egt04.html +++ b/development/tables/ECG/egt04.html @@ -1553,7 +1553,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:47:37 UTC"
+
[1] "2024-04-10 17:48:34 UTC"

Session Info

@@ -1584,7 +1584,7 @@ other attached packages: [1] dplyr_1.1.4 tern_0.9.3.9031 rtables_0.6.6.9011 -[4] magrittr_2.0.3 formatters_0.5.5.9020 scda_0.1.6.9017 +[4] magrittr_2.0.3 formatters_0.5.5.9021 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/ECG/egt05_qtcat.html b/development/tables/ECG/egt05_qtcat.html index 737183d7e2..2ee2ba88a3 100644 --- a/development/tables/ECG/egt05_qtcat.html +++ b/development/tables/ECG/egt05_qtcat.html @@ -1735,7 +1735,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:47:31 UTC"
+
[1] "2024-04-10 17:48:28 UTC"

Session Info

@@ -1765,19 +1765,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] scda_0.1.6.9017 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1799,7 +1799,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/ECG/egt05_qtcat_files/figure-html/teal-1.png b/development/tables/ECG/egt05_qtcat_files/figure-html/teal-1.png index bd1f318fe2..54c1c56994 100644 Binary files a/development/tables/ECG/egt05_qtcat_files/figure-html/teal-1.png and b/development/tables/ECG/egt05_qtcat_files/figure-html/teal-1.png differ diff --git a/development/tables/adverse-events/aet01.html b/development/tables/adverse-events/aet01.html index dcb5fbf176..8a5d910171 100644 --- a/development/tables/adverse-events/aet01.html +++ b/development/tables/adverse-events/aet01.html @@ -1965,7 +1965,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:44:51 UTC"
+
[1] "2024-04-10 17:45:39 UTC"

Session Info

@@ -1995,19 +1995,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] dplyr_1.1.4 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -2029,7 +2029,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/adverse-events/aet01_aesi.html b/development/tables/adverse-events/aet01_aesi.html index caf53eb8d9..981971ea1b 100644 --- a/development/tables/adverse-events/aet01_aesi.html +++ b/development/tables/adverse-events/aet01_aesi.html @@ -2398,7 +2398,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:40:40 UTC"
+
[1] "2024-04-10 17:41:20 UTC"

Session Info

@@ -2428,19 +2428,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] dplyr_1.1.4 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -2462,7 +2462,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/adverse-events/aet01_aesi_files/figure-html/teal-1.png b/development/tables/adverse-events/aet01_aesi_files/figure-html/teal-1.png index 6f7035ef42..23c7668b9d 100644 Binary files a/development/tables/adverse-events/aet01_aesi_files/figure-html/teal-1.png and b/development/tables/adverse-events/aet01_aesi_files/figure-html/teal-1.png differ diff --git a/development/tables/adverse-events/aet01_files/figure-html/teal-1.png b/development/tables/adverse-events/aet01_files/figure-html/teal-1.png index 8ba4acc093..eaf7ed5c02 100644 Binary files a/development/tables/adverse-events/aet01_files/figure-html/teal-1.png and b/development/tables/adverse-events/aet01_files/figure-html/teal-1.png differ diff --git a/development/tables/adverse-events/aet02.html b/development/tables/adverse-events/aet02.html index af89bb17cc..06dc7ce5fa 100644 --- a/development/tables/adverse-events/aet02.html +++ b/development/tables/adverse-events/aet02.html @@ -2509,7 +2509,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:42:22 UTC"
+
[1] "2024-04-10 17:43:05 UTC"

Session Info

@@ -2539,19 +2539,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -2573,7 +2573,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/adverse-events/aet02_files/figure-html/teal-1.png b/development/tables/adverse-events/aet02_files/figure-html/teal-1.png index 0e08e62b4c..a91ae3e904 100644 Binary files a/development/tables/adverse-events/aet02_files/figure-html/teal-1.png and b/development/tables/adverse-events/aet02_files/figure-html/teal-1.png differ diff --git a/development/tables/adverse-events/aet02_smq.html b/development/tables/adverse-events/aet02_smq.html index 6e98159609..fc935d6002 100644 --- a/development/tables/adverse-events/aet02_smq.html +++ b/development/tables/adverse-events/aet02_smq.html @@ -1714,7 +1714,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:42:54 UTC"
+
[1] "2024-04-10 17:43:38 UTC"

Session Info

@@ -1744,19 +1744,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 stringr_1.5.1 [9] scda_0.1.6.9017 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 dplyr_1.1.4 +[13] formatters_0.5.5.9021 dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1778,7 +1778,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/adverse-events/aet02_smq_files/figure-html/teal-1.png b/development/tables/adverse-events/aet02_smq_files/figure-html/teal-1.png index 234bfd3b18..5056a96f58 100644 Binary files a/development/tables/adverse-events/aet02_smq_files/figure-html/teal-1.png and b/development/tables/adverse-events/aet02_smq_files/figure-html/teal-1.png differ diff --git a/development/tables/adverse-events/aet03.html b/development/tables/adverse-events/aet03.html index 09fd64f4fd..bb7dd1929c 100644 --- a/development/tables/adverse-events/aet03.html +++ b/development/tables/adverse-events/aet03.html @@ -1680,7 +1680,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:44:35 UTC"
+
[1] "2024-04-10 17:45:22 UTC"

Session Info

@@ -1710,19 +1710,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] dplyr_1.1.4 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1744,7 +1744,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/adverse-events/aet03_files/figure-html/teal-1.png b/development/tables/adverse-events/aet03_files/figure-html/teal-1.png index 4388dd2739..dd174b67c1 100644 Binary files a/development/tables/adverse-events/aet03_files/figure-html/teal-1.png and b/development/tables/adverse-events/aet03_files/figure-html/teal-1.png differ diff --git a/development/tables/adverse-events/aet04.html b/development/tables/adverse-events/aet04.html index ebb8fc11c4..9d0db5f9f4 100644 --- a/development/tables/adverse-events/aet04.html +++ b/development/tables/adverse-events/aet04.html @@ -2894,7 +2894,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:41:44 UTC"
+
[1] "2024-04-10 17:42:27 UTC"

Session Info

@@ -2924,19 +2924,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -2958,7 +2958,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/adverse-events/aet04_files/figure-html/teal-1.png b/development/tables/adverse-events/aet04_files/figure-html/teal-1.png index 2f1658dc95..9a8418e1f6 100644 Binary files a/development/tables/adverse-events/aet04_files/figure-html/teal-1.png and b/development/tables/adverse-events/aet04_files/figure-html/teal-1.png differ diff --git a/development/tables/adverse-events/aet04_pi.html b/development/tables/adverse-events/aet04_pi.html index 84ed40f7c2..528046d67a 100644 --- a/development/tables/adverse-events/aet04_pi.html +++ b/development/tables/adverse-events/aet04_pi.html @@ -1998,7 +1998,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:43:31 UTC"
+
[1] "2024-04-10 17:44:17 UTC"

Session Info

@@ -2028,19 +2028,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 tern_0.9.3.9031 [9] rtables_0.6.6.9011 magrittr_2.0.3 -[11] formatters_0.5.5.9020 dplyr_1.1.4 +[11] formatters_0.5.5.9021 dplyr_1.1.4 [13] scda_0.1.6.9017 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -2062,7 +2062,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/adverse-events/aet04_pi_files/figure-html/teal-1.png b/development/tables/adverse-events/aet04_pi_files/figure-html/teal-1.png index 5ed9689e95..0aaf84c7b5 100644 Binary files a/development/tables/adverse-events/aet04_pi_files/figure-html/teal-1.png and b/development/tables/adverse-events/aet04_pi_files/figure-html/teal-1.png differ diff --git a/development/tables/adverse-events/aet05.html b/development/tables/adverse-events/aet05.html index a25dd3bf65..24a9ef149c 100644 --- a/development/tables/adverse-events/aet05.html +++ b/development/tables/adverse-events/aet05.html @@ -1596,7 +1596,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:40:56 UTC"
+
[1] "2024-04-10 17:41:37 UTC"

Session Info

@@ -1626,19 +1626,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 tern_0.9.3.9031 [9] rtables_0.6.6.9011 magrittr_2.0.3 -[11] formatters_0.5.5.9020 scda_0.1.6.9017 +[11] formatters_0.5.5.9021 scda_0.1.6.9017 [13] dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1660,7 +1660,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/adverse-events/aet05_all.html b/development/tables/adverse-events/aet05_all.html index 7b20106f83..9f9418c32b 100644 --- a/development/tables/adverse-events/aet05_all.html +++ b/development/tables/adverse-events/aet05_all.html @@ -1604,7 +1604,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:42:00 UTC"
+
[1] "2024-04-10 17:42:42 UTC"

Session Info

@@ -1634,19 +1634,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] scda_0.1.6.9017 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1668,7 +1668,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/adverse-events/aet05_all_files/figure-html/teal-1.png b/development/tables/adverse-events/aet05_all_files/figure-html/teal-1.png index 8f42f7f563..f167c35aba 100644 Binary files a/development/tables/adverse-events/aet05_all_files/figure-html/teal-1.png and b/development/tables/adverse-events/aet05_all_files/figure-html/teal-1.png differ diff --git a/development/tables/adverse-events/aet05_files/figure-html/teal-1.png b/development/tables/adverse-events/aet05_files/figure-html/teal-1.png index b3d4fb0373..0e287990aa 100644 Binary files a/development/tables/adverse-events/aet05_files/figure-html/teal-1.png and b/development/tables/adverse-events/aet05_files/figure-html/teal-1.png differ diff --git a/development/tables/adverse-events/aet06.html b/development/tables/adverse-events/aet06.html index dfa2544bf9..a99fa6d63c 100644 --- a/development/tables/adverse-events/aet06.html +++ b/development/tables/adverse-events/aet06.html @@ -2085,7 +2085,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:41:17 UTC"
+
[1] "2024-04-10 17:41:59 UTC"

Session Info

@@ -2115,19 +2115,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -2149,7 +2149,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/adverse-events/aet06_files/figure-html/teal-1.png b/development/tables/adverse-events/aet06_files/figure-html/teal-1.png index 97ee503838..2cf03fed2e 100644 Binary files a/development/tables/adverse-events/aet06_files/figure-html/teal-1.png and b/development/tables/adverse-events/aet06_files/figure-html/teal-1.png differ diff --git a/development/tables/adverse-events/aet06_smq.html b/development/tables/adverse-events/aet06_smq.html index 9d38887abc..6f3e9218e2 100644 --- a/development/tables/adverse-events/aet06_smq.html +++ b/development/tables/adverse-events/aet06_smq.html @@ -1812,7 +1812,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:42:38 UTC"
+
[1] "2024-04-10 17:43:22 UTC"

Session Info

@@ -1842,19 +1842,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 stringr_1.5.1 [9] scda_0.1.6.9017 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 dplyr_1.1.4 +[13] formatters_0.5.5.9021 dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1876,7 +1876,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/adverse-events/aet06_smq_files/figure-html/teal-1.png b/development/tables/adverse-events/aet06_smq_files/figure-html/teal-1.png index a7112b8a0f..dfd1628560 100644 Binary files a/development/tables/adverse-events/aet06_smq_files/figure-html/teal-1.png and b/development/tables/adverse-events/aet06_smq_files/figure-html/teal-1.png differ diff --git a/development/tables/adverse-events/aet07.html b/development/tables/adverse-events/aet07.html index 5ca037059f..90474ff9c3 100644 --- a/development/tables/adverse-events/aet07.html +++ b/development/tables/adverse-events/aet07.html @@ -1648,7 +1648,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:43:09 UTC"
+
[1] "2024-04-10 17:43:53 UTC"

Session Info

@@ -1678,19 +1678,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1712,7 +1712,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/adverse-events/aet07_files/figure-html/teal-1.png b/development/tables/adverse-events/aet07_files/figure-html/teal-1.png index a72d79da0e..079c91a93a 100644 Binary files a/development/tables/adverse-events/aet07_files/figure-html/teal-1.png and b/development/tables/adverse-events/aet07_files/figure-html/teal-1.png differ diff --git a/development/tables/adverse-events/aet09.html b/development/tables/adverse-events/aet09.html index 581f93330c..41171e78b4 100644 --- a/development/tables/adverse-events/aet09.html +++ b/development/tables/adverse-events/aet09.html @@ -1742,7 +1742,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:44:18 UTC"
+
[1] "2024-04-10 17:45:05 UTC"

Session Info

@@ -1772,19 +1772,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1806,7 +1806,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/adverse-events/aet09_files/figure-html/teal-1.png b/development/tables/adverse-events/aet09_files/figure-html/teal-1.png index 6dfd217d69..7b9c17b03d 100644 Binary files a/development/tables/adverse-events/aet09_files/figure-html/teal-1.png and b/development/tables/adverse-events/aet09_files/figure-html/teal-1.png differ diff --git a/development/tables/adverse-events/aet09_smq.html b/development/tables/adverse-events/aet09_smq.html index 30018c21d2..04e3f0bfc9 100644 --- a/development/tables/adverse-events/aet09_smq.html +++ b/development/tables/adverse-events/aet09_smq.html @@ -1718,7 +1718,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:44:02 UTC"
+
[1] "2024-04-10 17:44:48 UTC"

Session Info

@@ -1748,19 +1748,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 stringr_1.5.1 [9] scda_0.1.6.9017 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 dplyr_1.1.4 +[13] formatters_0.5.5.9021 dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1782,7 +1782,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/adverse-events/aet09_smq_files/figure-html/teal-1.png b/development/tables/adverse-events/aet09_smq_files/figure-html/teal-1.png index 346dba9bb9..a0898c14ab 100644 Binary files a/development/tables/adverse-events/aet09_smq_files/figure-html/teal-1.png and b/development/tables/adverse-events/aet09_smq_files/figure-html/teal-1.png differ diff --git a/development/tables/adverse-events/aet10.html b/development/tables/adverse-events/aet10.html index 9e9169e963..22620b2d8b 100644 --- a/development/tables/adverse-events/aet10.html +++ b/development/tables/adverse-events/aet10.html @@ -1654,7 +1654,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:43:47 UTC"
+
[1] "2024-04-10 17:44:32 UTC"

Session Info

@@ -1684,19 +1684,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] dplyr_1.1.4 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1718,7 +1718,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/adverse-events/aet10_files/figure-html/teal-1.png b/development/tables/adverse-events/aet10_files/figure-html/teal-1.png index 0cbe0c30cc..b5e7dc78c4 100644 Binary files a/development/tables/adverse-events/aet10_files/figure-html/teal-1.png and b/development/tables/adverse-events/aet10_files/figure-html/teal-1.png differ diff --git a/development/tables/concomitant-medications/cmt01.html b/development/tables/concomitant-medications/cmt01.html index 8ddfb30f4c..dd2cd4995e 100644 --- a/development/tables/concomitant-medications/cmt01.html +++ b/development/tables/concomitant-medications/cmt01.html @@ -1813,7 +1813,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:49:50 UTC"
+
[1] "2024-04-10 17:50:53 UTC"

Session Info

@@ -1843,19 +1843,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1877,7 +1877,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/concomitant-medications/cmt01_files/figure-html/teal-1.png b/development/tables/concomitant-medications/cmt01_files/figure-html/teal-1.png index 28873b33b8..e4805273dd 100644 Binary files a/development/tables/concomitant-medications/cmt01_files/figure-html/teal-1.png and b/development/tables/concomitant-medications/cmt01_files/figure-html/teal-1.png differ diff --git a/development/tables/concomitant-medications/cmt01a.html b/development/tables/concomitant-medications/cmt01a.html index 2716078bf3..6ac6b478e8 100644 --- a/development/tables/concomitant-medications/cmt01a.html +++ b/development/tables/concomitant-medications/cmt01a.html @@ -1894,7 +1894,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:50:23 UTC"
+
[1] "2024-04-10 17:51:27 UTC"

Session Info

@@ -1924,19 +1924,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1958,7 +1958,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/concomitant-medications/cmt01a_files/figure-html/teal-1.png b/development/tables/concomitant-medications/cmt01a_files/figure-html/teal-1.png index bd17ad5f0f..0487e9a219 100644 Binary files a/development/tables/concomitant-medications/cmt01a_files/figure-html/teal-1.png and b/development/tables/concomitant-medications/cmt01a_files/figure-html/teal-1.png differ diff --git a/development/tables/concomitant-medications/cmt01b.html b/development/tables/concomitant-medications/cmt01b.html index 27c5f8097e..6adf9a6fc6 100644 --- a/development/tables/concomitant-medications/cmt01b.html +++ b/development/tables/concomitant-medications/cmt01b.html @@ -1957,7 +1957,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:50:41 UTC"
+
[1] "2024-04-10 17:51:46 UTC"

Session Info

@@ -1987,19 +1987,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -2021,7 +2021,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/concomitant-medications/cmt01b_files/figure-html/teal-1.png b/development/tables/concomitant-medications/cmt01b_files/figure-html/teal-1.png index 8c13f0f2ea..72e9aff020 100644 Binary files a/development/tables/concomitant-medications/cmt01b_files/figure-html/teal-1.png and b/development/tables/concomitant-medications/cmt01b_files/figure-html/teal-1.png differ diff --git a/development/tables/concomitant-medications/cmt02_pt.html b/development/tables/concomitant-medications/cmt02_pt.html index 5fe57fcb96..3ce872223b 100644 --- a/development/tables/concomitant-medications/cmt02_pt.html +++ b/development/tables/concomitant-medications/cmt02_pt.html @@ -1590,7 +1590,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:50:05 UTC"
+
[1] "2024-04-10 17:51:09 UTC"

Session Info

@@ -1620,19 +1620,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1654,7 +1654,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/concomitant-medications/cmt02_pt_files/figure-html/teal-1.png b/development/tables/concomitant-medications/cmt02_pt_files/figure-html/teal-1.png index f0cbe1fc25..12ec1e8da4 100644 Binary files a/development/tables/concomitant-medications/cmt02_pt_files/figure-html/teal-1.png and b/development/tables/concomitant-medications/cmt02_pt_files/figure-html/teal-1.png differ diff --git a/development/tables/deaths/dtht01.html b/development/tables/deaths/dtht01.html index b136c72e98..aa62758535 100644 --- a/development/tables/deaths/dtht01.html +++ b/development/tables/deaths/dtht01.html @@ -1708,7 +1708,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:51:22 UTC"
+
[1] "2024-04-10 17:52:27 UTC"

Session Info

@@ -1739,7 +1739,7 @@ other attached packages: [1] dplyr_1.1.4 scda_0.1.6.9017 tern_0.9.3.9031 -[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9020 +[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/demography/dmt01.html b/development/tables/demography/dmt01.html index 6595746f68..dc6c83ce85 100644 --- a/development/tables/demography/dmt01.html +++ b/development/tables/demography/dmt01.html @@ -1870,7 +1870,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:35:58 UTC"
+
[1] "2024-04-10 17:36:28 UTC"

Session Info

@@ -1900,19 +1900,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 tidyr_1.3.1 [9] dplyr_1.1.4 scda_0.1.6.9017 [11] tern_0.9.3.9031 rtables_0.6.6.9011 -[13] magrittr_2.0.3 formatters_0.5.5.9020 +[13] magrittr_2.0.3 formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1934,7 +1934,7 @@ [67] brio_1.1.4 R6_2.5.1 Rdpack_2.6 [70] evaluate_0.23 lattice_0.22-6 rbibutils_2.2.16 [73] backports_1.4.1 memoise_2.0.1 broom_1.0.5 -[76] teal.reporter_0.3.1.9002 bslib_0.7.0 httpuv_1.6.15 +[76] teal.reporter_0.3.1.9003 bslib_0.7.0 httpuv_1.6.15 [79] Rcpp_1.0.12 shinyvalidate_0.1.3 coda_0.19-4.1 [82] nlme_3.1-164 checkmate_2.3.1 xfun_0.43 [85] zoo_1.8-12 forcats_1.0.0 pkgconfig_2.0.3 diff --git a/development/tables/demography/dmt01_files/figure-html/teal-1.png b/development/tables/demography/dmt01_files/figure-html/teal-1.png index 98ca642ade..efbaeca139 100644 Binary files a/development/tables/demography/dmt01_files/figure-html/teal-1.png and b/development/tables/demography/dmt01_files/figure-html/teal-1.png differ diff --git a/development/tables/disclosures/disclosurest01.html b/development/tables/disclosures/disclosurest01.html index 682df14a36..41920ba2e7 100644 --- a/development/tables/disclosures/disclosurest01.html +++ b/development/tables/disclosures/disclosurest01.html @@ -1947,7 +1947,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:46:04 UTC"
+
[1] "2024-04-10 17:46:55 UTC"

Session Info

@@ -1978,7 +1978,7 @@ other attached packages: [1] dplyr_1.1.4 scda_0.1.6.9017 tern_0.9.3.9031 -[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9020 +[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/disclosures/eudrat01.html b/development/tables/disclosures/eudrat01.html index 736d0d95c6..d98657fe43 100644 --- a/development/tables/disclosures/eudrat01.html +++ b/development/tables/disclosures/eudrat01.html @@ -1587,7 +1587,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:46:16 UTC"
+
[1] "2024-04-10 17:47:07 UTC"

Session Info

@@ -1618,7 +1618,7 @@ other attached packages: [1] dplyr_1.1.4 scda_0.1.6.9017 tern_0.9.3.9031 -[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9020 +[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/disclosures/eudrat02.html b/development/tables/disclosures/eudrat02.html index b2bef5b0ad..be3c165e79 100644 --- a/development/tables/disclosures/eudrat02.html +++ b/development/tables/disclosures/eudrat02.html @@ -1535,7 +1535,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:46:10 UTC"
+
[1] "2024-04-10 17:47:01 UTC"

Session Info

@@ -1566,7 +1566,7 @@ other attached packages: [1] dplyr_1.1.4 scda_0.1.6.9017 tern_0.9.3.9031 -[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9020 +[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/disposition/dst01.html b/development/tables/disposition/dst01.html index ee5b537c5f..9118bfce88 100644 --- a/development/tables/disposition/dst01.html +++ b/development/tables/disposition/dst01.html @@ -1682,7 +1682,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:45:42 UTC"
+
[1] "2024-04-10 17:46:32 UTC"

Session Info

@@ -1712,19 +1712,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] scda_0.1.6.9017 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1746,7 +1746,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/disposition/dst01_files/figure-html/teal-1.png b/development/tables/disposition/dst01_files/figure-html/teal-1.png index 12e9ec2b9d..7b086cd958 100644 Binary files a/development/tables/disposition/dst01_files/figure-html/teal-1.png and b/development/tables/disposition/dst01_files/figure-html/teal-1.png differ diff --git a/development/tables/disposition/pdt01.html b/development/tables/disposition/pdt01.html index ad70f012fe..166c1696b3 100644 --- a/development/tables/disposition/pdt01.html +++ b/development/tables/disposition/pdt01.html @@ -1599,7 +1599,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:45:56 UTC"
+
[1] "2024-04-10 17:46:47 UTC"

Session Info

@@ -1629,19 +1629,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1663,7 +1663,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/disposition/pdt01_files/figure-html/teal-1.png b/development/tables/disposition/pdt01_files/figure-html/teal-1.png index e280ee2dd6..e90840d8ca 100644 Binary files a/development/tables/disposition/pdt01_files/figure-html/teal-1.png and b/development/tables/disposition/pdt01_files/figure-html/teal-1.png differ diff --git a/development/tables/disposition/pdt02.html b/development/tables/disposition/pdt02.html index d8a2598bec..23268f73fd 100644 --- a/development/tables/disposition/pdt02.html +++ b/development/tables/disposition/pdt02.html @@ -1530,7 +1530,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:45:27 UTC"
+
[1] "2024-04-10 17:46:17 UTC"

Session Info

@@ -1561,7 +1561,7 @@ other attached packages: [1] dplyr_1.1.4 tern_0.9.3.9031 rtables_0.6.6.9011 -[4] magrittr_2.0.3 formatters_0.5.5.9020 scda_0.1.6.9017 +[4] magrittr_2.0.3 formatters_0.5.5.9021 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/efficacy/aovt01.html b/development/tables/efficacy/aovt01.html index 94b4b14bc9..2be398dd09 100644 --- a/development/tables/efficacy/aovt01.html +++ b/development/tables/efficacy/aovt01.html @@ -1622,7 +1622,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:39:42 UTC"
+
[1] "2024-04-10 17:40:21 UTC"

Session Info

@@ -1652,19 +1652,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] scda_0.1.6.9017 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1686,7 +1686,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/efficacy/aovt01_files/figure-html/teal-1.png b/development/tables/efficacy/aovt01_files/figure-html/teal-1.png index 65d61278f8..ed05182c8e 100644 Binary files a/development/tables/efficacy/aovt01_files/figure-html/teal-1.png and b/development/tables/efficacy/aovt01_files/figure-html/teal-1.png differ diff --git a/development/tables/efficacy/aovt02.html b/development/tables/efficacy/aovt02.html index bf3eaeb007..83a9777311 100644 --- a/development/tables/efficacy/aovt02.html +++ b/development/tables/efficacy/aovt02.html @@ -1605,7 +1605,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:39:16 UTC"
+
[1] "2024-04-10 17:39:53 UTC"

Session Info

@@ -1635,19 +1635,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] scda_0.1.6.9017 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1669,7 +1669,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/efficacy/aovt02_files/figure-html/teal-1.png b/development/tables/efficacy/aovt02_files/figure-html/teal-1.png index 71a1b12769..34ef208fa2 100644 Binary files a/development/tables/efficacy/aovt02_files/figure-html/teal-1.png and b/development/tables/efficacy/aovt02_files/figure-html/teal-1.png differ diff --git a/development/tables/efficacy/aovt03.html b/development/tables/efficacy/aovt03.html index 19be92ddb6..9044a213cc 100644 --- a/development/tables/efficacy/aovt03.html +++ b/development/tables/efficacy/aovt03.html @@ -1564,7 +1564,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:39:25 UTC"
+
[1] "2024-04-10 17:40:03 UTC"

Session Info

@@ -1595,7 +1595,7 @@ other attached packages: [1] dplyr_1.1.4 tern_0.9.3.9031 rtables_0.6.6.9011 -[4] magrittr_2.0.3 formatters_0.5.5.9020 scda_0.1.6.9017 +[4] magrittr_2.0.3 formatters_0.5.5.9021 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] sandwich_3.1-0 utf8_1.2.4 generics_0.1.3 tidyr_1.3.1 diff --git a/development/tables/efficacy/cfbt01.html b/development/tables/efficacy/cfbt01.html index b0e7d285eb..599ae265ce 100644 --- a/development/tables/efficacy/cfbt01.html +++ b/development/tables/efficacy/cfbt01.html @@ -1647,7 +1647,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:37:50 UTC"
+
[1] "2024-04-10 17:38:24 UTC"

Session Info

@@ -1677,23 +1677,23 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] scda_0.1.6.9017 loaded via a namespace (and not attached): - [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 + [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 [10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 [13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 [16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 [19] ps_1.7.6 purrr_1.0.2 xfun_0.43 -[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002 +[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003 [25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 [28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 [31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 diff --git a/development/tables/efficacy/cfbt01_files/figure-html/teal-1.png b/development/tables/efficacy/cfbt01_files/figure-html/teal-1.png index d1e3cf93a8..f9b7d4a5e9 100644 Binary files a/development/tables/efficacy/cfbt01_files/figure-html/teal-1.png and b/development/tables/efficacy/cfbt01_files/figure-html/teal-1.png differ diff --git a/development/tables/efficacy/cmht01.html b/development/tables/efficacy/cmht01.html index bd3bb6a44f..edbc1e7fa9 100644 --- a/development/tables/efficacy/cmht01.html +++ b/development/tables/efficacy/cmht01.html @@ -1728,7 +1728,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:36:43 UTC"
+
[1] "2024-04-10 17:37:14 UTC"

Session Info

@@ -1758,19 +1758,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] scda_0.1.6.9017 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1792,7 +1792,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/efficacy/cmht01_files/figure-html/teal-1.png b/development/tables/efficacy/cmht01_files/figure-html/teal-1.png index 283302aba2..dd55ea74a9 100644 Binary files a/development/tables/efficacy/cmht01_files/figure-html/teal-1.png and b/development/tables/efficacy/cmht01_files/figure-html/teal-1.png differ diff --git a/development/tables/efficacy/coxt01.html b/development/tables/efficacy/coxt01.html index 188a13f140..f8d5356773 100644 --- a/development/tables/efficacy/coxt01.html +++ b/development/tables/efficacy/coxt01.html @@ -1717,7 +1717,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:36:59 UTC"
+
[1] "2024-04-10 17:37:31 UTC"

Session Info

@@ -1747,44 +1747,46 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 tern_0.9.3.9031 [9] rtables_0.6.6.9011 magrittr_2.0.3 -[11] formatters_0.5.5.9020 dplyr_1.1.4 +[11] formatters_0.5.5.9021 dplyr_1.1.4 [13] scda_0.1.6.9017 loaded via a namespace (and not attached): - [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 - [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 - [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 processx_3.8.4 -[13] survival_3.5-8 compiler_4.3.3 sass_0.4.9 -[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 -[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 -[22] websocket_1.4.1 abind_1.4-5 multcomp_1.4-25 -[25] withr_3.0.0 purrr_1.0.2 geepack_1.3.10 -[28] grid_4.3.3 fansi_1.0.6 teal.logger_0.2.0.9001 -[31] xtable_1.8-4 colorspace_2.1-0 ggplot2_3.5.0 -[34] emmeans_1.10.0 scales_1.3.0 MASS_7.3-60.0.1 -[37] cli_3.6.2 mvtnorm_1.2-4 rmarkdown_2.26 -[40] generics_0.1.3 cachem_1.0.8 chromote_0.2.0 -[43] stringr_1.5.1 splines_4.3.3 vctrs_0.6.5 -[46] webshot_0.5.5 Matrix_1.6-5 sandwich_3.1-0 -[49] jsonlite_1.8.8 carData_3.0-5 callr_3.7.6 -[52] car_3.1-2 teal.widgets_0.4.2.9009 testthat_3.2.1 -[55] fontawesome_0.5.2 jquerylib_0.1.4 tidyr_1.3.1 -[58] glue_1.7.0 ps_1.7.6 codetools_0.2-20 -[61] stringi_1.8.3 gtable_0.3.4 later_1.3.2 -[64] munsell_0.5.1 tibble_3.2.1 logger_0.3.0 -[67] pillar_1.9.0 htmltools_0.5.8.1 brio_1.1.4 -[70] R6_2.5.1 Rdpack_2.6 evaluate_0.23 -[73] lattice_0.22-6 rbibutils_2.2.16 backports_1.4.1 -[76] memoise_2.0.1 broom_1.0.5 bslib_0.7.0 -[79] httpuv_1.6.15 Rcpp_1.0.12 coda_0.19-4.1 -[82] nlme_3.1-164 checkmate_2.3.1 xfun_0.43 -[85] zoo_1.8-12 forcats_1.0.0 pkgconfig_2.0.3 + [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 + [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 + [7] digest_0.6.35 estimability_1.5 mime_0.12 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 processx_3.8.4 +[13] survival_3.5-8 compiler_4.3.3 sass_0.4.9 +[16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 +[19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 +[22] websocket_1.4.1 abind_1.4-5 multcomp_1.4-25 +[25] withr_3.0.0 purrr_1.0.2 shinyWidgets_0.8.4 +[28] geepack_1.3.10 grid_4.3.3 fansi_1.0.6 +[31] teal.logger_0.2.0.9001 xtable_1.8-4 colorspace_2.1-0 +[34] ggplot2_3.5.0 emmeans_1.10.0 scales_1.3.0 +[37] MASS_7.3-60.0.1 cli_3.6.2 mvtnorm_1.2-4 +[40] rmarkdown_2.26 generics_0.1.3 cachem_1.0.8 +[43] chromote_0.2.0 stringr_1.5.1 splines_4.3.3 +[46] formatR_1.14 vctrs_0.6.5 webshot_0.5.5 +[49] Matrix_1.6-5 sandwich_3.1-0 jsonlite_1.8.8 +[52] carData_3.0-5 callr_3.7.6 car_3.1-2 +[55] teal.widgets_0.4.2.9009 testthat_3.2.1 fontawesome_0.5.2 +[58] jquerylib_0.1.4 tidyr_1.3.1 glue_1.7.0 +[61] ps_1.7.6 codetools_0.2-20 stringi_1.8.3 +[64] gtable_0.3.4 later_1.3.2 shinycssloaders_1.0.0 +[67] munsell_0.5.1 tibble_3.2.1 logger_0.3.0 +[70] pillar_1.9.0 htmltools_0.5.8.1 brio_1.1.4 +[73] R6_2.5.1 Rdpack_2.6 evaluate_0.23 +[76] lattice_0.22-6 rbibutils_2.2.16 backports_1.4.1 +[79] memoise_2.0.1 broom_1.0.5 teal.reporter_0.3.1.9003 +[82] bslib_0.7.0 httpuv_1.6.15 Rcpp_1.0.12 +[85] shinyvalidate_0.1.3 coda_0.19-4.1 nlme_3.1-164 +[88] checkmate_2.3.1 xfun_0.43 zoo_1.8-12 +[91] forcats_1.0.0 pkgconfig_2.0.3

diff --git a/development/tables/efficacy/coxt01_files/figure-html/teal-1.png b/development/tables/efficacy/coxt01_files/figure-html/teal-1.png index 42be746275..38bbc4e2f3 100644 Binary files a/development/tables/efficacy/coxt01_files/figure-html/teal-1.png and b/development/tables/efficacy/coxt01_files/figure-html/teal-1.png differ diff --git a/development/tables/efficacy/coxt02.html b/development/tables/efficacy/coxt02.html index cc9a1c144d..1cdde53982 100644 --- a/development/tables/efficacy/coxt02.html +++ b/development/tables/efficacy/coxt02.html @@ -1647,7 +1647,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:38:59 UTC"
+
[1] "2024-04-10 17:39:36 UTC"

Session Info

@@ -1677,19 +1677,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 broom_1.0.5 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 processx_3.8.4 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 processx_3.8.4 [13] survival_3.5-8 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1712,7 +1712,7 @@ [70] pillar_1.9.0 htmltools_0.5.8.1 brio_1.1.4 [73] R6_2.5.1 Rdpack_2.6 evaluate_0.23 [76] lattice_0.22-6 rbibutils_2.2.16 backports_1.4.1 -[79] memoise_2.0.1 teal.reporter_0.3.1.9002 bslib_0.7.0 +[79] memoise_2.0.1 teal.reporter_0.3.1.9003 bslib_0.7.0 [82] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [85] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [88] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/efficacy/coxt02_files/figure-html/teal-1.png b/development/tables/efficacy/coxt02_files/figure-html/teal-1.png index 5f987aa8ef..7648a62484 100644 Binary files a/development/tables/efficacy/coxt02_files/figure-html/teal-1.png and b/development/tables/efficacy/coxt02_files/figure-html/teal-1.png differ diff --git a/development/tables/efficacy/dort01.html b/development/tables/efficacy/dort01.html index 45d7eef84a..1b6be7d779 100644 --- a/development/tables/efficacy/dort01.html +++ b/development/tables/efficacy/dort01.html @@ -1860,7 +1860,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:37:18 UTC"
+
[1] "2024-04-10 17:37:51 UTC"

Session Info

@@ -1890,19 +1890,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] scda_0.1.6.9017 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1924,7 +1924,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/efficacy/dort01_files/figure-html/teal-1.png b/development/tables/efficacy/dort01_files/figure-html/teal-1.png index 655827131d..0038bad275 100644 Binary files a/development/tables/efficacy/dort01_files/figure-html/teal-1.png and b/development/tables/efficacy/dort01_files/figure-html/teal-1.png differ diff --git a/development/tables/efficacy/lgrt02.html b/development/tables/efficacy/lgrt02.html index 53d05c2d4d..7b81ed8f72 100644 --- a/development/tables/efficacy/lgrt02.html +++ b/development/tables/efficacy/lgrt02.html @@ -1750,7 +1750,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:40:00 UTC"
+
[1] "2024-04-10 17:40:38 UTC"

Session Info

@@ -1780,19 +1780,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 tern_0.9.3.9031 [9] rtables_0.6.6.9011 magrittr_2.0.3 -[11] formatters_0.5.5.9020 dplyr_1.1.4 +[11] formatters_0.5.5.9021 dplyr_1.1.4 [13] scda_0.1.6.9017 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 processx_3.8.4 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 processx_3.8.4 [13] survival_3.5-8 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1815,7 +1815,7 @@ [70] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [73] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [76] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[79] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[79] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [82] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [85] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [88] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/efficacy/lgrt02_files/figure-html/teal-1.png b/development/tables/efficacy/lgrt02_files/figure-html/teal-1.png index 21ecd9734e..aaa7573db5 100644 Binary files a/development/tables/efficacy/lgrt02_files/figure-html/teal-1.png and b/development/tables/efficacy/lgrt02_files/figure-html/teal-1.png differ diff --git a/development/tables/efficacy/mmrmt01.html b/development/tables/efficacy/mmrmt01.html index 86cce98922..b885186a32 100644 --- a/development/tables/efficacy/mmrmt01.html +++ b/development/tables/efficacy/mmrmt01.html @@ -1953,7 +1953,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:38:43 UTC"
+
[1] "2024-04-10 17:39:19 UTC"

Session Info

@@ -1983,25 +1983,25 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 broom_1.0.5 [9] scda_0.1.6.9017 tern.mmrm_0.3.0.9005 [11] tern_0.9.3.9031 rtables_0.6.6.9011 -[13] magrittr_2.0.3 formatters_0.5.5.9020 +[13] magrittr_2.0.3 formatters_0.5.5.9021 [15] dplyr_1.1.4 loaded via a namespace (and not attached): [1] Rdpack_2.6 mmrm_0.3.11 formatR_1.14 - [4] tern.gee_0.1.3.9004 logger_0.3.0 testthat_3.2.1 + [4] tern.gee_0.1.3.9005 logger_0.3.0 testthat_3.2.1 [7] sandwich_3.1-0 rlang_1.1.3 multcomp_1.4-25 [10] compiler_4.3.3 callr_3.7.6 vctrs_0.6.5 [13] stringr_1.5.1 pkgconfig_2.0.3 fastmap_1.1.1 [16] backports_1.4.1 fontawesome_0.5.2 utf8_1.2.4 [19] promises_1.3.0 rmarkdown_2.26 ps_1.7.6 [22] purrr_1.0.2 xfun_0.43 shinyvalidate_0.1.3 -[25] cachem_1.0.8 teal.reporter_0.3.1.9002 jsonlite_1.8.8 +[25] cachem_1.0.8 teal.reporter_0.3.1.9003 jsonlite_1.8.8 [28] later_1.3.2 parallel_4.3.3 R6_2.5.1 [31] bslib_0.7.0 stringi_1.8.3 parallelly_1.37.1 [34] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 diff --git a/development/tables/efficacy/mmrmt01_files/figure-html/teal-1.png b/development/tables/efficacy/mmrmt01_files/figure-html/teal-1.png index 8962c9d164..0f3fa5ee8a 100644 Binary files a/development/tables/efficacy/mmrmt01_files/figure-html/teal-1.png and b/development/tables/efficacy/mmrmt01_files/figure-html/teal-1.png differ diff --git a/development/tables/efficacy/onct05.html b/development/tables/efficacy/onct05.html index 3beec6151b..2d03735882 100644 --- a/development/tables/efficacy/onct05.html +++ b/development/tables/efficacy/onct05.html @@ -1705,7 +1705,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:37:34 UTC"
+
[1] "2024-04-10 17:38:08 UTC"

Session Info

@@ -1735,16 +1735,16 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] forcats_1.0.0 teal.modules.clinical_0.9.0.9014 - [3] teal.transform_0.5.0.9004 teal_0.15.2.9020 - [5] teal.slice_0.5.0.9009 teal.data_0.5.0.9006 + [1] forcats_1.0.0 teal.modules.clinical_0.9.0.9016 + [3] teal.transform_0.5.0.9004 teal_0.15.2.9022 + [5] teal.slice_0.5.0.9010 teal.data_0.5.0.9007 [7] teal.code_0.5.0.9004 shiny_1.8.1.1 [9] scda_0.1.6.9017 dplyr_1.1.4 [11] tern_0.9.3.9031 rtables_0.6.6.9011 -[13] magrittr_2.0.3 formatters_0.5.5.9020 +[13] magrittr_2.0.3 formatters_0.5.5.9021 loaded via a namespace (and not attached): - [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 + [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 [10] systemfonts_1.0.6 callr_3.7.6 vctrs_0.6.5 @@ -1752,7 +1752,7 @@ [16] fontawesome_0.5.2 labeling_0.4.3 utf8_1.2.4 [19] promises_1.3.0 rmarkdown_2.26 ps_1.7.6 [22] ragg_1.3.0 purrr_1.0.2 xfun_0.43 -[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002 +[25] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003 [28] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 [31] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 [34] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 diff --git a/development/tables/efficacy/onct05_files/figure-html/teal-1.png b/development/tables/efficacy/onct05_files/figure-html/teal-1.png index 54a4a00321..aa71b34f21 100644 Binary files a/development/tables/efficacy/onct05_files/figure-html/teal-1.png and b/development/tables/efficacy/onct05_files/figure-html/teal-1.png differ diff --git a/development/tables/efficacy/ratet01.html b/development/tables/efficacy/ratet01.html index 2a8ec86b24..a944744f10 100644 --- a/development/tables/efficacy/ratet01.html +++ b/development/tables/efficacy/ratet01.html @@ -1570,7 +1570,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:40:07 UTC"
+
[1] "2024-04-10 17:40:46 UTC"

Session Info

@@ -1601,7 +1601,7 @@ other attached packages: [1] dplyr_1.1.4 tern_0.9.3.9031 rtables_0.6.6.9011 -[4] magrittr_2.0.3 formatters_0.5.5.9020 scda_0.1.6.9017 +[4] magrittr_2.0.3 formatters_0.5.5.9021 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] sandwich_3.1-0 utf8_1.2.4 generics_0.1.3 tidyr_1.3.1 diff --git a/development/tables/efficacy/rbmit01.html b/development/tables/efficacy/rbmit01.html index 6cf6c8091d..c7cd10082c 100644 --- a/development/tables/efficacy/rbmit01.html +++ b/development/tables/efficacy/rbmit01.html @@ -1555,8 +1555,8 @@

 SAMPLING FOR MODEL 'MMRM' NOW (CHAIN 1).
 Chain 1: 
-Chain 1: Gradient evaluation took 0.000354 seconds
-Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 3.54 seconds.
+Chain 1: Gradient evaluation took 0.000383 seconds
+Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 3.83 seconds.
 Chain 1: Adjust your expectations accordingly!
 Chain 1: 
 Chain 1: 
@@ -1713,7 +1713,7 @@
 
Code
Sys.time()
-
[1] "2024-04-06 17:38:01 UTC"
+
[1] "2024-04-10 17:38:35 UTC"

Session Info

@@ -1745,7 +1745,7 @@ other attached packages: [1] broom_1.0.5 dplyr_1.1.4 tern.rbmi_0.1.2.9013 [4] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[7] formatters_0.5.5.9020 rbmi_1.2.6 +[7] formatters_0.5.5.9021 rbmi_1.2.6 loaded via a namespace (and not attached): [1] gtable_0.3.4 TMB_1.9.11 xfun_0.43 ggplot2_3.5.0 diff --git a/development/tables/efficacy/rspt01.html b/development/tables/efficacy/rspt01.html index 80bf34135d..6d2c8051e3 100644 --- a/development/tables/efficacy/rspt01.html +++ b/development/tables/efficacy/rspt01.html @@ -1883,7 +1883,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:38:20 UTC"
+
[1] "2024-04-10 17:38:55 UTC"

Session Info

@@ -1913,19 +1913,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1947,7 +1947,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/efficacy/rspt01_files/figure-html/teal-1.png b/development/tables/efficacy/rspt01_files/figure-html/teal-1.png index 39271911ab..1704f52922 100644 Binary files a/development/tables/efficacy/rspt01_files/figure-html/teal-1.png and b/development/tables/efficacy/rspt01_files/figure-html/teal-1.png differ diff --git a/development/tables/efficacy/ttet01.html b/development/tables/efficacy/ttet01.html index 3498f3b452..2dddd4de15 100644 --- a/development/tables/efficacy/ttet01.html +++ b/development/tables/efficacy/ttet01.html @@ -2098,7 +2098,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:36:21 UTC"
+
[1] "2024-04-10 17:36:51 UTC"

Session Info

@@ -2128,19 +2128,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] scda_0.1.6.9017 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -2162,7 +2162,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/efficacy/ttet01_files/figure-html/teal-1.png b/development/tables/efficacy/ttet01_files/figure-html/teal-1.png index d2613d8d68..a760905462 100644 Binary files a/development/tables/efficacy/ttet01_files/figure-html/teal-1.png and b/development/tables/efficacy/ttet01_files/figure-html/teal-1.png differ diff --git a/development/tables/exposure/ext01.html b/development/tables/exposure/ext01.html index e2aa2f57d7..f890cc2da2 100644 --- a/development/tables/exposure/ext01.html +++ b/development/tables/exposure/ext01.html @@ -1884,7 +1884,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:55:23 UTC"
+
[1] "2024-04-10 17:56:38 UTC"

Session Info

@@ -1914,23 +1914,23 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 tidyr_1.3.1 [9] dplyr_1.1.4 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 scda_0.1.6.9017 +[13] formatters_0.5.5.9021 scda_0.1.6.9017 loaded via a namespace (and not attached): - [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 + [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 [10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 [13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 [16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 [19] ps_1.7.6 purrr_1.0.2 xfun_0.43 -[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002 +[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003 [25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 [28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 [31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 diff --git a/development/tables/exposure/ext01_files/figure-html/teal-1.png b/development/tables/exposure/ext01_files/figure-html/teal-1.png index 37bf8706c0..257e7d4037 100644 Binary files a/development/tables/exposure/ext01_files/figure-html/teal-1.png and b/development/tables/exposure/ext01_files/figure-html/teal-1.png differ diff --git a/development/tables/lab-results/lbt01.html b/development/tables/lab-results/lbt01.html index ad0dbe4ea6..838019263e 100644 --- a/development/tables/lab-results/lbt01.html +++ b/development/tables/lab-results/lbt01.html @@ -1641,7 +1641,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:52:20 UTC"
+
[1] "2024-04-10 17:53:28 UTC"

Session Info

@@ -1671,23 +1671,23 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] scda_0.1.6.9017 loaded via a namespace (and not attached): - [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 + [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 [10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 [13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 [16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 [19] ps_1.7.6 purrr_1.0.2 xfun_0.43 -[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002 +[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003 [25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 [28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 [31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 diff --git a/development/tables/lab-results/lbt01_files/figure-html/teal-1.png b/development/tables/lab-results/lbt01_files/figure-html/teal-1.png index 481d87ffb8..ea15186f5e 100644 Binary files a/development/tables/lab-results/lbt01_files/figure-html/teal-1.png and b/development/tables/lab-results/lbt01_files/figure-html/teal-1.png differ diff --git a/development/tables/lab-results/lbt02.html b/development/tables/lab-results/lbt02.html index 437665db40..9737663dad 100644 --- a/development/tables/lab-results/lbt02.html +++ b/development/tables/lab-results/lbt02.html @@ -1612,7 +1612,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:54:45 UTC"
+
[1] "2024-04-10 17:55:58 UTC"

Session Info

@@ -1642,23 +1642,23 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] dplyr_1.1.4 teal.modules.clinical_0.9.0.9014 - [3] teal.transform_0.5.0.9004 teal_0.15.2.9020 - [5] teal.slice_0.5.0.9009 teal.data_0.5.0.9006 + [1] dplyr_1.1.4 teal.modules.clinical_0.9.0.9016 + [3] teal.transform_0.5.0.9004 teal_0.15.2.9022 + [5] teal.slice_0.5.0.9010 teal.data_0.5.0.9007 [7] teal.code_0.5.0.9004 shiny_1.8.1.1 [9] tern_0.9.3.9031 rtables_0.6.6.9011 -[11] magrittr_2.0.3 formatters_0.5.5.9020 +[11] magrittr_2.0.3 formatters_0.5.5.9021 [13] scda_0.1.6.9017 loaded via a namespace (and not attached): - [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 + [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 [10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 [13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 [16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 [19] ps_1.7.6 purrr_1.0.2 xfun_0.43 -[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002 +[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003 [25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 [28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 [31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 diff --git a/development/tables/lab-results/lbt02_files/figure-html/teal-1.png b/development/tables/lab-results/lbt02_files/figure-html/teal-1.png index 681b27a927..e6a00f57a7 100644 Binary files a/development/tables/lab-results/lbt02_files/figure-html/teal-1.png and b/development/tables/lab-results/lbt02_files/figure-html/teal-1.png differ diff --git a/development/tables/lab-results/lbt03.html b/development/tables/lab-results/lbt03.html index 56effd976f..6944518e40 100644 --- a/development/tables/lab-results/lbt03.html +++ b/development/tables/lab-results/lbt03.html @@ -1713,7 +1713,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:53:19 UTC"
+
[1] "2024-04-10 17:54:28 UTC"

Session Info

@@ -1743,23 +1743,23 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 tern_0.9.3.9031 [9] rtables_0.6.6.9011 magrittr_2.0.3 -[11] formatters_0.5.5.9020 dplyr_1.1.4 +[11] formatters_0.5.5.9021 dplyr_1.1.4 [13] scda_0.1.6.9017 loaded via a namespace (and not attached): - [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 + [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 [10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 [13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 [16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 [19] ps_1.7.6 purrr_1.0.2 xfun_0.43 -[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002 +[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003 [25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 [28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 [31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 diff --git a/development/tables/lab-results/lbt03_files/figure-html/teal-1.png b/development/tables/lab-results/lbt03_files/figure-html/teal-1.png index 588d1bce42..5674dde8c1 100644 Binary files a/development/tables/lab-results/lbt03_files/figure-html/teal-1.png and b/development/tables/lab-results/lbt03_files/figure-html/teal-1.png differ diff --git a/development/tables/lab-results/lbt04.html b/development/tables/lab-results/lbt04.html index 27b6aa8e18..0540619d52 100644 --- a/development/tables/lab-results/lbt04.html +++ b/development/tables/lab-results/lbt04.html @@ -1575,7 +1575,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:55:00 UTC"
+
[1] "2024-04-10 17:56:13 UTC"

Session Info

@@ -1605,19 +1605,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 tern_0.9.3.9031 [9] rtables_0.6.6.9011 magrittr_2.0.3 -[11] formatters_0.5.5.9020 dplyr_1.1.4 +[11] formatters_0.5.5.9021 dplyr_1.1.4 [13] scda_0.1.6.9017 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1639,7 +1639,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/lab-results/lbt04_files/figure-html/teal-1.png b/development/tables/lab-results/lbt04_files/figure-html/teal-1.png index 190821074a..7de70475d0 100644 Binary files a/development/tables/lab-results/lbt04_files/figure-html/teal-1.png and b/development/tables/lab-results/lbt04_files/figure-html/teal-1.png differ diff --git a/development/tables/lab-results/lbt05.html b/development/tables/lab-results/lbt05.html index 0e64ef7d52..d4ad16c240 100644 --- a/development/tables/lab-results/lbt05.html +++ b/development/tables/lab-results/lbt05.html @@ -1699,7 +1699,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:55:08 UTC"
+
[1] "2024-04-10 17:56:21 UTC"

Session Info

@@ -1730,7 +1730,7 @@ other attached packages: [1] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 +[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/lab-results/lbt06.html b/development/tables/lab-results/lbt06.html index b7416d68f1..a72579849b 100644 --- a/development/tables/lab-results/lbt06.html +++ b/development/tables/lab-results/lbt06.html @@ -1731,7 +1731,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:53:04 UTC"
+
[1] "2024-04-10 17:54:13 UTC"

Session Info

@@ -1762,7 +1762,7 @@ other attached packages: [1] dplyr_1.1.4 tern_0.9.3.9031 rtables_0.6.6.9011 -[4] magrittr_2.0.3 formatters_0.5.5.9020 scda_0.1.6.9017 +[4] magrittr_2.0.3 formatters_0.5.5.9021 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/lab-results/lbt07.html b/development/tables/lab-results/lbt07.html index b0db0da500..1bddd03e84 100644 --- a/development/tables/lab-results/lbt07.html +++ b/development/tables/lab-results/lbt07.html @@ -1642,7 +1642,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:51:53 UTC"
+
[1] "2024-04-10 17:53:00 UTC"

Session Info

@@ -1672,19 +1672,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 forcats_1.0.0 [9] dplyr_1.1.4 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 scda_0.1.6.9017 +[13] formatters_0.5.5.9021 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1706,7 +1706,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 pkgconfig_2.0.3 diff --git a/development/tables/lab-results/lbt07_files/figure-html/teal-1.png b/development/tables/lab-results/lbt07_files/figure-html/teal-1.png index 6b5bded485..b7e268051e 100644 Binary files a/development/tables/lab-results/lbt07_files/figure-html/teal-1.png and b/development/tables/lab-results/lbt07_files/figure-html/teal-1.png differ diff --git a/development/tables/lab-results/lbt08.html b/development/tables/lab-results/lbt08.html index 7841697826..aa100ed77b 100644 --- a/development/tables/lab-results/lbt08.html +++ b/development/tables/lab-results/lbt08.html @@ -1553,7 +1553,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:52:27 UTC"
+
[1] "2024-04-10 17:53:35 UTC"

Session Info

@@ -1584,7 +1584,7 @@ other attached packages: [1] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 +[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/lab-results/lbt09.html b/development/tables/lab-results/lbt09.html index 5f1c4c0f0d..b0dd9b09c0 100644 --- a/development/tables/lab-results/lbt09.html +++ b/development/tables/lab-results/lbt09.html @@ -1692,7 +1692,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:52:50 UTC"
+
[1] "2024-04-10 17:53:59 UTC"

Session Info

@@ -1723,7 +1723,7 @@ other attached packages: [1] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 +[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/lab-results/lbt10.html b/development/tables/lab-results/lbt10.html index ff22141ef8..230ded0265 100644 --- a/development/tables/lab-results/lbt10.html +++ b/development/tables/lab-results/lbt10.html @@ -1563,7 +1563,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:54:04 UTC"
+
[1] "2024-04-10 17:55:15 UTC"

Session Info

@@ -1594,7 +1594,7 @@ other attached packages: [1] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 +[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/lab-results/lbt10_bl.html b/development/tables/lab-results/lbt10_bl.html index 00c11b32fd..f2b30c5462 100644 --- a/development/tables/lab-results/lbt10_bl.html +++ b/development/tables/lab-results/lbt10_bl.html @@ -1563,7 +1563,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:52:00 UTC"
+
[1] "2024-04-10 17:53:07 UTC"

Session Info

@@ -1594,7 +1594,7 @@ other attached packages: [1] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 +[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/lab-results/lbt11.html b/development/tables/lab-results/lbt11.html index 1b39aa2ac9..c3d335a35a 100644 --- a/development/tables/lab-results/lbt11.html +++ b/development/tables/lab-results/lbt11.html @@ -1714,7 +1714,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:52:42 UTC"
+
[1] "2024-04-10 17:53:51 UTC"

Session Info

@@ -1744,19 +1744,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] scda_0.1.6.9017 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1778,7 +1778,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/lab-results/lbt11_bl.html b/development/tables/lab-results/lbt11_bl.html index 349aebd5ce..7d2199aad4 100644 --- a/development/tables/lab-results/lbt11_bl.html +++ b/development/tables/lab-results/lbt11_bl.html @@ -1712,7 +1712,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:51:37 UTC"
+
[1] "2024-04-10 17:52:43 UTC"

Session Info

@@ -1742,19 +1742,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] scda_0.1.6.9017 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1776,7 +1776,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/lab-results/lbt11_bl_files/figure-html/teal-1.png b/development/tables/lab-results/lbt11_bl_files/figure-html/teal-1.png index 8be9844056..633f1db541 100644 Binary files a/development/tables/lab-results/lbt11_bl_files/figure-html/teal-1.png and b/development/tables/lab-results/lbt11_bl_files/figure-html/teal-1.png differ diff --git a/development/tables/lab-results/lbt11_files/figure-html/teal-1.png b/development/tables/lab-results/lbt11_files/figure-html/teal-1.png index e6a002d00e..060ce9caba 100644 Binary files a/development/tables/lab-results/lbt11_files/figure-html/teal-1.png and b/development/tables/lab-results/lbt11_files/figure-html/teal-1.png differ diff --git a/development/tables/lab-results/lbt12.html b/development/tables/lab-results/lbt12.html index 47ae447267..4fbab24f32 100644 --- a/development/tables/lab-results/lbt12.html +++ b/development/tables/lab-results/lbt12.html @@ -1542,7 +1542,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:52:05 UTC"
+
[1] "2024-04-10 17:53:13 UTC"

Session Info

@@ -1573,7 +1573,7 @@ other attached packages: [1] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 +[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/lab-results/lbt12_bl.html b/development/tables/lab-results/lbt12_bl.html index 4002ca3c79..80b4cc5750 100644 --- a/development/tables/lab-results/lbt12_bl.html +++ b/development/tables/lab-results/lbt12_bl.html @@ -1542,7 +1542,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:52:56 UTC"
+
[1] "2024-04-10 17:54:05 UTC"

Session Info

@@ -1573,7 +1573,7 @@ other attached packages: [1] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 +[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/lab-results/lbt13.html b/development/tables/lab-results/lbt13.html index 11cd61028c..ca3c29d442 100644 --- a/development/tables/lab-results/lbt13.html +++ b/development/tables/lab-results/lbt13.html @@ -2608,7 +2608,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:54:29 UTC"
+
[1] "2024-04-10 17:55:41 UTC"

Session Info

@@ -2638,19 +2638,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 tern_0.9.3.9031 [9] rtables_0.6.6.9011 magrittr_2.0.3 -[11] formatters_0.5.5.9020 dplyr_1.1.4 +[11] formatters_0.5.5.9021 dplyr_1.1.4 [13] scda_0.1.6.9017 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -2672,7 +2672,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/lab-results/lbt13_files/figure-html/teal-1.png b/development/tables/lab-results/lbt13_files/figure-html/teal-1.png index 5d70131027..de4f5082c0 100644 Binary files a/development/tables/lab-results/lbt13_files/figure-html/teal-1.png and b/development/tables/lab-results/lbt13_files/figure-html/teal-1.png differ diff --git a/development/tables/lab-results/lbt14.html b/development/tables/lab-results/lbt14.html index 014b021a56..ba904ab4f5 100644 --- a/development/tables/lab-results/lbt14.html +++ b/development/tables/lab-results/lbt14.html @@ -2212,7 +2212,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:53:41 UTC"
+
[1] "2024-04-10 17:54:52 UTC"

Session Info

@@ -2242,19 +2242,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 tern_0.9.3.9031 [9] rtables_0.6.6.9011 magrittr_2.0.3 -[11] formatters_0.5.5.9020 dplyr_1.1.4 +[11] formatters_0.5.5.9021 dplyr_1.1.4 [13] scda_0.1.6.9017 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -2276,7 +2276,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/lab-results/lbt14_files/figure-html/teal-1.png b/development/tables/lab-results/lbt14_files/figure-html/teal-1.png index 4f28dd27d7..c0db10e0d5 100644 Binary files a/development/tables/lab-results/lbt14_files/figure-html/teal-1.png and b/development/tables/lab-results/lbt14_files/figure-html/teal-1.png differ diff --git a/development/tables/lab-results/lbt15.html b/development/tables/lab-results/lbt15.html index 35b918ee0a..23787c1f9f 100644 --- a/development/tables/lab-results/lbt15.html +++ b/development/tables/lab-results/lbt15.html @@ -1665,7 +1665,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:53:57 UTC"
+
[1] "2024-04-10 17:55:08 UTC"

Session Info

@@ -1695,19 +1695,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 forcats_1.0.0 [9] dplyr_1.1.4 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 scda_0.1.6.9017 +[13] formatters_0.5.5.9021 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1729,7 +1729,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 pkgconfig_2.0.3 diff --git a/development/tables/lab-results/lbt15_files/figure-html/teal-1.png b/development/tables/lab-results/lbt15_files/figure-html/teal-1.png index 5246d57130..5a9e7ebf00 100644 Binary files a/development/tables/lab-results/lbt15_files/figure-html/teal-1.png and b/development/tables/lab-results/lbt15_files/figure-html/teal-1.png differ diff --git a/development/tables/medical-history/mht01.html b/development/tables/medical-history/mht01.html index 6ec0e55ee0..b7f5d196e8 100644 --- a/development/tables/medical-history/mht01.html +++ b/development/tables/medical-history/mht01.html @@ -1752,7 +1752,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:40:22 UTC"
+
[1] "2024-04-10 17:41:02 UTC"

Session Info

@@ -1782,19 +1782,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 scda_0.1.6.9017 [9] dplyr_1.1.4 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1816,7 +1816,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/medical-history/mht01_files/figure-html/teal-1.png b/development/tables/medical-history/mht01_files/figure-html/teal-1.png index 57fd9d1ca3..f259b366d1 100644 Binary files a/development/tables/medical-history/mht01_files/figure-html/teal-1.png and b/development/tables/medical-history/mht01_files/figure-html/teal-1.png differ diff --git a/development/tables/pharmacokinetic/pkct01.html b/development/tables/pharmacokinetic/pkct01.html index 00414dd19a..51e524afbc 100644 --- a/development/tables/pharmacokinetic/pkct01.html +++ b/development/tables/pharmacokinetic/pkct01.html @@ -1699,7 +1699,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:47:00 UTC"
+
[1] "2024-04-10 17:47:54 UTC"

Session Info

@@ -1730,7 +1730,7 @@ other attached packages: [1] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 +[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/pharmacokinetic/pkpt02.html b/development/tables/pharmacokinetic/pkpt02.html index 4fe239403a..ea970239ac 100644 --- a/development/tables/pharmacokinetic/pkpt02.html +++ b/development/tables/pharmacokinetic/pkpt02.html @@ -1602,7 +1602,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:46:46 UTC"
+
[1] "2024-04-10 17:47:39 UTC"

Session Info

@@ -1633,7 +1633,7 @@ other attached packages: [1] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 +[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/pharmacokinetic/pkpt03.html b/development/tables/pharmacokinetic/pkpt03.html index 84eefb23d8..3fcb431f23 100644 --- a/development/tables/pharmacokinetic/pkpt03.html +++ b/development/tables/pharmacokinetic/pkpt03.html @@ -1714,7 +1714,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:46:40 UTC"
+
[1] "2024-04-10 17:47:33 UTC"

Session Info

@@ -1745,7 +1745,7 @@ other attached packages: [1] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 +[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/pharmacokinetic/pkpt04.html b/development/tables/pharmacokinetic/pkpt04.html index dd886cbf84..b3f83af5a1 100644 --- a/development/tables/pharmacokinetic/pkpt04.html +++ b/development/tables/pharmacokinetic/pkpt04.html @@ -1618,7 +1618,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:47:06 UTC"
+
[1] "2024-04-10 17:48:00 UTC"

Session Info

@@ -1649,7 +1649,7 @@ other attached packages: [1] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 +[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/pharmacokinetic/pkpt05.html b/development/tables/pharmacokinetic/pkpt05.html index e2678b8fd5..435e58bb4c 100644 --- a/development/tables/pharmacokinetic/pkpt05.html +++ b/development/tables/pharmacokinetic/pkpt05.html @@ -1590,7 +1590,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:46:27 UTC"
+
[1] "2024-04-10 17:47:20 UTC"

Session Info

@@ -1621,7 +1621,7 @@ other attached packages: [1] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 +[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/pharmacokinetic/pkpt06.html b/development/tables/pharmacokinetic/pkpt06.html index d285276db2..503c57f41a 100644 --- a/development/tables/pharmacokinetic/pkpt06.html +++ b/development/tables/pharmacokinetic/pkpt06.html @@ -1572,7 +1572,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:47:17 UTC"
+
[1] "2024-04-10 17:48:12 UTC"

Session Info

@@ -1603,7 +1603,7 @@ other attached packages: [1] stringr_1.5.1 tern_0.9.3.9031 rtables_0.6.6.9011 -[4] magrittr_2.0.3 formatters_0.5.5.9020 dplyr_1.1.4 +[4] magrittr_2.0.3 formatters_0.5.5.9021 dplyr_1.1.4 [7] scda_0.1.6.9017 loaded via a namespace (and not attached): diff --git a/development/tables/pharmacokinetic/pkpt07.html b/development/tables/pharmacokinetic/pkpt07.html index 250c07b35b..f18e5b3603 100644 --- a/development/tables/pharmacokinetic/pkpt07.html +++ b/development/tables/pharmacokinetic/pkpt07.html @@ -1583,7 +1583,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:46:52 UTC"
+
[1] "2024-04-10 17:47:45 UTC"

Session Info

@@ -1614,7 +1614,7 @@ other attached packages: [1] stringr_1.5.1 tern_0.9.3.9031 rtables_0.6.6.9011 -[4] magrittr_2.0.3 formatters_0.5.5.9020 dplyr_1.1.4 +[4] magrittr_2.0.3 formatters_0.5.5.9021 dplyr_1.1.4 [7] scda_0.1.6.9017 loaded via a namespace (and not attached): diff --git a/development/tables/pharmacokinetic/pkpt08.html b/development/tables/pharmacokinetic/pkpt08.html index bdf79d5e1e..6245d3a544 100644 --- a/development/tables/pharmacokinetic/pkpt08.html +++ b/development/tables/pharmacokinetic/pkpt08.html @@ -1569,7 +1569,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:46:21 UTC"
+
[1] "2024-04-10 17:47:13 UTC"

Session Info

@@ -1600,7 +1600,7 @@ other attached packages: [1] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[4] formatters_0.5.5.9020 scda_0.1.6.9017 dplyr_1.1.4 +[4] formatters_0.5.5.9021 scda_0.1.6.9017 dplyr_1.1.4 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/pharmacokinetic/pkpt11.html b/development/tables/pharmacokinetic/pkpt11.html index 33cc94b911..64b70678d0 100644 --- a/development/tables/pharmacokinetic/pkpt11.html +++ b/development/tables/pharmacokinetic/pkpt11.html @@ -1628,7 +1628,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:47:11 UTC"
+
[1] "2024-04-10 17:48:06 UTC"

Session Info

@@ -1659,7 +1659,7 @@ other attached packages: [1] tern_0.9.3.9031 rtables_0.6.6.9011 magrittr_2.0.3 -[4] formatters_0.5.5.9020 dplyr_1.1.4 scda_0.1.6.9017 +[4] formatters_0.5.5.9021 dplyr_1.1.4 scda_0.1.6.9017 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/risk-management-plan/rmpt01.html b/development/tables/risk-management-plan/rmpt01.html index e50f38adb8..9633121470 100644 --- a/development/tables/risk-management-plan/rmpt01.html +++ b/development/tables/risk-management-plan/rmpt01.html @@ -1625,7 +1625,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:49:34 UTC"
+
[1] "2024-04-10 17:50:36 UTC"

Session Info

@@ -1655,19 +1655,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] scda_0.1.6.9017 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1689,7 +1689,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/risk-management-plan/rmpt01_files/figure-html/teal-1.png b/development/tables/risk-management-plan/rmpt01_files/figure-html/teal-1.png index 355953ebb1..cabda2abc1 100644 Binary files a/development/tables/risk-management-plan/rmpt01_files/figure-html/teal-1.png and b/development/tables/risk-management-plan/rmpt01_files/figure-html/teal-1.png differ diff --git a/development/tables/risk-management-plan/rmpt03.html b/development/tables/risk-management-plan/rmpt03.html index 55d466ec6e..81964db4af 100644 --- a/development/tables/risk-management-plan/rmpt03.html +++ b/development/tables/risk-management-plan/rmpt03.html @@ -1684,7 +1684,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:49:06 UTC"
+
[1] "2024-04-10 17:50:06 UTC"

Session Info

@@ -1714,19 +1714,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] scda_0.1.6.9017 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1748,7 +1748,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/risk-management-plan/rmpt03_files/figure-html/teal-1.png b/development/tables/risk-management-plan/rmpt03_files/figure-html/teal-1.png index 5e1ef28ab1..230c9627d8 100644 Binary files a/development/tables/risk-management-plan/rmpt03_files/figure-html/teal-1.png and b/development/tables/risk-management-plan/rmpt03_files/figure-html/teal-1.png differ diff --git a/development/tables/risk-management-plan/rmpt04.html b/development/tables/risk-management-plan/rmpt04.html index 763b8b089f..51207a7960 100644 --- a/development/tables/risk-management-plan/rmpt04.html +++ b/development/tables/risk-management-plan/rmpt04.html @@ -1606,7 +1606,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:48:51 UTC"
+
[1] "2024-04-10 17:49:50 UTC"

Session Info

@@ -1636,19 +1636,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] scda_0.1.6.9017 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1670,7 +1670,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/risk-management-plan/rmpt04_files/figure-html/teal-1.png b/development/tables/risk-management-plan/rmpt04_files/figure-html/teal-1.png index e9e59bd611..094e9c2236 100644 Binary files a/development/tables/risk-management-plan/rmpt04_files/figure-html/teal-1.png and b/development/tables/risk-management-plan/rmpt04_files/figure-html/teal-1.png differ diff --git a/development/tables/risk-management-plan/rmpt05.html b/development/tables/risk-management-plan/rmpt05.html index f2d069f16f..99aad9444a 100644 --- a/development/tables/risk-management-plan/rmpt05.html +++ b/development/tables/risk-management-plan/rmpt05.html @@ -1612,7 +1612,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:49:20 UTC"
+
[1] "2024-04-10 17:50:22 UTC"

Session Info

@@ -1642,19 +1642,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] scda_0.1.6.9017 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1676,7 +1676,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/risk-management-plan/rmpt05_files/figure-html/teal-1.png b/development/tables/risk-management-plan/rmpt05_files/figure-html/teal-1.png index 315ea09883..5594daabeb 100644 Binary files a/development/tables/risk-management-plan/rmpt05_files/figure-html/teal-1.png and b/development/tables/risk-management-plan/rmpt05_files/figure-html/teal-1.png differ diff --git a/development/tables/risk-management-plan/rmpt06.html b/development/tables/risk-management-plan/rmpt06.html index c50046cf29..1aa3407051 100644 --- a/development/tables/risk-management-plan/rmpt06.html +++ b/development/tables/risk-management-plan/rmpt06.html @@ -1853,7 +1853,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:48:37 UTC"
+
[1] "2024-04-10 17:49:35 UTC"

Session Info

@@ -1884,7 +1884,7 @@ other attached packages: [1] scda_0.1.6.9017 dplyr_1.1.4 tern_0.9.3.9031 -[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9020 +[4] rtables_0.6.6.9011 magrittr_2.0.3 formatters_0.5.5.9021 loaded via a namespace (and not attached): [1] Matrix_1.6-5 gtable_0.3.4 jsonlite_1.8.8 compiler_4.3.3 diff --git a/development/tables/safety/enrollment01.html b/development/tables/safety/enrollment01.html index e734abd36c..12a1b3c357 100644 --- a/development/tables/safety/enrollment01.html +++ b/development/tables/safety/enrollment01.html @@ -2099,7 +2099,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:45:21 UTC"
+
[1] "2024-04-10 17:46:10 UTC"

Session Info

@@ -2129,19 +2129,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 tern_0.9.3.9031 [9] rtables_0.6.6.9011 magrittr_2.0.3 -[11] formatters_0.5.5.9020 scda_0.1.6.9017 +[11] formatters_0.5.5.9021 scda_0.1.6.9017 [13] forcats_1.0.0 dplyr_1.1.4 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -2163,7 +2163,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 pkgconfig_2.0.3 diff --git a/development/tables/safety/enrollment01_files/figure-html/teal-1.png b/development/tables/safety/enrollment01_files/figure-html/teal-1.png index 665d117ca7..40f0e4bcf4 100644 Binary files a/development/tables/safety/enrollment01_files/figure-html/teal-1.png and b/development/tables/safety/enrollment01_files/figure-html/teal-1.png differ diff --git a/development/tables/vital-signs/vst01.html b/development/tables/vital-signs/vst01.html index 07f6ed3860..57ae920903 100644 --- a/development/tables/vital-signs/vst01.html +++ b/development/tables/vital-signs/vst01.html @@ -1733,7 +1733,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:51:14 UTC"
+
[1] "2024-04-10 17:52:19 UTC"

Session Info

@@ -1763,23 +1763,23 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 dplyr_1.1.4 [9] scda_0.1.6.9017 tern_0.9.3.9031 [11] rtables_0.6.6.9011 magrittr_2.0.3 -[13] formatters_0.5.5.9020 +[13] formatters_0.5.5.9021 loaded via a namespace (and not attached): - [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9004 + [1] Rdpack_2.6 formatR_1.14 tern.gee_0.1.3.9005 [4] logger_0.3.0 testthat_3.2.1 sandwich_3.1-0 [7] rlang_1.1.3 multcomp_1.4-25 compiler_4.3.3 [10] callr_3.7.6 vctrs_0.6.5 pkgconfig_2.0.3 [13] fastmap_1.1.1 backports_1.4.1 fontawesome_0.5.2 [16] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 [19] ps_1.7.6 purrr_1.0.2 xfun_0.43 -[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9002 +[22] shinyvalidate_0.1.3 cachem_1.0.8 teal.reporter_0.3.1.9003 [25] jsonlite_1.8.8 later_1.3.2 broom_1.0.5 [28] R6_2.5.1 bslib_0.7.0 stringi_1.8.3 [31] brio_1.1.4 jquerylib_0.1.4 estimability_1.5 diff --git a/development/tables/vital-signs/vst01_files/figure-html/teal-1.png b/development/tables/vital-signs/vst01_files/figure-html/teal-1.png index 88f39c4853..843fc19be2 100644 Binary files a/development/tables/vital-signs/vst01_files/figure-html/teal-1.png and b/development/tables/vital-signs/vst01_files/figure-html/teal-1.png differ diff --git a/development/tables/vital-signs/vst02.html b/development/tables/vital-signs/vst02.html index b477316fec..a2e2923a41 100644 --- a/development/tables/vital-signs/vst02.html +++ b/development/tables/vital-signs/vst02.html @@ -1628,7 +1628,7 @@
Code
Sys.time()
-
[1] "2024-04-06 17:50:57 UTC"
+
[1] "2024-04-10 17:52:02 UTC"

Session Info

@@ -1658,19 +1658,19 @@ [1] stats graphics grDevices utils datasets methods base other attached packages: - [1] teal.modules.clinical_0.9.0.9014 teal.transform_0.5.0.9004 - [3] teal_0.15.2.9020 teal.slice_0.5.0.9009 - [5] teal.data_0.5.0.9006 teal.code_0.5.0.9004 + [1] teal.modules.clinical_0.9.0.9016 teal.transform_0.5.0.9004 + [3] teal_0.15.2.9022 teal.slice_0.5.0.9010 + [5] teal.data_0.5.0.9007 teal.code_0.5.0.9004 [7] shiny_1.8.1.1 tern_0.9.3.9031 [9] rtables_0.6.6.9011 magrittr_2.0.3 -[11] formatters_0.5.5.9020 dplyr_1.1.4 +[11] formatters_0.5.5.9021 dplyr_1.1.4 [13] scda_0.1.6.9017 loaded via a namespace (and not attached): [1] tidyselect_1.2.1 fastmap_1.1.1 TH.data_1.1-2 [4] webshot2_0.1.1 shinyjs_2.1.0 promises_1.3.0 [7] digest_0.6.35 estimability_1.5 mime_0.12 -[10] tern.gee_0.1.3.9004 lifecycle_1.0.4 survival_3.5-8 +[10] tern.gee_0.1.3.9005 lifecycle_1.0.4 survival_3.5-8 [13] processx_3.8.4 compiler_4.3.3 sass_0.4.9 [16] rlang_1.1.3 tools_4.3.3 utf8_1.2.4 [19] yaml_2.3.8 knitr_1.45 htmlwidgets_1.6.4 @@ -1692,7 +1692,7 @@ [67] htmltools_0.5.8.1 brio_1.1.4 R6_2.5.1 [70] Rdpack_2.6 evaluate_0.23 lattice_0.22-6 [73] rbibutils_2.2.16 backports_1.4.1 memoise_2.0.1 -[76] broom_1.0.5 teal.reporter_0.3.1.9002 bslib_0.7.0 +[76] broom_1.0.5 teal.reporter_0.3.1.9003 bslib_0.7.0 [79] httpuv_1.6.15 Rcpp_1.0.12 shinyvalidate_0.1.3 [82] coda_0.19-4.1 nlme_3.1-164 checkmate_2.3.1 [85] xfun_0.43 zoo_1.8-12 forcats_1.0.0 diff --git a/development/tables/vital-signs/vst02_files/figure-html/teal-1.png b/development/tables/vital-signs/vst02_files/figure-html/teal-1.png index 7a57e980c0..825e452fed 100644 Binary files a/development/tables/vital-signs/vst02_files/figure-html/teal-1.png and b/development/tables/vital-signs/vst02_files/figure-html/teal-1.png differ