全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1032 2
2015-04-25
   /*************************************/   /* create the initial data set       */   /*************************************/data admit;   input ID $ 1-4 Name $ 6-19 Sex $ 21 Age 23-24         Date 26-27 Height 29-30 Weight 32-34         ActLevel $ 36-39 Fee 41-46;   format fee 6.2;
As I am a new learner, I want know the meaning of $ 1-4, $ 6-19, $ 21 ,etc. Thanks a lot.

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2015-4-26 17:34:58
The INPUT statement reads raw data using column input.
From 'The little SAS BOOK':
'After the INPUT keyword, list the first variable's name. If the variable is character, leave a space; then place a $. After the $, or variable name if it is numeric, leave a space; then list the column or range of columns for that variable.'
That is, 1-4 means extract the first column to the fourth column and assign it to ID as a numeric value. $ 21 means extract the 21st column and assign it to Sex as a character value.

I am also a new learn and my English is poor. Hope it helps you.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-6-12 06:59:26
zcycy 发表于 2015-4-26 17:34
The INPUT statement reads raw data using column input.
From 'The little SAS BOOK':
'After the INPU ...
Thanks a ton!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群