html">margins</a></span>(x)
<span class="kw">split</span>(m, m<span class="op">$</span>am)</code></pre></div>
<pre><code>## $`0`</code></pre>
<pre><code>## Average marginal effects</code></pre>
<pre><code>## lm(formula = mpg ~ factor(cyl) * am + hp + wt, data = mtcars)</code></pre>
<pre><code>##     am       hp     wt   cyl6   cyl8
##  1.706 -0.03115 -2.441 -1.715 -1.586
## 
## $`1`</code></pre>
<pre><code>## Average marginal effects
## lm(formula = mpg ~ factor(cyl) * am + hp + wt, data = mtcars)</code></p