从编辑窗口读入数据.DOC

所有问题请加入必要的标题和说明。 1. 把下列数据从程序窗口读入SAS,并把生成的sas数据集合变成永久数据集合。 Andy 7 1 Martha 9 3 Marissa 13 7 John 10 4 Larry 11 6 2. 变量名为Name, Age, Height, Sex, 和 JoinDate的数据如下。请读入到一个数据集合里,并按原来的格式用Proc Print把数据显示在输出窗口上。 John 21 70 M 2/14/97 Jo 18 62 F 3/27/99 Mark 32 68 M 6/22/98 Linda 25 65 F 12/14/97 Carey 27 59 F 8/20/98 3. 本题使用的数据(president.txt)包括历史上美国总统的名字、出生日期和死亡日期(name, birth ,和 death).?把数据从文本文件读入到一个sas数据集合。 整个人名为一个变量(长度为21个字节)。 data president; infile d:\data\president.txt; informat name $23. birth mmddyy10. death mmddyy10.; input name $1-23 birth death; run; a) 计算每一个总统的寿命,并把它作为一个变量加到数据集合里。 b)计算历史上美国总统

文档评论(0)

1亿VIP精品文档

相关文档