The jamsession package is based upon the notion of central storage of R sessions, R objects, and R scripts, to facilitate re-use and to minimize the time spent task-switching across analysis projects.
Details
The methods subscribe to my personal priority for writing R functions, at least make my own life easier! These functions make my analysis life more efficient, as I know I can retrieve an R session from a project from several years ago. If I want to re-use an R object from an R session, I have a mechanism to do so that scales reasonably well. If I realize that I munged some data from a week ago, I can go back and reload my R session from a week ago.
The R session mechanism also changes the R prompt to include the project name, which I have found immensely helpful when multiple active R sessions are open, and I need to remember which is which.
The basic units in jamsession:
- session
An .RData file based upon a project name, saved alongside the Rhistory, in a central location. One can discover a past R session with
grep_jamessions("array950")and load withload-jamsession(grep_jamsessions("array950")).- object
An .RData file which contains only one R object, intended to be saved and possibly re-used in a separate R session. Objects can be discovered using
grep_objects("hg19refgene")and loaded withload_object("hg19refGene").- function
An .R file which contains custom R functions related to a specific project, but have not yet warranted being rolled into their own R package yet. Such functions can be loaded or refreshed with
refresh_functions(project). The reason to store functions separately and load via this mechanism is that the functions can often encapsulate logic too complex to run in a live R console, and to keep function code out of the R.GlobalEnvto save space. The mechanism here will load functions into their own R environment, whose parent environment is .GlobalEnv to allow functions to be in the usual R function search space.
Author
Maintainer: James M. Ward jmw86069@gmail.com (ORCID) [copyright holder]