">&lt;</span><span class="st"> </span><span class="dv">5</span>] &lt;-<span class="st"> </span><span class="ot">NA</span>

<span class="co"># replace out-of-range phq item data with missing values -----</span>
t0[<span class="kw">paste0</span>(<span class="st">&quot;phq&quot;</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">9</span>)] &lt;-<span class="st"> </span><span class="kw">lapply</span>(
  t0[<span class="kw">paste0</span>(<span class="st">&quot;phq&quot;</span>, <span clas