标题: 一道编程题 [打印本页] 作者: shiyiming 时间: 2006-10-17 16:09 标题: 一道编程题 有一篇英文文章,节选一部分:
Some people hate the very name of statistics, but I find
em full of beauty and interest. Whenever they are not br-
utalized, but delicately handled by the higher methods, and
are warily interpreted, their power of dealing with compli-
cated phenomena is extraordinary.
想要将字符逐个读入形成一个数据集,就是类似这样:
S
o
m
e
.
.
.
我试用这样的程序:
data galton;
infile data(galton.txt);
input z $1. @@;
run;
但会把文章中的句号变成空格,似乎是系统内部处理@@的问题,请问有什么办法可以改正吗?或大家知道这个程序可以怎么编吗?作者: shiyiming 时间: 2006-10-18 10:24 标题: to Vessa 试试看
[code:4fff4]input z $char1. @@;[/code:4fff4]作者: shiyiming 时间: 2006-10-20 10:07 标题: ? 可以的,请问这是什么原因呢?作者: shiyiming 时间: 2006-10-20 15:09 标题: to Vessa 要学会自己看HELP嘛,HELP里都有解释的呀。
[quote:41d4b]The $w. informat trims leading blanks and left aligns the values before storing the text. In addition, if a field contains only blanks and a single period, $w. converts the period to a blank because it interprets the period as a missing value. The $w. informat treats two or more periods in a field as character data.[/quote:41d4b][quote:41d4b]The $CHARw. informat does not trim leading and trailing blanks or convert a single period in the input data field to a blank before storing values. If you use $CHARw. in an INFORMAT or ATTRIB statement within a DATA step to read list input, then by default SAS interprets any blank embedded within data as a field delimiter, including leading blanks.[/quote:41d4b]作者: shiyiming 时间: 2006-10-22 12:18 标题: help 我也看help文件的,但是我每次都找不到自己想要的
请问大大看help是用搜索功能呢,还是都会到其中某些主要的地方看,因为help的分类太多了,然后连关于函数的解释都没找到。。。