This could mean there is something in your working directory that modify the behavior. When you click on the Knit button it will render in a new clean environment.
you can start a new fresh session, with a clean workspace and play the document chunk by chunk to check is working ok.
This error is an R error related to your code, and not Rmarkdown specifically. It means you have covidniaja is a vector at this step, and I guess you expect it to be a dataframe. So something off in the step above.
Hope it helps