Skip to content

Commit

Permalink
jsBasicGadget: add Subgroup analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
cyk0315 committed Feb 15, 2024
1 parent 8e2b85c commit 000c129
Showing 1 changed file with 127 additions and 0 deletions.
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 000c129

Please sign in to comment.