I'm working on a project where I have to determine the shortest path (shortest.path the function in R) between two nodes. For that, I used an open source (open street map). The problem is in the size of my .osm file (an .osm file contains all the information for a given map, all nodes, ways and relations). Rstudio doesn’t have the ability to run such a large file (the size of my file is 3.2GB). My idea was to split my .osm file into several smaller files. The problem is: how can I get them into my code so as to determine the shortest path, since the information for each node/way will be found in different .osm files.
I hope someone can help me.