diff --git a/Dockerfile b/Dockerfile index 9e4872f54b534acb81bb2e932ba5ded94a390ec8..2e3fac845305b098091e97375bd2a3fcee06dc90 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 8fedf0331147fc19f66cd794632e3bb11d79b725..fe9c2a25fa7c3ef656e1802f9b04d9a204ac0960 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 bc7ef637aba91337bc501d44c883b8335f6359fa..286df53190a3027fac1a39e43e75680b2fafd5b3 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}