i have one column in a dataset with long string, i want to convert the particular column to simple integer values(hashing or indexing)in R so that I can easily join other tables with that specific column, can anyone suggest something on this?
library(tidyverse)
mpg
mpg <- mpg %>% mutate(displ = as.character(displ), year =
as.character(year)) %>%
mutate(matcher = as.character(paste(model, displ, year, sep = "")))
View(mpg)
If you see the matcher column, it has a long string values as a character vector, I want to map those values to simple integers like 1, 2, 3 and so on. How can I do that?