There are a total of 100 data from six teams' basketball games. I wrote the R code to see which team wins in each game like this. 
`win = ifelse(dat$away_score > dat$home_score, dat$away, dat$home)`
 However, the name of the basketball team is not output but is output as a number (1,2,3, ..). Of course, 
After naming the basketball teams in alphabetical order, numbers were assigned according to their order. At this time, how do I print the results in the name of the original basketball team rather than numbers?