title: Conditional help ifelse statement
body: <p>We have the following piecewise equality for a dataset:</p>
  <pre><code>tenure_new == tenure iftenure &lt;= exper 
  tenure_new == exper iftenure&gt; exper
  </code></pre>
  <p>So the code i wrote is:</p>
  <pre><code>tenure_new &lt;- ifelse(wage2$tenure &lt;= wage2$exper,wage2$tenure, wage2$exper)
  </code></pre>
  <p>We want to get the mean value, but the answer we got is not being accepted - not sure what else to do.</p>
  <p>I don't want the answer, just some directions on what i might be overlooking.</p>
  <p>Here is the problem question:</p>
  <p><img src="https://i.stack.imgur.com/zUE4t.png" alt="PROBLEM QUESTION" /></p>