Skip to content

Commit

Permalink
Merge pull request #19 from cyk0315/master
Browse files Browse the repository at this point in the history
jsBasicGadget: add Subgroup analysis
  • Loading branch information
jinseob2kim authored Feb 16, 2024
2 parents 967f7bf + 74de64f commit 5063c04
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9403-605X")),
person("Zarathu", role = c("cph", "fnd")),
person("Hyunki", "Lee", email = "[email protected]", role = c("aut")),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
127 changes: 127 additions & 0 deletions R/jsBasicGadget.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

)
)
)
)
)

Expand Down Expand Up @@ -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()
})
Expand Down Expand Up @@ -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"
)

)
)
)
)
)

Expand Down Expand Up @@ -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()
})
Expand Down

0 comments on commit 5063c04

Please sign in to comment.