/span>, n)</a>
<a class="sourceLine" id="cb1-7" data-line-number="7">Z[<span class="kw">sample</span>(<span class="dv">1</span><span class="op">:</span>n, n<span class="op">/</span><span class="dv">2</span>)] &lt;-<span class="st"> &quot;female&quot;</span>; Z &lt;-<span class="st"> </span><span class="kw">ifelse</span>(Z <span class="op">==</span><span class="st"> </span><span class="dv">0</span>, <span class="st">&quot;male&quot;</span>, Z)</a>
<a class="sourceLine" id="cb1-8" data-line-number="8">dummyZ 