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

R语言 sessionTools包 restoreClassDefinitions()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 01:31:20 | 显示全部楼层 |阅读模式
restoreClassDefinitions(sessionTools)
restoreClassDefinitions()所属R语言包:sessionTools

                                         Restore Session Class Definitions
                                         恢复会话类定义

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

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

Restores the class definitions from an R binary file to the specified environment.
从R的二进制文件到指定的环境恢复的类定义。


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


restoreClassDefinitions(file = "session.RData", envir = .GlobalEnv, clean = TRUE, srcEnv)



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

参数:file
path to an R binary file  
路径的R的二进制文件


参数:envir
the environment into which the class definitions should be restored.  
环境类的定义应该恢复。


参数:clean
boolean indicating whether the environment should be purged of existing class definitions prior to restoring  
布尔值,指示环境是否应被清除现有的类定义之前恢复


参数:srcEnv
environment from which to restore class definitions. if this argument is provided the "file" arguments is ignored.  
环境恢复类的定义。如果这种说法是“文件”参数将被忽略。


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

This method is executed for it's side-effects.
执行该方法的副作用。


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



Matthew D. Furia <a href="mailto:matt.furia@sagebase.org">matt.furia@sagebase.org</a>

<a href="https://github.com/MattNapsAlot">https://github.com/MattNapsAlot</a>




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


## make some objects[#使一些对象。]
aMatrix <- diag(10)
letters <- c("a", "b", "c")

## save the session[#保存会话]
sessionFile <- tempfile(fileext=".rbin")
saveSession(list = ls(), file = sessionFile)

## create an environment where they can be restored[#创建一个环境,让他们可以恢复]
env <- new.env()

## define an S4 class[#定义一个S4级]
setClass("foo", where = env)

## restore the objects leaving "goo"[#恢复的对象离开“咕”]
restoreClassDefinitions(file = sessionFile, envir = env, clean = FALSE)
ls(env)

## restore the objects again, this time delete all objects from env first[#恢复的对象了,这一次删除所有对象ENV第一]
restoreClassDefinitions(file = sessionFile, envir = env, clean = TRUE)
ls(env)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-21 06:03 , Processed in 0.021801 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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