loadConnection: Save/Load an ImmuneSpaceConnection object from disk

View source: R/utils.R

loadConnectionR Documentation

Save/Load an ImmuneSpaceConnection object from disk

Description

Connection can hold a lot of data in cache. If a lot of work has been done (e.g: lots of downloaded datasets and gene-expression matrices), it can be useful to save the connection for later work or even offline use.

Usage

loadConnection(file)

saveConnection(con, file)

Arguments

file

The file name to be saved to or loaded from

con

An ImmuneSpaceConnection. The connection to save to file. To be loaded later using loadConnection.

Value

An ImmuneSpaceConnection object

Examples

# Sample saved connection with pre-downloaded expression matrices and datasets
saved <- system.file("extdata/saved_con.rds", package = "ImmuneSpaceR")
new_con <- loadConnection(saved)
new_con
names(new_con$cache)
## Not run: 
saveConnection(new_con, tempfile())

## End(Not run)


RGLab/ImmuneSpaceR documentation built on Jan. 5, 2023, 10:24 a.m.