The best place to start when posting a question is with a reproducible example. It helps if you show a little bit of your data for us to give the best answer and not very generic answers. See a guide here: FAQ: How to do a minimal reproducible example ( reprex ) for beginners