list_objects | R Documentation |
list saved R objects
list_objects( objects_path = jamsession_paths()$objects, most_recent = FALSE, object_prefix = "", object_suffix = "[.]RData$", add_stats = FALSE, ... )
objects_path |
character vector of one or more file paths to
search for saved R objects. When |
most_recent |
logical whether to return only the most recent
saved entry for each session name. When |
object_prefix, object_suffix |
|
add_stats |
|
... |
additional arguments are ignored. |
This function lists saved R objects for the given objects_path
,
usually called by grep_objects()
.
When most_recent=TRUE
it returns only the most recent version
of each file.
It is possible to supply multiple file paths using the
argument objects_path
, in which case all objects are returned
for all directories, then they are sorted by save_date
.
The input objects_path
is stored as an ordered factor, such
that two files with the same save_date
will still be ordered
consistent with the input directories in objects_path
.
In this case, when most_recent=TRUE
there will be one entry
returned per object
name, and the first entry will be the
most recent entry ordered by save_date
then objects_path
.
In practice, it is recommended to use one objects_path
location, but this option exists.
For example, load_object(grep_objects("my_favorite_object"))
will load the most recent object by save_date
where any
ties prefer the order in objects_path
. Similarly,
load_object("my_favorite_object")
does the same thing,
without the grep_patten search step.
list containing
data.frame
of R objects
vector
of matching R object names
Other jamsession objects:
grep_objects()
,
load_object()
,
save_object()
# by default the full list includes all past versions head(list_objects()); # you can return only the most recent for each object list_objects(most_recent=TRUE); # add_stats makes sense when most_recent=TRUE list_objects(most_recent=TRUE, add_stats=TRUE);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.