In R i have a column in a dataframe which contains the City names. As shown in the below image.
This contains some erroneous data for example the Data N, Z, X needs to be replaced as "Others" and some city codes need to be replaced by their original names for example
OC, Okl City --> Oklahoma City
LA --> Los Angles
NW --> New York
When i tried doing this by using IF and ELSE IF statements inside a FOR Loop. I was very much Unsuccessful.
It will be of great help if someone can help me on this.
Thanks in Advance.
dput()orhead(), not images which we cannot copy/paste.