大佬教程收集整理的这篇文章主要介绍了部署 R 闪亮应用程序后出错(找不到对象),大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在开发我的第一个 shiny
应用程序,但在将应用程序发布到 Shinyapp.io 服务器时遇到了问题。该应用程序在我本地的 R studio 中运行良好,但是在部署后并在 Web 浏览器中打开时,它在日志中显示一条错误消息:“Warning: Error in unique: object 'df_app_MT' not found”.
但是 'df_app_MT' 已存在于 .Rdata 中。我已经浏览了几个帖子,但错误仍然存在。
我已将(ui.R、server.R 和 .Rdata)放置在应用程序的文件夹中。还检查了shinydashboard,应用程序(状态显示“正在运行”)。这是我当前的 ui.R 代码和日志详细信息以及屏幕截图。请帮助我解决这个问题。
谢谢, 托菲克
ui.R
library(shinydashboard)
library(shiny)
library(dplyr)
library(ComplexHeatmap)
library(ggplot2)
library(BiOCManager)
options(repos = BiOCManager::repositorIEs())
load("DATAFILE.RData")
# define UI
ui <- dashboardPage(skin = "red",dashboardheader(title = "TesTing"),dashboardSIDebar(
sIDebarMenu(
menuItem("MENU")
),sIDebarMenuOutput("menu")
),dashboardBody(
tabItems(
tabItem("grIDfingerprint",fluIDRow(
Box(wIDth = NulL,solIDheader = TRUE,plotOutput("plot2",height = 500)
),fluIDRow(
Box(wIDth = NulL,plotOutput("plot_map",height = 500))
),fluIDRow(
column(wIDth = 4,Box(wIDth = NulL,status = "warning",downloadbutton("gridplot",label = "Download image")
)
),column(wIDth = 3,offset = 1,downloadbutton("downloadList",label = "Download table")
))
)
)
),tabItem(tabname = "indivIDualfingerprint",h5("Fingerprint heatmap displaying patterns of Annotated modules across indivIDual study subjects"),fluIDRow(
Box(wIDth = 12,(div(style='wIDth:1400px;overflow: auto;height:800px;',plotOutput("plot4",height = 1200,wIDth = 2550)))
),downloadbutton("downloadindplot",downloadbutton("indivIDualtable",label = "Download table")
))
)
)),tabItem("complexplot",fluIDRow(
column(wIDth = 12,(div(style='wIDth:1400px;overflow: auto;',plotOutput("plot3",height = 800,wIDth = 4600)))),fluIDRow(
column(wIDth = 4,downloadbutton("aggregateplot",label = "Download image")
)
),downloadbutton("downloadaggregate",label = "Download table")
))
)
)
))
)
)
)
server.R
server = function(input,output) {
output$menu <- renderMenu({
sIDebarMenu(
menuItem("FINGERPRINT GRIDS",tabname = "grIDfingerprint"),menuItem("Choose disease",icon = icon("bar-chart-o"),# input directly under menuItem
SELEcTinput(inputID = "diseaseinput",label = "",choices = unique(df_app_MT$diseases),multiple=F,SELEctize=TRUE,wIDth = '98%'),menuItem("MODulES X stuDIES",tabname = "complexplot"),menuItem("Choose aggregate",# input directly under menuItem
SELEcTinput(inputID = "aggregateinput",choices = unique(df_app_MT$AggregatE),menuItem("MODulES X INdivIDUALS",tabname = "indivIDualfingerprint"),# input directly under menuItem
SELEcTinput(inputID = "Illnessinput",choices = unique(Ind_table_MT$Illness),wIDth = '80%'),menuItem("Choose aggregate"),SELEcTinput(inputID = "Indaggregateinput",SELEcted ="A1",multiple=T,tabname = "indivIDualfingerprint")
}
)
}
日志详细信息
2021-04-29T02:08:20.853366+00:00 shinyapps[4042863]: Bioconductor page: http://bioconductor.org/packages/ComplexHeatmap/
2021-04-29T02:08:20.853367+00:00 shinyapps[4042863]: Github page: https://github.com/jokergoo/ComplexHeatmap
2021-04-29T02:08:20.853367+00:00 shinyapps[4042863]: documentation: http://jokergoo.github.io/ComplexHeatmap-reference
2021-04-29T02:08:20.853368+00:00 shinyapps[4042863]: Gu,Z. Complex heatmaps reveal patterns and correlations in multIDimensional
2021-04-29T02:08:20.853369+00:00 shinyapps[4042863]: genomic data. Bioinformatics 2016.
2021-04-29T02:08:20.853369+00:00 shinyapps[4042863]: This message can be suppressed by:
2021-04-29T02:08:20.853369+00:00 shinyapps[4042863]: suppresspackageStartupmessages(library(ComplexHeatmap))
2021-04-29T02:08:20.853370+00:00 shinyapps[4042863]: ========================================
2021-04-29T02:08:20.853370+00:00 shinyapps[4042863]:
2021-04-29T02:08:21.178976+00:00 shinyapps[4042863]: Bioconductor version 3.12 (BiOCManager 1.30.10),?BiOCManager::install for Help
2021-04-29T02:08:24.452402+00:00 shinyapps[4042863]: Warning: Error in unique: object 'df_app_MT' not found
2021-04-29T02:08:24.459069+00:00 shinyapps[4042863]: 114: unique
2021-04-29T02:08:24.459069+00:00 shinyapps[4042863]: 108: renderUI [/srv/connect/apps/test/server.R#3]
2021-04-29T02:08:24.459071+00:00 shinyapps[4042863]: 94: renderFunc
2021-04-29T02:08:24.459084+00:00 shinyapps[4042863]: 7: connect$retry
2021-04-29T02:08:24.459070+00:00 shinyapps[4042863]: 107: func
2021-04-29T02:08:24.459071+00:00 shinyapps[4042863]: 93: output$menu
2021-04-29T02:08:24.459071+00:00 shinyapps[4042863]: 13: runApp
2021-04-29T02:08:24.459083+00:00 shinyapps[4042863]: 12: fn
2021-04-29T02:08:24.459085+00:00 shinyapps[4042863]: 5: eval
2021-04-29T02:08:24.459084+00:00 shinyapps[4042863]: 6: eval
2021-04-29T02:42:03.040084+00:00 shinyapps[4042863]: Running on host: ebb9348b6b95
2021-04-29T02:42:03.046218+00:00 shinyapps[4042863]: Server version: 1.8.6.1
2021-04-29T02:42:03.046231+00:00 shinyapps[4042863]: LANG: en_US.UTF-8
2021-04-29T02:42:03.046234+00:00 shinyapps[4042863]: R version: 4.0.3
2021-04-29T02:42:03.046237+00:00 shinyapps[4042863]: shiny version: 1.6.0
2021-04-29T02:42:03.046237+00:00 shinyapps[4042863]: httpuv version: 1.5.5
2021-04-29T02:42:03.046247+00:00 shinyapps[4042863]: rmarkdown version: (nonE)
2021-04-29T02:42:03.046281+00:00 shinyapps[4042863]: knitr version: (nonE)
2021-04-29T02:42:03.046298+00:00 shinyapps[4042863]: Jsonlite version: 1.7.2
2021-04-29T02:42:03.046308+00:00 shinyapps[4042863]: rjsonio version: (nonE)
2021-04-29T02:42:03.046478+00:00 shinyapps[4042863]: Using pandoc: /opt/connect/ext/pandoc/2.11
2021-04-29T02:42:03.046308+00:00 shinyapps[4042863]: HTMLtools version: 0.5.1
2021-04-29T02:42:03.256647+00:00 shinyapps[4042863]: StarTing R with process ID: '24'
2021-04-29T02:42:03.253079+00:00 shinyapps[4042863]: Using Jsonlite for JsON processing
我看不出从拆分应用程序切换到单文件应用程序会如何改变任何内容,但该应用程序第一次可能无法在同一工作目录中找到 .RData 文件。在本地,如果 df_app_MT 恰好在您的工作环境中,这可能会被忽略。
以上是大佬教程为你收集整理的部署 R 闪亮应用程序后出错(找不到对象)全部内容,希望文章能够帮你解决部署 R 闪亮应用程序后出错(找不到对象)所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。