load_jamsession | R Documentation |
load an R session
load_jamsession( session, sessions_path = jamsession_paths()$sessions, save_date = NULL, envir = globalenv(), assign_session = TRUE, load_history = TRUE, do_window_title = TRUE, do_prompt = TRUE, verbose = TRUE, ... )
session |
character string corresponding to the |
sessions_path |
character vector of one or more file paths to search
for saved R sessions. When |
save_date |
optional character string with a specific date to
use when loading a session. This string is matched with
the |
envir |
|
assign_session |
logical whether to assign |
load_history |
logical whether to load the .Rhistory file for the R session, if available. |
do_window_title |
logical whether to update the device options
to define the title based upon the |
do_prompt |
logical whether to run
|
verbose |
logical whether to print verbose output. |
... |
additional arguments are passed to |
This function loads a previously-saved R session, loading the most
recently saved R session by the session
. It also by default
sets the R prompt using jamba::setPrompt()
, to indicate the
session
and help reinforce which R session is in the active
environment.
The default workflow is to load the R session into the R
workspace, that is envir=globalenv()
, because the target use
for load_jamsession()
is to call this function in a new,
empty R session in order to continue work on the saved
R session. In this case is the .Rhistory
file is also
available and load_history=TRUE
, it is loaded as well. Note
that loading R history will overwrite the previous active
R history.
However, when envir
is defined as something other than globalenv()
,
then the prompt is not altered, and the R session is
loaded into the specific environment. In this case the R history
is not loaded, even when load_history=TRUE
.
When assign_session=TRUE
this environment is assigned to a new object in globalenv()
so that it can be attached with attach()
.
invisible list of R object names loaded into the environment. One could use this vector of R object names to learn which R objects are stored in an R session, by creating a new environment, loading an R session into that environment, then inspecting the R object names.
Other jamsession sessions:
grep_jamsessions()
,
list_jamsessions()
,
save_jamsession()
,
show_session_versions()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.