|
|
板凳

楼主 |
发表于 2010-1-28 16:20:39
|
只看该作者
Re: 生成数据集
CAUTION:仅用于9.2
[code:1w6ntt8q]data raw(drop=position length);
length Name $20 Type $2 Region $4;
input;
call scan(_infile_,-4,position,length,' ');
name=substrn(_infile_,1,position-2);
type=scan(_infile_,-4,' ');
region=scan(_infile_,-3,' ');
Meseums=input(scan(_infile_,-2,' '),best.);
Camping=input(scan(_infile_,-1,' '),best.);
datalines;
Dinosaur NM West 2 6
Ellis Island NM East 1 0
Everglades NP East 5 2
Grand Canyon NP West 5 3
Great Smoky Mountains NP East 3 10
Hawaii Volcanoes NP West 2 2
Lava Beds NM West 1 1
Statue of Liberty NM East 1 0
Theodore Roosevelt NP . 2 2
Yellowstone NP West 9 11
Yosemite NP West 2 13
;[/code:1w6ntt8q] |
|