How to change a character variable into vector within a DataFrame

I can't tell exactly what you are trying to do.

Are you trying to convert colData(sce)$orig.ident into a factor?

In that case you probably want:

colData(sce)$orig.ident <- as.factor(colData(sce)$orig.intent)

You can get a better answer if you post a reprex (FAQ: What's a reproducible example (`reprex`) and how do I do one?)