0

I have a data frame like LowData below. I have not the vectors country, House or Seats, only the result data frame.

country <- rep(c("Greece","Cuba","Rwanda"),2)
House <- rep(c("LowerHouse","Senate"),each = 3)
Seats <-  c(300,605,80,0,0,26)
LowData <- data.frame(COUNTRY=country,HOUSE=House,SEATS=Seats)

How can I add the seats of each country and make automatically a vector like AllSeats below?

AllSeats <- c(300,605,106)

Thanks in advance!

0 Answers0