Learn R Programming

froth (version 1.1.0)

save-load-froth: Save/Load froth Sessions

Description

Methods to preserve user-defined entries and variables.

Usage

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

Value

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

Arguments

file

Path to a file used for saving/loading

...

Additional arguments passed to saveRDS

Author

Aidan Lakshman ahl27@pitt.edu

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.

Examples

Run this code
  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")

Run the code above in your browser using DataLab