% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{convert2Factor} \alias{convert2Factor} \title{Convert specified columns to factor} \usage{ convert2Factor(data, columns) } \arguments{ \item{data}{The input data frame} \item{columns}{The column names to be converted to factors} } \value{ The modified data frame with specified columns converted to factors } \description{ Convert specified columns to factor } \examples{ data <- data.frame( Category1 = c("A", "B", "A", "B"), Category2 = c("X", "Y", "X", "Z"), Value = 1:4, stringsAsFactors = FALSE ) ## -- Convert columns to factors convert2Factor(data, columns = c("Category1", "Category2")) }