Hi, welcome to the forum.
We really need to see your code , perhaps some sample data, and any error messages you are getting
See FAQ: How to do a minimal reproducible example ( reprex ) for beginners.
Rather than a reprex you also can just copy the code you are using and paste it here between
```
```
A handy way to supply data is to use the dput() function. Do dput(mydata) where "mydata" is the name of your dataset. For really large datasets probably dput(head(mydata, 100)) will do. Paste the output between
```
```