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

R语言中文网

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

R语言数据输出write.table()函数-中英文对照帮助文档

[复制链接]
发表于 2020-8-21 08:19:13 | 显示全部楼层 |阅读模式
        R语言数据输出write.table()函数-中英文对照帮助文档

                                         By MicroRbt Martinez PhD

R语言函数名:write.table()
R语言函数功能:数据输出
来自资源库:基础库(R语言自带)
write.table()函数所属R语言包:所在R包具体名称、包功能的中英文双语描述见正文后面'--所在R语言包信息--'部分。

描述-----Description-----

write.table prints its required argument x (after converting it to a data frame if it is not one nor a matrix) to a file or connection.
write.table将其所需的参数x打印到文件或连接中(如果既不是矩阵也不是矩阵,则将其转换为数据帧)。


使用方法-----Usage-----

write.table(x, file = "", append = FALSE, quote = TRUE, sep = " ",
eol = "\n", na = "NA", dec = ".", row.names = TRUE,
col.names = TRUE, qmethod = c("escape", "double"),
fileEncoding = "")
write.csv(...)
write.csv2(...)

参数-----Arguments-----

参数x介绍: the object to be written, preferably a matrix or data frame. If not, it is attempted to coerce x to a data frame.
要写入的对象,最好是矩阵或数据帧。如果不是,则尝试将x强制为数据帧。

参数file介绍: either a character string naming a file or a connection open for writing. "" indicates output to the console.
命名文件的字符串或打开以供写入的连接。 ""指示输出到控制台。

参数append介绍: logical. Only relevant if file is a character string. If TRUE, the output is appended to the file. If FALSE, any existing file of the name is destroyed.
符合逻辑仅当file是字符串时才相关。如果为TRUE,则输出将附加到文件中。如果是FALSE,则该名称的任何现有文件都将被销毁。

参数quote介绍: a logical value (TRUE or FALSE) or a numeric vector. If TRUE, any character or factor columns will be surrounded by double quotes. If a numeric vector, its elements are taken as the indices of columns to quote. In both cases, row and column names are quoted if they are written. If FALSE, nothing is quoted.
逻辑值(TRUE或FALSE)或数字向量。如果是TRUE,则任何字符或因子列都将用双引号引起来。如果是数字矢量,则将其元素用作要引用的列的索引。在这两种情况下,如果都写了行名和列名,则要加引号。如果为FALSE,则不会引用任何内容。

参数sep介绍: the field separator string. Values within each row of x are separated by this string.
字段分隔符字符串。 x每行中的值都由该字符串分隔。

参数eol介绍: the character(s) to print at the end of each line (row). For example, eol = "\r\n" will produce Windows' line endings on a Unix-alike OS, and eol = "\r" will produce files as expected by Excel:mac 2004.
每行(行)末尾要打印的字符。例如,eol = "\r\n"将在类似Unix的操作系统上产生Windows的行尾,而eol = "\r"将产生Excel:mac 2004期望的文件。

参数na介绍: the string to use for missing values in the data.
用于数据中缺少值的字符串。

参数dec介绍: the string to use for decimal points in numeric or complex columns: must be a single character.
用于数字列或复杂列中小数点的字符串:必须为单个字符。

参数row.names介绍: either a logical value indicating whether the row names of x are to be written along with x, or a character vector of row names to be written.
指示是否要与x一起写入x的行名称的逻辑值,或要写入的行名称的字符向量。

参数col.names介绍: either a logical value indicating whether the column names of x are to be written along with x, or a character vector of column names to be written. See the section on CSV files for the meaning of col.names = NA.
指示是否要与x一起写入x的列名的逻辑值,或要写入的列名称的字符向量。有关col.names = NA的含义,请参见CSV filesc一节。

参数qmethod介绍: a character string specifying how to deal with embedded double quote characters when quoting s
-----未完,待续-----,↓↓↓展开剩余72%↓↓↓
购买主题 前行需要您的支持,请赞助作者 【15 金钱】 就能浏览全部100%内容啦!(本贴一次赞助、永久可读)
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-10 18:00 , Processed in 0.026449 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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