pan class="op">!</span><span class="kw">is.na</span>(valence))
<span class="kw">pdf</span>(<span class="dt">file =</span> <span class="st">&quot;scripts/published/figure1.pdf&quot;</span>)
<span class="kw">plot</span>(valence <span class="op">~</span><span class="st"> </span>timestamp, d, <span class="dt">type =</span> <span class="st">&quot;b&quot;</span>)
<span class="kw">dev.off</span>()

<span class="co"># run a regression model on P001 mood data --------------------</span>
fm &lt;-<span class="st"> </s