I think you must have changed the dataframes before running somehow. Maybe restart R.
library(osrm)
#> Data: (c) OpenStreetMap contributors, ODbL 1.0 - http://www.openstreetmap.org/copyright
#> Routing: OSRM - http://project-osrm.org/
library(tidyverse)
dfPRQ <- tribble(
~Id, ~lon, ~lat,
"RENNES",-1.68186449144,48.1119791219,
"QUIMPER",-4.09111944455,47.9971425162,
"PARIS 01",2.33629344655,48.8626304852
)
dfPQ <- dfPRQ %>%
filter(Id!="RENNES")
dfPR <- dfPRQ %>%
filter(Id!="QUIMPER")
osrmTable(loc=dfPR, measure="duration")$durations
#> RENNES PARIS 01
#> RENNES 0.0 230.4
#> PARIS 01 228.9 0.0
osrmTable(loc=dfPQ, measure="duration")$durations
#> QUIMPER PARIS 01
#> QUIMPER 0.0 379.1
#> PARIS 01 378.3 0.0
osrmTable(loc=dfPRQ, measure="duration")$durations
#> RENNES QUIMPER PARIS 01
#> RENNES 0.0 157.2 230.4
#> QUIMPER 156.0 0.0 379.1
#> PARIS 01 228.9 378.3 0.0
Created on 2020-12-29 by the reprex package (v0.3.0)