Hi! I used mapview to create a quick & easy map that shows changes in median home value for census tracts. However, I'm having a hard time changing the format of the numeric labels to display in a currency format/dollar value. I'm so used to just being able to use scales::label_dollar with ggplot, and I tried
mapview(mv_shift, zcol = "mv_shift", label = label_dollar()) but I got the error "cannot coerce type 'closure' to vector of type 'character'" no matter how I tried it.
I can't find any clear answer in the documentation. In the mapview reference, the only help for "label" is "See addControl for details." There wasn't a link for addControl, but I'm pretty sure it refers to the leaflet function. This lead me to labelOptions, but if this is the correct formula to use I haven't been able to figure out how to incorporate it. There is a leaflet function,
addLegend(labFormat = labelFormat()) that has the options I need (prefix, big.mark), but I think you can only use this function for a legend. I've tried incorporating countless leaflet label functions but all fail.
I'm about to either 1. add a new column where I try and format to the label output I want or 2. just use leaflet, but I was wondering if someone knew something I'm missing.