通过shiny发布自己的网页APP出现了问题,磨了好几天没找到头绪,希望大家给点建议。

我用Rstudio建立COX回归预测模型app,app在Rstudio中运行是顺利的,发布到shiny.io网站后无无法使用,显示错误信息:
An error has occurred. Check your logs or contact the app author for clarification.
下面是我的COX回归建模代码,和shiny网站logs显示的warning信息。我尝试重新加载了建模所需要的所有R包,多次重启已上传的App,仍未能成功在shiny网站运行自己的网页app,花费了好几天时间,仍找不到头绪,不知道问题出在哪里。特请教各位大神,望各位老师不吝赐教,拜谢,感激涕零。

1、以下是我的构建COX回归模型代码:

library(rsconnect)
library(survival)
library(shiny)
library(DynNom)
library(rms)
subdt <- read.csv("subdt.csv")
dddt <- datadist(subdt)   
options(datadist="dddt")
Outcome <- "Surv(Time, Status)"
FinalVariables <- c("Gender","AMB","PCP","Age", "TBIL", "ALB", "BUN", "PCT")
Formula <- formula(paste(paste(Outcome,'~',collapse = ' '),
                         paste(FinalVariables, collapse = ' + ')))
fcox<-cph(formula = Formula,surv = T, x=T, y=T, data = subdt)
DynNom(fcox,DNtitle="Marneffei Nomogram",DNxlab="Survival Probability",data=subdt,covariate = "numeric") 
DNbuilder(fcox,DNtitle="Marneffei Nomogram",DNxlab="Survival Probability",data=subdt,covariate = "numeric")
rsconnect::setAccountInfo(name='guanxxx',    #为了保密,部分字母用x代替
                          token='08A7095E549xxxxxxxxxxxxxxxxx',     #为了保密,部分字母用x代替
                          secret='mWapvwGW1xxxxxxxxxxxxxxxxxxxxxxx')    #为了保密,部分字母用x代替
rsconnect::deployApp('DynNomapp')

2、以下是shiny网站logs显示的信息:有一条为Warning: namespace ‘DynNom’ is not available and has been replaced by .GlobalEnv when processing object ‘mlinkF’。(下面已用斜粗体字标显问题行)

2022-11-22T15:15:47.345114+00:00 shinyapps[7705389]: Shiny application exiting ...
2022-11-22T15:15:49.665731+00:00 shinyapps[7705389]: Running on host: 6d6f1b8f29ed
2022-11-22T15:15:49.665772+00:00 shinyapps[7705389]: Server version: 2022.09.0
2022-11-22T15:15:49.665791+00:00 shinyapps[7705389]: LANG: C.UTF-8
2022-11-22T15:15:49.665796+00:00 shinyapps[7705389]: Working directory: /srv/connect/apps/dynnomapp
2022-11-22T15:15:49.666089+00:00 shinyapps[7705389]: Running content using the current R environment
2022-11-22T15:15:49.671688+00:00 shinyapps[7705389]: R version: 4.2.1
2022-11-22T15:15:49.671718+00:00 shinyapps[7705389]: shiny version: 1.7.1
2022-11-22T15:15:49.671729+00:00 shinyapps[7705389]: httpuv version: 1.6.5
2022-11-22T15:15:49.671735+00:00 shinyapps[7705389]: rmarkdown version: (none)
2022-11-22T15:15:49.671741+00:00 shinyapps[7705389]: knitr version: 1.39
2022-11-22T15:15:49.671757+00:00 shinyapps[7705389]: jsonlite version: 1.8.0
2022-11-22T15:15:49.671763+00:00 shinyapps[7705389]: RJSONIO version: (none)
2022-11-22T15:15:49.671768+00:00 shinyapps[7705389]: htmltools version: 0.5.2
2022-11-22T15:15:49.671792+00:00 shinyapps[7705389]: reticulate version: (none)
2022-11-22T15:15:49.672054+00:00 shinyapps[7705389]: Using pandoc: /opt/connect/ext/pandoc/2.16
2022-11-22T15:15:50.059853+00:00 shinyapps[7705389]: Starting R with process ID: '90'
2022-11-22T15:15:50.060247+00:00 shinyapps[7705389]: Shiny application starting ...
2022-11-22T15:15:50.842506+00:00 shinyapps[7705389]: Attaching package: ‘plotly’
2022-11-22T15:15:50.843157+00:00 shinyapps[7705389]: The following object is masked from ‘package:ggplot2’:
2022-11-22T15:15:50.843184+00:00 shinyapps[7705389]: last_plot
2022-11-22T15:15:50.843338+00:00 shinyapps[7705389]: The following object is masked from ‘package:stats’:
2022-11-22T15:15:50.843360+00:00 shinyapps[7705389]: filter
2022-11-22T15:15:50.843519+00:00 shinyapps[7705389]: The following object is masked from ‘package:graphics’:
2022-11-22T15:15:50.843527+00:00 shinyapps[7705389]: layout
2022-11-22T15:15:50.849478+00:00 shinyapps[7705389]: Please cite as:
2022-11-22T15:15:50.849521+00:00 shinyapps[7705389]: Hlavac, Marek (2022). stargazer: Well-Formatted Regression and Summary Statistics Tables.
2022-11-22T15:15:50.849562+00:00 shinyapps[7705389]: R package version 5.2.3. https://cran.r-project.org/package=stargazer
2022-11-22T15:15:50.857693+00:00 shinyapps[7705389]: Attaching package: ‘compare’
2022-11-22T15:15:50.857918+00:00 shinyapps[7705389]: The following object is masked from ‘package:base’:
2022-11-22T15:15:50.857935+00:00 shinyapps[7705389]: isTRUE
2022-11-22T15:15:50.869596+00:00 shinyapps[7705389]: Loading required package: Hmisc
2022-11-22T15:15:50.871417+00:00 shinyapps[7705389]: Loading required package: lattice
2022-11-22T15:15:50.887506+00:00 shinyapps[7705389]: Loading required package: survival
2022-11-22T15:15:51.942790+00:00 shinyapps[7705389]: Loading required package: Formula
2022-11-22T15:15:52.148721+00:00 shinyapps[7705389]: Attaching package: ‘Hmisc’
2022-11-22T15:15:52.148911+00:00 shinyapps[7705389]: The following object is masked from ‘package:plotly’:
2022-11-22T15:15:52.148947+00:00 shinyapps[7705389]: subplot
2022-11-22T15:15:52.149137+00:00 shinyapps[7705389]: The following objects are masked from ‘package:base’:
2022-11-22T15:15:52.149154+00:00 shinyapps[7705389]: format.pval, units
2022-11-22T15:15:52.151873+00:00 shinyapps[7705389]: Loading required package: SparseM
2022-11-22T15:15:52.248521+00:00 shinyapps[7705389]: Attaching package: ‘SparseM’
2022-11-22T15:15:52.248700+00:00 shinyapps[7705389]: The following object is masked from ‘package:base’:
2022-11-22T15:15:52.248724+00:00 shinyapps[7705389]: backsolve
2022-11-22T15:15:53.548849+00:00 shinyapps[7705389]: Attaching package: ‘rms’
2022-11-22T15:15:53.549062+00:00 shinyapps[7705389]: The following object is masked from ‘package:shiny’:
2022-11-22T15:15:53.549091+00:00 shinyapps[7705389]: validate
2022-11-22T15:15:53.550999+00:00 shinyapps[7705389]: Warning: namespace ‘DynNom’ is not available and has been replaced
2022-11-22T15:15:53.551047+00:00 shinyapps[7705389]: by .GlobalEnv when processing object ‘mlinkF’

2022-11-22T15:15:53.567258+00:00 shinyapps[7705389]: Listening on http://127.0.0.1:36441

rstudio的数据集怎么建立和保存_使用shiny快速建立一个个人网页
https://blog.csdn.net/weixin_28912709/article/details/112440372

试试这些操作呢 参考一下