'Error in Choropleth map in R , the data extract as a list (from each column)

I would like to make an interactive map in R, but somehow it turns out error, so here is my code.

indo_sp %>% 
  leaflet() %>% 
  addProviderTiles(providers$CartoDB.DarkMatter) %>% 
  addPolygons(fillColor = pal(indo_sp@data$value), 
              fillOpacity = 0.8, 
              weight = 2, 
              label = labels_name,  
              color = "white", 
              highlightOptions = highlightOptions(
                color = "blue", 
                weight = 5, 
                bringToFront = TRUE, 
                opacity = 0.8
              ))

enter image description here

However, I do not know why the result ends up like this, it takes the value from each variable (and the label turns out to list from the column)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source