由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - SAS help: programming 中遇到的一些问题
相关主题
Proc SQL 能不能直接读 非 SAS format 的数据,txt , csv 等谁能推荐好一点的Excel VBA的书?
SAS问题请教:Numeric Variable Length的设定终于考完了,贡献一下
a SAS question for best solutionQuestions about opreate large data set, thank you!
another sas question输出一个sas dataset为csv文件,有没有办法在一个变量的名字前加个#?
SAS format 的问题How well is SAS/IML studio integrating with R.?
SAS Base 70题 第20题求教Question: Importing csv file into SAS 9----太多变量
sas base 70 第 20题用SAS生成CSV 文件
SAS format file--- when I load the file 急~~~谢谢~~~questions about SAS import Excel data
相关话题的讨论汇总
话题: length话题: aaabb话题: aaa话题: format话题: start
进入Statistics版参与讨论
1 (共1页)
p***r
发帖数: 920
1
做 text analysis 的时候遇到一些问题,虽然想着法子解决了,但是想不明白
1. 空白问题
一个value 看上去是 missing 的什么也没有,但是为什么 通过function missing()
却没有办法消除?一查首字母的ASCII码还都不一样
2. Proc format range overlap 的问题:
用 cntl 引入 format 的时候如果出现如下两个这样的值有时会被判定为overlap 而产
生错误
Start Label
-------------
AAA X
AAABB Y
...
Log 显示 range AAA-AAA and AAABB-AAABB 有 overlap,这个很奇怪
d******9
发帖数: 404
2
Proc Format
The problem may be due to the insufficient length of Start. Try to use
Length to specify a longer length.
d******9
发帖数: 404
3
I tried with below codes, it worked without any problem:
data F;
retain FMTName '$try';
input start $ label $;
cards;
AAA X
AAABB Y
;
run;
proc format cntlin=F fmtlib;
run;
------------------------------------------------
----------------------------
| FORMAT NAME: $TRY LENGTH: 1
NUMBER OF VALUES: 2 |
| MIN LENGTH: 1 MAX LENGTH: 40 DEFAULT
LENGTH 1 FUZZ: 0 |
|-----------------------------------------------
---------------------------|
|START |END |LABEL (VER.
V7|V8 03JAN2012:12:24:10)|
|----------------+----------------+-------------
---------------------------|
|AAA |AAA |X
|
|AAABB |AAABB |Y
|
------------------------------------------------
----------------------------

【在 p***r 的大作中提到】
: 做 text analysis 的时候遇到一些问题,虽然想着法子解决了,但是想不明白
: 1. 空白问题
: 一个value 看上去是 missing 的什么也没有,但是为什么 通过function missing()
: 却没有办法消除?一查首字母的ASCII码还都不一样
: 2. Proc format range overlap 的问题:
: 用 cntl 引入 format 的时候如果出现如下两个这样的值有时会被判定为overlap 而产
: 生错误
: Start Label
: -------------
: AAA X

p***r
发帖数: 920
4
I tried the same code as well and its fine. But the actual F dataset are
imported from .xls sheet with 5000 rows. And this error is not able to be
corrected. There must be something hidden unexplained.
Thanks for your input though.

【在 d******9 的大作中提到】
: I tried with below codes, it worked without any problem:
: data F;
: retain FMTName '$try';
: input start $ label $;
: cards;
: AAA X
: AAABB Y
: ;
: run;
: proc format cntlin=F fmtlib;

d******9
发帖数: 404
5
I see.
Please note Excel data are very different from SAS data, which may cause
problem.
Can u save the Excel as CSV or txt, and then use SAS to read in.
1 (共1页)
进入Statistics版参与讨论
相关主题
questions about SAS import Excel dataSAS format 的问题
SAS读数据乱码的问题SAS Base 70题 第20题求教
#刚考完SAS BASE,问其中的一个题目#sas base 70 第 20题
请教一个数据输入的问题SAS format file--- when I load the file 急~~~谢谢~~~
Proc SQL 能不能直接读 非 SAS format 的数据,txt , csv 等谁能推荐好一点的Excel VBA的书?
SAS问题请教:Numeric Variable Length的设定终于考完了,贡献一下
a SAS question for best solutionQuestions about opreate large data set, thank you!
another sas question输出一个sas dataset为csv文件,有没有办法在一个变量的名字前加个#?
相关话题的讨论汇总
话题: length话题: aaabb话题: aaa话题: format话题: start