MINI MINI MANI MO
%
% Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
%
\name{ore.load}
\alias{ore.load}
\title{Oracle R Enterprise Datastore Loading Function}
\description{
Loads \R objects from a datastore in the user's Oracle Database schema.
}
\usage{
ore.load(name, list = character(0), owner, envir = parent.frame())
}
\arguments{
\item{name}{
A character string specifying the name of the datastore.
}
\item{list}{
An optional character vector containing the names of the \R objects
within the datastore to load. If this argument is not specified,
then all of the \R objects within the datastore will be loaded.
}
\item{owner}{
An optional character string specifying the owner of the datastore to load.
If the owner of the datastore is not the current user, the read privilege
for the datastore must be granted to the current user by
\code{\link{ore.grant}}; otherwise \code{\link{ore.load}} errors out.
If the \code{owner} argument not specified, the default value is
the current user.
}
\item{envir}{
The environment into which the \R objects are to be loaded.
}
}
\details{
Functions \code{\link{ore.save}} and \code{ore.load} operate together
in a similar manner to functions \code{\link[base]{save}} and
\code{\link[base]{load}} from the \pkg{base} package. Whereas the
\code{\link[base]{save}} and \code{\link[base]{load}} functions save
and load \R objects to and from an external file, the
\code{\link{ore.save}} and \code{ore.load} functions save and load \R
objects from a datastore.
}
\value{
Function \code{ore.load} returns a character vector specifying the
names of the \R objects that are loaded from the datastore to
environment \code{envir}.
}
\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.save}},
\code{\link{ore.delete}},
\code{\link{ore.datastore}},
\code{\link{ore.datastoreSummary}},
\code{\link{ore.lazyLoad}}
\code{\link{ore.grant}}
\code{\link{ore.revoke}}
}
\examples{
if (any(sapply(c("x", "y", "z", "e"), exists)))
stop("object x, y, z, or e 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")
rm(x, y, z)
# load all objects from datastore rq$ds_1 to current workspace
ore.load(name = "rq$ds_1")
ls()
# load x and y from datastore rq$ds_1 to environment e
e <- new.env()
ore.load(name = "rq$ds_1", list = c("x", "y"), envir = e)
ls(envir = e)
# clean up
ore.delete(name = "rq$ds_1")
rm(x, y, z, e)
}
\keyword{datastore}
\keyword{database}
\keyword{ORE}
OHA YOOOO