I have a data which consists of two columns "Students" & "points"

x<-data.frame(Students=c("Student1","Student2","Student3","Student2","Student3","Student1"),points=c(5,10,15,2,6,4))

Students points

1 Student1 5

2 Student2 10

3 Student3 15

4 Student2 2

5 Student3 6

6 Student1 4

I want to sort the data and find the sum of the points in this way:

Students x

1 Student1 9

2 Student2 12

3 Student3 21