I am having a huge amount of data in my data frame- df which has count data generated from two different programs. This is an example of the df:
Species variable value
1 "Malassezia;globosa" 100 68126
2 "Aspergillus;nomius" 100 13977
3 "Mitosporidium;daphniae" 100 5953
4 "Penicillium;chrysogenum" 100 1
5 Other 100 102
6 "Malassezia;globosa" 101 110268
In the whole data frame I am having 311 rows. In that data frame I want to add a column named "Program" and on that column I want to groups rows from 1 to 186 as "HMS" and rows from 187 to 311 as "MiCoP", for example:
Species variable value Program
1 "Malassezia;globosa" 100 68126 HMS
2 "Aspergillus;nomius" 100 13977 HMS
3 "Mitosporidium;daphniae" 100 5953 HMS
4 "Penicillium;chrysogenum" 100 1 HMS
5 Other 100 102 HMS
6 "Malassezia;globosa" 101 110268 HMS