I would like to use a basic data.frame to get three polylines each of different colours
I am currently using the below code as an example.
require(le
Here is a way to automate for each group in your dataset:
map <- leaflet(df) map <- addTiles(map) for( group in levels(df$group)){ map <- addPolylines(map, lng=~lon,lat=~lat,data=df[df$group==group,], color=~col) } map