I'm trying to merge duplicates in this data frame in R
first last city in out
john doe sf 1 0
mary jane cl 0 1
john doe sf 1 0
mary jane cl 1 0
john shmo dn 1 0
to this result
john doe sf 2 0
mary jane cl 1 1
john shmo dn 1 0