Satchel: Carry around your data

Description Usage Format Initialization Methods Examples

Description

Carry around your data

Usage

1

Format

An object of class R6ClassGenerator of length 24.

Initialization

satchel <- Satchel$new("<namespace>", "<path/to/satchel>")

Methods

methods:

Examples

 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
## Not run: 
# create a new satchel stored as namespace f1 in the dir data/derived
satchel <- Satchel$new("f1", "../data/derived/satchel")
satchel$save(Theoph)
# new file at ../data/derived/satchel/f1/Theoph.rds

# we can also give the files other names
satchel$save(Theoph, data_name = "other")
satchel$save(Theoph, data_name = "another")

# to see all objects saved during the session can check the report
satchel$report()

# can see data from any satchel dir by checking what is available
satchel$available()

# lets say in another file I had saved a file nca_summaries in an nca_analysis namespace
# satchel is smart enough to scan all folders for that file
nca_summaries <- satchel$use("nca_summaries")

# if it finds a conflict, you must explicitly specify which namespace it was saved under
nca_summaries <- satchel$use("nca_summaries", "nca_analysis")



## End(Not run)

dpastoor/satchel documentation built on May 15, 2019, 1:23 p.m.