Hello
I have this kind of dataset
HHID herd_size ls_code exotic
1 1 3 0
2 3 3 1
3 2 6 0
1 3 3 1
2 6 5 1
2 1 3 0
3 1 4 1
I would like, in a first time, to have a list of all the HHID dat have the same HHID number and the same ls_code and if possible herd_size
So I could drop those duplicates
In a second time I would like to sum up the herd_sizes for the one that have the same HHID and same ls_code but a different herd_size
After I have the sum of those i would like to drop the rest of the duplicates HHID numbers
Can someone help me with this? Untill now I haven't figured out how to do this.
Thanks a lot
I have this kind of dataset
HHID herd_size ls_code exotic
1 1 3 0
2 3 3 1
3 2 6 0
1 3 3 1
2 6 5 1
2 1 3 0
3 1 4 1
I would like, in a first time, to have a list of all the HHID dat have the same HHID number and the same ls_code and if possible herd_size
So I could drop those duplicates
In a second time I would like to sum up the herd_sizes for the one that have the same HHID and same ls_code but a different herd_size
After I have the sum of those i would like to drop the rest of the duplicates HHID numbers
Can someone help me with this? Untill now I haven't figured out how to do this.
Thanks a lot
Comment