Hello
I have a problem with what seems to be a blank in a string.
The str10 variable is called X and a commonly occurring value is "DVAXX". This value is e.g. observed for observation number 1.
However, another value of X is also observed. This value is e.g. observed for observation number 2.
My problem is that I am not able to identify this other value. The codebook command confirms that the type is str6.
I suspected the value to be "DVAXX " (that is with a trailing blank), but when I type:
the result is 0 i.e. false, contrary to what I achieve when typing:
Here the result is 1 i.e. true.
When I type:
no symbol is shown in the result window. In other words I am not able to visually discern it from the result I get when typing:
Thus my question is: what is the value of X[2] and how do I find out?
Best regards
Andreas Jensen
I have a problem with what seems to be a blank in a string.
The str10 variable is called X and a commonly occurring value is "DVAXX". This value is e.g. observed for observation number 1.
However, another value of X is also observed. This value is e.g. observed for observation number 2.
My problem is that I am not able to identify this other value. The codebook command confirms that the type is str6.
I suspected the value to be "DVAXX " (that is with a trailing blank), but when I type:
Code:
display substr(X[2],6,1)==" "
Code:
display substr("DVAXX ",6,1)==" "
When I type:
Code:
display substr(X[2],6,1)
Code:
display substr("DVAXX ",6,1)
Best regards
Andreas Jensen
Comment