Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
Radiant
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuzekai
Radiant
Commits
22652dec
Commit
22652dec
authored
Oct 14, 2025
by
wuzekai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
0f3629ae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
12 deletions
+11
-12
Dockerfile
Dockerfile
+7
-7
coxp.R
radiant.model/R/coxp.R
+0
-0
coxp_ui.R
radiant.model/inst/app/tools/analysis/coxp_ui.R
+3
-4
coxp.Rd
radiant.model/man/coxp.Rd
+1
-1
No files found.
Dockerfile
View file @
22652dec
...
@@ -12,15 +12,15 @@ COPY . /srv/shiny-server/
...
@@ -12,15 +12,15 @@ COPY . /srv/shiny-server/
COPY
set_path.R /usr/local/lib/R/etc/Rprofile.site.d/00-radiant-path.R
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.data',dependencies=TRUE, type='source', upgrade='never')"
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.basics',dependencies=TRUE, type='source', upgrade='never')"
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.model',dependencies=TRUE, type='source', upgrade='never')"
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.multivariate',dependencies=TRUE, type='source', upgrade='never')"
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.design',dependencies=TRUE, type='source', upgrade='never')"
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.quickgen',dependencies=TRUE, type='source', upgrade='never')"
# 安装主 radiant 应用
# 安装主 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
WORKDIR
/data
CMD
["R", "-e", "radiant::radiant(host='0.0.0.0', port=3838)"]
CMD
["R", "-e", "radiant::radiant(host='0.0.0.0', port=3838)"]
...
...
radiant.model/R/cox.R
→
radiant.model/R/cox
p
.R
View file @
22652dec
File moved
radiant.model/inst/app/tools/analysis/cox_ui.R
→
radiant.model/inst/app/tools/analysis/cox
p
_ui.R
View file @
22652dec
## ========== coxp_ui.R ==========
## ========== coxp_ui.R ==========
source
(
file.path
(
"../../../R"
,
"cox.R"
))
## 1. 常量 -----------------------------------------------------------------
## 1. 常量 -----------------------------------------------------------------
coxp_predict
<-
setNames
(
c
(
"none"
,
"data"
,
"cmd"
,
"datacmd"
),
coxp_predict
<-
setNames
(
c
(
"none"
,
"data"
,
"cmd"
,
"datacmd"
),
...
@@ -39,10 +38,10 @@ coxp_plot_inputs <- reactive({ list() })
...
@@ -39,10 +38,10 @@ coxp_plot_inputs <- reactive({ list() })
coxp_pred_inputs
<-
reactive
({
coxp_pred_inputs
<-
reactive
({
args
<-
coxp_pred_args
args
<-
coxp_pred_args
# 收集所有预测参数
(含新增的coxp_conf_lev)
# 收集所有预测参数
for
(
i
in
names
(
args
))
args
[[
i
]]
<-
input
[[
paste0
(
"coxp_"
,
i
)]]
for
(
i
in
names
(
args
))
args
[[
i
]]
<-
input
[[
paste0
(
"coxp_"
,
i
)]]
# 处理预测数据/命令
(保留原有逻辑)
# 处理预测数据/命令
args
$
pred_cmd
<-
""
args
$
pred_cmd
<-
""
args
$
pred_data
<-
""
args
$
pred_data
<-
""
if
(
input
$
coxp_predict
==
"cmd"
)
{
if
(
input
$
coxp_predict
==
"cmd"
)
{
...
@@ -315,7 +314,7 @@ coxp_available <- reactive({
...
@@ -315,7 +314,7 @@ coxp_available <- reactive({
if
(
is.factor
(
surv_vec
)
||
is.character
(
surv_vec
))
{
if
(
is.factor
(
surv_vec
)
||
is.character
(
surv_vec
))
{
lev
<-
unique
(
surv_vec
)
lev
<-
unique
(
surv_vec
)
if
(
length
(
lev
)
!=
2
)
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
ds
[[
status_var
]]
<-
as.numeric
(
factor
(
surv_vec
,
levels
=
lev
))
-
1L
}
else
if
(
!
all
(
unique
(
surv_vec
)
%in%
c
(
0
,
1
)))
{
}
else
if
(
!
all
(
unique
(
surv_vec
)
%in%
c
(
0
,
1
)))
{
return
(
"状态变量必须只包含 0 和 1"
%>%
add_class
(
"coxp"
))
return
(
"状态变量必须只包含 0 和 1"
%>%
add_class
(
"coxp"
))
...
...
radiant.model/man/coxp.Rd
View file @
22652dec
% Generated by roxygen2: do not edit by hand
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cox.R
% Please edit documentation in R/cox
p
.R
\name{coxp}
\name{coxp}
\alias{coxp}
\alias{coxp}
\title{Cox Proportional Hazards Regression}
\title{Cox Proportional Hazards Regression}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment