找回密码
 注册
查看: 538|回复: 0

R语言 XLConnect包 writeNamedRegion-methods()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 23:30:50 | 显示全部楼层 |阅读模式
writeNamedRegion-methods(XLConnect)
writeNamedRegion-methods()所属R语言包:XLConnect

                                        Writing named regions to a workbook
                                         编写命名区域的一个工作簿

                                         译者:生物统计家园网 机器人LoveR

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

Writes named regions to a workbook.
将命名区域的一个workbook。


用法----------Usage----------


## S4 method for signature 'workbook,ANY'
writeNamedRegion(object,data,name,header,rownames)



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

参数:object
The workbook to use
workbook使用


参数:data
Data to write
要写入的数据


参数:name
Name of the named region to write to
命名区域的名称写


参数:header
Specifies if the column names should be written. The default is TRUE.
指定的列名应写。默认的TRUE。


参数:rownames
Name (character) of column to use for the row names of the provided data object. If specified, the row names of the data object (data.frame) will be included as an additional column with the specified name. If rownames = NULL (default), no row names will be included.
名称(character)用于提供data对象的行的名称的列。如果指定的行名的数据对象(data.frame)将包含一个额外的列具有指定名称。如果rownames = NULL(默认),则没有行名称将被列入。


Details

详细信息----------Details----------

Writes data to the named region specified by name. Note that data is assumed to be a data.frame and is coerced to one if this is not already the case. The argument header specifies if the column names should be written. Note also that the arguments are vectorized and as such multiple named regions can be written with one call. In this case data is assumed to be a list of data objects (data.frame's).
写data指定的name命名的区域。需要注意的是data被认为是一个data.frame,这是不是已经被强制为1。参数header指定的列名应写。还请注意,参数的矢量,并作为这样的多个区域可以被写入的一个调用。在这种情况下data被假定为一个列表的数据对象(data.frame的)。


注意----------Note----------

Named regions are automatically redefined to the area occupied by the written cells. This guarantees that the complete set of data can be re-read using readNamedRegion. Also, this allows the named region just to be defined as the top left cell to be written to. There is no need to know the exact size of the data in advance.<br><br> When writing data to Excel, writeNamedRegion further applies cell styles to the cells as defined by the workbook's "style action" (see setStyleAction).
命名区域自动重新定义,以通过书面的单元占据的面积。这一套完整的数据重新读取readNamedRegion担保。此外,这允许命名区域被定义为被写入到左上角的单元格。有没有需要的数据提前知道确切的尺寸。<br> <br>当写入数据到Excel,writeNamedRegion还适用的单元格的单元格样式所定义的workbook的“风格的动作”(见setStyleAction“)。


(作者)----------Author(s)----------



Martin Studer<br>
Mirai Solutions GmbH <a href="http://www.mirai-solutions.com">http://www.mirai-solutions.com</a>




参考文献----------References----------

http://www.officearticles.com/excel/named_ranges_in_microsoft_excel.htm<br> How to create named regions/ranges?<br> http://www.youtube.com/watch?v=iAE9a0uRtpM

参见----------See Also----------

workbook, writeWorksheet, appendNamedRegion, appendWorksheet, readNamedRegion, readWorksheet, writeNamedRegionToFile
workbook,writeWorksheet,appendNamedRegion,appendWorksheet,readNamedRegion,readWorksheet,writeNamedRegionToFile


实例----------Examples----------


# Load workbook (create if not existing)[负载工作簿(如果不存在创建)]
wb <- loadWorkbook("writeNamedRegion.xlsx", create = TRUE)

# Create a worksheet named 'mtcars'[创建一个工作表命名为“mtcars]
createSheet(wb, name = "mtcars")

# Create a named region called 'mtcars' on the sheet called 'mtcars'[创建一个命名的区域被称为“mtcars在纸张上被称为”mtcars“]
createName(wb, name = "mtcars", formula = "mtcars!$A$1")

# Write built-in data set 'mtcars' to the above defined named region[内置的数据集mtcars上述定义的命名区域写]
# (using header = TRUE)[(使用header = TRUE)]
writeNamedRegion(wb, mtcars, name = "mtcars")

# Save workbook (this actually writes the file to disk)[保存工作簿(这实际上是将文件写入到磁盘)]
saveWorkbook(wb)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

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

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-24 17:09 , Processed in 0.022045 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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