I am trying to calculate more distances In R using the package "osrm". I don't know what I am doing wrong because I followed all the steps of the package. When I try to use the argument max-table-size
, it returns an error.
I already tried to put the argument max-table-size
into the code, but that doesn't work.
I tried to do this:
distancias <- osrmTable(loc = dist[1:100, c("id","lon","lat")]"max-table-size")
when I try this, I have this error:
The OSRM server returned an error: Error in names(src) <- c("id", "lon", "lat"): 'names' attribute [3] must be the same length as the vector [1]
library(osrm)
dist <- read.table ("C:\\Users\\hammer\\Documents\\Erick\\22-05-19\\Distancias\\mg.txt", header=TRUE, sep="\t")
distancias <- osrmTable(loc = dist[1:100, c("id","lon","lat")])
write.table(distancias, file = "dist.txt", sep="\t")
I hope get one distance matrix of 3.600 x 3.600