Consider grep_functions()
to be consistent with grep_jamsessions()
and grep_objects()
.
The save_object()
mechanism should allow saving multiple objects,
similar to saving an R session with a corresponding "objectlist.txt"
file with the objects saved.
New idea: optionally check objects for size before saving session? If any objects are greater than 500MB it could exit with a warning.
max_objectsize=500*1024*1024
General idea is to store the list of R objects in its own file to help search for R objects within a stored R session.
save_jamsession()
- argument save_objectlist=TRUE
enables saving
the list of Robjects using file extension defined by
objectlist_suffix=".objectlist.txt"
.save_jamsession()
should allow underscore and not convert to hyphen/dash: "-"
.
some method to decide whether to save environment objects, default TRUE currently.
prune_jamsessions()
- utility to delete old versions of jam session files.
prune_objects()
- utility to delete old versions of R object files.grep_functions()
- utility to search functions_path and list available files.
Bonus points for listing functions defined? Probably easier to import.
refresh_functions_for_package()
- same as refresh_functions()
except it
creates a folder with proper package structure that can be used in an R package.
Generally need a better mechanism to store a few R objects in a file. Currently the R object names are concatenated to produce the output filename.
save_jamsession()
objects to exclude or include
exclude object names by pattern and/or vector of object names
include only a defined vector of object names
exclude object classes (e.g. environments)
check virtual package name for direct conflicts with names of fully installed R packages
warn/stop if virtual package would conflict and thus override an installed R package
New functions to round out the workflow:
list_functions()
- list all stored functions
grep_functions()
- grep list of functions for keywordsconsider associating notes to an R session?
"useful R script(s) associated with this session"
Is it possible to grep stored functions for the name of a specific function?
grep_function_name()
- search by function name
easiest method: Parse the .R
file for specific pattern
"^[a-zA-Z0-9_]+[ ]*<-[ ]*function"
This pattern matches
all function-compatible names starting on a new line that are
immediately followed by <- function
on the same line.more involved: load all functions .R
files as temporary packages,
this process would be too slow for routine searches across all .R
files.
most involved: process to "index" functions .R
files:
.R
file, perhaps
by running jamba::jargs()
or storing formals()
for each function..R
file would
need to be loaded as a virtual R package in order to inspect
the contents. This alternative runs this process only once
per .R
file.Create a new index, or update an existing index when:
.R
file.R
fileDocument the use of object_notes_list
argument.
Consider returning object notes with load_object()
as a
proper R object for review.
Mechanism to "describe" objects in an objects RData file. If someone searches for R-objects RData files by name, how would they know what's inside?
currently when multiple objects are stored in one RData
file, the filename is the set of objects separated by
hyphen "-"
.
jamba::sdim()
to describe
size and class of all objectsjamba::sdim()
on that environmentThis step will be slow for very large RData files, but it will work.
Possible to save jamba::sdim()
in a separate index,
to prevent having to reload the full RData file to read its contents.
Is there any R method to read contents of an RData file without loading/parsing the entire RData file?
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.