title: Creating new baseline age variable from 3 waves of Age variable
body: <p>I'm trying to create a new variable (baseline.age) that only consists of each ID's baseline age. The original age variable has 3 waves/ages per ID. When I run this code:</p>
  <pre><code>model.set %&gt;% group_by(id) %&gt;% mutate(baseline.age=Age[wave==1],all=TRUE)
  </code></pre>
  <p>I'm getting this error message: Error:
  ! Assigned data <code>value</code> must be compatible with existing data.
  x Existing data has 6144 rows.
  x Assigned data has 2123 rows.
  ℹ Only vectors of size 1 are recycled.
  Backtrace:</p>
  <ol>
  <li>model.set %&gt;% group_by(id) %&gt;% ...</li>
  <li>tibble <code>&lt;fn&gt;</code>(<code>&lt;vctrs___&gt;</code>)</li>
  </ol>
  <p>Is there a way to make the baseline.age variable show the baseline age for each of the ID's 3 rows (wave 1-3) such that:
  ID1: wave 1 age 50, baseline age 50
  ID1: wave 2 age 60, baseline age 50
  ID1: wave 3 age 70, baseline age 50</p>