list available R functions for jamsession
Usage
list_functions(
functions_path = jamsession_paths()$functions,
most_recent = FALSE,
function_prefix = "",
function_suffix = "_functions[.]R$",
return_type = c("df", "functions", "list"),
...
)Arguments
- functions_path
characterwith default usingjamsession_paths()$functions, with file paths to search for matching files with suffix'_functions.R'.- most_recent
logicaldefault FALSE, whether to return only the most recent file per unique functions name.- function_prefix, function_suffix
characterstring used as regular expression patterns searching files infunctions_path. Default uses no prefix, and suffix'_functions.R'.- return_type
characterdefault 'df' with type of object to return.'df': returns
data.frame'functions': returns
charactervector of functions names.'list': returns
listwith both the above.
- ...
additional arguments are ignored.
Value
data.frame by default, each row is a matching functions file,
with rownames defined using 'functions' and 'save_date'.
The rows are sorted by 'days_old', 'functions', then 'functions_path'
by default.
Output with
return_type='functions'is acharactervector of functions file names.Output when
return_type='list'is alistwith the two components above, named 'functions_df' and 'functions', respectively.
Details
This function lists available R functions for jamsession,
in the given functions_path.
Available functions are defined by files with suffix
'_functions.R'.
It is possible to supply multiple file paths using the
argument functions_path. All functions are returned,
sorted by save_date, then by the order of functions_path.
So a file saved on the same date will be returned by first
entry in functions_path.
When using most_recent=TRUE, only the first entry is returned
for each unique value in the 'functions' column,
ordered by 'save_date' and 'functions_path'.
See also
Other jamsession internals:
clean_jamsession_name(),
fileInfo(),
list_jamsessions(),
list_objects(),
print_pkg_description()
Examples
# by default the full list includes all past versions
head(list_functions());
#> functions save_date days_old file_size
#> shinycat_15oct2025 shinycat 15oct2025 33 24.1 kb
#> salmontsspergene_22sep2025 salmontsspergene 22sep2025 56 13.1 kb
#> theo_31jul2025 theo 31jul2025 109 5.57 kb
#> deeptools_22jul2025 deeptools 22jul2025 118 3.49 kb
#> functions_path
#> shinycat_15oct2025 C:/Users/james.ward/Documents/Projects/R-scripts
#> salmontsspergene_22sep2025 C:/Users/james.ward/Documents/Projects/R-scripts
#> theo_31jul2025 C:/Users/james.ward/Documents/Projects/R-scripts
#> deeptools_22jul2025 C:/Users/james.ward/Documents/Projects/R-scripts
#> functions_file
#> shinycat_15oct2025 shinycat_functions.R
#> salmontsspergene_22sep2025 salmontsspergene_functions.R
#> theo_31jul2025 theo_functions.R
#> deeptools_22jul2025 deeptools_functions.R
# you can return only the most recent for each function
list_functions(most_recent=TRUE);
#> functions save_date days_old file_size
#> shinycat_15oct2025 shinycat 15oct2025 33 24.1 kb
#> salmontsspergene_22sep2025 salmontsspergene 22sep2025 56 13.1 kb
#> theo_31jul2025 theo 31jul2025 109 5.57 kb
#> deeptools_22jul2025 deeptools 22jul2025 118 3.49 kb
#> functions_path
#> shinycat_15oct2025 C:/Users/james.ward/Documents/Projects/R-scripts
#> salmontsspergene_22sep2025 C:/Users/james.ward/Documents/Projects/R-scripts
#> theo_31jul2025 C:/Users/james.ward/Documents/Projects/R-scripts
#> deeptools_22jul2025 C:/Users/james.ward/Documents/Projects/R-scripts
#> functions_file
#> shinycat_15oct2025 shinycat_functions.R
#> salmontsspergene_22sep2025 salmontsspergene_functions.R
#> theo_31jul2025 theo_functions.R
#> deeptools_22jul2025 deeptools_functions.R