Convert sequence of longitude and latitude to polygon via sf in R : <p>I have five longitude and latitude that form a shape like this.</p>

<pre><code>df &lt;- c(order=1:5,
        lon=c(119.4,119.4,119.4,119.5,119.5), 
        lat=c(-5.192,-5.192,-5.187,-5.187,-5.191))
</code></pre>

<p>How could I easily convert them into an sf polygon data frame using <code>sf</code> package like this?</p>

<pre><code>## Simple feature collection with 1 feature and 0 fields
## geometry type:  POLYGON
## dimension:      XY
## bbox:           xmin: 119.4 ymin: -5.192 xmax: 119.5 ymax: -5.187
## epsg (SRID):    4326
## proj4string:    +proj=longlat +datum=WGS84 +no_defs
## geometry
## 1 POLYGON ((119.4 ...
</code></pre>
