File: quickLoadObject.Rd

package info (click to toggle)
r-bioc-alabaster.base 1.6.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 1,652 kB
  • sloc: cpp: 11,377; sh: 29; makefile: 2
file content (52 lines) | stat: -rw-r--r-- 1,646 bytes parent folder | download | duplicates (2)
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/quickLoadObject.R
\name{quickLoadObject}
\alias{quickLoadObject}
\alias{readLocalObject}
\alias{saveLocalObject}
\alias{quickStageObject}
\title{Convenience helpers for handling local directories}
\usage{
quickLoadObject(dir, path, ...)

quickStageObject(x, dir, path, ...)
}
\arguments{
\item{dir}{String containing a path to the directory.}

\item{path}{String containing a relative path to the object of interest inside \code{dir}.}

\item{...}{Further arguments to pass to \code{\link{loadObject}} (for \code{quickLoadObject}) or \code{\link{stageObject}} (for \code{quickStageObject}).}

\item{x}{Object to be saved.}
}
\value{
For \code{quickLoadObject}, the object at \code{path}.

For \code{quickStageObject}, the object is saved to \code{path} inside \code{dir}.
All necessary directories are created if they are not already present.
A \code{NULL} is returned invisibly.
}
\description{
\emph{WARNING: these functions are deprecated as the saving/reading functions are already simple enough in the newer versions of the \pkg{alabaster} framework.}
Read and write objects from a local staging directory.
These are just convenience wrappers around functions like \code{\link{loadObject}}, \code{\link{stageObject}} and \code{\link{writeMetadata}}.
}
\examples{
local <- tempfile()

# Creating a slightly complicated object:
library(S4Vectors)
df <- DataFrame(A=1:10, B=LETTERS[1:10])
df$C <- DataFrame(D=letters[1:10], E=runif(10))

# Saving it:
quickStageObject(df, local, "FOOBAR")

# Reading it back:
quickLoadObject(local, "FOOBAR")

}
\author{
Aaron Lun
}