I have to use the "ifelse" function in R to uncode values used in a variable.
The data frame being used is dance. The variable is Type. Via comments I have received, here is what I have:
ifelse(dance$Type=="Swg","Swing",
ifelse(dance$Type=="Ldy","Lindy",
ifelse(dance$Type=="Blue","Blues",
else(dance$Type=="Contra","Contra"))))
I keep getting error messages. Are all of the commas correct? Also, did I end it correctly?
I keep getting error messages plus I'm supposed to specify the data frame I'm using somehow.
Any help would be greatly appreciated. Thank you.