Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个从联合操作中获得的大数据集,我想检查 2 个字符变量(我们称它们为 var_1 和 var_2)是否相同。我可以使用任何 SAS 功能吗?
看看你能不能把它用作模板。随意问:-)
data have; input var_1 var_2; datalines; 1 1 1 2 2 2 2 1 ; data want; set have; check = (var_1 = var_2); run;
结果:
var_1 var_2 check 1 1 1 1 2 0 2 2 1 2 1 0