I have a data frame (dat1) as such:
|Home Team|Away Team|...|Goals Scored|Goals Conceded|
|----|----|---|------------|--------------|
|A|B|...|NA|NA|
|B|C|...|NA|NA|
|D|E|...|NA|NA|
with another 1000 rows including other games
With another data frame (dat2) that includes:
|Team...|Goals Scored|Goals Conceded|
|-------|------------|--------------|
|A|1|0|
|B|1|1|
|C|3|1|
|D|4|2|
|E|2|2|
I'd like to write some code that inputs the Goals Scored and Goals Conceded from dat2 into dat1. I can't figure out the conditional statement required to do it though. TIA