title: using diamond, triangle and star shapes in R leaflet
body: <p>I have different types of observations and I want to display them on leaflet using different shapes and colors. Is it possible to use diamond, triangle, star and other shapes in leaflet in R? </p>
  
  <p>I have providing dummy data and created circle markers with differnt colors.</p>
  
  <pre><code>library(leaflet)
  
   lat1= 36+runif(n=5,min=-1,max=1)
   lon1 =-115+runif(n=5,min=-1,max=1)
  
   lat2= 35+runif(n=5,min=-0.5,max=0.5)
   lon2 =-110+runif(n=5,min=-0.5,max=0.5)
  
   lat3= 34+runif(n=5,min=-0.5,max=0.5)
   lon3 =-112+runif(n=5,min=-0.5,max=0.5)
  
   data_all=rbind(data.frame(Longitude=lon1,Latitude=lat1,Group=1),
             data.frame(Longitude=lon2,Latitude=lat2,Group=2),
             data.frame(Longitude=lon3,Latitude=lat3,Group=3))
  
   pal &lt;- colorFactor(c("red","blue","purple"), domain = c(1,2,3))
  
  
   leaflet(data_all) %&gt;% addTiles() %&gt;%
     addCircleMarkers(~Longitude, ~Latitude,popup=~paste0("Group=  ",data_all$Group),
       radius = 10,
      color = ~pal(Group),
      stroke = FALSE, fillOpacity = 1
       )
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/x9ln5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x9ln5.png" alt="enter image description here"></a></p>