I have the following sample data:
# data
school = c('ABC University','ABC Uni','DFG University','DFG U')
applicant = c(2000,3100,210,2000)
students = c(100,2000,300,4000)
df = data.frame(school,applicant,students)
I want to merge to this:
|school |appliant| students |
-----------------------------------
|ABC University| 5100 | 2100 |
|DFG University| 2210 | 4300 |
I ran this code:
df$school[df$school == 'ABC Uni'] = 'ABC University'
But it gives me ABC University twice instead of merging them together.