R Studio Performance interacting with leaflet map

I am plotting 10,000 addresses on a map using leaflet and sp packages. I can see the map with the markers, BUT when I start interacting with the map (zooming and dragging) RStudio freezes! Even after restarting the software and computer. Why is this happening?

The computer is an Intel(R) Core i7-4790 CPU @ 3.60GHZ and 24 GB RAM
RStudio Version: 1.2.1335

Here is the script:



addresses <- read.csv("R Studio Projects/Addresses.csv")

addresses$Latitude <- as.numeric(addresses$Latitude)
addresses$Longitude <- as.numeric(addresses$Longitude)

addresses.sp <- SpatialPointsDataFrame(addresses[,c(23,24)], addresses[,-c(23,24)])

m <- leaflet() %>%
addTiles() %>%
addMarkers(data = addresses, lng = ~Longitude, lat = ~Latitude, popup = ~Street)


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.