Geoff
Geoff

Reputation: 180

Suddenly I get "Error : $ operator is invalid for atomic vectors"

I've been developing a shiny app with no issues. Then suddenly when I try to run it I get the following error:

Error : $ operator is invalid for atomic vectors
Warning: Error in $: $ operator is invalid for atomic vectors
Stack trace (innermost first):
68: tag
67: tags$a
66: tag
65: tags$li
64: FUN
63: lapply
62: buildTabset
61: tabsetPanel
60: tag
59: tags$div
58: div
57: tabPanel
56: tabsetPanel
55: tag
54: tags$div
53: div
52: fluidRow
51: tag
50: tags$div
49: div
48: hidden
47: tag
46: tags$div
45: div
44: tagList
43: attachDependencies
42: bootstrapPage
41: fluidPage
 1: runApp
Error : $ operator is invalid for atomic vectors

However, there's no indication of where the error is occurring as it doesn't specify a variable. Does anyone know what would cause such an error? My app has 1000s of lines of code so it's not practical to share it here.

Upvotes: 6

Views: 3392

Answers (2)

Sebastian Bloy
Sebastian Bloy

Reputation: 101

I do not have enough reputation to comment a comment so forgive me making an answer. This comment by Goeff solved my identical error.

Thanks Geovany. I managed to fix it by systematically commenting out sections of the UI script. What fixed it for me was adding an absent id ="abcd" to a tabsetPanel. I guess there's indication in the StackTrace. Thanks for for input though. – Geoff Aug 20 at 15:58

I also had tabsetPanels without the addition of "id =", I had a name though like

tabsetPanel( "abcd",...) yet it became non functional after updating shiny and r-Studio.

With tabsetPanel(id = "abcd,...) it works now.

Thanks to all!

Upvotes: 4

Magdalena Julkowska
Magdalena Julkowska

Reputation: 1

We had similar problem here. Indeed tabsetPanel was the major disaster causing it. We changed all the tabsetPanel into navbarPage and that fixed the issue.

Upvotes: 0

Related Questions