writeInterface(SSOAP)
writeInterface()所属R语言包:SSOAP
Serialize generated interface to a file
序列化生成的接口文件
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function allows the user to take a programmatically generated interface such as with genSOAPClientInterface and write the code to a file for inclusion in an R package or to be source'd into a different R session.
此功能允许,用户genSOAPClientInterface的,如生成的接口和编程的代码写入到文件列入R包,或将不同的R会话sourced。
Note that this is not essential. One can save the interface generated by genSOAPClientInterface in RDA format and then use load that into a different R session, potentially on a different machine, and the interface will work as is.
请注意,这是没有必要的。一个可以save所产生的接口genSOAPClientInterface RDA中的格式,然后使用load到一个不同的R会话,可能在不同的机器,界面将工作是。
用法----------Usage----------
writeInterface(iface, file = stdout(), where = globalenv())
参数----------Arguments----------
参数:iface
the interface object created via a call to genSOAPClientInterface
接口对象调用genSOAPClientInterface通过创建
参数:file
the name of the file to which to write the code.
的文件,编写代码的名称。
参数:where
the position or package name used to find the class definitions associated with this interface. This is passed to getClass.
位置或包名找到这个接口的类的定义。这是传递getClass的。
Details
详情----------Details----------
Currently, this has to handle deparseing S4 objects directly. Also, it undoes the use of environments within the functions to store the "cached" information about the operation and the SOAP server location. Instead, it adds these as explicit parameters and to the body of the code.
目前,这有直接处理deparseingS4对象。此外,它撤销的环境内使用的功能,存储的“缓存”的操作和SOAP服务器的位置信息。相反,它增加了这些明确的参数和代码的身体。
值----------Value----------
This function is used for its side effect of writing content in the specified file
此功能用于其写作内容的副作用,在指定的file
作者(S)----------Author(s)----------
Duncan Temple Lang
参见----------See Also----------
genSOAPClientInterface processWSDL
genSOAPClientInterfaceprocessWSDL
举例----------Examples----------
w = processWSDL(system.file("examples", "KEGG.wsdl", package = "SSOAP"))
iface = genSOAPClientInterface(w)
f = tempfile()
writeInterface(iface, f)
source(f)
## Not run: [#无法运行:]
db = list_databases()
class(db)
class(db[[1]])
## End(Not run)[#结束(不运行)]
z = processWSDL(system.file("WSDLs", "wsGoBioSpace.asmx.WSDL", package = "SSOAP"), port = 1)
iface = genSOAPClientInterface(z)
f = tempfile()
writeInterface(iface, f)
source(f)
a = GetAdducts()
d = GetDepositors()
session = CreateSession(DepositorIds = c(3, 6, 8), AdductIds = c(2L, 3L))
sm = SearchMass12C(SessionID = session, mass = 579.1705, tolerance = 0.001)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|