sas|call label and vlabel
syntax:
call label(svar,namelabel);
namelabel=vlabel(svar);
【sas|call label and vlabel】example(http://support.sas.com/kb/24/664.html):
/* Create dummy data */
data one;
input toy & $30. price type $;
label toy='Hot Toys for 2000'
price='Current Price'
type='Regular or Sale Price';
datalines;
Tekno the Robotic Puppy39.99regular
Razor B1 Scooter119.99regular
Madeline Dollhouse149.99regular
Amazing Baby in Lavendar36.99sale
Kick and Play Piano24.99regular
;
data new;
set one;
/* Array of all character variables */
array temp1 (*) _character_;
/* Array of all numeric variables */
array temp2 (*) _numeric_;
length newlabel $40;
/* For each element in the character array, assign its label */
/* as the value of NEWLABEL, and output the observation*/
do i=1 to dim(temp1);
call label(temp1(i),newlabel);
/*newlabel=vlabel(temp1(i));
*/
output;
end;
/* For each element of the numeric array, assign its label as */
/* the value of NEWLABEL, and output the observation*/
do j=1 to dim(temp2);
call label(temp2(j),newlabel);
/*newlabel=vlabel(temp2(j));
*/
output;
end;
stop;
keep newlabel;
run;
proc print;
run;
推荐阅读
- 临床统计学学习日志
- JavaScript|JavaScript — call()和apply()、Date对象、Math、包装类、字符串的方法
- JavaSwing学习笔记(二)
- Python|Python TypeError: 'module' object is not callable 原因分析
- Cocos|Cocos Creator 在native平台几率出现图片、Label 白块(变成白色)问题
- call和apply的应用
- The|The getter 'data' was called on null , Receiver: null, Tried calling
- 获取平均数之Function.prototype.call()、Function.prototype.apply()应用
- QT(在QLabel中绘制背景透明的框线)
- Golang可视化工具——go-callvis