title: Distance between all the points to the first point
body: <p>I have points on a street, and Im trying to calculate the distance between all the points and the first point in the street</p>
  
  <p>Here is my sf object:</p>
  
  <pre class="lang-r prettyprint-override"><code>library(rgeos)
  library(rgdal)
  library(sf)
   #I actually have multiple points on a segment of 5 Km
  df &lt;- data.frame(lon = c(-121.95, -121.96, -121.97, -121.98), lat = c(37.35,37.36,37.37,37.38)) 
  coordinates(df) &lt;- c("lon", "lat")
  proj4string(df) &lt;- CRS("+init=epsg:4326") 
  df_sf &lt;- st_as_sf(df) %&gt;% st_transform(3488)
  </code></pre>
  
  <p>I tried st_distance but the distance is not correct.
  What I sould get is to have each point distance to the begining of the street until the end. So basically it has to go from 0 to the 5000m.</p>