title: I am trying to use the mutate function with conditions to create a new column from existing data
body: <p>Column 1 
     </p>
  
  <p>1 &lt;=<br>
   2 &lt;=<br>
   3 =<br>
   4 &lt;=<br>
   5 =<br>
   6 ><br>
   7 &lt;=<br>
   8 =<br>
   9 &lt;=<br>
  10 = </p>
  
  <p>Column 2</p>
  
  <p>1 0.5<br>
   2 0.5<br>
   3 8<br>
   4 0.5<br>
   5 1<br>
   6 32<br>
   7 0.5<br>
   8 1<br>
   9 0.5<br>
  10 8   </p>
  
  <p>I need column 3. </p>
  
  <p>I know this will not work in R, but this is what I want to get. </p>
  
  <pre><code>mutate(if(col1 = "&lt;="){
    start &lt;- 0
  } else if(col1 = "="){
    start &lt;- col2/2
  } else if(col1 = "&gt;"){
    start &lt;- paste(col2)
  })
  </code></pre>
  
  <p>Data:</p>
  
  <pre><code>structure(list(`col1` = c("&lt;=", "&lt;=", "=", "&lt;=", "=", "&gt;"
  ), col2 = c("0.5", "0.5", "8", "0.5", "1", "32")), row.names = c(NA, 
  -6L), class = c("tbl_df", "tbl", "data.frame"))
  </code></pre>