公卫百科  > 所属分类  >  SAS   
[0] 评论[0] 编辑

SAS Arrays

The SAS array statement is used to easily tag variables in a data set for processing. The array statement is used in the data step. Example:

array x{3} light water yield;

Following this statement x{1} refers to light, x{2} refers to water and x{3} refers to yield. This makes it easy to replace all zero values with the SAS missing value symbol by using the program 公卫人


do i=1 to 3;
if x{i}=0 then x{i}= . ;
end;

If the data set has many variables then all numeric variables can be placed into an array with the statement

array x{*} _numeric_ ;

The number of entries in the array x is then obtained with dim(x). 公卫百科

The first entry of an array has index 1.

For further information see the SAS Language Reference.

附件列表


0

词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。

如果您认为本词条还有待完善,请 编辑

上一篇 SAS @ Symbol    下一篇 SAS X Command

标签

暂无标签

同义词

暂无同义词