Hello everyone,
I have a question regarding how to make a new variable that lists all of the observations that fulfil a certain condition. In practice, I have one variable that contains a list of either a stock code, or a 0 if the condition is not fulfilled. Now, I need to make a summary variable, that in one cell lists all of the observations that contain numbers.
For example, I could have the following:
Observation number Stock Code
1 0
2 2345
3 6789
4 0
5 1111
So now, what I would want to do, is to create a new variable that equals: 2345 6789 1111, so basically the three strings one after the other with a space in-between. Does anyone have an idea of how to go about this?
Thanks everyone for your consideration!
Best regards,
Janthe
I have a question regarding how to make a new variable that lists all of the observations that fulfil a certain condition. In practice, I have one variable that contains a list of either a stock code, or a 0 if the condition is not fulfilled. Now, I need to make a summary variable, that in one cell lists all of the observations that contain numbers.
For example, I could have the following:
Observation number Stock Code
1 0
2 2345
3 6789
4 0
5 1111
So now, what I would want to do, is to create a new variable that equals: 2345 6789 1111, so basically the three strings one after the other with a space in-between. Does anyone have an idea of how to go about this?
Thanks everyone for your consideration!
Best regards,
Janthe
Comment