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 |
list
is returned, with named elements
"sessions"
, "objects"
, and "functions"
.
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.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.)
Other jamsession utilities:
print_pkg_description()
#> $sessions #> [1] "~/Projects/R-sessions" #> #> $objects #> [1] "~/Projects/R-objects" #> #> $functions #> [1] "~/Projects/R-scripts" #>## Update the functions path jamsession_paths(functions="~/Projects/R-functions")#> $sessions #> [1] "~/Projects/R-sessions" #> #> $objects #> [1] "~/Projects/R-objects" #> #> $functions #> [1] "~/Projects/R-functions" #>#> $sessions #> [1] "~/Projects/R-sessions" #> #> $objects #> [1] "~/Projects/R-objects" #> #> $functions #> [1] "~/Projects/R-functions" #>#> [1] "~/Projects/R-functions"#> $sessions #> [1] "~/Projects/R-sessions" #> #> $objects #> [1] "~/Projects/R-objects" #> #> $functions #> [1] "~/Projects/R-scripts" #>