Sorry if this is a basic question, i'm very new to R.
Say I have a vector with certain values with these levels:
x=c(3,1,2,1)
levels(x)[c(1,2,3)]=c("Coins","Mix", "Liquid")
How can I return a vector of x
with the values of the level as a string (e.g. "Liquid", "Coins", "Mix", "Coins").
Thanks
This is a weird way to format data, but here's an answer: