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
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/loadDirectory.R
\name{loadDirectory}
\alias{loadDirectory}
\title{Load all non-child objects in a directory}
\usage{
loadDirectory(dir, redirect.action = c("from", "to", "both"))
}
\arguments{
\item{dir}{String containing a path to a staging directory.}
\item{redirect.action}{String specifying how redirects should be handled:
\itemize{
\item \code{"to"} will report an object at the redirection destination, not the redirection source.
\item \code{"from"} will report an object at the redirection source(s), not the destination.
\item \code{"both"} will report an object at both the redirection source(s) and destination.
}}
}
\value{
A named list is returned containing all (non-child) R objects in \code{dir}.
}
\description{
\emph{WARNING: this function is deprecated, use \code{\link{listObjects}} and loop over entries with \code{\link{readObject}} instead.}
As the title suggests, this function loads all non-child objects in a staging directory.
All loading is performed using \code{\link{altLoadObject}} to respect any application-specific overrides.
Children are used to assemble their parent objects and are not reported here.
}
\examples{
tmp <- tempfile()
dir.create(tmp)
library(S4Vectors)
df <- DataFrame(A=1:10, B=LETTERS[1:10])
meta <- stageObject(df, tmp, path="whee")
writeMetadata(meta, tmp)
ll <- list(A=1, B=LETTERS, C=DataFrame(X=1:5))
meta <- stageObject(ll, tmp, path="stuff")
writeMetadata(meta, tmp)
redirect <- createRedirection(tmp, "whoop", "whee/simple.csv.gz")
writeMetadata(redirect, tmp)
all.meta <- loadDirectory(tmp)
str(all.meta)
}
\author{
Aaron Lun
}
|