Can you please post a reproducible example, or reprex. This includes a toy data set, the code that you have tried, and your desired output. I would recommend taking a look at this blog post to see how to create a reprex.
You are much more likely to get help from the community if you take the time to create a reprex of your problem.