【发布时间】:2015-11-29 09:39:29
【问题描述】:
我已经构建了一个闪亮的应用程序来从 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({
有人知道为什么我在使用移动设备时遇到问题吗?
【问题讨论】: