The Leaflet JS mapping library has lots of plugins available. The Leaflet package for R provides direct support for some, but far from all, of these plugins, by providing R functions for invoking the plugins.
If you as an R user find yourself wanting to use a Leaflet plugin that isn't directly supported in the R package, you can use the technique shown here to load the plugin yourself and invoke it using JS code.
Another question: I'm trying to pass an icon to a marker. Using a URL it works file. But when I try to grab the icon locally from disk I get a blue box with a question mark. I'm presuming that it can't find the icon. So what is the "working" directory for the javascript that's run in
OnRender
?