File: readBaseList.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 (47 lines) | stat: -rw-r--r-- 1,762 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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/readBaseList.R
\name{readBaseList}
\alias{readBaseList}
\alias{loadBaseList}
\title{Read a base list from disk}
\usage{
readBaseList(path, metadata, simple_list.parallel = TRUE, ...)
}
\arguments{
\item{path}{String containing a path to a directory, itself created with the list method for \code{\link{stageObject}}.}

\item{metadata}{Named list containing metadata for the object, see \code{\link{readObjectFile}} for details.}

\item{simple_list.parallel}{Whether to perform reading and parsing in parallel for greater speed.
Only relevant for lists stored in the JSON format.}

\item{...}{Further arguments to be passed to \code{\link{altReadObject}} for complex child objects.}
}
\value{
The list represented by \code{path}.
}
\description{
Read a \link{list} from its on-disk representation.
This is usually not directly called by users, but is instead called by dispatch in \code{\link{readObject}}.
}
\details{
The \pkg{uzuki2} specification (see \url{https://github.com/ArtifactDB/uzuki2}) allows length-1 vectors to be stored as-is or as a scalar.
If the file stores a length-1 vector as-is, \code{readBaseList} will read the list element as a length-1 vector with the \link{AsIs} class.
If the file stores a length-1 vector as a scalar, \code{readBaseList} will read the list element as a length-1 vector without this class.
This allows downstream users to distinguish between the storage modes in the rare cases that it is necessary.
}
\examples{
library(S4Vectors)
ll <- list(A=1, B=LETTERS, C=DataFrame(X=letters))

tmp <- tempfile()
saveObject(ll, tmp)
readObject(tmp)

}
\seealso{
\code{"\link{stageObject,list-method}"}, for the staging method.
}
\author{
Aaron Lun
}