79819278

Date: 2025-11-13 18:08:26
Score: 0.5
Natty:
Report link

I am working in R on Mac and have a related question.
I first had the same error as described above.
Run this code in the R console before deploying the app:

install.packages("plotly", repos = "https://cran.rstudio.com/")

Include this code at the beginning of |app.R"

library(ggplot2) # dependency
library(stats) # dependency
library(graphics) # dependency
library(plotly)

I am still trying to deploy an app that includes a plotly figure on shinyapps.io. When running the app locally, it works fine. However, when deploying the app on shinyapps.io, I get this error:

Error in plotlyOutput("name_of_sunburst_plot")
could not find function "plotlyOutput"

In ui, I use:

sunburst_finance_count
})
             tabPanel("Panel name", 
                      h4("TextText"), 
                      p("TextText."), 
                      plotly::plotlyOutput(outputID="instruments_sunburst"
                                   # , height = "800px"
                                   )),

In server, I use the following code (sunburstDF and custom_colors are defined in global.R)

output$instruments_sunburst <- renderPlotly({
sunburst_finance_count <-
plot_ly(
data = sunburstDF_inst,
ids = ~ids,
labels = ~labels,
parents = ~parents,
values = ~values,
type = 'sunburst',
branchvalues = 'total',
hoverinfo = 'text',
textinfo = 'label+percent parent', # Add the count to the textinfo by adding +value
hovertext = ~hoverinfo,
insidetextorientation = "radial", # Adjust text orientation
marker = list(
colors = custom_colors_instruments # Apply the custom color scale
)
)
})

I appreciate any advice on how to address this error.

Reasons:
  • RegEx Blacklisted phrase (1): I get this error
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: blue_elephant