'Group unique values in r

I have a following data:

I want o summarise the data in three columns by Subject type and other two columns sates number of schools and number of students by each subject type. I have used group_by function by it keeps giving the number of types subjects appeared rather then by the number of schools or students

TIA



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source