I have a variable called "Item", it contains data looks like "1, A, 2, B, 3, C, 4, D, 5, E, 6, F". The data type of this variable is a list. I would like to create a new factor variable called "Item type", which contains two values, either "numbers" or "letters".
So ideal dataset looks like this
Item Item type
I'm having trouble to create the new variable "item type". I have tried a couple ways to do that. It seems like my data type of "item" is a list, so it wouldn't allow me to create a new factor. Does anyone can help me with it? A sample code would be helpful! Thank you!