jamsession_paths | R Documentation |
jamsession file paths
jamsession_paths( sessions = NULL, objects = NULL, functions = NULL, create = FALSE, mode = "0755", recursive = TRUE, verbose = FALSE, ... )
sessions, objects, functions |
character vector with one or more
file directory path locations, suitable for use by |
create |
logical indicating whether to create a file path
that does not already exist. The directory is created using
|
mode, recursive |
arguments passed to |
verbose |
logical indicating whether to print verbose output. |
... |
additional arguments are passed to |
This function retrieves the file path for each jamsession type:
"sessions"
- the folder where R sessions are saved,
this path is also stored in getOption("jam.sessions_path")
.
"objects"
- the folder where R objects are saved,
this path is also stored in getOption("jam.objects_path")
.
"functions"
- the folder where R functions are saved,
this path is also stored in getOption("jam.functions_path")
.
To use custom file paths in each R session, use either ~/.Rprofile
or an appropriate method to define the relevant options:
options("jam.sessions_path"="/some/specific/path/sessions")
,
options("jam.objects_path"="/some/specific/path/objects")
,
options("jam.functions_path"="/some/specific/path/functions")
.
When a file path is not defined in options()
, the corresponding
default path is used:
"sessions"
uses default "~/Projects/R-sessions"
"objects"
uses default "~/Projects/R-objects"
"functions"
uses default "~/Projects/R-scripts"
(Note ~
refers to the home directory, which may also be defined
by $HOME
depending upon the computer operating system, for
example linux, Mac OSX, or Microsoft Windows.)
list
is returned, with named elements
"sessions"
, "objects"
, and "functions"
.
Other jamsession utilities:
print_pkg_description()
## Display the current or default paths c(jamsession_paths(functions=NULL)) ## Update the functions path jamsession_paths(functions="~/Projects/R-functions") ## confirm the functions path has been updated c(jamsession_paths()) getOption("jam.functions_path") ## Revert the functions path c(jamsession_paths(functions="~/Projects/R-scripts"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.