由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - SAS simple question
相关主题
SAS QUESTIONS: Urgent time formating problem, please help!SAS help
问一个简单的SAS问题,多谢SAS快捷键问题
sas date variable exchange请教个SAS问题
character变date variable help求教 SAS数据转化
线性回归的SAS编程疑问帮忙看个SAS base 小问题吧
请教两个关于SAS的问题请教SAS的例子中用到很多数据,这些数据存在呢里呢?
SAS base 87% pass today[SAS] call execute gives me error
weird SASask SAS code
相关话题的讨论汇总
话题: sas话题: 244话题: digit话题: 5678话题: simple
进入Statistics版参与讨论
1 (共1页)
k******w
发帖数: 269
1
How to keep the first digit of a number?
For example,
12
23
244
5678
99
100
I just want to first digit, what is the code? Thanks.
a***r
发帖数: 420
2
a "tu" method that works somehow
data example;
input firstdg 1.;
datalines;
12
23
244
...
;
run;
a "tu" method that works somehow

【在 k******w 的大作中提到】
: How to keep the first digit of a number?
: For example,
: 12
: 23
: 244
: 5678
: 99
: 100
: I just want to first digit, what is the code? Thanks.

h***i
发帖数: 634
3
输入设成只接受一位数字
input a 1. ;

【在 k******w 的大作中提到】
: How to keep the first digit of a number?
: For example,
: 12
: 23
: 244
: 5678
: 99
: 100
: I just want to first digit, what is the code? Thanks.

A****t
发帖数: 141
4
data one;
input id $;
datalines;
12
23
244
5678
99
100
;
run;
data two;
set one;
a=substr(id,1,1);
keep a;
run;
1 (共1页)
进入Statistics版参与讨论
相关主题
ask SAS code线性回归的SAS编程疑问
[SAS] row merging请教两个关于SAS的问题
help for SAS codeSAS base 87% pass today
请教个用SAS读数据的问题。weird SAS
SAS QUESTIONS: Urgent time formating problem, please help!SAS help
问一个简单的SAS问题,多谢SAS快捷键问题
sas date variable exchange请教个SAS问题
character变date variable help求教 SAS数据转化
相关话题的讨论汇总
话题: sas话题: 244话题: digit话题: 5678话题: simple