File: loadObject.Rd

package info (click to toggle)
r-cran-r.utils 2.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,864 kB
  • sloc: sh: 18; makefile: 6
file content (53 lines) | stat: -rw-r--r-- 1,451 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
% 
%  loadObject.R
% 
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\name{loadObject}
\alias{loadObject.default}
\alias{loadObject}

\title{Method to load object from a file or a connection}

\description{
  Method to load object from a file or a connection, which previously have been saved using \code{\link{saveObject}}().
}

\usage{
\method{loadObject}{default}(file, path=NULL, format=c("auto", "xdr", "rds"), ...)
}

\arguments{
 \item{file}{A filename or \code{\link[base:connections]{connection}} to read the object from.}
 \item{path}{The path where the file exists.}
 \item{format}{File format.}
 \item{...}{Not used.}
}

\value{
 Returns the saved object.
}

\details{
  The main difference from this method and \code{\link[base]{load}}() in the
  \pkg{base} package, is that this one returns the object read rather
  than storing it in the global environment by its default name.
  This makes it possible to load objects back using any variable name.
}

\author{Henrik Bengtsson}

\seealso{
  \code{\link{saveObject}}() to save an object to file.
  Internally \code{\link[base]{load}}() is used.
  See also \code{\link{loadToEnv}}().
  See also \code{\link[base]{saveRDS}}().
}



\keyword{programming}
\keyword{IO}