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

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

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

                                        Workbook data extraction & replacement operators
                                         工作簿的数据提取和更换运营商

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

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

Operators that allow to extract/replace data from/on a workbook.
运营商允许在workbook/提取/替换数据。


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

参数:x
The workbook object to use
workbook对象使用


参数:i
Name of worksheet ([, [<-) or name of Excel name ([[, [[<-) to extract or replace
工作表的名称([,[<-)或名称的Excel名称([[,[[<-)提取或替换


参数:j
Only used with [[<-: Optional formula to define the Excel name if it does not yet exist on the workbook.
只用[[<-:可选的公式来定义Excel名称,如果它还不存在的工作簿。


参数:drop
Not used
未使用


参数:value
Data object used for replacement
数据对象,用于更换


参数:...
Arguments passed to the corresponding underlying function to read/write the data
参数传递给相应的基本功能,读/写数据


Details

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

The workbook extraction operators are basically syntactic sugar for the common methods readWorksheet ([),  writeWorksheet ([<-), readNamedRegion ([[),  writeNamedRegion ([[<-).
该工作簿提取运营商基本上都是语法糖的常用方法readWorksheet([)writeWorksheet([<-)readNamedRegion([[) writeNamedRegion([[<-)。


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



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




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

workbook, readWorksheet, writeWorksheet, readNamedRegion, writeNamedRegion
workbook,readWorksheet,writeWorksheet,readNamedRegion,writeNamedRegion


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


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

# Write mtcars data set on a worksheet named 'mtcars1'.[写mtcars工作表上的数据集名为“mtcars1”。]
# Note: The 'mtcars1' sheet will be created automatically if it does[注:mtcars1表将自动创建它]
# not exist yet. Also, default values for other writeWorksheet arguments[还不存在。此外,默认值其他writeWorksheet参数]
# hold, i.e. the data set is written starting at the top left corner. [持有,即在左上角开始的数据集被写入。]
wb["mtcars1"] = mtcars

# Write mtcars data set on a worksheet named 'mtcars2'.[写mtcars工作表上的数据集名为“mtcars2”。]
# Again, the 'mtcars2' worksheet is created automatically.[同样,“mtcars2”工作表中自动创建的。]
# Additionally specify arguments passed to the underlying method[另外指定参数传递的基本方法]
# writeWorksheet.[writeWorksheet。]
wb["mtcars2", startRow = 6, startCol = 11, header = FALSE] = mtcars

# Read worksheets 'mtcars1' and 'mtcars2'.[阅读工作表mtcars1和mtcars2。]
# Note: The default arguments hold for the underlying method[注:默认参数的基本方法持有]
# readWorksheet.[readWorksheet。]
wb["mtcars1"]
wb["mtcars2"]

# Write mtcars data set to a named region named 'mtcars3'. Since[写mtcars设定到命名区域名为“mtcars3”,的数据。自]
# it doesn't exist yet we also need to specify the formula to[它不存在,但我们也需要指定的公式]
# define it. Also note that the sheet 'mtcars3' referenced in the[定义它。还要注意的是的表“mtcars3”中引用的]
# formula does not yet exist - it will be created automatically![公式中不存在 - 它会自动创建的!]
# Moreover, default values for other writeNamedRegion arguments hold.[此外,其他writeNamedRegion参数保持默认值。]
wb[["mtcars3", "mtcars3!$B$7"]] = mtcars

# Redefine named region 'mtcars3'. Note that no formula specification[重新命名的区域的mtcars3“。需要注意的是没有公式规范]
# is required since named region is already defined (see above example).[是必需的,因为已经定义命名区域(见上面的例子)。]
wb[["mtcars3"]] = mtcars

# Write mtcars data set to a named region 'mtcars4'. Since the named[写mtcars,以一个命名区域mtcars4“的数据集。由于命名]
# region does not yet exist a formula specification is required. Also,[区域尚不存在的公式规范要求。另外,]
# additional arguments are specified that are passed to the underlying[指定了额外的参数传递给底层]
# method writeNamedRegion.[方法writeNamedRegion。]
wb[["mtcars4", "mtcars4!$D$8", rownames = "Car"]] = mtcars

# Read the named regions 'mtcars3' and 'mtcars4'.[阅读命名区域mtcars3和mtcars4。]
# Note: Default values hold for the underlying method readNamedRegion.[注:默认值保持的基本方法readNamedRegion的的。]
wb[["mtcars3"]]
wb[["mtcars4"]]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-24 20:41 , Processed in 0.025462 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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