1
几个月前,我构建了一个闪亮的应用程序,并将一张图表作为主要输出。我的数据来自excel工作表,我用readxl
包将数据拉入R. 我最近更新了excel数据,现在情节将不再绘制数据。 从shinyapp:Plotly in R not recognized/plotting data from readxl package
ratings <- read_excel("data/excel.xlsx", sheet = "Ratings")
p <- plot_ly(ratings, x = ratings[,1],
y = ratings[,input$select[1]],
name = input$select[1])
是输出开始构建块。当我启动应用程序时,我看到一条错误消息
Error: Unsupported index type: NULL
其中情节曾经是。 我试图在RStudio中逐步构建图,但是我的输出是空白的x,y图,没有任何数据点。如果我手动建立向量:
xVector <- c(1:5)
yVector <- c(1:5)
plot_ly(x = xVector, y = yVector)
我得到一个全功能plotly
图。
很高兴工作。 'tibble'继承'data.frame',所以这个步骤不需要。可能会在即将发布的剧情中得到修复。使用这个,我不必使用'as.data.frame()'显式转换。 – timelyportfolio