RDT storage files {Rgb} | R Documentation

## Single refTable object storage

### Description

Functions to write a single `refTable` object to a file, and to restore it.

### Usage

      saveRDT(object, file, compress = "gzip", compression_level = 6)
      readRDT(file, version = FALSE)

### Arguments

`object` | An object of class `refTable` to store.
`file` | A connection or the name of the file where the R object is saved to or read from. The '.rdt' file extension is recommended, but not mandatory.
`compress` | To be passed to `save`
`compression_level` | To be passed to `save`
`version` | Single logical value, whether to return the stored object or the version of the package used to store it.

### Details

These functions mimic the `saveRDS` and `saveRDS` system, without storing the class definition in the file (which can lead to about 100 useless Ko of data and longer loading times). It is intented to manage all classes extending `refTable`, but no guarantee is provided for classes with non-atomic slots (particularly environment-derived ones).

### Value

`saveRDT` returns nothing, `readRDT` returns the object stored in the file or a single character value (depends on the `version` argument).

### Note

To avoid whole-environment copying, environments of `function` slots are discarded.

### Author(s)

Sylvain Mareschal

### See Also

`refTable-class`, `saveRDS`, `saveRDS`

[Package Rgb version 1.6.1 Index]