我已经构建了一个闪亮的应用程序,可以从Quandl加载数据并显示有助于跟踪我的投资的图表。我已将其发布到https://jackpeacock.shinyapps.io/investmentgraphs上的Shinyapps.io
这在桌面上可以很好地加载,但是仅挂在移动设备上的“请稍候”加载屏幕上。我已经在Google Nexus 5上的Chrome以及在iPad 2上的Chrome和Safari中对此进行了测试。我还尝试在两个设备上请求桌面站点均未成功。RStudio的网站说,移动设备应该没有问题。(https://www.rstudio.com/faq-items/will-shiny-app-work-properly-mobile-device-iphone-android-ipad-kindle-etc/)
最初,我认为这可能与使用ggplot2或quandl软件包有关,但后来我注意到我以前构建的一个极其简单的应用程序也遇到了同样的问题https://jackpeacock.shinyapps.io/chelseapredictor。
我更简单的UI.R文档的顶部如下所示:
shinyUI(fluidPage(
headerPanel("Can you catch Chelsea?"),
sidebarPanel(
dataTableOutput('lTable')
),
mainPanel(
tabsetPanel(
tabPanel("League Predictor",
我更简单的server.R文档的顶部看起来像这样:
# Let's first create the data frame:
Club <- c("Chelsea", "Man City", "Arsenal", "Man Utd", "Liverpool",
"Spurs", "Southampton", "Stoke", "Swansea", "West Ham",
"Newcastle", "Crystal Palace", "West Brom", "Everton",
"Hull", "Sunderland", "Aston Villa", "QPR", "Burnley",
"Leicester")
Played <- c(27, rep(28, 18), 27)
Points <- c(63, 58, 54, 53, 51, 50, 49, 42, 40, 39, 35, 30, 30, 28,
27, 26, 25, 22, 22, 18)
leagueTable <- data.frame(Club, Played, Points)
shinyServer(
function(input, output) {
output$lTable <- renderDataTable(leagueTable, options=list(paging = FALSE, searching = FALSE))
southampton <- reactive({
有谁知道我为什么在移动设备上遇到问题?
这似乎是大写的问题。
上述问题中的两个链接甚至都没有加载到桌面上。但是,如果我使用链接https://jackpeacock.shinyapps.io/InvestmentGraphs和https://jackpeacock.shinyapps.io/ChelseaPredictor,则无论台式机还是移动设备,我都不再遇到问题。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句