title: stargazer error "length of NULL cannot be changed"
body: <p>I'm trying to produce a proper table with stargazer in markdown. The linear model code is as follows:</p>
  
  <pre><code>k &lt;- lm(mean_p ~ P*MA, data=d)
  </code></pre>
  
  <p>Calling the following stargazer-function however does not work, produces the error </p>
  
  <blockquote>
    <p>length of NULL cannot be changed</p>
  </blockquote>
  
  <p>and only produces html-code. </p>
  
  <pre><code>stargazer(k,type="html")
  </code></pre>
  
  <p>This is the Output of the dput(head(d))-call:</p>
  
  <pre><code>structure(list(
  age = c(15.1666666666667, 14.9166666666667, 
  13.3333333333333, 12.0833333333333, 10.9166666666667, 13.75), 
  gender = c("girls", "girls", "boys", "girls", "boys", "girls"), 
  MA = c("NM", "NM", "NM", "NM", "NM", "NM"), 
  AFC = c(0, 0, 0, 0, 0, 0), 
  test_k_1 = c(3, 3, 3, 3, 0, 0), test_k_2 = c(6, 3, 6, 6, 3, 3), 
  test_k_3 = c(9, 0, 6, 3, 0, 0), test_k_4 = c(3, 3, 9, 6, 0, 0), 
  test_u_1 = c(3, 3, 6, 3, 0, 0), test_u_2 = c(6, 3, 0, 0, 0, 0), 
  test_u_3 = c(9, 0, 3, 0, 0, 0), test_u_4 = c(3,0, 0, 0, 0, 0), 
  test_n_3 = c(6, 3, 6, 0, 0, 3), test_n_4 = c(3,0, 9, 0, 0, 3), 
  k = c(6, 2, 7, 5, 1, 1), b = c(6,1, 1, 0, 0, 0), 
  d = c(6, 2, 8, 1, 0, 3), 
  s = c(6,1.66666666666667,5.33333333333333, 2, 0.333333333333333,    1.33333333333333), 
  mean_p = c(6, 1.66666666666667, 5.33333333333333,2, 0.333333333333333, 1.33333333333333), 
  zc = c(-0.669549727292442, 
      -0.669549727292442, -0.669549727292442, -0.669549727292442, 
      -0.669549727292442, -0.669549727292442), 
  znum = c(-0.643217641381636, -0.643217641381636, -0.643217641381636, -0.643217641381636, -0.643217641381636, -0.643217641381636), 
  zse = c(-0.708845108492594, -0.708845108492594, -0.708845108492594, -0.708845108492594, -0.708845108492594, -0.708845108492594), 
  m = c(-0.669549727292442,-0.669549727292442, -0.669549727292442, -0.669549727292442, -0.669549727292442, -0.669549727292442), 
  P = c(-0.416305415592902, -0.442252258358532, -0.499214827082544, -0.699404516110036, -0.39383368539238, -0.702020755840638)), 
  row.names = c(186L,187L, 195L, 197L, 199L, 200L), class = "data.frame")
  </code></pre>
  
  <p>Does anybody know how to solve that problem? Thanks in advance for any hints.</p>