readRDS {base}R Documentation

Internal Serialization Interface

Description

Internal functions for serialization. See serialize for public (but experimental) versions.

Usage

.saveRDS(object, file = "", ascii = FALSE, version = NULL,
         compress = TRUE, refhook = NULL)

.readRDS(file, refhook = NULL)

Arguments

object R object to serialize.
file a connection or the name of the file where the R object is saved to or read from.
ascii a logical. If TRUE, an ASCII representation is written; otherwise (default except for text-mode connections), a binary one is used. See the commnents in the help for save.
version the workspace format version to use. NULL specifies the current default version (2). Versions prior to 2 are not supported, so this will only be relevant when there are later versions.
compress a logical specifying whether saving to a named file is to use compression. Ignored when file is a connection. As from R 2.10.0 this is also allowed to be "bzip2" to specify that type of compression.
refhook a hook function for handling reference objects.

Details

Since these are internal, the file format is subject to change without notice. The current format is that of serialize, compressed as if by gzip if compress = TRUE.

The current internal-only versions of .readRDS if given an un-opened connection wrap it in gzcon and close it after use: this was undocumented and will change in R 2.13.0.

Value

For .readRDS, an R object.

For .saveRDS, NULL invisibly.


[Package base version 2.12.2 Index]