R, need help setting up my contrast

I have a problem that provides litter types (M, Mix, MM)
and weights. It asks me to conduct a planned comparison and test whether M>mix>mm.
I setup all my codes in R but then i need to make my contrasts and im very confused on how i would do that.
If anyone can give me some insight, I'd greatly appreciate it.
Also, any resources that can give me some information on anova, as its been hard for me to underatand.
Thank you