I have the following data frame:
name1 name2 A B B D C C D A
the columns \"name1\"
If you want to convert only the selected column of factor variable instead of all the factor variable columns in the data frame, you can use:
file1[,n] <- sapply(file1[,n], as.character)
where n is the column number.