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. |