求助SAS kcompress函数的modifier
sas吧
全部回复
仅看楼主
level 8
按照sas官网文档,modifier=g相当于删除图形字符,modifier=w是删除所有可打印字符。我理解的是w包含g和空格,但是运行代码发现这两个完全没区别。所以求助大佬们能否给个例子让我看看这俩有啥区别
modifier
specifies a character constant, variable, or expression in which each non-blank character modifies the action of the KCOMPRESS function. Full-width alphabetic and numeric characters are supported. Blanks are ignored. The following characters can be used as modifiers:
g or G adds graphic characters to the list of characters.
w or W adds printable characters to the list of characters.
2024年12月17日 04点12分 1
level 11
试了一下,如你所言
我也不知道什么原理
不知道下面这个有没有帮助
https://communities.sas.com/t5/New-SAS-User/how-to-add-blank-space-to-a-variable-in-the-front/td-p/709031
2024年12月18日 01点12分 2
谢谢老哥,我再研究研究
2024年12月18日 02点12分
@HunterWong2020 不知道你的动机是什么,如果是应用,那基本不影响,如果想深究,可以写邮件或者去sas community发帖
2024年12月18日 05点12分
1