title: How to divide polygon in R?
body: <p>I have a shapefile of Amazonas state (Brazil) and other with the six biggest rivers in this state (Negro, Solimões, Amazonas, Madeira, Purus and Juruá). I want to divide the state using the rivers, to get the interfluvial areas (Madeira-Purus, Purus-Juruá, etc). I want to get the final 6 regions delimited by those rivers, each region as a different polygon. How do I do that?</p>
  
  <p><img src="https://i.stack.imgur.com/fQ2B5.png" alt="enter image description here"></p>
  
  <p>I'm only finding "clipping" algorithms, and those give me the area of the rivers that are inside the state, and that's not what I want.</p>