做了个股票行情实时更新的shinyapp,在本地可以正常运行,但部署到shinyapp.io后无法正常显示,具体代码如下:
global.R:
pacman::p_load(data.table,stringr,dplyr,Tushare,lubridate,mongolite,DT,
future.apply,zoo,haven,readxl,foreign,rlist,XML,RCurl,jsonlite,
ggplot2,shiny)
options(encoding = "UTF-8")
#涨停股票数据
getstockdat<-function(database,bk){
todays=Sys.Date()
tradeate<-as.Date(ifelse(weekdays(todays)=="星期六",todays-1,ifelse(week(todays)=="星期日",todays-2,todays)))|>
format("%Y%m%d")
zturl=paste0("https://push2ex.eastmoney.com/",database,"?cb=callbackdata4&ut=7eea3edcaed734bea9cbfc24409ed989&dpt=wz.ztzt&Pageindex=0&pagesize=1000&sort=",bk,"%3Aasc&date=",tradeate,"&_=1675429626825")
dat<-zturl|>
getURI()|>
str_extract("(?<=\\().+?(?=\\))")|>
fromJSON(flatten=T)
return(dat)
}
gettim<-function(){
Sys.setenv(TZ = "Asia/Shanghai")
times<-format(now(tzone = "Asia/Shanghai"), "%H:%M:%S")
if(nchar(times)<8){
tims<-paste0("0",times)
}else{
tims<-times
}
return(tims)
}
deltime<-function(tdat){
tdat<-ifelse(nchar(tdat)==5,paste0("0",tdat),tdat)
return(gsub('^(\\d{2})(\\d{2})(\\d{2})$', '\\1:\\2:\\3', tdat))
}
sprinfs<-function(x){
return(sprintf("%.2f",x))
}
ztdata<-function(){
zturl=getstockdat("getTopicZTPool",'fbt')
if(is.null(zturl$data)){
ztdata<-NULL
}else{
ztdata<-zturl$data$pool|>
mutate(p=p/100,
zdp=zdp/100,
amount=paste0(sprinfs(amount/100000000),"亿"),
ltsz=paste0(sprinfs(ltsz/100000000),"亿"),
tshare=paste0(sprinfs(tshare/100000000),"亿"),
hs=hs/100,
fund=paste0(sprinfs(fund/100000000),"亿"),
lbc=paste0(lbc,"连板"),
zbc=paste0(zbc,"次"),
zttj=paste0(zttj.days,"/",zttj.ct),
fbt=deltime(fbt),
lbt=deltime(lbt)
)|>
select(c,n,zdp,p,amount,ltsz,tshare,hs,fund,fbt,lbt,zbc,zttj,lbc,hybk)|>
arrange(fbt)|>
datatable(options = list(
columnDefs = list(list(className = 'dt-center', targets = "_all"))
),
colnames = c("代码","名称","涨跌幅","最新价","成交额","流通市值","总市值",
"换手率","封板资金","首次封板时间","最后封板时间","炸板次数",
"涨停统计","连板数","所属行业"))|>
formatPercentage(columns=c("zdp","hs"),2)|>
formatStyle(columns=c("zdp","ztp"),valueColumns = "zdp",color=styleInterval(0, c('green','red' )), textAlign = 'center')|>
formatStyle(columns=1:15, textAlign = 'center')
}
return(ztdata)
}
#昨日涨停表现
zrztdat<-function(){
zrzt<-getstockdat("getYesterdayZTPool",'zs')
if(is.null(zrzt$data)){
ysztdat<-zrzt$data$pool
}else{
ysztdat<-zrzt$data$pool|>
mutate(p=p/1000,
zdp=zdp/100,
zf=zf/100,
zs=zs/100,
ztp=ztp/1000,
amount=paste0(sprinfs(amount/100000000),"亿"),
ltsz=paste0(sprinfs(ltsz/100000000),"亿"),
tshare=paste0(sprinfs(tshare/100000000),"亿"),
hs=hs/100,
ylbc=paste0(ylbc,"连板"),
zttj=paste0(zttj.ct,"/",zttj.days),
yfbt=deltime(yfbt)
)|>
select(c,n,zdp,p,ztp,amount,ltsz,tshare,hs,zs,zf,yfbt,zttj,ylbc,hybk)|>
arrange(desc(zs))|>
datatable(options = list(
columnDefs = list(list(className = 'dt-center', targets = "_all"))
),
colnames = c("代码","名称","涨跌幅","最新价","涨停价","成交额","流通市值","总市值",
"换手率","涨速","振幅","昨日封板时间",
"涨停统计","连板数","所属行业"))|>
formatPercentage(columns=c("zdp","hs","zs","zf"),2)|>
formatStyle(columns=c("p","ztp"),valueColumns = "zdp",color=styleInterval(0, c('green','red' )), textAlign = 'center')|>
formatStyle(columns=c("zdp","zs","zf"),color=styleInterval(0, c('green','red' )), textAlign = 'center')|>
formatStyle(columns=1:15, textAlign = 'center')
}
return(ysztdat)
}
##强势股
qsdata<-function(){
qsurl=getstockdat("getTopicQSPool",'zdp')
if(is.null(qsurl$data)){
qsda<-qsurl$data$pool
}else{
qsda<-qsurl$data$pool|>
mutate(p=p/1000,
zdp=zdp/100,
zs=zs/100,
ztp=ztp/1000,
amount=paste0(sprinfs(amount/100000000),"亿"),
ltsz=paste0(sprinfs(ltsz/100000000),"亿"),
tshare=paste0(sprinfs(tshare/100000000),"亿"),
hs=hs/100,
nh=factor(nh,labels = c("否","是")),
zttj=paste0(zttj.ct,"/",zttj.days),
cc=ifelse(cc==1,"60日新高",ifelse(cc==2,"近期多次涨停","60日新高且近期多次涨停")))|>
select(c,n,zdp,p,ztp,amount,ltsz,tshare,hs,zs,nh,lb,zttj,cc,hybk)|>
arrange(desc(zdp))|>
datatable(options = list(
columnDefs = list(list(className = 'dt-center', targets = "_all"))
),
colnames =c("代码","名称","涨跌幅","最新价","涨停价","成交额","流通市值","总市值",
"换手率","涨速","是否新高","量比",
"涨停统计","入选理由","所属行业") )|>
formatPercentage(columns=c("zdp","hs","zs"),2)|>
formatStyle(columns=c("p","ztp"),valueColumns = "zdp",color=styleInterval(0, c('green','red' )), textAlign = 'center')|>
formatStyle(columns=c("zdp","zs"),color=styleInterval(0, c('green','red' )), textAlign = 'center')|>
formatStyle(columns=1:15, textAlign = 'center')
}
return(qsda)
}
##炸板股
zbztdat<-function(){
zbzt<-getstockdat("getTopicZBPool",'fbt')
if(!is.null(zbzt$data$pool)){
zbztdata<-zbzt$data$pool|>
mutate(p=p/1000,
zdp=zdp/100,
zf=zf/100,
zs=zs/100,
ztp=ztp/1000,
amount=paste0(sprinfs(amount/100000000),"亿"),
ltsz=paste0(sprinfs(ltsz/100000000),"亿"),
tshare=paste0(sprinfs(tshare/100000000),"亿"),
hs=hs/100,
zbc=paste0(zbc,"次"),
zttj=paste0(zttj.ct,"/",zttj.days),
fbt=deltime(fbt)
)|>
select(c,n,zdp,p,ztp,amount,ltsz,tshare,hs,zs,fbt,zbc,zttj,zf,hybk)|>
arrange(fbt)|>
datatable(options = list(
columnDefs = list(list(className = 'dt-center', targets = "_all"))
),
colnames = c("代码","名称","涨跌幅","最新价","涨停价","成交额","流通市值","总市值",
"换手率","涨速","首次封板时间","炸板次数",
"涨停统计","振幅","所属行业"))|>
formatPercentage(columns=c("zdp","hs","zs","zf"),2)|>
formatStyle(columns=c("p","ztp"),valueColumns = "zdp",color=styleInterval(0, c('green','red' )), textAlign = 'center')|>
formatStyle(columns=c("zdp","zs","zf"),color=styleInterval(0, c('green','red' )), textAlign = 'center')|>
formatStyle(columns=1:15, textAlign = 'center')
}else{
zbztdata<-zbzt$data$pool
}
return(zbztdata)
}
##跌停表现
dtdat<-function(){
dtzt<-getstockdat("getTopicDTPool",'fund')
if(!is.null(dtzt$data)){
dtdata<-dtzt$data$pool|>
arrange(fund)|>
mutate(p=p/1000,
zdp=zdp/100,
amount=paste0(sprinfs(amount/100000000),"亿"),
ltsz=paste0(sprinfs(ltsz/100000000),"亿"),
tshare=paste0(sprinfs(tshare/100000000),"亿"),
fba=paste0(sprinfs(fba/100000000),"亿"),
fund=paste0(sprinfs(fund/10000),"万"),
hs=hs/100,
days=paste0(days,"天"),
oc=paste0(oc,"次"),
lbt=deltime(lbt)
)|>
select(c,n,zdp,p,amount,ltsz,tshare,pe,hs,fund,lbt,fba,days,oc,hybk)|>
datatable(options = list(
columnDefs = list(list(className = 'dt-center', targets = "_all"))
),
colnames = c("代码","名称","涨跌幅","最新价","成交额","流通市值","总市值",
"动态市盈率","换手率","封单资金","最后封板时间",
"板上成交额","连续跌停","开板次数","所属行业"))|>
formatPercentage(columns=c("zdp","pe","hs"),2)|>
formatStyle(columns=c("zdp","p"),color="green", textAlign = 'center')|>
formatStyle(columns=1:15, textAlign = 'center')
}else{
dtdata=dtzt$data$pool
}
return(dtdata)
}
getindex<-function(){
hsmainindex<-"http://96.push2.eastmoney.com/api/qt/clist/get?cb=jQuery112400759858277797385_1679825335215&pn=1&pz=50&po=1&np=1&ut=bd1d9ddb04089700cf9c27f6f7426281&fltt=2&invt=2&wbp2u=|0|0|0|web&fid=&fs=b:MK0010&fields=f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f12,f13,f14,f15,f16,f17,f18,f20,f21,f23,f24,f25,f26,f22,f11,f62,f128,f136,f115,f152&_=1679823379624"
# hsmainindex<-"https://29.push2.eastmoney.com/api/qt/clist/get?cb=jQuery1124045798871689048637_1675491181570&pn=1&pz=50&po=1&np=1&ut=bd1d9ddb04089700cf9c27f6f7426281&fltt=2&invt=2&fid=&fs=b:MK0010"
# headers<-c("Accept"="text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
# "Accept-Encoding"= "gzip, deflate",
# "Accept-Language"="zh-CN,zh;q=0.9,en;q=0.8",
# "User-Agent"= "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36")
jsondat<-hsmainindex|>
getURL()
if(!is.null(jsondat)){
indexdat<-jsondat|>
str_extract("(?<=\\().+?(?=\\))")|>
fromJSON(flatten=T)
}else{
indexdat<-NULL
}
return(indexdat)
}
hsindexdatif<-function(){
dats<-getindex()
if(!is.null(dats$data$diff)){
infobox<-dats$data$diff|>
mutate(f5=paste0(sprinfs(f5/100000000),"亿"),
f6=paste0(sprinfs(f6/100000000),"亿"),
f3=f3/100)|>
select(f12,f14,f2,f4,f3,f5,f6,f18,f17,f15,f16)|>
filter(f12%in%c("000001","399001","399006","000688"))|>
mutate(zdf=paste0(f4,ifelse(f3>0,"(+","("),f3*100,"%)"),
cols=ifelse(f3<=0,"green","red"))|>
select(f2,zdf,cols)
}else{
infobox<-NULL
}
return(infobox)
}
hsindexdat<-function(){
dats<-getindex()
if(!is.null(dats$data$diff)){
hsindex<-dats$data$diff|>
mutate(f5=paste0(sprinfs(f5/100000000),"亿"),
f6=paste0(sprinfs(f6/100000000),"亿"),
f3=f3/100)|>
select(f12,f14,f2,f4,f3,f5,f6,f18,f17,f15,f16)
hsindat<-hsindex|>
datatable(options = list(
columnDefs = list(list(className = 'dt-center', targets = "_all"))
),
colnames=c("代码","名称","最新价","涨跌额","涨跌幅","成交量","成交额","昨收","今开","最高","最低"))|>
formatPercentage(columns=c("f3"),2)|>
formatStyle(columns=c("f2","f4","f3","f18","f17","f15","f16"),valueColumns = "f3",color=styleInterval(0, c('green','red' )), textAlign = 'center')|>
formatStyle(columns=1:15, textAlign = 'center')
}else{
hsindat<-NULL
}
return(hsindat)
}
sever.R:
pacman::p_load(data.table,stringr,dplyr,Tushare,lubridate,mongolite,DT,
future.apply,zoo,haven,readxl,foreign,rlist,XML,RCurl,jsonlite,
ggplot2,shiny)
Sys.setlocale(category = "LC_ALL", locale = "en_US.UTF-8")
options(shiny.sanitize.errors=FALSE)
# Define server logic required to draw a histogram
shinyServer(function(input, output, session) {
## I. Main dashboard -----------------------------
i_prog <- 1
tot_step <- 25
# 1. Value boxes ---------------------------------------------------------
# try add progress bars
output$markettype <- renderUI({
tagList(input$markettype, tags$sup(style="font-size: 20px", "%"))
})
output$long_short <- renderUI({
tagList(input$long_short, tags$sup(style="font-size: 20px", "%"))
})
output$currentTime <- renderText({
invalidateLater(2000, session)
paste("时间:", Sys.time())
})
##动态刷新时间
refreshdat<-function(lensecond){
tems<-gettim()
if(tems>"09:30:00"&tems<"15:01:00"){
invalidateLater(lensecond, session)
}else{
invalidateLater(400000, session)
}
}
threetop<-function(){
tems<-gettim()
if(tems>"00:00:00"&tems<"09:30:00"){
output$SzindexBox<-renderInfoBox({
infoBox(
"上证指数","","数据维护中....",width = 3,
fill = TRUE
)
})
output$SczindexBox<-renderInfoBox({
infoBox(
"深成指数","","数据维护中....",width = 3,
fill = TRUE
)
})
output$CybindexBox <-renderInfoBox({
infoBox(
"创业板指","","数据维护中....",width = 3,
fill = TRUE
)
})
output$KcbindexBox<-renderInfoBox({
infoBox(
"科创50","","数据维护中....",width = 3,
fill = TRUE
)
})
}else{
react<-hsindexdatif()
output$SzindexBox<-renderInfoBox({
infoBox(
"上证指数",react$f2[1],react$zdf[1],
color=react$col[1],width = 3,
fill = TRUE
)
})
output$SczindexBox<-renderInfoBox({
infoBox(
"深成指数",react$f2[2],react$zdf[2],
color=react$cols[2],width = 3,
fill = TRUE
)
})
output$CybindexBox <-renderInfoBox({
infoBox(
"创业板指",react$f2[3],react$zdf[3],
color=react$cols[3],width = 3,
fill = TRUE
)
})
output$KcbindexBox<-renderInfoBox({
infoBox(
"科创50",react$f2[4],react$zdf[4],
color=react$cols[4],width = 3,
fill = TRUE
)
})
}
}
##涨停股池
ztgch<-function(){
ztgdat<-ztdata()
ztstatu<-is.null(ztgdat)
if(!ztstatu){
output$zttj <- renderDataTable(ztgdat)
}else{
output$ztgcnull<-renderUI({
tagList(
HTML('<div class="text-center">
<strong>无涨停股票</strong>
</div>')
)
})
}
}
##昨日涨停股票
zrzt<-function(){
zrzgdat<-zrztdat()
zrzgstatu<-is.null(zrzgdat)
if(!zrzgstatu){
output$zrzttj <- renderDataTable(zrzgdat)
}else{
output$zrztnull<-renderUI({
tagList(
HTML('<div class="text-center">
<strong>昨日无涨停股票</strong>
</div>')
)
})
}
}
##强势股票
qsgc<-function(){
qsgpdat<-qsdata()
qsstatu<-is.null(qsgpdat)
if(!qsstatu){
output$qszttj <- renderDataTable(qsgpdat)
}else{
output$qsgpnull<-renderUI({
tagList(
HTML('<div class="text-center">
<strong>强势股票</strong>
</div>')
)
})
}
}
##炸板股池
zbreact<-function(){
zbztd<-zbztdat()
zbstatus<-is.null(zbztd)
if(!zbstatus){
output$zbzttj <- renderDataTable(zbztd)
}else{
output$zbgcnull<-renderUI({
tagList(
HTML('<div class="text-center">
<strong>无强势股票</strong>
</div>')
)
})
}
}
##跌停股票池
dtbanreact<-function(){
dtban<-dtdat()
dtstatus<-is.null(dtban)
if(!dtstatus){
output$dttj <- renderDataTable({dtban})
}else{
output$dtbcnull<-renderUI({
tagList(
HTML('<div class="text-center">
<strong>无跌停股票</strong>
</div>')
)
})
}
}
##指数数据
hsindwreact<-function(){
hszs<-hsindexdat()
status<-is.null(hszs)
if(!status){
output$hsmainindex <- renderDataTable(hszs)
}
}
showModal(modalDialog(
title = "请稍候...",
"数据加载中,请稍候...",
easyClose = FALSE
))
updatf<-reactiveTimer(5000)
updatslow<-reactiveTimer(100000)
isolate(
observe({
tems<-gettim()
if(tems>"09:30:00"&tems<"15:01:00"){
updatf()
}
threetop()
})
)
isolate(
observe({
tems<-gettim()
if(tems>"09:30:00"&tems<"15:01:00"){
updatslow()
}
ztgch()
zrzt()
qsgc()
zbreact()
dtbanreact()
hsindwreact()
})
)
removeModal()
})
ui.R:
pacman::p_load(shinydashboard,shiny,dplyr,tidyr,ggplot2,
highcharter,lubridate,stringr,withr,treemap,DT,shinyBS,shinyjs,
WDI,geosphere,magrittr,shinycssloaders,timevis,bslib,
ggplot2,shiny)
options(spinner.color="#006272")
Sys.setlocale(category = "LC_ALL", locale = "en_US.UTF-8")
## 1. header -------------------------------
header <- dashboardHeader( title = HTML("Quant"),
disable = FALSE,
titleWidth = 225
)
## 2. siderbar ------------------------------
siderbar <- dashboardSidebar(
width=225,
sidebarMenu(
menuItem(tabName = "main","当日行情"),
menuItem(tabName = "stock","股票" ,
menuSubItem(tabName ="facot","因子表现"),
menuSubItem(tabName ="strategy","投资策略")),
menuItem(tabName = "ETF", "ETF"),
menuItem(tabName = "Convertbond", "可转债")
)
)
## 3. body --------------------------------
body <- dashboardBody(
## 3.0. CSS styles in header ----------------------------
tags$head(
tags$style(HTML(
"h1{font-size:20px;
font-family:SimSun;
font-weight: bold;
}"
))
),
tabItems(
tabItem(tabName ="main",
tags$br(),
div(h1(strong(textOutput("currentTime")),
style = "color:darkblue" , align = "left")
),
fluidRow(
infoBoxOutput("SzindexBox", width = 3),
infoBoxOutput("SczindexBox", width = 3),
infoBoxOutput("CybindexBox", width = 3),
infoBoxOutput("KcbindexBox", width = 3)
),
tags$br(),
div(p(strong("涨停板行情"),
style = "color:black", align = "left")
),
fluidRow(
box(
width = 12,
id="tabset1",
tabsetPanel(
tabPanel("涨停股池",
dataTableOutput("zttj"),
uiOutput("ztgcnull")
),
tabPanel("昨日涨停池",
dataTableOutput("zrzttj"),
uiOutput("zrztnull")
),
tabPanel("强势股池",
dataTableOutput("qszttj"),
uiOutput("qsgpnull")
),
tabPanel("炸板股池",
dataTableOutput("zbzttj"),
uiOutput("zbgcnull")
),
tabPanel("跌停股池",
dataTableOutput("dttj"),
uiOutput("dtbcnull"))
)
)
),
div(p(strong("沪深重要指数"),
style = "color:black", align = "left")
),
fluidRow(
box(
width = 12,
id="boxset1",
#带加载
# shinycssloaders::withSpinner(
# dataTableOutput("hsmainindex")
# )
dataTableOutput("hsmainindex")
)
)
),
tabItem(tabName ="facot"
),
tabItem(tabName ="strategy"
),
tabItem(tabName ="ETF"
),
tabItem(tabName ="Convertbond"
)
)
)
## put UI together --------------------
ui <- dashboardPage(header, siderbar, body,skin = "red")
部署后logs如下:
···
2023-03-26T13:40:53.251645+00:00 shinyapps[7857848]: rmarkdown version: 2.20
2023-03-26T13:40:53.251649+00:00 shinyapps[7857848]: knitr version: 1.42
2023-03-26T13:40:53.251654+00:00 shinyapps[7857848]: jsonlite version: 1.8.4
2023-03-26T13:40:53.251662+00:00 shinyapps[7857848]: RJSONIO version: (none)
2023-03-26T13:40:53.251666+00:00 shinyapps[7857848]: htmltools version: 0.5.4
2023-03-26T13:40:53.251680+00:00 shinyapps[7857848]: reticulate version: (none)
2023-03-26T13:40:53.251938+00:00 shinyapps[7857848]: Using pandoc: /opt/connect/ext/pandoc/2.16
2023-03-26T13:40:53.631590+00:00 shinyapps[7857848]: Starting R with process ID: '25'
2023-03-26T13:40:53.631956+00:00 shinyapps[7857848]: Shiny application starting ...
2023-03-26T13:40:55.497605+00:00 shinyapps[7857848]: Container event from container-7928489: stop
2023-03-26T13:40:55.610920+00:00 shinyapps[7857848]: Listening on http://127.0.0.1:46629
2023-03-26T13:41:01.803347+00:00 shinyapps[7857848]: Running on host: f462b7098e29
2023-03-26T13:41:01.805782+00:00 shinyapps[7857848]: Running as user: uid=10001(shiny) gid=10001(shiny) groups=10001(shiny)
2023-03-26T13:41:01.805812+00:00 shinyapps[7857848]: Connect version: 2023.03.0
2023-03-26T13:41:01.805818+00:00 shinyapps[7857848]: LANG: C.UTF-8
2023-03-26T13:41:01.805824+00:00 shinyapps[7857848]: Working directory: /srv/connect/apps/quant
2023-03-26T13:41:01.806044+00:00 shinyapps[7857848]: Using R 4.2.2
2023-03-26T13:41:01.806062+00:00 shinyapps[7857848]: R.home(): /opt/R/4.2.2/lib/R
2023-03-26T13:41:01.806312+00:00 shinyapps[7857848]: Content will use current R environment
2023-03-26T13:41:01.806320+00:00 shinyapps[7857848]: R_LIBS: (unset)
2023-03-26T13:41:01.806352+00:00 shinyapps[7857848]: .libPaths(): /opt/R/4.2.2/lib/R/library
2023-03-26T13:41:01.812864+00:00 shinyapps[7857848]: shiny version: 1.7.4
2023-03-26T13:41:01.812885+00:00 shinyapps[7857848]: httpuv version: 1.6.9
2023-03-26T13:41:01.812898+00:00 shinyapps[7857848]: rmarkdown version: 2.20
2023-03-26T13:41:01.812913+00:00 shinyapps[7857848]: knitr version: 1.42
2023-03-26T13:41:01.812921+00:00 shinyapps[7857848]: jsonlite version: 1.8.4
2023-03-26T13:41:01.812924+00:00 shinyapps[7857848]: RJSONIO version: (none)
2023-03-26T13:41:01.812927+00:00 shinyapps[7857848]: htmltools version: 0.5.4
2023-03-26T13:41:01.812948+00:00 shinyapps[7857848]: reticulate version: (none)
2023-03-26T13:41:01.813198+00:00 shinyapps[7857848]: Using pandoc: /opt/connect/ext/pandoc/2.16
2023-03-26T13:41:02.211233+00:00 shinyapps[7857848]: Starting R with process ID: '46'
2023-03-26T13:41:02.211240+00:00 shinyapps[7857848]: Shiny application starting ...
2023-03-26T13:41:04.310289+00:00 shinyapps[7857848]: Listening on http://127.0.0.1:46093
2023-03-26T13:41:09.077528+00:00 shinyapps[7857848]: Warning: Error in if: missing value where TRUE/FALSE needed
2023-03-26T13:41:09.088497+00:00 shinyapps[7857848]: 63: fromJSON
2023-03-26T13:41:09.088543+00:00 shinyapps[7857848]: 62: getindex [global.R#246]
2023-03-26T13:41:09.088549+00:00 shinyapps[7857848]: 61: hsindexdatif [global.R#257]
2023-03-26T13:41:09.088554+00:00 shinyapps[7857848]: 60: threetop [/srv/connect/apps/quant/server.R#83]
2023-03-26T13:41:09.088560+00:00 shinyapps[7857848]: 59: observe [/srv/connect/apps/quant/server.R#250]
2023-03-26T13:41:09.088571+00:00 shinyapps[7857848]: 58: <observer>
2023-03-26T13:41:09.088575+00:00 shinyapps[7857848]: 15: <Anonymous>
2023-03-26T13:41:09.088578+00:00 shinyapps[7857848]: 13: fn
2023-03-26T13:41:09.088585+00:00 shinyapps[7857848]: 8: retry
2023-03-26T13:41:09.088588+00:00 shinyapps[7857848]: 7: connect$retryingStartServer
2023-03-26T13:41:09.088591+00:00 shinyapps[7857848]: 6: eval
2023-03-26T13:41:09.088594+00:00 shinyapps[7857848]: 5: eval
2023-03-26T13:41:09.088597+00:00 shinyapps[7857848]: 4: eval
2023-03-26T13:41:09.088600+00:00 shinyapps[7857848]: 3: eval
2023-03-26T13:41:09.088604+00:00 shinyapps[7857848]: 2: eval.parent
2023-03-26T13:41:09.088607+00:00 shinyapps[7857848]: 1: local
···
提示貌似fromJSON报错,但在本地试了多次都无问题,不知道如何debug.