d*o 发帖数: 108 | 1 I have a file with the following format:
name age income height ....
john 23 39 89 ...
jack 23 44 25 ...
Possible to write a "general" code, so that the code can use the very first
line, to define the variable names? in other words, the data set should have
variables "name", "age", ... | t*******t 发帖数: 633 | 2 直接用proc import就好了
first
have
【在 d*o 的大作中提到】 : I have a file with the following format: : name age income height .... : john 23 39 89 ... : jack 23 44 25 ... : Possible to write a "general" code, so that the code can use the very first : line, to define the variable names? in other words, the data set should have : variables "name", "age", ...
| d*o 发帖数: 108 | 3 thanks.
proc import is not very robust; e.g., if the column name starts with a
number, sas seems assumin the entire column is a numeric field; also i found
that if there are some missing fields, the resulting data is less reliable..
【在 t*******t 的大作中提到】 : 直接用proc import就好了 : : first : have
| t*******t 发帖数: 633 | 4 You can specify more options in proc import.
For example, using guessingrow=200 then SAS will scan the first 200 rows to
make a decision on whether this variable is a numeric or character.
For missing values, using DSD option can help.
Just read more of proc import document, you can see it's a powerful proc.
found
reliable..
【在 d*o 的大作中提到】 : thanks. : proc import is not very robust; e.g., if the column name starts with a : number, sas seems assumin the entire column is a numeric field; also i found : that if there are some missing fields, the resulting data is less reliable..
| o*******w 发帖数: 2310 | 5 proc import sounds right to me
by the way, column name cannot start with a number in SAS
to
【在 t*******t 的大作中提到】 : You can specify more options in proc import. : For example, using guessingrow=200 then SAS will scan the first 200 rows to : make a decision on whether this variable is a numeric or character. : For missing values, using DSD option can help. : Just read more of proc import document, you can see it's a powerful proc. : : found : reliable..
|
|