Error in tagAssert argument body is missing with no default when trying to create a dashboard using shiny R

+5 votes

I'm trying to create a dashboard using shiny R. I'm ending up with the following error:

Warning: Error in tagAssert: argument "body" is missing, with no default

ui.R

library(shiny)
library(shinydashboard)

shinyUI(
  dashboardPage(title = "Sales Analysis",
    dashboardHeader(title="project", dropdownMenuOutput("msgOutput"),
                    # dropdownMenu(
                    #   type = "message",
                    #   messageItem(from = "Finance Update",message = "whats up niggas"),
                    #   messageItem(from = "Sales Update",message = "Meeting at 6PM on Monday", time = "15:00",icon = icon("handshake-o"))
                    # )
    
              dropdownMenu(type = "task",
                          taskItem(
                           value = 80,
                           color = "aqua",
                           "80% of DevOps courses sold"),
                          taskItem(
                            value = 55,
                            color = "red",
                            "55% of Blockchain courses sold"),
                          taskItem(
                            value = 25,
                            color = "blue",
                            "25% of AWS courses sold"
                          )
                          )
                    ),
    dashboardSidebar(
      sidebarSearchForm("searchText","buttonSearch","search"),
        sidebarMenu(
        menuItem("Sales dashboard",tabName = "dashboard"),
        menuSubItem("DevOps",tabName = "DevOps"),
        menuSubItem("Blockchain",tabName = "Blockchain"),
        menuSubItem("AWS",tabName = "AWS"),
       menuItem("Employee Performance",tabName = "Employee Performance")
    ),
    dashboardBody(
      tabItems(
        tabItem(tabName = "dashboard",
                fluidRow(
                  valueBox("10,00,000","Sales till date for the month", icon = icon("thumbs-up"),color = "olive"),
                  valueBox(paste0('20%'),"Sales Improvement", icon = icon("warning"),color = "olive"),
                  valueBoxOutput("approvedsales")
                ),
                fluidRow(
                  valueBox(value = "60,00,000",
                           subtitle = "Sales target for next month",
                           icon = icon("hourglass-start"),
                           color = "teal"),
                  valueBox(paste0('80%'),"Expected Improvement for next month",icon = icon("chart-line"),color = "teal"),
                  valueBox(paste0('80%'),"Expected Leads to sales conversions",icon = icon("arrow-circle-right"),color = "teal")
                ),
                fluidRow(
                  box(title = "Sales report in 5 years",status = "primary",solidHeader = T,plotOutput("histogram",height = 250)),
                  box(title = "controls for dashboard",status = "primary",solidHeader = T,
                  sliderInput("bins","number of breaks",1,100,50))
                  )),
        tabItem(tabName = "DevOps",
                fluidRow(
                valueBox("220","DevOps sales till date for the month",icon = icon("thumbs-up"),color = "olive"),
                valueBox("30%","Sales Improvement",icon = icon("warning"),color = "olive"),
                valueBox("70%","Leads to sales Conversion",icon = icon("arrow-circle-right"),color = "olive")
                ),
                fluidRow(
                  valueBox("350","DevOps sales target for next month",icon = icon("hourglass-start"),color = "teal"),
                  valueBox("90%","Expected Improvement for next month",icon = icon("chart-line"),color = "teal"),
                  valueBox("98%","Leads to Sales Conversion",icon = icon("arrow-circle-right"),color = "teal")
                ),
                fluidRow(
                  box(title = "Sales report of DevOps in 5 years",status = "primary",solidHeader = T,plotOutput("Devops_histo",height = 250)),
                  box(title = "controls for dashboard",status = "primary",solidHeader = T,
                      sliderInput("bins1","number of breaks",1,100,50))
                  )
        ),
        tabItem(tabName = "Blockchain",
                fluidRow(
                  valueBox("110","Blockchain sales till date for the month",icon = icon("thumbs-up"),color = "olive"),
                  valueBox("16%","Sales Improvement",icon = icon("warning"),color = "olive"),
                  valueBox("27%","Leads to sales Conversion",icon = icon("arrow-circle-right"),color = "olive")
                ),
                fluidRow(
                  valueBox("230","Blockchain sales target for next month",icon = icon("hourglass-start"),color = "teal"),
                  valueBox("60%","Expected Improvement for next month",icon = icon("chart-line"),color = "teal"),
                  valueBox("50%","Leads to Sales Conversion",icon = icon("arrow-circle-right"),color = "teal")
                ),
                fluidRow(
                  box(title = "Sales report of Blockchain in 5 years",status = "primary",solidHeader = T,plotOutput("block_histo",height = 250)),
                  box(title = "controls for dashboard",status = "primary",solidHeader = T,
                      sliderInput("bins2","number of breaks",1,100,50))
                )
        ),
        tabItem(tabName = "AWS",
                fluidRow(
                  valueBox("200","AWS sales till date for the month",icon = icon("thumbs-up"),color = "olive"),
                  valueBox("45%","Sales Improvement",icon = icon("warning"),color = "olive"),
                  valueBox("68%","Leads to sales Conversion",icon = icon("arrow-circle-right"),color = "olive")
                ),
                fluidRow(
                  valueBox("350","AWS sales target for next month",icon = icon("hourglass-start"),color = "teal"),
                  valueBox("85%","Expected Improvement for next month",icon = icon("chart-line"),color = "teal"),
                  valueBox("98%","Leads to Sales Conversion",icon = icon("arrow-circle-right"),color = "teal")
                ),
                fluidRow(
                  box(title = "Sales report of AWS in 5 years",status = "primary",solidHeader = T,plotOutput("aws_histo")),
                  box(title = "controls for dashboard",status = "primary",solidHeader = T,
                      sliderInput("bins3","number of breaks",1,100,50))
                )
                ),
        tabItem(tabName = "Others",h1("Other Courses sold"),
                fluidRow(
                  box(title = "Sales report of all other courses in 5 years",status = "primary",solidHeader = T,plotOutput("other_histo")),
                  box(title = "controls for dashboard",status = "primary",solidHeader = T,
                      sliderInput("bins","number of breaks",1,100,50))
                )
        )
        )
            )
    )
  )
)

server.R

library(shiny)
library(shinydashboard)

shinyServer(function(input,output){
  
  output$histogram <- renderPlot({
    hist(Book1$sales,breaks = seq(0,max(Book1),l=input$bins+1),col = "lightblue",
         main = paste("Sales Analysis"),
         xlab = "Months",ylab = "Sales"#,xlim = c(1,60),ylim = c(1,1000),plot = TRUE,axes = TRUE
         )
  })
  
  output$msgOutput <- renderMenu({
    msgs <- apply(read.csv("C:\\Users\\ali\\Desktop\\cleaning data\\msg.csv"),1,function(row){
      messageItem(from = row[["from"]],message = row[["message"]])}
    )
    
    dropdownMenu(type = "messages", .list = msgs)
  })
  
  output$approvedsales <- renderInfoBox({
    valueBox("40%","Leads to Sales conversion",icon = icon("arrow-circle-right"),color = "olive")
  })
  output$Devops_histo <- renderPlot({
    hist(Book1$devops,breaks = seq(0,max(Book1),l=input$bins1+1),col = "lightblue",
         main = paste("DevOps Sales Analysis"),
         xlab = "Months",ylab = "Sales"#,xlim = c(1,60),ylim = c(1,1000),plot = TRUE,axes = TRUE,
         )
  })
  output$block_histo <- renderPlot({
    hist(Book1$blockchain,breaks = seq(0,max(Book1)),l=input$bins2+1,col = "lightblue",
         main = paste("Blockchain sales Analysis"),
         xlab = "Months",ylab = "Sales"#,xlim = c(1,60),ylim = c(1,1000),plot = TRUE,axes = TRUE,
         )
  })
  output$aws_histo <- renderPlot({
    hist(Book1$aws,breaks = seq(0,max(Book1)),l=input$bins3+1,col = "lightblue",
         main = paste("AWS Sales Analysis"),
         xlab = "Months",ylab = "Sales"#,xlim = c(1,60),ylim = c(1,1000),plot = TRUE,axes = TRUE,
           )
  })
  output$other_histo <- renderPlot({
    hist(Book1$others,breaks = seq(0,max(Book1)),l=input$bins3+1,col = "lightblue",
      main = paste("AWS Sales Analysis"),
      xlab = "Months",ylab = "Sales"#,xlim = c(1,60),ylim = c(1,1000),plot = TRUE,axes = TRUE,
    )
  })
})

I don't understand where I'm going wrong. Please help. Thank you

Dec 11, 2018 in Data Analytics by Ali
• 11,360 points

edited Dec 11, 2018 by Ali 2,220 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Data Analytics

0 votes
1 answer

Error saying "Error in rnorm() : argument "n" is missing, with no default" in R

Hey @ali, rnorm() function requires an argument, ...READ MORE

answered Oct 30, 2018 in Data Analytics by Maverick
• 10,840 points
3,332 views
0 votes
0 answers

Error in xy.coords(x, y, xlabel, ylabel, log) : argument "x" is missing, with no default

Hi, my code is showing this, what's ...READ MORE

Sep 7, 2020 in Data Analytics by Nurdiana
• 120 points

recategorized Sep 7, 2020 by Gitika 1,956 views
0 votes
1 answer
+1 vote
1 answer
+1 vote
1 answer

Error saying "could not find function "shinyUI"" in shiny R

Its a small spelling mistake that you've ...READ MORE

answered Nov 28, 2018 in Data Analytics by Maverick
• 10,840 points
2,626 views
+1 vote
1 answer

Error saying "could not find function dashboardPage" in shiny R

Include this line in the code: Library(shinydashboard) READ MORE

answered Nov 29, 2018 in Data Analytics by Maverick
• 10,840 points
3,657 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP