SPSS20
I have a STRG variable VAR001 in which different words are listed. I would like to search the STRG variable VAR001 for a certain text (string), i.e. "hallo". If the string is found a second variable (VAR002) should get the value 1. If not: 0.
Dr. Frank Gaeth
|
something like
(untested)
compute var002 = char.index(var001,'hallo') ne 0. Art Kendall Social Research ConsultantsOn 3/16/2014 1:19 PM, drfg2008 [via SPSSX Discussion] wrote: SPSS20
Art Kendall
Social Research Consultants |
Administrator
|
Adding to this, if you have multiple strings or multiple variables consider setting this up in a DO REPEAT.
===
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 |