Sorry, couldn't think of a better way to phrase the question.
Basically, how would I go about merging something similar to the following dataframes
2014:
Team Goals.Scored Goals.Conceded
MUFC 2 4
MCFC 3 0
LFC 1 6
2015:
Team Goals.Scored Goals.Conceded
MUFC 4 3
MCFC 3 2
AVFC 1 5
into something like this, that would automatically add the values for matching Teams
Overall
Team Goals.Scored Goals.Conceded
MUFC 6 7
MCFC 6 2
LFC 1 6
AVFC 1 5
I was originally using a simple command along the lines of
new.df = 2014$Goals.Scored + 2015$Goals.Scored
but I think that only works if the teams are in the same order in both data frames, and if they're the same teams across the years? Was thinking of doing a for loop but have been unsuccessful thus far.
Would appreciate any help, thanks.