Hello Experts,
I am learning R. In one of the online learning courses, I came across the following exercise that I could not resolve. Thought of picking your brain to solve this. Could someone help?
Create a list abrCarrier which will contain actual carrier names corresponding to the values in the variable UniqueCarrier.
abrCarrier <- c("AA" = "American", "AS" = "Alaska", "B6" = "JetBlue", "CO" = "Continental", "DL" = "Delta", "OO" = "SkyWest", "UA" = "United", "US" = "US_Airways", "WN" = "Southwest", "EV" = "Atlantic_Southeast", "F9" = "Frontier", "FL" = "AirTran", "MQ" = "American_Eagle", "XE" = "ExpressJet", "YV" = "Mesa")
Add a new column Carrier to hflights which will contain the actual Carrier name by referring abrCarrier and the UniqueCarrier column of hflights.
Use the glimpse(hflights)
to view the values in the newly added column.
Thanks.