R语言读取固定宽度格式文件read.fwf()函数-中英文对照帮助文档
By MicroRbt Martinez PhD
R语言函数名:read.fwf()
R语言函数功能:读取固定宽度格式文件
来自资源库:基础库(R语言自带)
read.fwf()函数所属R语言包:所在R包具体名称、包功能的中英文双语描述见正文后面'--所在R语言包信息--'部分。
描述-----Description-----
Read a table of fixed width formatted data into a data.frame.
将固定宽度格式的数据表读入data.frame。
使用方法-----Usage-----
read.fwf(file, widths, header = FALSE, sep = "\t",
skip = 0, row.names, col.names, n = -1,
buffersize = 2000, fileEncoding = "", ...)
参数-----Arguments-----
参数file介绍: the name of the file which the data are to be read from.
要从中读取数据的文件的名称。
Alternatively, file can be a connection, which will be opened if necessary, and if so closed at the end of the function call.
另外,file可以是一个连接,如有必要将打开该连接,如果在函数调用结束时将其关闭,则可以将其打开。
参数widths介绍: integer vector, giving the widths of the fixed-width fields (of one line), or list of integer vectors giving widths for multiline records.
整数向量,给出固定宽度字段(一行的宽度)的宽度,或者整数向量列表,给出多行记录的宽度。
参数header介绍: a logical value indicating whether the file contains the names of the variables as its first line. If present, the names must be delimited by sep.
一个逻辑值,指示文件是否包含变量名称作为其第一行。如果存在,则名称必须由sep分隔。
参数sep介绍: character; the separator used internally; should be a character that does not occur in the
-----未完,待续-----,↓↓↓展开剩余72%↓↓↓
|