在Shinyapp.io上部署闪亮

时间:2017-09-28 01:57:22

标签: r shiny

我在rstudio中成功运行了一个闪亮的应用程序,但当我尝试将其部署到Shinyapp.io时,它出错了:

错误:发生了错误。检查您的日志或联系应用程序作者进行说明。

我的日志在哪里?这是因为我直接从我的电脑开始工作吗?提前致谢

ui.R:

library(shiny)
library(shinydashboard)
library(proxy)
library(recommenderlab)
library(reshape2)
library(plyr)
library(dplyr)
library(DT)
library(RCurl)
rm(list = ls());gc(reset = T)

setwd("C:\\Users\\xxxx\\yyyyy")
movies <- read.csv("movies.csv", header = TRUE, stringsAsFactors=FALSE)
movies <- movies[with(movies, order(title)), ]
ratings <- read.csv("ratings100k.csv", header = TRUE)
a <- unique(movies$movieId)
b <- unique(ratings$movieId)  
movies <- movies[-which((a %in% b) == FALSE),]   
################################################################

ui <- shinyUI(dashboardPage(skin="blue",
                            dashboardHeader(title = "Movie Recommenders"),
                            dashboardSidebar(
                              sidebarMenu(
                                menuItem("Movies", tabName = "movies", icon = icon("star-o")),
                                menuItem(
                                  list(

                                    selectInput("select", label = h5("Select 3 Movies That You Like"),
                                                choices = as.character(movies$title[1:length(unique(movies$movieId))]),
                                                selectize = FALSE,
                                                selected = "127 Hours (2010)"),
                                    selectInput("select2", label = NA,
                                                choices = as.character(movies$title[1:length(unique(movies$movieId))]),
                                                selectize = FALSE,
                                                selected = "Nines, The (2007)"),
                                    selectInput("select3", label = NA,
                                                choices = as.character(movies$title[1:length(unique(movies$movieId))]),
                                                selectize = FALSE,
                                                selected = "Prancer (1989)"),
                                    submitButton("Submit")
                                  )
                                )
                              )
                            ),


                            dashboardBody(
                              tags$head(
                                tags$style(type="text/css", "select { max-width: 360px; }"),
                                tags$style(type="text/css", ".span4 { max-width: 360px; }"),
                                tags$style(type="text/css",  ".well { max-width: 360px; }")
                              ),

                              tabItems(  

                                tabItem(tabName = "movies",
                                        fluidRow(
                                          box(
                                            width = 6, status = "info", solidHead = TRUE,
                                            title = "You might like this too!",
                                            tableOutput("table")),
                                          valueBoxOutput("tableRatings1"),

                                          valueBoxOutput("tableRatings2"),
                                          valueBoxOutput("tableRatings3"),
                                          HTML('<br/>')
                                        )
                                )
                              )
                            )

)
)   

0 个答案:

没有答案