How can I group by name in R and apply sum to the other 2 columns? : <p>I am trying to summarize this dataset by grouping by name (Almeria, Ath Bilbao,...) and have the sum of its corresponding values in column 2 (HalfTimeResult) and 3 (FullTimeResult). I tried with the <strong>aggregate</strong> and <strong>group_by</strong> functions but have not been able to obtain the right output.</p>

<p>What function and how would I use it to obtain an output like this?</p>

<p><a href="https://i.stack.imgur.com/aDweT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aDweT.png" alt="enter image description here"></a></p>

<p>This is the dataset that I am working with:</p>

<p><a href="https://i.stack.imgur.com/ORB4p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ORB4p.png" alt="enter image description here"></a></p>
