Hi, welcome to the forum.
I think we need to see your code and some sample data.
If the file is not too large could you copy it and paste it here between
```
```
If there is a lot of pure text, you can probably just delete much of it as what we probably need to see is the YAML at the top of the file and the R code.
A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need. Just do dput(mydata) where mydata is your data. Copy the output and paste it here between
```
```
For general interest, you may find these useful:
FAQ Asking Questions
How to format your code