Hi,
I have a huge data, with a string variable that has so many empty values (which is ok) and that is why it is meaningless to use dataex in this case. The string variable has values that start with different letters and digits. What I want is to count how many obs that string variable has values that within range of "V01" up to "V899". Bearing in mind that some values has only two digits following the letter and some has three digits. For instance, V01, V010, V019, V020, ..., V89, V899. So it will be hectic to include all range. I tried to use inrange with astrix like "V01*", "V89*" but it produce incorrect results than if I use inrange(stringvar,"V01","V899"). So can you please help which command is the best in this case, as it is near impossible to check if the results is matching or not and whether it captures all obs within that specified range!
Thanks in advance for any suggestion!
I have a huge data, with a string variable that has so many empty values (which is ok) and that is why it is meaningless to use dataex in this case. The string variable has values that start with different letters and digits. What I want is to count how many obs that string variable has values that within range of "V01" up to "V899". Bearing in mind that some values has only two digits following the letter and some has three digits. For instance, V01, V010, V019, V020, ..., V89, V899. So it will be hectic to include all range. I tried to use inrange with astrix like "V01*", "V89*" but it produce incorrect results than if I use inrange(stringvar,"V01","V899"). So can you please help which command is the best in this case, as it is near impossible to check if the results is matching or not and whether it captures all obs within that specified range!
Thanks in advance for any suggestion!
Comment