楼主: bobobj
13429 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
拉您进交流群
GMT+8, 2025-12-29 12:56