# reading the data
data(mtl_network)
data(bike_accidents)
mtl_network$LineID <- 1:nrow(mtl_network)
# snapping point to lines
snapped_points <- snapPointsToLines2(bike_accidents,
mtl_network,
"LineID"
)
Run the code above in your browser using DataLab