楼主: crackman
1447 5

[原创博文] 这个例子是不是有问题? [推广有奖]

已卖:401份资源

院士

83%

还不是VIP/贵宾

-

威望
6
论坛币
91928 个
通用积分
23.5045
学术水平
424 点
热心指数
505 点
信用等级
256 点
经验
112978 点
帖子
2940
精华
0
在线时间
2532 小时
注册时间
2007-4-26
最后登录
2025-6-25

初级热心勋章 中级热心勋章 初级学术勋章 初级信用勋章

楼主
crackman 发表于 2010-4-3 23:17:44 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
Examples:
s='ABC 123 xyz’';
compress(s) → ‘ABC123abc’.
compress(s,'a') → ‘BC 123 abc’.
我觉得是有问题
二维码

扫码加我 拉你入群

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

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

关键词:compress Examples example Press ExamP

沙发
数模爱好者联盟 发表于 2010-4-3 23:53:38
这是什么东东哦。。。

藤椅
gzjb 发表于 2010-4-3 23:54:43
crackman 发表于 2010-4-3 23:17
Examples:
s='ABC 123 xyz’';
compress(s) → ‘ABC123abc’.
compress(s,'a') → ‘BC 123 abc’.
我觉得是有问题
SAS code and running result
******* 1.;
data test;
  s='ABC 123 xyz’';
  scomp=compress(s);
  scompa=compress(s,'a');
  run;

proc print noobs; run;

*******2. ;

                                s                       scomp          scompa

                             ABC 123 xyz’    ABC123xyz’    ABC 123 xyz’

******I think LZ need the following codes;
data test;
  s='ABC 123 abc’';
  scomp=compress(s);
  scompa=compress(s,'a');
  run;

  proc print; run;

*** output **;
                          Obs         s            scomp         scompa

                           1     ABC 123 abc’    ABC123abc’    ABC 123 bc’

板凳
crackman 发表于 2010-4-4 00:00:02
this is a example in the sas function pocket edited by chris fehily
i can't understand  why.

报纸
jxx05 发表于 2010-4-4 00:05:40
详细说明  规矩都不知道!

地板
gzjb 发表于 2010-4-4 00:30:36
crackman 发表于 2010-4-4 00:00
this is a example in the sas function pocket edited by chris fehily
i can't understand  why.
It's wrong for misprint. I think the string should be  s='ABC 123 abc’';
and the results should be :

                                        s            scomp         scompa

                                  ABC 123 abc’    ABC123abc’    ABC 123 bc’

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-26 02:54