Reputation: 37
I just installed a bunch of new package updates this morning (including plotly, dygraphs, rCharts, shiny and shinydashboard), and suddenly almost all outputs on my dashboard that I worked months on are broken, while they worked yesterday without a problem! For most charts I get the following error:
ERROR: object of type 'closure' is not subsettable
This is for plotly graphs like this one:
ui:
plotlyOutput("Top10Events")
server:
output$Top10Events <- renderPlotly({
x <- list(
title = " "
)
y <- list(
title = "Total Events"
)
plot_ly(x = Top10$event,
y = Top10$totalEvents.x,
type = "bar",
color = Top10$totalEvents.x,
name = "This Month",
marker = list(color = brewer.pal(10, "Paired"))) %>%
layout(xaxis = x, yaxis = y, autosize = F, width = 700, height = 350, margin = m)
p2 <- add_trace(
p,
x = Top10$event,
y = Top10$totalEvents.y,
name = "Last Month",
type = "bar",
color = Top10$totalEvents.y,
marker = list(color = brewer.pal(10, "Paired")))
})
I read that this error occurs mostly when {} are missing for reactive values, but as everything just worked fine yesterday I don't think this is the issue.
I figured it is likely a shiny issue? So I installed the old version of Shiny (0.13.2) successfully, but get a new error:
Error in get(Info[i, 1], envir = env) :
lazy-load database 'C:/Users/user/Documents/R/R-
3.3.1/library/shiny/R/shiny.rdb' is corrupt
In addition: Warning message:
In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1
Tried it with an older shinydashbaord version as well (0.5.2), but I get the following error when installing:
The following object is masked from ‘package:graphics’:
box
My version of R & RStudio is also the newest apparently.
Any suggestions on how to approach the debugging process further and save my dashboard?
Many thanks, any help is appreciated!
EDIT: The latest oldest plotly version I can find on https://cran.r-project.org/src/contrib/Archive/plotly/ is only plotly_3.6.0, while I am currently running 4.5.2 (as I figured it might be a plotly issue). Trying to install the 3.6.0 version, I get again the following error:
The following object is masked from ‘package:igraph’:
%>%
The following object is masked from ‘package:ggplot2’:
last_plot
The following object is masked from ‘package:graphics’:
layout
EDIT 2: Sorry for all the edits - so now I managed to upload the old plotly package, 3.6.0, and everything works again. Seems like the new package is either full of bugs, or I need to code my graphs differently? I could not find any helpful resource on that. Could anyone help?
Upvotes: 0
Views: 132