Please take a look at our homework policy
Also, check this guide about how to make R related questions