title: How to add rows to dataframe R with rbind
body: <p>I know this is a classic question and there are also similar ones in the archive, but I feel like the answers did not really apply to this case. Basically I want to take one dataframe (covid cases in Berlin per district), calculate the sum of the columns and create a new dataframe with a column representing the name of the district and another one representing the total number. So I wrote</p>
  <pre><code>covid_bln &lt;- read.csv('https://www.berlin.de/lageso/gesundheit/infektionsepidemiologie-infektionsschutz/corona/tabelle-bezirke-gesamtuebersicht/index.php/index/all.csv?q=', sep=';')
  c_tot&lt;-data.frame('district'=c(), 'number'=c())
  for (n in colnames(covid_bln[3:14])){
      x&lt;-data.frame('district'=c(n), 'number'=c(sum(covid_bln$n)))
      c_tot&lt;-rbind(c_tot, x)
      next
  }
  print(c_tot)
  </code></pre>
  <p>Which works properly with the names but returns only the number of cases for the 8th district, but for all the districts. If you have any suggestion, even involving the use of other functions, it would be great. Thank you</p>