How to add row to dataframe?
<p>Ive tried many different things but I have no clue how to add a row to this table</p>

<pre><code>  means &lt;- data.frame("State" = character(0), "Mean" = numeric(0))
</code></pre>

<p>I thought it was something like this</p>

<pre><code>for (state in unique(data$State)){
  means &lt;- rbind(means, c("state", 4))
}
</code></pre>

<p>But when i try to print the table it gives me warnings about different levels.</p>

<pre><code>44: In `[&lt;-.factor`(`*tmp*`, ri, value = structure(c(1L, NA,  ... :
  invalid factor level, NA generated
45: In `[&lt;-.factor`(`*tmp*`, ri, value = structure(c(1L, NA,  ... :
  invalid factor level, NA generated
</code></pre>

<p>EDIT:</p>

<p>print(state) prints this</p>

<pre><code>[1] "Arizona"
[1] "California"
[1] "Colorado"
[1] "District Of Columbia"
[1] "Florida"
[1] "Illinois"
[1] "Indiana"
[1] "Kansas"
[1] "Kentucky"
[1] "Louisiana"
[1] "Michigan"
[1] "Missouri"
[1] "New Jersey"
[1] "New York"
[1] "North Carolina"
[1] "Oklahoma"
[1] "Pennsylvania"
[1] "Texas"
[1] "Virginia"
[1] "Massachusetts"
[1] "Nevada"
[1] "New Hampshire"
[1] "Tennessee"
[1] "South Carolina"
[1] "Connecticut"
[1] "Iowa"
[1] "Maine"
[1] "Maryland"
[1] "Wisconsin"
[1] "Country Of Mexico"
[1] "Arkansas"
[1] "Oregon"
[1] "Wyoming"
[1] "North Dakota"
[1] "Idaho"
[1] "Ohio"
[1] "Georgia"
[1] "Delaware"
[1] "Hawaii"
[1] "Minnesota"
[1] "New Mexico"
[1] "Rhode Island"
[1] "South Dakota"
[1] "Utah"
[1] "Alabama"
[1] "Washington"
[1] "Alaska"
</code></pre>