I have written the below code. And it gives result in R-Studio. However, I think, my approach is a bit convoluted. Moreover, I had to compile the code in webbased "katacoda" environment which is not liking my code and is not allowing me to progress to next chapter. Also, it could be my output is incorrect let me know. Thanks.
install.packages("dplyr")
install.packages("hflights")
library(dplyr)
library(hflights)
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")
df1 <- data.frame(abrCarrier)
#df1
#setwd("C:\Users\Dell\Documents\trial_1")
write.csv(df1,"abrCarrier_export.csv")
df2 <- read.delim("abrCarrier_export.csv",sep = ",")
names(df2) <- c("UniqueCarrier", "Carrier")
#df2
#library(hflights)
df0 <- hflights
hflights1 <- left_join (df0,df2, by = "UniqueCarrier")
glimpse(hflights1)