library(leaflet)
leaflet() %>%
addTiles() %>%
addHistory(options = historyOptions(
position = "bottomright",
maxMovesToSave = 20,
backText = "Go back",
forwardText = "Go forward",
orientation = "vertical"
))
Run the code above in your browser using DataLab