How to manage metadata in R

Hi!

Following the metadata topic. I manage my metadata on R.
Does anyone have a suggestion on how to automate the labelling of the variable type on R to export into QIIME2 instead of doing it manually?

Thank you!