title: R Shiny basic questions
body: <p>I'm getting two warnings that I do not exactly understand:</p>
  
  <pre><code>Warning in if (file == "") { :
    the condition has length &gt; 1 and only the first element will be used
  Warning: Error in file: invalid 'description' argument
    166: file
    165: parse
    163: renderPlot [...app.R#51]
    161: func
    121: drawPlot
    107: &lt;reactive:plotObj&gt;
     91: drawReactive
     78: origRenderFunc
     77: output$Minimum_Rates
      1: runApp
  </code></pre>
  
  <p>As a somewhat beginner to R and Shiny, I have no clue what I'm doing wrong. Chances are there are tons of things wrong with this program, but if anyone could give me a hand on these two current errors, that would be awesome. Here's my code:</p>
  
  <pre><code>library(shiny)
  library(ggplot2)
  library(dplyr)
  library(rlang)
  library(shinyWidgets)
  library(rstudioapi)
  
  ui &lt;- fluidPage(
  
  
    # Give the page a title
    titlePanel("Rate Analysis"),
  
    # Generate a row with a sidebar
    sidebarLayout(      
  
      # Define the sidebar with one input
      sidebarPanel(
        selectInput("ProductType","Product Type: (Choose One)",choices=c("t","r")),
        selectInput("inSelect","Carrier: (Choose One)",choices=unique(c(t_rates_names,r_rates_names))),
        selectInput("Category","Category: (Choose One)",choices=c("Age","Term","Band","Class","Gender")),
        sliderInput("discount","% Discount:",min=0,max=100,value=0),
        width=3
      ),
  
      # Create a spot for the barplot
      mainPanel(
        plotOutput("Minimum_Rates")  
      )
  
    )
  )
  
  server &lt;- function(input, output, session) {
    observe({
      req(input$ProductType)
      x&lt;-sym(input$ProductType)
      updateSelectInput(session,"inSelect",label=paste("test"),choices=eval(parse(text=paste0(x,"_rates_names"))))
    })
  
    output$Minimum_Rates&lt;-renderPlot({
      req(input$inSelect)
      req(input$Category)
      req(input$discount)
      req(input$ProductType)
      carrier&lt;-(input$inSelect)
      carrier&lt;-eval(parse(text=carrier))
      category&lt;-sym(input$Category)
      discount&lt;-input$discount
      string_name=deparse(substitute(carrier))
      fee_name=eval(parse(paste0(substr(string_name,1,nchar(string_name)-6),"_fees")))
      carrier&lt;-discountRatesAndFindNewPrems(carrier,discount/100,fee_name)
      tMinTable&lt;-removeTheseRatesAndFindMinimumRates(t_list_rates)
      if(as_string(input$ProductType)=="t"){
        carrier %&lt;%
          createRatesComparedToTMin(carrier) %&lt;%
          original_percent_higher&lt;-Percent_Higher %&lt;%
          findRatesFromPrems(carrier,fee_name) %&lt;%
          original_rates&lt;-`Rates per Thousand` %&lt;%
          group_by(!!!category) %&gt;%
          summarise(Current_Comparison=sum(original_percent_higher),Hypothetical_Comparison=sum(New_Percent_Higher)) %&gt;%
          ggplot(aes_string(input$category,"Current_Comparison"))+geom_bar(stat="identity",position="dodge") + geom_text(aes(label=scales::percent(Current_Comparison)),size=3.2,vjust=-0.5,position=position_dodge(width=1))
      }
      else{
        rMinTable&lt;-removeTheseRatesAndFindMinimumRates(r_list_rates)
        carrier$Percent_Higher&lt;-original_percent_higher
        carrier&lt;-createNewRatesComparedToRMin(carrier)
        carrier%&gt;%
          group_by(!!!category) %&gt;%
          summarise(Current_Comparison=sum(original_percent_higher),Hypothetical_Comparison=sum(New_Percent_Higher))
          ggplot(aes_string(input$Category,"Current_Comparison"))+geom_bar(stat="identity",position="dodge") + geom_text(aes(label=scales::percent(Current_Comparison)),size=3.2,vjust=-0.5,position=position_dodge(width=1))  
      }
    })
  }
  shinyApp(ui=ui,server=server)
  </code></pre>
  
  <p>Another question I have is what kind of data type are the selections? Are they basically whatever type that I enter in the "choices parameter? So if my choices are all string, then why do I need to convert them to symbol?</p>
  
  <p>Edit: I added a print(string_name) after the     string_name=deparse(substitute(carrier)) line, and it looks like print(string_name) is printing the entire df while I meant to get the name of the df to be string_name. I think I have some misunderstandings about what the "carrier" data type should be. Anyone know?</p>