title: Can you create multiple polygons in R from a dataframe containing the vertices' coordinates?
body: <p>I have a data frame with 400 rows, each corresponding to a fishing area. Each row includes the coordinates of vertices of said fishing area, like this (NW = northwest corner, etc.):</p>
  <pre><code>&gt; head(zones)
  ID       NW.X     NW.Y       NE.X     NE.Y       SE.X     SE.Y       SW.X       SW.Y     NW.X.2 Effort Season  Method
  1  1 -7,9961854 37.00222  -8,102379 37.05959 -8,1030245 37.01368 -7,9969111 36,9563306 -7,9961854     36 Winter Tremmel
  2  2 -8,2268172 37.08076 -7,9773826 36.98974 -7,9778924 36.94389 -8,1248423 37,0183724 -8,2268172     12 Winter    Gill
  3  3  -8,102379 37.05959 -7,9961854 37.00222 -7,9990974 36.75608 -8,1036475 36,8128815  -8,102379     42 Winter    Gill
  4  4 -8,1024855 37.04711 -7,9963439 36.98973 -7,9994791 36.72262 -8,1036857 36,7794856 -8,1024855     42 Winter Tremmel
  5  5 -8,3621785 37.02390 -7,9969701 36.93962 -7,9982745 36.83943 -8,3620979 36,9327666 -8,3621785     36 Winter    Gill
  6  6 -8,2580358 37.06539 -7,9963439 36.98973 -7,9974956 36.90627 -8,2580358 36,9822685 -8,2580358     36 Winter    Gill
  </code></pre>
  <p>I want to create polygons of each individual area, and extract it as a shapefile to use in ArcGIS.
  I've seen questions here asking how to create a polygon from a list of coordinates, but not of multiple polygons from coordinates stored in this way, and I'm a total beginner with the <code>sf</code> package.
  I know that usually, you should only have 1 column with X and 1 column with Y, not like what I have here. I could reformat my data frame to only have 2 columns with the coordinates, but then how do I create the multiple polygons? I imagine with some sort of loop?</p>
  <p>I think the answer to this question may help, but I don't understand it perfectly. <a href="https://gis.stackexchange.com/questions/144728/add-polygons-to-spatialpolygons-via-loop-iteration-using-r">https://gis.stackexchange.com/questions/144728/add-polygons-to-spatialpolygons-via-loop-iteration-using-r</a></p>