From 22652decb7c9a7fa69acee03061743b6256caa13 Mon Sep 17 00:00:00 2001 From: wuzekai <3025054974@qq.com> Date: Tue, 14 Oct 2025 10:46:11 +0800 Subject: [PATCH] update --- Dockerfile | 14 +++++++------- radiant.model/R/{cox.R => coxp.R} | 0 .../app/tools/analysis/{cox_ui.R => coxp_ui.R} | 7 +++---- radiant.model/man/coxp.Rd | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) rename radiant.model/R/{cox.R => coxp.R} (100%) rename radiant.model/inst/app/tools/analysis/{cox_ui.R => coxp_ui.R} (96%) diff --git a/Dockerfile b/Dockerfile index 9e4872f..2e3fac8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,15 +12,15 @@ COPY . /srv/shiny-server/ COPY set_path.R /usr/local/lib/R/etc/Rprofile.site.d/00-radiant-path.R # 安装所有子模块 -RUN R -e "remotes::install_local('/srv/shiny-server/radiant.data',dependencies=TRUE, type='source', upgrade='never',force=TRUE)" -RUN R -e "remotes::install_local('/srv/shiny-server/radiant.basics',dependencies=TRUE, type='source', upgrade='never',force=TRUE)" -RUN R -e "remotes::install_local('/srv/shiny-server/radiant.model',dependencies=TRUE, type='source', upgrade='never',force=TRUE)" -RUN R -e "remotes::install_local('/srv/shiny-server/radiant.multivariate',dependencies=TRUE, type='source', upgrade='never',force=TRUE)" -RUN R -e "remotes::install_local('/srv/shiny-server/radiant.design',dependencies=TRUE, type='source', upgrade='never',force=TRUE)" -RUN R -e "remotes::install_local('/srv/shiny-server/radiant.quickgen',dependencies=TRUE, type='source', upgrade='never',force=TRUE)" +RUN R -e "remotes::install_local('/srv/shiny-server/radiant.data',dependencies=TRUE, type='source', upgrade='never')" +RUN R -e "remotes::install_local('/srv/shiny-server/radiant.basics',dependencies=TRUE, type='source', upgrade='never')" +RUN R -e "remotes::install_local('/srv/shiny-server/radiant.model',dependencies=TRUE, type='source', upgrade='never')" +RUN R -e "remotes::install_local('/srv/shiny-server/radiant.multivariate',dependencies=TRUE, type='source', upgrade='never')" +RUN R -e "remotes::install_local('/srv/shiny-server/radiant.design',dependencies=TRUE, type='source', upgrade='never')" +RUN R -e "remotes::install_local('/srv/shiny-server/radiant.quickgen',dependencies=TRUE, type='source', upgrade='never')" # 安装主 radiant 应用 -RUN R -e "remotes::install_local('/srv/shiny-server/radiant-master',dependencies=TRUE, type='source', upgrade='never',force=TRUE)" +RUN R -e "remotes::install_local('/srv/shiny-server/radiant-master',dependencies=TRUE, type='source', upgrade='never')" WORKDIR /data CMD ["R", "-e", "radiant::radiant(host='0.0.0.0', port=3838)"] diff --git a/radiant.model/R/cox.R b/radiant.model/R/coxp.R similarity index 100% rename from radiant.model/R/cox.R rename to radiant.model/R/coxp.R diff --git a/radiant.model/inst/app/tools/analysis/cox_ui.R b/radiant.model/inst/app/tools/analysis/coxp_ui.R similarity index 96% rename from radiant.model/inst/app/tools/analysis/cox_ui.R rename to radiant.model/inst/app/tools/analysis/coxp_ui.R index 8fedf03..fe9c2a2 100644 --- a/radiant.model/inst/app/tools/analysis/cox_ui.R +++ b/radiant.model/inst/app/tools/analysis/coxp_ui.R @@ -1,5 +1,4 @@ ## ========== coxp_ui.R ========== -source(file.path("../../../R", "cox.R")) ## 1. 常量 ----------------------------------------------------------------- coxp_predict <- setNames(c("none", "data", "cmd", "datacmd"), @@ -39,10 +38,10 @@ coxp_plot_inputs <- reactive({ list() }) coxp_pred_inputs <- reactive({ args <- coxp_pred_args - # 收集所有预测参数(含新增的coxp_conf_lev) + # 收集所有预测参数 for (i in names(args)) args[[i]] <- input[[paste0("coxp_", i)]] - # 处理预测数据/命令(保留原有逻辑) + # 处理预测数据/命令 args$pred_cmd <- "" args$pred_data <- "" if (input$coxp_predict == "cmd") { @@ -315,7 +314,7 @@ coxp_available <- reactive({ if (is.factor(surv_vec) || is.character(surv_vec)) { lev <- unique(surv_vec) if (length(lev) != 2) - return("状态变量必须是二分类(0/1 或两个水平)" %>% add_class("coxp")) + return("状态变量必须是二分类(两个水平)" %>% add_class("coxp")) ds[[status_var]] <- as.numeric(factor(surv_vec, levels = lev)) - 1L } else if (!all(unique(surv_vec) %in% c(0, 1))) { return("状态变量必须只包含 0 和 1" %>% add_class("coxp")) diff --git a/radiant.model/man/coxp.Rd b/radiant.model/man/coxp.Rd index bc7ef63..286df53 100644 --- a/radiant.model/man/coxp.Rd +++ b/radiant.model/man/coxp.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/cox.R +% Please edit documentation in R/coxp.R \name{coxp} \alias{coxp} \title{Cox Proportional Hazards Regression} -- 2.22.0