Ahoy and Welcome Xiuqi!
Admin stuff first, note our HW policy: FAQ: Homework Policy
Thanks for clearly indicating this is about HW, and thanks for not asking people here to do your homework for you (it seriously happens).
It's really not clear what issue you're having. A fuller explanation describing what you're trying to do and what errors you get, and a reproducible example (ideally as a reprex FAQ: What's a reproducible example (`reprex`) and how do I do one?) might be needed to help you out.
A big guess is you're having trouble compiling an R Markdown assignment document. If you have a public RStudio.cloud project that you're willing and able to share, that could be a good starting point to help diagnose the issue.