diff --git a/DESCRIPTION b/DESCRIPTION index 93369074..4430b465 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)) 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() })