save-load-froth {froth}R Documentation

Save/Load froth Sessions

Description

Methods to preserve user-defined entries and variables.

Usage

saveFrothSession(file=NULL, ...)
loadFrothSession(file=NULL)

Arguments

file

Path to a file used for saving/loading

...

Additional arguments passed to saveRDS

Details

saveFrothSession saves current user-defined methods and variables within the Froth dictionary to the file specified. Built-in methods are loaded when the package is attached, so these aren't saved. Note that methods defined using froth.RDefine are currently not able to be saved.

loadFrothSession will restart the froth environment, which will erase any current user-defined methods and variables. It then loads the contents of the the file specified into the current Froth session.

Value

None. loadFrothSession will update internal froth stacks, and saveFrothSession will save to a file.

Author(s)

Aidan Lakshman ahl27@pitt.edu

Examples

  tf <- tempfile()
  froth.RDefine('rnorm', rnorm, 3L)
  saveFrothSession(tf)
  froth.reset()
  froth.parse("5 0 1 rnorm .s")
  # fr> rnorm ?

  loadFrothSession(tf)
  froth.parse("5 0 1 rnorm .s")

[Package froth version 1.1.0 Index]