I have a column containing the brand and model of cars. How to keep only the brand and remove the model? In the original dataset, the brand and the mode were separated by a space. So I tried this:
carprice$CarName=gsub(pattern = " *", replacement = "",carprice$CarName)
What happened was the space got eliminated and now the brand and the model names are concatenated. I am not able to even undo it.