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

R语言:library.dynam()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 19:58:10 | 显示全部楼层 |阅读模式
library.dynam(base)
library.dynam()所属R语言包:base

                                        Loading DLLs from Packages
                                         从包中载入的DLL

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

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

Load the specified file of compiled code if it has not been loaded already, or unloads it.
加载指定的文件编译的代码,如果它没有被加载了,或卸载它。


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


library.dynam(chname, package = NULL, lib.loc = NULL,
              verbose = getOption("verbose"),
              file.ext = .Platform$dynlib.ext, ...)

library.dynam.unload(chname, libpath,
              verbose = getOption("verbose"),
              file.ext = .Platform$dynlib.ext)

.dynLibs(new)



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

参数:chname
a character string naming a DLL (also known as a dynamic shared object or library) to load.
一个字符串命名的DLL(又称作为动态共享对象或库)来载入。


参数:package
a character vector with the names of packages to search through, or NULL.  By default, all packages in the search path are used.
与特征向量的套件名称来搜索,或NULL。默认情况下,用于在搜索路径中的所有包。


参数:lib.loc
a character vector describing the location of R library trees to search through, or NULL.  The default value of NULL corresponds to all libraries currently known to .libPaths().
字符向量描述R库树的位置,通过搜索,或NULL。默认值NULL.libPaths()目前已知的所有库。


参数:libpath
the path to the loaded package whose DLL is to be unloaded.
DLL被卸载,装包,其路径。


参数:verbose
a logical value indicating whether an announcement is printed on the console before loading the DLL.  The default value is taken from the verbose entry in the system options.
一个逻辑值,指明是否公布之前加载DLL的控制台上打印。默认值是系统options详细条目。


参数:file.ext
the extension (including . if used) to append to the file name to specify the library to be loaded.  This defaults to the appropriate value for the operating system.
扩展(包括.如果使用)追加到文件名指定要加载的库。这默认的操作系统适当的值。


参数:...
additional arguments needed by some libraries that are passed to the call to dyn.load to control how the library and its dependencies are loaded.
一些传递给调用dyn.load控制如何加载库和它的依赖库所需要的额外参数。


参数:new
a list of "DLLInfo" objects corresponding to the DLLs loaded by packages.  Can be missing.
"DLLInfo"对象相应的包所加载的DLL列表。可缺少的。


Details

详情----------Details----------

See dyn.load for what sort of objects these functions handle.
dyn.load什么样的对象排序这些功能的手柄。

library.dynam is designed to be used inside a package rather than at the command line, and should really only be used inside .onLoad.  The system-specific extension for DLLs (e.g., ".so" or ".sl" on Unix-alike systems, ".dll" on Windows) should not be added.
library.dynam设计一个包内,而不是在命令行使用,应该真的只有里面.onLoad。为DLL的系统特定的扩展名(例如,.so或.slUnix相似的系统,“.dll在Windows上)不应该是补充说。

If ... does not include a named argument DLLpath, dyn.load is called with DLLpath set to the package's "libs" directory.  See the “Windows” section of the help on dyn.load for how to control where dependent DLLs are found.
如果...不包括命名参数DLLpath,dyn.load与DLLpath设置包的libs目录调用。请参阅“Windows”帮助dyn.load如何控制依赖DLL被发现。

library.dynam.unload is designed for use in .onUnload: it unloads the DLL and updates the value of .dynLibs()
library.dynam.unload设计使用.onUnload:卸载DLL和更新的的.dynLibs()价值

.dynLibs is used for getting (with no argument) or setting the DLLs which are currently loaded by packages (using library.dynam).
.dynLibs获得(不带参数)或设置包(使用library.dynam)这是目前加载的DLL。

lib.loc should contain absolute paths: versions of R prior to 2.12.0 may get confused by relative paths.
lib.loc应包含绝对路径:R版本2.12.0之前,可能会得到相对路径相混淆。

Using the defaults for package or lib.loc is deprecated, not least because they will not give work as intended from .onLoad.
package或lib.loc被弃用,而不是至少使用默认值,因为他们不会放弃工作,作为拟从.onLoad。


值----------Value----------

If chname is not specified, library.dynam returns an object of class "DLLInfoList" corresponding to the DLLs loaded by packages.
如果chname没有被指定,library.dynam类"DLLInfoList"相应的包所加载的DLL返回一个对象。

If chname is specified, an object of class "DLLInfo" that identifies the DLL and which can be used in future calls is returned invisibly.  Note that the class "DLLInfo" has a method for $ which can be used to resolve native symbols within that DLL.
如果chname指定一个类的对象"DLLInfo"标识DLL和可用于在未来的呼叫返回无形。注意类"DLLInfo"$可以用来解决该DLL内的本地符号的方法。

library.dynam.unload invisibly returns an object of class "DLLInfo" identifying the DLL successfully unloaded.
library.dynam.unload无形返回一个类的对象"DLLInfo"确定DLL成功卸载。

.dynLibs returns an object of class "DLLInfoList" corresponding corresponding to its current value.
.dynLibs类"DLLInfoList"相应的对应其当前值返回一个对象。


警告----------Warning----------

Do not use dyn.unload on a DLL loaded by library.dynam: use library.dynam.unload to ensure that .dynLibs gets updated.  Otherwise a subsequent call to library.dynam will be told the object is already loaded.
不使用dyn.unload对library.dynam加载一个DLL:使用library.dynam.unload,.dynLibs得到更新。否则后续调用library.dynam会被告知已加载的对象。

Note that whether or not it is possible to unload a DLL and then reload a revised version of the same file is OS-dependent: see the "Value" section of the help for  dyn.unload.
请注意,是否有可能卸载DLL,然后重新装入一个相同的文件的修订版本是OS相关的:看到“价值”帮助部分dyn.unload。


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

The New S Language. Wadsworth & Brooks/Cole.

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

getLoadedDLLs for information on "DLLInfo" and "DLLInfoList" objects.
getLoadedDLLs"DLLInfo"和"DLLInfoList"对象的信息。

.onLoad, library, dyn.load, .packages, .libPaths
.onLoad,library,dyn.load,.packages,.libPaths

SHLIB for how to create suitable DLLs.
SHLIB如何创造合适的DLL。


举例----------Examples----------


## Which DLLs were dynamically loaded by packages?[#的DLL动态加载的包吗?]
library.dynam()

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-24 19:19 , Processed in 0.036459 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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