If statement SPSS-使用if-then从两个字符串计算新变量
我需要开发一个语句,根据两个列的值和缺少的值从两个列中提取字符串值。比如说If statement SPSS-使用if-then从两个字符串计算新变量,if-statement,spss,If Statement,Spss,我需要开发一个语句,根据两个列的值和缺少的值从两个列中提取字符串值。比如说 A列,B列,新的 AA,BB,AA ___,CC,CC DD,_uu,DD __",__ 我知道这是一个简单的说法,但我今天似乎无法理解。这应该可以做到: string new_var(a20). if (COL_A<>"" and COL_B<>"") or COL_B="" new_var=COL_A. if new_var="" and COL_B<>"" new_var=C
- A列,B列,新的
- AA,BB,AA
- ___,CC,CC
- DD,_uu,DD
- __",__
string new_var(a20).
if (COL_A<>"" and COL_B<>"") or COL_B="" new_var=COL_A.
if new_var="" and COL_B<>"" new_var=COL_B.
字符串新变量(a20)。
如果(列A“”和列B“”)或列B=“”新值=列A。
如果new_var=“”和COL_B”“new_var=COL_B。
您的意思是缺少值还是空值?空值。我道歉。