In my data set there is a column named "Faculty" that includes name of faculties. I want to replace the names with corresponding codes (numbers). For example, the following code produces a small sample.
Faculty<-data.frame(Faculty=c("Forestry","Advanced Technology", "erontology","Design and Architecture","Veterinary Medicine"))
In R, I want to replace all names with codes throughout the data frame. lets say:
Faculty.code<-data.frame(Faculty=c("23","34", "15","7","11"))
Thank you.