When you get an “object not found” error, your first step should be to double check for typos and misspellings in your code. Take a look at the name of the object R says is not found, and compare it to the name of the variable in your data frame that you’re trying to convert.
But note: it’s very possible my advice will not help because I can’t see the rest of your code — so fixing this one error could just result in you getting an error message about a different problem.
That’s why it’s a good idea to take @mara’s advice and share a reproducible example of what you’re working on. It will save you time and get you better answers, and it will make people more likely to want to help you because they can do so quickly and efficiently.