楼主: bobobj
12836 12

[学习分享] 北美SAS BASE 08/18 94%新鲜机经 [推广有奖]

11
第八日的蝉c 发表于 2014-11-10 17:16:45 |只看作者 |坛友微信交流群
一个dataset,列出了所有的variables的类型
Name Type
N1      num
N2      num
N3      char
N4      char
问在程序中array{*} _numeric_ 建立了几个variable
答案是0,
因为这条命令只是refer了dataset里所有num类型的variables,并没有建立新的变量

使用道具

12
bobobj 发表于 2014-12-27 23:12:25 |只看作者 |坛友微信交流群
第八日的蝉c 发表于 2014-11-10 17:16
一个dataset,列出了所有的variables的类型
Name Type
N1      num
哦哦,多谢指教!

使用道具

13
elva-pass 发表于 2015-10-7 08:32:39 |只看作者 |坛友微信交流群
A SAS variable list is an abbreviated method of referring to a list of variable names. Two variable lists, _NUMERIC_ and
_CHARACTER_, are especially relevant for arrays. As the names imply, these variable lists reflect all of the numeric or
character variables that are defined in the current DATA step when the variable list is specified. You can use these variable
lists in the ARRAY statement, as shown here:
array my_nums[*] _numeric_;
array my_chars[*] _character_;
These variable lists are especially helpful if you want your array to contain all of the numeric or character variables in a SAS
data set referenced in a SAS statement that reads the data set. It is important to emphasize that the variable list refers to all
variables of that type that are previously defined in the DATA step, not just those that exist in a previously referenced data
set.

使用道具

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

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-26 13:37