write.xlsx(xlsx)
write.xlsx()所属R语言包:xlsx
Write a data.frame to an Excel 2007 workbook.
数据框写入Excel 2007工作簿。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Write a data.frame to an Excel 2007 workbook.
写一个data.frame Excel 2007工作簿。
用法----------Usage----------
write.xlsx(x, file, sheetName="Sheet1",
col.names=TRUE, row.names=TRUE, append=FALSE)
write.xlsx2(x, file, sheetName="Sheet1",
col.names=TRUE, row.names=TRUE, append=FALSE, ...)
参数----------Arguments----------
参数:x
a data.frame to write to the workbook.
一个data.frame写入到工作簿。
参数:file
the absolute path to the file which the data are to be read from.
该数据要被读取的文件的绝对路径。
参数:sheetName
a character string with the sheet name.
工作表名称的字符串。
参数:col.names
a logical value indicating if the column names of x are to be written along with x to the file.
一个逻辑值,表示如果列名的x是要写入的文件随着x。
参数:row.names
a logical value indicating whether the row names of x are to be written along with x to the file.
一逻辑值,指示是否行名称x是要写入的文件随着x。
参数:append
a logical value indicating if x should be appended to an existing file. If TRUE the file is read from disk.
一逻辑值,表示如果x应附加到现有文件。如果TRUE的文件从磁盘中读取。
参数:...
other arguments to addDataFrame in the case of read.xlsx2.
其他参数addDataFrame的情况下,read.xlsx2。
Details
详细信息----------Details----------
This function provides a high level API for writing a data.frame to an Excel 2007 worksheet. It calls several low level functions in the process. Its goal is to provide the conveniency of write.csv by borrowing from its signature.
此功能提供了一个高层次的API写一个data.frameExcel 2007工作表。它调用几个低级别的功能,在这个过程中。它的目标是通过其签名的借款提供的方便性write.csv。
Internally, there is a double loop in R over all the elements of the data.frame so performance for very large data.frame may be an issue. Please report if you experience slow performance. Dates and POSIXct classes are formatted separately after the insertion. This also adds to processing time.
在内部,有一个双循环在Rdata.frame所以表现为非常大的data.frame可能是一个问题的所有元素。请报告,如果您遇到性能下降。分别日期和POSIXct类的格式后插入。这也增加了处理时间。
If x is not a data.frame it will be converted to one.
如果x是不是data.frame的,它会被转换为一个。
Function write.xlsx2 uses addDataFrame which speeds up the execution compared to write.xlsx by an order of magnitude for large spreadsheets (with more than 100,000 cells).
函数write.xlsx2这加快了执行速度相比,addDataFrame write.xlsx了一个数量级的大型试算表(超过10万个单元)。
(作者)----------Author(s)----------
Adrian Dragulescu
参见----------See Also----------
read.xlsx for reading xlsx documents. See also addDataFrame for writing a data.frame to a
read.xlsxxlsx文件。 addDataFrame写data.frame到
实例----------Examples----------
## Not run: [#不运行:]
file <- paste(tempdir(), "/usarrests.xlsx", sep="")
res <- write.xlsx(USArrests, file)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|