<p>Yes, it looks like a clash of markup procedures. The only workaround I have found is to add a comment containing an odd number of $\$$ after each offending line.  For example,</p>



<pre><code>&gt; AIC(gam_example$lme)
    [1] -2.136317
    &gt; AIC(gamm_example$lme)
[1] -1286.44
</code></pre>

<p>becomes</p>



<pre><code>&gt; AIC(gam_example$lme) #$
[1] -2.136317
&gt; AIC(gamm_example$lme) #$
[1] -1286.44
</code></pre>
