Reputation: 3608
I am ploting data via leaflet in R using
leaflet(data=a) %>%
addTiles() %>%
addMarkers(a$long, a$lat, popup=a[,4])
which returns:
but when I have popup=rownames(a), it works:
Any ideas why? I have the same issue with label (works with rownames, not column values)
Upvotes: 1
Views: 881
Reputation: 3608
it appears it needs to be type character:
popup = as.character(a[,4])
works
Upvotes: 2