SAS:“数据文件”和“数据文件”之间有什么区别?和“原始数据文件”?
所以,根据SAS书籍,你这样做:
PROC IMPORT
DATAFILE="filename" | TABLE="tablename"
OUT=SAS-data-set
<DBMS=identifier><REPLACE>;
对于数据文件,你使用INFILE来读取原始数据文件......
那么“原始数据文件”到底是什么? CSV 文件是数据文件还是“原始数据文件”?以空格分隔的文本文件是数据文件还是“原始数据文件”?
So, according to SAS books, you do:
PROC IMPORT
DATAFILE="filename" | TABLE="tablename"
OUT=SAS-data-set
<DBMS=identifier><REPLACE>;
for data files, and you use INFILE to read raw data files...
So what exactly is "raw data files"? Are CSV files data files or "raw data files"? Are space-separated text files data files or "raw data files"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为“数据文件”可能是指 SAS 创建的数据文件,而“原始数据文件”是指任何其他数据文件源(excel、csv、dat 等)。据我了解(大致阅读了 Delwiche & Slaughter 的《The Little SAS Book》),
proc import
将扫描您的文件(至少前 20 行)以自动确定变量类型和理想长度。INFILE
是一种更原始的方式,但允许您通过input
关键字指定要读取的变量。您还可以直接在使用INFILE
的DATA
步骤中进行数据操作,这是无法通过proc import
完成的(至少我不知道)认为不能)。检查http://www.sfu.ca/sasdoc/sashtml/proc/z0332605。 htm 和 http://support.sas .com/onlinedoc/913/getDoc/en/lrcon.hlp/a000998889.htm 了解更多信息。I think "data files" might refer to SAS created data files, whereas "raw data files" refers to any other data file source (excel, csv, dat, etc). As I understand it (reading roughly from "The Little SAS Book" by Delwiche & Slaughter),
proc import
will scan your file (at least the first 20 rows) to automatically determine variable types and ideal lengths.INFILE
is a more primitive in ways, but allows you to specify what variables to read through theinput
keyword. You can also do data manipulations directly within theDATA
step where yourINFILE
is used, which cannot be done withproc import
(at least I don't think it can). Check http://www.sfu.ca/sasdoc/sashtml/proc/z0332605.htm and http://support.sas.com/onlinedoc/913/getDoc/en/lrcon.hlp/a000998889.htm for additional info.