MINI MINI MANI MO
%
% Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
%
\name{ore.save}
\alias{ore.save}
\title{
Oracle R Enterprise 数据存储保存函数
}
\description{
将 \R 对象保存到用户 Oracle 数据库方案中的数据存储。
}
\usage{
ore.save(..., list = character(0),
name = stop("parameter 'name' must be specified"),
grantable = FALSE,
envir = parent.frame(), overwrite = FALSE, append = FALSE,
description = character(0),
envAsEmptyenv = getOption("ore.envAsEmptyenv", FALSE))
}
\arguments{
\item{...}{
要保存的 \R 对象的名称 (符号或
字符串)。
}
\item{list}{
包含要保存的 \R 对象名称的字符向量。
}
\item{name}{
指定在其中保存 \R 对象的数据存储名称的
字符串。
}
\item{grantable}{
一个标量逻辑值, 指定是否创建一个可以将其
读取权限授予其他用户的新数据存储。
在与参数 \code{grantable} 或 \code{overwrite} 一起使用时, 忽略
参数 \code{append}。
}
\item{envir}{
在其中搜索要保存的 \R 对象的环境。
}
\item{overwrite}{
一个用于指定是否覆盖数据存储 (如果数据存储
已存在) 的逻辑值。
}
\item{append}{
一个用于指定是否将 \R 对象附加到数据存储的
逻辑值。
}
\item{description}{
一个包含用作数据存储注释的不超过 2000 个
字符的字符串。
}
\item{envAsEmptyenv}{
一个逻辑值, 该值指示在串行化期间是否
应将要保存的 \R 对象中的引用环境
替换为空环境。如果为 \code{TRUE}, 则将
对象中的引用环境替换为
其父级为 \code{.GlobalEnv} 的空环境, 因此,
原始引用环境中的内容将不串行化和
保存到数据库中。在某些情况下, 这可能会
显著减少已保存对象的大小。如果为
\code{FALSE}, 引用环境中的内容
将串行化并保存, 并且可在调用 \code{ore.load} 时
反串行化并加载到内存中。默认值
由全局选项 \code{ore.envAsEmptyenv} 控制。
}
}
\details{
函数 \code{ore.save} 将 \R 对象 (来自参数 \code{...} 或
在参数 \code{list} 逐项列出供检索) 从环境
\code{envir} 保存到用户 Oracle 数据库方案的
参数 \code{name} 指定的数据存储中。将忽略参数
\code{list} 中引用的不存在 \R 对象。如果参数
\code{list} 中指定的 \R 对象在环境 \code{envir} 中不存在,
则函数将引发错误。
默认情况下, \R 对象保存到具有指定
\code{name} 的新数据存储。参数 \code{overwrite} 和 \code{append} 可用于
将 \R 对象保存到现有数据存储, 但只有其中之一可以
为 \code{TRUE}。
可以通过参数 \code{description} 将注释添加到数据存储。
}
\references{
\href{http://www.oracle.com/technetwork/database/database-technologies/r/r-enterprise/documentation/index.html}{Oracle R Enterprise}
}
\author{
Oracle \email{oracle-r-enterprise@oracle.com}
}
\seealso{
\code{\link{ore.load}},
\code{\link{ore.delete}},
\code{\link{ore.datastore}},
\code{\link{ore.datastoreSummary}}
\code{\link[OREbase]{ore.options}}
}
\examples{
if (any(sapply(c("x", "y", "z"), exists)))
stop("object x, y, or z exists")
x <- stats::runif(20)
y <- list(a = 1, b = TRUE, c = "oops")
z <- ore.push(x)
# save all objects in the current workspace environment to
# a datastore with name 'rq$ds_1' in the user's schema
ore.save(list=ls(), name="rq$ds_1")
# overwrite existing datastore rq$ds_1 with object x, y in
# the current workspace environment
ore.save(x, y, name="rq$ds_1", overwrite=TRUE)
# add object z in the current workspace environment to
# the existing datastore rq$ds_1
ore.save(z, name="rq$ds_1", append=TRUE)
ore.delete(name="rq$ds_1")
rm(x, y, z)
}
\keyword{datastore}
\keyword{database}
\keyword{ORE}
OHA YOOOO