title: Warning: Factor contains implicit NA
body: <p>I am new to R and Shiny and I am trying to create an interactive plot with ggplot2. When the user check the checkbox, he has access to a multiple select field to custom the plot.</p>
  
  <p>The original dataframe contains missing values identified as <code>"N/A"</code> in <code>Publisher</code> and <code>Year</code> column. I removed the lines containing NAs with <code>complete.cases</code> so it shouldn't have any NA left.</p>
  
  <p>I run my app : OK. I get to the default plot : OK. I check the checkbox : <code>Warning: Factor 'Publisher' contains implicit NA, consider using 'forcats::fct_explicit_na'</code></p>
  
  <p>I'd like to remove this warning, at least understand it. If you have any additional comment please do so : my goal is to get better.</p>
  
  <p>app.R :</p>
  
  <pre><code>df&lt;-read.csv("vgsales.csv")
  df$Year[df$Year=="N/A"]&lt;-NA
  df$Year&lt;-factor(df$Year)
  df$Publisher[df$Publisher=="N/A"]&lt;-NA
  df$Publisher&lt;-factor(df$Publisher)
  df&lt;-df[complete.cases(df),]
  
  pubSales&lt;-na.omit(df
      %&gt;% group_by(Publisher, Year) 
      %&gt;% summarise(Global_Sales=sum(Global_Sales))
  )
  pubSales&lt;-pubSales[order(pubSales$Year),]
  
  top5Pub&lt;-head(unique(pubSales[order(-pubSales$Global_Sales),]$Publisher),5)
  
  ui &lt;- navbarPage("Video Games Sales",
      tabPanel("Publishers",
          mainPanel(
              titlePanel(
                  title = "Publishers sales"
              ),
              sidebarPanel(
                  radioButtons(
                      "pubOptions",
                      "Options",
                      c("Top 5 Publishers"="topFivePub",
                        "Custom Publishers"="customPub"),
                      selected="topFivePub"
                  ),
                  uiOutput("customPubUI")
              ),
              mainPanel(
                  plotOutput("pubPlot")
              ),
              width=12
          )
      )
  )
  
  server &lt;- function(input, output, session) {
  
      output$customPubUI&lt;-renderUI({
          if(input$pubOptions=="customPub"){
              selectInput(
                  "selectedPub",
                  "Editeurs",
                  pubSales$Publisher,
                  multiple=TRUE
              )
          }
      })
  
      output$pubSales&lt;-renderTable(pubSales)
      output$pubPlot&lt;-renderPlot({
          ggplot()+
              if(input$pubOptions=="customPub"){
                  geom_line(
                      data=pubSales[pubSales$Publisher %in% input$selectedPub,],
                      aes(x=Year,y=Global_Sales,colour=Publisher,group=Publisher)
                  )
              }else{
                  geom_line(
                      data=pubSales[pubSales$Publisher %in% top5Pub,],
                      aes(x=Year,y=Global_Sales,colour=Publisher,group=Publisher)
                  )
              }
      })
  
  }
  
  shinyApp(ui, server)
  </code></pre>