设为首页收藏本站获取积分奖励

R语言中文网

 找回密码
 立即注册
查看: 731|回复: 0

R语言读取固定宽度格式文件read.fwf()函数-中英文对照帮助文档

[复制链接]
发表于 2020-8-21 08:11:47 | 显示全部楼层 |阅读模式
        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%↓↓↓
购买主题 前行需要您的支持,请赞助作者 【15 金钱】 就能浏览全部100%内容啦!(本贴一次赞助、永久可读)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Archiver|R语言中文网    

GMT+8, 2024-5-21 05:16 , Processed in 0.023662 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表