0

I'am in the process of creating a shiny dashbord, I create 3 widgets two SelectizeInput and a radioButton, the problem is that when i added the radioButton this was displayed

ERROR: $ operator is invalid for atomic vectors

NB: the same code it worked once then failed I don't know why

this is the code R concerning the widgets. Can someone help me please

dashboardBody(
tabItems(
   tabItem(tabName = "dashboard",h2("Analyse du comportement électoral des citoyens tunisiens", align="center",style = "color:blue"),


           fluidRow(
             tiltle="filtre",
             column(width=4,
                    box(
                        title = "Filtre",
                        status = "primary",
                        width = 8,
                        solidHeader = TRUE,
                        background="navy", 
                        box(

                          solidHeader = FALSE,
                          width = 8,
                          background = "navy" ,
                          radioButtons("genre", "Genre", list("Homme","Femme","Tous"),"Tous")

                        ),

                        box(
                          solidHeader = FALSE,
                          width = 12,
                          background = "navy",
                          selectizeInput("region", label = "Région",
                                      choices = levels(data$REGION), 
                                      selected = "Ariana", multiple=TRUE)


                        ),

                        box(
                          solidHeader = FALSE,
                          width = 12,
                          background = "navy",
                          selectizeInput("parti", label = "Parti politique",
                                      choices = levels(data$Q99), 
                                      selected = "", multiple=TRUE)


                        ),
                        box(
                          submitButton("Mettre à jour!",icon("refresh")),
                          background = "navy"


                        )
                       )),
Psidom
  • 209,562
  • 33
  • 339
  • 356
Asma
  • 51
  • 2
  • 5
  • The more interesting part of the code will be the server component. Generally this error hints at that what ever you use $ on (probably expected to be a list) is actually not a list/data.frame but a vector. – AlexR Aug 12 '16 at 21:36
  • I've tried radioButtons("genre", "Genre", c("Homme","Femme","Tous"),"Tous") and I've tried radioButtons("genre", "Genre", levels(data$Q101,"") but nothing @AlexR – Asma Aug 12 '16 at 21:42
  • R has named parameters. Use them. Also, I'm talking about the server function (function(input, output){doSomethingToRespondToUI}... – AlexR Aug 12 '16 at 21:43

0 Answers0