Working script no longer working after reopening R?

Maybe you performed some data cleaning step in your previous R session that you have forgot to include in your script and that is why isn't working now, but to be able to help you we are going to need sample data that reproduces your issue, not a str() print, please try to provide a REPRoducible EXample (reprex)