title: How to define a factor as being above or below its median in R?
body: <p>So I need to create a factor that defines my 'alt' variable (altitude) as being above or below its median.</p>
  
  <p>I know it should follow this basic shape of creating something new:</p>
  
  <pre><code>conservation$alt.factor &lt;- conservation$alt (..????...)
  </code></pre>
  
  <p>But I'm just struggling with that last bit.</p>
  
  <p>There must be simple command out there!</p>