title: "Wasn't able to determine range of domain" for ColorNumeric
body: <p>I'm trying to create a choropleth map in R. I've merged my shapefiles and data files. I'm trying to create a palette for the different colours I want my data to display in on my choropleth. When I use the colorNumeric function it returns an error message.</p>
  
  <pre class="lang-r prettyprint-override"><code>
  library(leaflet)
  library(rgdal)
  library(tigris)
  library(dplyr)
  
  LAsMap &lt;- readOGR(dsn = "C:/Users/LocalAuthorityShapefiles", 
          layer = "Local_Authority_Districts_December_2017_Generalised_Clipped_Boundaries_in_United_Kingdom_WGS84")
  
  data &lt;- read.csv(file = "C:/projects/N123.csv")
  
  data_merged_map &lt;- geo_join(LAsMap, data, "lad17cd", "lad17nm")
  
  
  mypalette &lt;- colorNumeric( palette="viridis", domain=data_merged_map$N456)
  
  </code></pre>
  
  <p>I expect the output to just run the code and create a palette in my workspace but instead the "Wasn't able to determine range of domain" error message appears.</p>