Hello
I am trying to create a dataset from an existing dataset.
The current dataset has a variable called id_code. The id_code is a string of length 10 characters. I need to extract the 2 left most characters and based on whether it is a 01 assign "temp" and if 02 assign "non-temp".
I have to repeat this process till the end of the dataset that has around 350 observations.
Could anyone help me with the code for this.
Thanks