From 000c12926699a138ffca076ee1ea0e29b88fac68 Mon Sep 17 00:00:00 2001 From: cyk0315 Date: Thu, 15 Feb 2024 14:49:12 +0900 Subject: [PATCH 1/2] jsBasicGadget: add Subgroup analysis --- R/jsBasicGadget.R | 127 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) diff --git a/R/jsBasicGadget.R b/R/jsBasicGadget.R index fff5de60..9c16eaa2 100644 --- a/R/jsBasicGadget.R +++ b/R/jsBasicGadget.R @@ -270,6 +270,57 @@ jsBasicGadget <- function(data, nfactor.limit = 20) { ) ) ) + ), + navbarMenu( + title = "Subgroup analysis", + icon = icon("chart-bar"), + tabPanel( + title = "subgroup cox", + sidebarLayout( + sidebarPanel( + forestcoxUI('Forest') + ), + mainPanel( + withLoader( + DTOutput('tablesub'), + type = "html", + loader = "loader6" + ) + + ) + ) + ), + tabPanel( + title = "subgroup regression", + sidebarLayout( + sidebarPanel( + forestglmUI('Forest_glm') + ), + mainPanel( + withLoader( + DTOutput('tablesub_glm'), + type = "html", + loader = "loader6" + ) + ) + ) + ), + tabPanel( + title = "subgroup logistic regression", + sidebarLayout( + sidebarPanel( + forestglmUI('Forest_glmbi') + ), + mainPanel( + withLoader( + DTOutput('tablesub_glmbi'), + type = "html", + loader = "loader6" + ) + + ) + ) + ) ) ) @@ -655,6 +706,19 @@ jsBasicGadget <- function(data, nfactor.limit = 20) { caption.placement = "top" ) + outtable<-forestcoxServer('Forest',data=data,data_label=data.label) + output$tablesub<-renderDT({ + outtable() + }) + outtable_glm<-forestglmServer('Forest_glm',data=data,data_label=data.label,family='gaussian') + output$tablesub_glm<-renderDT({ + outtable_glm() + }) + + outtable_glmbi<-forestglmServer('Forest_glmbi',data=data,data_label=data.label,family='binomial') + output$tablesub_glmbi<-renderDT({ + outtable_glmbi() + }) session$onSessionEnded(function() { stopApp() }) @@ -1000,6 +1064,57 @@ jsBasicExtAddin <- function(nfactor.limit = 20, max.filesize = 2048) { ) ) ), + ), + navbarMenu( + title = "Subgroup analysis", + icon = icon("chart-bar"), + tabPanel( + title = "subgroup cox", + sidebarLayout( + sidebarPanel( + forestcoxUI('Forest') + ), + mainPanel( + withLoader( + DTOutput('tablesub'), + type = "html", + loader = "loader6" + ) + + ) + ) + ), + tabPanel( + title = "subgroup regression", + sidebarLayout( + sidebarPanel( + forestglmUI('Forest_glm') + ), + mainPanel( + withLoader( + DTOutput('tablesub_glm'), + type = "html", + loader = "loader6" + ) + ) + ) + ), + tabPanel( + title = "subgroup logistic regression", + sidebarLayout( + sidebarPanel( + forestglmUI('Forest_glmbi') + ), + mainPanel( + withLoader( + DTOutput('tablesub_glmbi'), + type = "html", + loader = "loader6" + ) + + ) + ) + ) ) ) @@ -1235,7 +1350,19 @@ jsBasicExtAddin <- function(nfactor.limit = 20, max.filesize = 2048) { caption = "Best cutoff", caption.placement = "top" ) + outtable<-forestcoxServer('Forest',data=data,data_label=data.label) + output$tablesub<-renderDT({ + outtable() + }) + outtable_glm<-forestglmServer('Forest_glm',data=data,data_label=data.label,family='gaussian') + output$tablesub_glm<-renderDT({ + outtable_glm() + }) + outtable_glmbi<-forestglmServer('Forest_glmbi',data=data,data_label=data.label,family='binomial') + output$tablesub_glmbi<-renderDT({ + outtable_glmbi() + }) session$onSessionEnded(function() { stopApp() }) From 74de64f5933d15b9435da2d7f2cfc659a84009cb Mon Sep 17 00:00:00 2001 From: cyk0315 Date: Thu, 15 Feb 2024 14:53:00 +0900 Subject: [PATCH 2/2] 1.5.1 --- DESCRIPTION | 4 ++-- NEWS.md | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2acc93fe..40120466 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: jsmodule Title: 'RStudio' Addins and 'Shiny' Modules for Medical Research -Version: 1.5.0 -Date: 2024-02-08 +Version: 1.5.1 +Date: 2024-02-15 Authors@R: c(person("Jinseob", "Kim", email = "jinseob2kim@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9403-605X")), person("Zarathu", role = c("cph", "fnd")), person("Hyunki", "Lee", email = "leevenstar@snu.ac.kr", role = c("aut")), diff --git a/NEWS.md b/NEWS.md index 32bf3418..7d9f329f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# jsmodule 1.5.1 + +## Update: Add Subgroupanalysis to jsBasicGadget + # jsmodule 1.5.0 ## New module: Subgroup analysis with forestplot (Thanks for [Yoonkyoung Jeon](https://github.com/cyk0315))