 mean time-series</span></span>
<span id="cb14-18"><a href="#cb14-18" tabindex="-1"></a>mean_ts <span class="ot">&lt;-</span> <span class="fu">rowMeans</span>(roi_mat)</span>
<span id="cb14-19"><a href="#cb14-19" tabindex="-1"></a></span>
<span id="cb14-20"><a href="#cb14-20" tabindex="-1"></a><span class="co"># Z-score the mean time-series</span></span>
<span id="cb14-21"><a href="#cb14-21" tabindex="-1"></a>z_ts <span class="ot">&lt;-</span> <span class="fu">as.numeric</span>(base<span class="sc">::</span