全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SPSS论坛
1367 0
2014-05-14
I got two variables, say X and Y. The value in X is with different orders of A, B and C, say ACB or BCA. I want to compare this with variable "Y", which has one only value of "ABC". Essentially, "ACB" is the same as "ABC". My question is how to compare X and Y? Is there any other way to rearrangethe value  in X and then compare in addition syntax Professor Bruce Weaver at Lakehead University, Canada ?

* Generate some sample data.
DATA LIST list / X Y (2A3).
BEGIN DATA
ABC ABC
ABC ACB
ABC BCA
ABC BCD
END DATA.

LOOP # = 1 to 3.
- COMPUTE Perm = CHAR.INDEX(Y,CHAR.SUBSTR(X,#,1)) GT 0.
END LOOP if not Perm.
FORMATS Perm(f1).
LIST.



二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群