title: How can I replace values in a Transition layer? (gdistance)
body: <p>I'm wondering if anyone could help me in replacing values in a transition layer.</p>
  
  <p>If I try:</p>
  
  <pre><code>transitionlayer[transitionlayer &gt;= 0.14] &lt;- 1
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>Error in hd &gt;= 0.14 : 
    comparison (5) is possible only for atomic and list types
  </code></pre>
  
  <p>What I'm trying to do is replace all values above 0.14 in a slope transition layer.</p>
  
  <p>I've found these examples in the gdistance vignette, however they use another transitionlayer, which I don't want to do, as I won't have the locations of cells that have a slope above 0.14</p>
  
  <pre><code>  #Extracting and replacing
    tr1[cbind(1:9,1:9)] &lt;- tr2[cbind(1:9,1:9)]
    tr1[1:9,1:9] &lt;- tr2[1:9,1:9]
    tr1[1:5,1:5]
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Thanks!</p>