bsave: Save and combine (gather) results from batched R sessions

View source: R/save-gather.r

bsaveR Documentation

Save and combine (gather) results from batched R sessions

Description

bsave() is run from R; its companion function is to be run through the command line via gather, which is located in Dropbox/bin.

Usage

bsave(res, suffix = "")

Arguments

res

Results to save

suffix

By default, files are named 'tmp1.rds', 'tmp2.rds', and so on. If suffix='a', then files will be named 'tmp1-a.rds', 'tmp2-a.rds', etc. gather will then save results to '2018-11-07-a.rds'.

Examples

# These examples are illustrative; for working examples, see Dropbox/bin/test

A <- rnorm(100)

# If run interactively
# bsave(A)        # Saves to 2019-06-14.rds
# bsave(A, "A")   # Saves to 2019-06-14-A.rds

# If run in batch (with a number as first command line argument)
# bsave(A)        # Saves to tmp1.rds; gathered to 2019-06-14.rds
# bsave(A, "A")   # Saves to tmp1-A.rds; gathered to 2019-06-14-A.rds


pbreheny/breheny documentation built on April 26, 2024, 10:40 a.m.