Hello,
I have a cell containing with a single string, like #AABCAAABC BCABCBCABCABADABCABAABACABABCDACAAACBAAA. I am trying to separate them into different cells, and give each cell a name. The syntax as following does not work, SPSS gave an error about "invalid variable name". How can I solve the problem? Loop #i=1 to 50. compute @i=substr(ResponseString,i,1). end loop. I would appreciate your inputs on it. Thank you very much. Sincerely, Jialin Huang |
Vector cell(50,a1). Loop #i=1 to 50. Gene Maguin From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of huang jialin Hello, |
Administrator
|
In reply to this post by huang jialin
Look up VECTOR in the FM or search the archives of this group.
Note also that #i is not the same thing as i . You also need to declare/preallocate string variables with STRING declarative . Your code is simply going to create a single variable @i corresponding to the 50th character of ResponseString. --
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Administrator
|
In reply to this post by Maguin, Eugene
The devil is in the details ;-)
--
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Free forum by Nabble | Edit this page |