title: r: Split a row with several items into one column by an id
body: <p>I have data where one row has several items in it.</p>
  <p>My actual dataframe is much larger, but here is an example dataframe to illustrate my problem:</p>
  <pre><code>shapeId verticeCoordinates
        3 [0,0][0,1][1,1][1,0]
        7 [0,0][2,0][2,1]
       10 [0,0][1,0][0,1][2,2][2,3]
  </code></pre>
  <p>I want there to only be one set of vertice coordinates in each row and to have its corresponding shapeId.</p>
  <p>I would like the data to be in the following format:</p>
  <pre><code>shapeId verticeCoordinates
        3 [0,0]
        3 [0,1]
        3 [1,1]
        3 [1,0]
  </code></pre>
  <p>Reproducible example data:</p>
  <pre><code>structure(list(shapeId = c(3L, 7L, 10L), verticeCoordinates = c(&quot;[0,0][0,1][1,1][1,0]&quot;, 
  &quot;[0,0][2,0][2,1]&quot;, &quot;[0,0][1,0][0,1][2,2][2,3]&quot;)), class = &quot;data.frame&quot;, row.names = c(NA, 
  -3L))
  </code></pre>