Post matrix from R

Hi, I am hoping to use Openrouteservice from R. What is the magic invocation to make this work? I have tried the following:

new_handle() %>%
handle_setopt(copypostfields =
“locations=[[9.70093,48.477473],[9.207916,49.153868]]”) %>%
“Accept”=“application/json, application/geo+json, application/gpx+xml, img/png”,
“Authorization”=“xxx”) %>%
curl_fetch_memory(url = “”) %$% content %>%
rawToChar %>% jsonlite::prettify()

But this returns error code 500 server error. What am I doing wrong?

Many thanks.

Hi @Michel_de_Lange,

Are you using the openrouteservice-r package already?

Best regards

I didn’t know about the openrouteservice-r package. Just what I need, thank you!
With best regards,