Hi,
to store the shortest paths matrix for the whole graph, you would need 23295 * 23295 * 8 bytes of memory, which is more than 4 Gb. You cannot allocate a memory chunk of that size on 32 bit machines. On 64 bit machines it is theoretically possible, but not in R, because R has some (smaller than 4Gb) limits for the size of a vector.
You can calculate the shortest paths from a couple of vertices only, the ones you really need. Or do all vertices in parallel, on multiple cores/machines if you really need all of them, and then store them on disk.
Gabor